void cdAudio_Stop() { stopping = true; debug(LOG_SOUND, "called, cdStream=%p", static_cast<void *>(cdStream)); if (cdStream) { sound_StopStream(cdStream); cdStream = nullptr; sound_Update(); } }
void cdAudio_Stop() { stopping = true; debug(LOG_SOUND, "called, cdStream=%p", cdStream); if (cdStream) { sound_StopStream(cdStream); cdStream = NULL; sound_Update(); } }
void cdAudio_Stop() { #if !defined(WZ_NOSOUND) stopping = true; debug(LOG_SOUND, "called, cdStream=%p", cdStream); if (cdStream) { sound_StopStream(cdStream); cdStream = NULL; sound_Update(); } #else debug(LOG_SOUND, "called"); #endif }
void audio_Update() { //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vector3f playerPos; float angle; AUDIO_SAMPLE *psSample, *psSampleTemp; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // if audio not enabled return true to carry on game without audio if ( g_bAudioEnabled == false ) { return; } #ifndef WZ_NOSOUND alGetError(); // clear error codes #endif audio_UpdateQueue(); #ifndef WZ_NOSOUND alGetError(); // clear error codes #endif // get player position playerPos = audio_GetPlayerPos(); audio_Get3DPlayerRotAboutVerticalAxis(&angle); sound_SetPlayerPos(playerPos); sound_SetPlayerOrientation(angle); // loop through 3D sounds and remove if finished or update position psSample = g_psSampleList; while ( psSample != NULL ) { // remove finished samples from list if ( psSample->bFinishedPlaying == true ) { psSampleTemp = psSample->psNext; audio_RemoveSample( &g_psSampleList, psSample ); free(psSample); psSample = psSampleTemp; } // check looping sound callbacks for finished condition else { if ( psSample->psObj != NULL ) { if ( audio_ObjectDead(psSample->psObj) || (psSample->pCallback != NULL && psSample->pCallback(psSample->psObj) == false) ) { sound_StopTrack( psSample ); psSample->psObj = NULL; } else { // update sample position { audio_GetObjectPos( psSample->psObj, &psSample->x, &psSample->y, &psSample->z ); #ifndef WZ_NOSOUND sound_SetObjectPosition(psSample); #endif } } } // next sample psSample = psSample->psNext; } } sound_Update(); return; }