Created
April 26, 2012 15:51
-
-
Save MasseGuillaume/2500530 to your computer and use it in GitHub Desktop.
Loop audio with FMOD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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