I’m putting together a litle mp3 player app, although whenever I try to play a stream (mp3 or wav) the output is very distorted. The first 0.5 seconds plays about 8 times, then the next 0.5 seconds plays about 8 times, and so on. A bit like if what happens if a system is put under extremly heavy load when playing a sound – it plays the same thing over and over for a few moments (soundcard buffer underrun???). (Hmmm… describing sounds aint easy…). The same happens with the ‘stream’ sample program (so it’s not my retarded coding!). I’ve tried various flags for the FSOUND_Stream_OpenFile() function, and tried loading the mp3 into memory before streaming, but have had no luck. Also tried values for FSOUND_SetBufferSize form 50 to 2000. The ‘simple’ sample program works fine, and I can play mp3s fine using other apps like xmms. The system is not under a heavy load (1 to 10% CPU usage).
Any ideas what the problem is and how to fix it?
Programming with gcc under SuSE Linux 7.2, kernel 2.4.4. Using fmod 3.6 with SB Live! Player 1024 sound card. Athlon 1GHz, 256Mb RAM.
Thanks in advance for any help/suggestions,
- andrewsmith asked 14 years ago
Just tried setting FSOUND_Stream_SetBufferSize to 1000, 2000 and even 10000 but it had no effect :o(
Futher Info: this distortion occurs continiously throughout the whole media file, not just at the beginning. Also, distiortion occurs with both long clips (full songs) and short clips (e.g., the jules.mp3 sample file).
Any other suggestions?
Please login first to submit.