0
0

i have a usb 1gb stick that is in addition to the 2gb internal memory on my in car product. I can stream movies in .com object and MP3’s in fmod quiet successfully, however if i remove the stick while playing, fmod say finished file, but then refuses to open any other files on that stream and returns with the file not loaded message. Any idea whats going on or a poss work around? Code included below
Thanks
Greg.

[code:wcw1te36]
void Audio_music(char *s)
{
if(!cmfd.data.data_str.ignition)
{
debug(TEXT("Not playing music, ignition off\r\n"));
return;
}
EnterAudio();
debug(TEXT("Audio Music %S\r\n"),s);
timeout=10;
if(!audio_init)
init_audio();

strncpy(current_song,s,120);

/* if(quietmode)
{
LeaveAudio();
return;
}
*/
if(streammusic!=NULL)
{
FSOUND_Stream_Stop(streammusic);
FSOUND_Stream_Close(streammusic);
streammusic=NULL;
streamchanmusic=-1;
}
streammusic = FSOUND_Stream_Open(s, FSOUND_16BITS | FSOUND_SIGNED | FSOUND_STEREO , 0,0);
if(!streammusic)
{
LeaveAudio();
debug(L"File not loaded\r\n");
return;
}
audio_musicstopped=0;

streamchanmusic=FSOUND_Stream_PlayEx(FSOUND_FREE, streammusic,dryunit,0);
FSOUND_SetPaused(streamchanmusic,0);
FSOUND_SetVolume(streamchanmusic,settings_struct.koran_volume);
FSOUND_DSP_SetActive( FSOUND_DSP_GetFFTUnit(), TRUE ); 
tot_musicduration=FSOUND_Stream_GetLengthMs(streammusic);
LeaveAudio();

}
[/code:wcw1te36]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.