0
0

Hi all,

I would like to use the fmod library to decode streams (mp3, ogg vorbis) and send me the decoded PCM samples, because i want to use my own output (can be waveout, dsound, disk writer, etc etc).

I did that:
[code:2putd279]
FSOUND_SetOutput(FSOUND_OUTPUT_NOSOUND);
FSOUND_SetMixer(FSOUND_MIXER_QUALITY_MMXP5);
FSOUND_Init(44100, 32, FSOUND_INIT_GLOBALFOCUS);

DSP_Unit = FSOUND_DSP_Create(input_fmod_get_pcm_samples, FSOUND_DSP_DEFAULTPRIORITY_USER, (int)input);

if (!DSP_Unit)
return (EXIT_FAILURE);

FSOUND_DSP_SetActive(DSP_Unit, TRUE);
[/code:2putd279]

And I use the DSP callback to get the pcm samples. Is it the good way ?
But FMOD seems to have builtin timer, and doesnot decode stream as fast as possible. By example, if I want to decode 10 s of sound before hearing it (i have a 10s buffer), it will take 10s to decode (but my ahtlon 2000+ can do it in somes ms 😉 ).

Did you understand my pb ? Excuse my english …
Thanks in advance,
Kyser

  • You must to post comments
0
0

You can speed up the decoding by using a stream callback on the stream you want to process, and then increase the frequency with FSOUND_SetFrequency.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.