0
0

Hi, i’m trying to get audio data in PCM 16 bites, 2 channels format from all kind of audio media (e.g. 8bit, mono). I’m getting data using readData function.
I though specifing (in c#)
[code:vrzt42pn]
system.setSoftwareFormat(48000, FMOD.SOUND_FORMAT.PCM16, 2, 0, FMOD.DSP_RESAMPLER.LINEAR);
[/code:vrzt42pn]

should be enough but the output is unchanged (e.g mono input will result in mono output)

Is there any way how to specify raw data output format?

  • You must to post comments
0
0

setSoftwareFormat specifies the playback mode. It has nothing to do with readData.

If you want a universal format you will have to convert them yourself from the readdata function.

I guess another way is to rip the output stream using a fake nosound playback routine, that would be done with System::setOutput(FMOD_OUTPUTTYPE_NOSOUND_NRT)

then you load the sound, call playsound on it, then rip the output using a dsp callback, or maybe you could use FMOD_OUTPUTTYPE_WAVWRITER_NRT which outputs a .wav file.

These 2 output modes will yes, convert to the format you specified in setSoftwareFormat.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.