Skip to content

Instantly share code, notes, and snippets.

@MasseGuillaume
Created April 26, 2012 15:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save MasseGuillaume/2500530 to your computer and use it in GitHub Desktop.
Loop audio with FMOD
void Radio::playTrack( string fileTrack )
{
systeme_->createStream( fileTrack.c_str(), FMOD_ACCURATETIME, false, &sound_ );
systeme_->playSound( FMOD_CHANNEL_FREE, sonRadio_, false, &channel_ );
}
void Radio::update()
{
bool playing = false;
if( channel_ ->isPlaying(&playing) != FMOD_OK )
{
return;
}
if( playing )
{
return;
}
playNext();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment