void plWin32StreamingSound::IDerivedActuallyPlay( void ) { fStopping = false; if( !fReallyPlaying ) { for(;;) { if(fSynchedStartTimeSec) { // if we are synching to another sound this is our latency time fDSoundBuffer->SetTimeOffsetSec((float)(hsTimer::GetSeconds() - fSynchedStartTimeSec)); fSynchedStartTimeSec = 0; } if(IsPropertySet(kPropIncidental)) { if(fIncidentalsPlaying >= MAX_INCIDENTALS) break; ++fIncidentalsPlaying; } fDSoundBuffer->Play(); fReallyPlaying = true; break; } } /// Send start callbacks plSoundEvent *event = IFindEvent( plSoundEvent::kStart ); if( event != nil ) event->SendCallbacks(); }
void plWin32GroupedSound::IDerivedActuallyPlay( void ) { // Ensure there's a stop notify for us if( !fReallyPlaying ) { fDSoundBuffer->Play(); fReallyPlaying = true; } plSoundEvent *event = IFindEvent( plSoundEvent::kStart ); if( event != nil ) event->SendCallbacks(); }
void plWin32StaticSound::IDerivedActuallyPlay( void ) { // Ensure there's a stop notify for us if( !fReallyPlaying ) { for(;;) { if(IsPropertySet(kPropIncidental)) { if(fIncidentalsPlaying >= MAX_INCIDENTALS) break; ++fIncidentalsPlaying; } fDSoundBuffer->Play(); fReallyPlaying = true; break; } } plSoundEvent *event = IFindEvent( plSoundEvent::kStart ); if( event != nil ) event->SendCallbacks(); }