0
0

Hi,

I’m running in to a problem where if I use fmod to play back an mp3 stream, the sound will get heavily distorted. Sometimes it happens immediately and sometimes it takes a few seconds.

My FMOD code is simple:

[code:b35w3glc]
FSOUND_Init(44100, 32, 0);
stream = FSOUND_Stream_OpenFile(argv[1], FSOUND_2D | FSOUND_8BITS | FSOUND_MONO | FSOUND_MPEGACCURATE, 0);
id = FSOUND_Stream_Play(FSOUND_FREE,stream);
while (FSOUND_IsPlaying(id))
usleep(1000000);
[/code:b35w3glc]
The problem is more easily reproduced if I have several “top” instances running (with refresh rates of <= 1 second). I’ve tried it on two different sound cards (sblive and vortex 2) with the same results, although it is much easier to reproduce on the sblive.

I’ve fiddled with buffer sizes and other options without much success.

What can I do about this?

System Stats:
sys 1: P3/1000, sblive, RH 7.3, RH kernel 2.4.18-5
NVIDIA GF2 (with NVIDIA drivers)
sys 2: P2/333, vortex 2, RH 7.1, RH kernel 2.4.9-34
NVIDIA TNT2 (with standard Xfree drivers)

Thanks,

  • jq
  • You must to post comments
0
0

Yes the sound stutters but there is also fizzing noise. It mainly seems to happen when the system is under load, such as that induced by “top” or my game. The distortion continues after the load is removed.

I’ve tried different buffer sizes, and the problem is somewhat reduced with larger buffer sizes (500-1000ms), but it is still apparent.

  • You must to post comments
0
0

The redhat kernels don’t use ALSA, so probably fmod is using OSS. In fact if I tell it to use Alsa explicitly using setoutput, it just crashes when I try to play an mp3.

I tried updating my emu10k1 drivers to the latest at sourceforge, but it didn’t help.

One other way I’ve found to reproduce it is to start up my 3d accelerated opengl game and switch between fullscreen and windowed mode while the music is playing. There is a momentary hitch/skip while the X server switches modes, that is expected, but then the distortion starts after that. Anyway that game is going to be released soon so if other users report the same problem (or don’t), that might shed some light on the issue.

Maybe it is just a problem with the soundcard, or driver or kernel or something. 😥

  • You must to post comments
0
0

Hey Brett,

A beta version of the linux game is released, and some people have reported the same problem on their systems. If I send you the download links, do you think you’d have time to test it out? You’ll need a working 3D accelerated glibc 2.2 based system to use it.

Please let me know. Thanks

  • You must to post comments
0
0

I get exactly the same problem :( . I’m using OSS and I hear clicks, hisses or some kind of distortion… The problem increases when I switch between desktops or I open more windows under X (doing the same with mpg123 causes no trouble 😕 ). I also tried changing the buffer size with no luck. Could it be some kind of low processor priority?? Is there any way to increase fmod’s priority?
Any ideas?? please tell me… thanks

  • You must to post comments
0
0

Yes, I called it before the Init function.
What size of buffer should I use?

  • You must to post comments
0
0

I’ve noticed that the problem increases when I play mp3 streams with variable bitrates.
Are there any problems with fmod playing whis type of streams?

  • You must to post comments
0
0

The new fmod 3.6 release fixed that bug!!
THANKS FMOD!!!!

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.