Hello everyone!
I’ve created a GUI interface for MOC and would like to share my work as well as invite anyone interested to discuss or collaborate on the project.
Originally, the program was developed for use on a small touchscreen and was designed for playing audio files stored on the device. However, it has since undergone significant changes, gained additional functionality, and has now become my primary audio player on PC.
I had noticed for a while that playback of certain WAV files would make moc crash for me. This only happened in conjunction with JACK playback, and only for certain (short?) files.
A server dump would look like this:
As libsamplerate is using too much CPU at the best quality, I replaced it by Soxr. The developper of Soxr has written an implementation using the libsamplerate API (libsoxr-lsr), so first I just linked to libsoxr-lsr and it worked. CPU usage decreases, but you have to keep the libsamplerate options in the config file, which is weird if you say you use soxr. So I modified the code to use only the soxr API.
this is all based on a partially done C++ port and I removed a lot of things to get that done faster, so I don't know how useful this is to anybody else, but for whatever it's worth, code is on GitHub and the changes are:
I wrote a quick tool that connects to the socket, and does "stuff" when events happen.
I'm playing with using it like this:
To display an OSD that shows current time in the song, and to post a notification whenever the music state changes.
You could use it to do other things quite easily.
I created the mocevents.c file in the source tree, and did: