I’m interested in making my own music player in OCaml so I wanted to know whether there were any existing ones and/or examples of how to make one.
Bear in mind, I am interested in the actual logic of how to read a music file (or a playlist) and listening to it, rather than the front-end part of a music player.
(My knowledge of OCaml is intermediate)
Thank you in advance
You want to check https://github.com/savonet/liquidsoap
I experimented with several solutions in the playo project.
One of the possible solutions is to use ocaml-gstreamer.
If you find that the gstreamer framework is too annoying (which I can understand :-), you can use ocaml-ffmpeg. note however that, in the latest version of ocaml-ffmpeg, the audio device output no longer works. To overcome this drawback, you can use ocaml-portaudio.