[Lazarus] Soliciting help with next tutoring project, playing sounds and music

José Mejuto joshyfun at gmail.com
Wed May 8 09:52:12 CEST 2019


El 07/05/2019 a las 22:30, Anthony Walter escribió:
> Jose,
> 
> Thank you for the suggestion. I've used both BASS and FMOD extensively 
> in the past. Those library are for playing sounds from files or streams 
> using their abstracted concepts of channels. What I am looking for is 
> something a bit more primitive, and that is manipulating sample sounds 
> through a series of functions, which is something both of those are not 
> suitable for. That is I need to be able to extract a section of an mp3 
> or wav file and convert it to left and right audio samples (in my case a 
> pair of SmallInt values) at a given samples per second. Then that buffer 
[...]

Hello,

I suggested BASS to decode audio files and get a raw PCM audio, not to 
play it directly. Raw PCM in a WAV file is almost trivial to read but 
mp3 and others are too complex and you always be dependent of a external 
.DLL/.so, many times with their own dependencies.

Of course, you can use, in example, ffmpeg command line program to 
convert any mp3/ogg/whatever to raw PCM files and use them from a 
"cache" of decompressed PCM files.

-- 



More information about the lazarus mailing list