0
0

System

Gentoo Linux
Alsa 1.0.6
fmod 3.74 , 3.74.1
Kernel : 2.6.9-r13
Sound Card Driver : VIA 8235
FileSystem : Raiserfs

Code

[code:1b12iay0]
MP3Player::MP3Player(void)
{
_current = NULL;
_status = Idle;
if(!FSOUND_Init(44100,5,FSOUND_INIT_ACCURATEVULEVELS))
{
cout<<"Faild To Init FSOUND"<<endl;
return;
}
#ifdef WIN32
FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND);
#else
FSOUND_SetOutput(FSOUND_OUTPUT_ALSA);
#endif
FSOUND_DSPUNIT * tmp = FSOUND_DSP_GetFFTUnit();
if(tmp == NULL)
return;
else
FSOUND_DSP_SetActive(tmp,true);
}
[/code:1b12iay0]

[code:1b12iay0]
void MP3Player::Play(size_t num)
{
_currentNum = num;
_status = Idle;
if(num > _list.size())
{
cout<<"Could Not Play File :: FileList Reached"<<endl;
return;
}
this->Stop();
_current = FSOUND_Stream_Open(_list[num].FileName.c_str(),FSOUND_MPEGACCURATE,0,0);
if(_current == NULL)
{
cout<<"Faild To Start "<<_list[num].FileName<<" :: Load Filed"<<endl;
return;
}
if(FSOUND_Stream_Play(0,_current) == -1)
cout<<"Faild To Start "<<_list[num].FileName<<" :: Play Faild"<<endl;
_status = Playing;
}
[/code:1b12iay0]

Problem

Works Fine On Windows XP, But On Linux The Sound Plays At Twice The Speed And There Are Some Clicking Sounds.
Same Problem On Both fmod versions.

I Have Tested

Changing The Frequency ( FSOUND_SetFrequency() )
Changing Stream Buffer Size ( FSOUND_Stream_SetBufferSize )
Changing Mixer Buffer Size ( FSOUND_SetBufferSize )

// Other Apps Using Alsa Works Fine

  • You must to post comments
0
0

Recompiled The Kernel Without Alsa.
Added OSS instead.

Problem Solved… Got the Idé from.
[url]
http://opensource.creative.com/pipermai … 00499.html[/url]

  • You must to post comments
0
0

I had the same problem (Stream playback too fast on Linux). So I downloaded the new version (3.74.1) and compiled my program using the new library. But I still have the problem.

Can it be another reason or is there still an ALSA-Driver problem?

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.