0
0

Hi 😀

I would like to know if there’s any way to get the data of any file (MP3, OGG, etc) in the PCM format with FMOD. I want to make a program to convert audio files to a custom audio format so I need the PCM data.

Thanks.

  • You must to post comments
0
0

I found that I can do it using FSOUND_Sample_Lock.

I have a few simple doubts:

1- Is there any way to get the size in bytes, without calculating using "Length * SampleSize * NumChannels"?

2- The samples are stored in the buffer as 8-bit or 16-bit, or just as 16-bit?

  • You must to post comments
0
0

You’ve proabably figured this out already…

If not, hope this helps.

getLength()
returns various lengths (bytes, milliseconds, samples…)

sound->getLength(&numBytes, FMOD_TIMEUNIT_PCMBYTES);

getFormat()
returns the sound format which can be 16 bit (little endian formati, -32768 to +32768) or one of the other FMOD_SOUND_FORMAT_ enumerated types.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.