0
0

hi,

i experience some strange glitch under linux 64
i use alsa2 1.0.12 stable

here is my init:
[quote:28v2p6mo]
FMOD::System_Create(&system1);
result = system1->setOutput(FMOD_OUTPUTTYPE_ALSA);
ERRCHECK(result);
result = system1->setSpeakerMode(FMOD_SPEAKERMODE_MAX);
ERRCHECK(result);
result = system1->setDSPBufferSize(INIT_BUFFER_SIZE,INIT_BUFFER_NUM); // 64 , 2
ERRCHECK(result);
result = system1->setSoftwareFormat(OUTPUT_RATE, FMOD_SOUND_FORMAT_PCM24,FMOD_SPEAKERMODE_MAX,1,FMOD_DSP_RESAMPLER_LINEAR);
ERRCHECK(result);
result = system1->init(64, FMOD_INIT_NORMAL, 0);
ERRCHECK(result);
[/quote:28v2p6mo]
sometime when i open a file to play (mp3, flac, ogg, aiff, wav …) the playeur read the file very fast without sound (i see my time indicator and scroll barre moving very fast).
this problem occure often for a rreason i don’t know.

sometime it happen at the opening of a file, and sometime while playing after a while, sound stop and the file is read very fast.

I do not use streaming for the moment.

here is how i open a file to play:

[quote:28v2p6mo]
if (m_filename.length() > 0)
file = new QFile(m_filename);
if (file && file->exists()) {
result = system1->createSound( (const char *)m_filename , FMOD_SOFTWARE|FMOD_ACCURATETIME|FMOD_2D, 0, &sound1);
ERRCHECK(result);
result = system1->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel1);
ERRCHECK(result);
result = system1->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel2);
ERRCHECK(result);

[/quote:28v2p6mo]

what can be the problem ?

PS: if i redo the init (after releasing system) it will not always crash the same way. If i do the init only one time as the program start, and if it crash it will never recover and play normaly untile i restart the prog.

  • You must to post comments
0
0

I did some test, and it appear that the crash is effectivly a system crash.

i try with stream buy creating 2 stream (of one file) for 2 different channel, and when the crash occure, both channel act the same way (read the stream very fast without sound).

only a system re-creation can cure the problem

i did the same with an AMD64 with an M-audio 1010LT sound card. Then with a Pentium double core (64bit, forget the name of cpu) with an internal AC97 card. In both case crash occure.

i tried with and without DSP effect (equalizers …) with the same results.

In all test i need real time so i set 64 frame and 2 buffers (there is no click noise…)

I realy don’t see what might be the problem, please Help.
😥

  • You must to post comments
0
0

the bug occure after this, even if there is no sound playing :

[quote:3q57pg62]
result = system1->setSoftwareFormat(OUTPUT_RATE/96000/, FMOD_SOUND_FORMAT_NONE, FMOD_SPEAKERMODE_MAX,2,FMOD_DSP_RESAMPLER_NOINTERP);
ERRCHECK(result);
result = system1->init(16, FMOD_INIT_NORMAL, 0);
ERRCHECK(result);[/quote:3q57pg62]

the CPU usage is 100%.

  • You must to post comments
0
0

is this a dead end ?

  • You must to post comments
0
0

we’ll look into trying to repro on our linux 64 box and see what we get.

  • You must to post comments
0
0

by the way you should write to support@fmod.org if you want fast turnaround on support not the forum. We can then send you versions to test and try and debug the issue on your side if we can’t repro it on this end (likely considering the variety of linux distros and code quality)

  • You must to post comments
0
0

Have you tried running the examples that come with the FMOD API? are you having any problems with them? If they work fine for you, you could try starting with the playsound example and modifying it with some of your code until you experience your issue.

Just looking at your code now, I noticed you are setting the DSP buffer size extremely small, the default is 1024 samples, with 4 buffers. Trying to use such a small buffer size could be causing you problems.

Also I have noticed you are setting the speaker mode to FMOD_SPEAKERMODE_MAX, this setting only signifies the the maximum value in the speaker mode enumeration, and not the maximum number of speakers your system supports. You should set this to your actual speaker setup.

  • You must to post comments
0
0

i was on holydays…

i set the value very low because i need very low latency, i was testing some other lib now because low latency is the key point for my application, and could never reach something usable with fmod (under 3ms between input and output with effect)
I just think fmod is not designed for such usage. It is a pity cause now i use faster but under documented libs …

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.