mpf-mc icon indicating copy to clipboard operation
mpf-mc copied to clipboard

Add support for loop points to sounds

Open qcapen opened this issue 4 years ago • 1 comments

Both .ogg and .wav files support tags that define looping points within audio files (ex: LOOPSTART and LOOPLENGTH). These particular points in the sample are used when the file played back and is looping (rather than the beginning and end points of the sample). The sdl_mixer library is used in the MC for sound loading to memory and final mix output to hardware. The sdl_mixer loading code does support some loop tags, however this data is internal to sdl_mixer and is not exposed via the api. This makes it extremely unlikely we can automatically support the loading of these tags. However, loop points could be added to the sound config manually and used to control the looping of in memory sounds so the functionality of the loop points would be supported in the MC (just not the automatic loading from the files themselves).

qcapen avatar Jun 05 '20 13:06 qcapen

It is possible a utility could be created using gstreamer to extract the loop points from the files and create a config snippet for the sound containing the loop points since gstreamer does have the ability to extract tag metadata from most audio file formats.

qcapen avatar Jun 05 '20 13:06 qcapen