virtual void Run() { while ( !g_Audio.FInitialized ) {} clPtr<AudioSource> Src = new AudioSource(); Src->BindWaveform( new OggProvider( LoadFileAsBlob( "test.ogg" ) ) ); // TODO: try Src->BindWaveform( new ModPlugProvider( LoadFileAsBlob( "test.it" ) ) ); Src->Play(); FPendingExit = false; double Seconds = Env_GetSeconds(); while ( !IsPendingExit() ) { float DeltaSeconds = static_cast<float>( Env_GetSeconds() - Seconds ); Src->Update( DeltaSeconds ); Seconds = Env_GetSeconds(); } Src = NULL; g_Audio.Exit( true ); exit( 0 ); }
virtual void Run() { while ( !g_Audio.FInitialized ) {} clPtr<AudioSource> Src = new AudioSource(); Src->BindWaveform( new WavProvider( LoadFileAsBlob( "test.wav" ) ) ); Src->Play(); while ( Src->IsPlaying() ) {} Src = NULL; g_Audio.Exit( true ); exit( 0 ); }