public ISoundPlayback Play(OpenALSound sound, bool looping) { if (m_playback != null && !m_playback.Stopped) { m_playback.Stop(); } m_playback = new OpenALSoundPlayback(this, sound, looping); return(m_playback); }
public OpenALSoundPlayback(OpenALSoundSource source, OpenALSound sound, bool looping) { m_source = source; m_sound = sound; m_looping = looping; m_rate = 1.0f; m_volume = 1.0f; m_complete = false; AL.Source(m_source.ALSource, ALSourcei.Buffer, (int)sound.ALBuffer); AL.Source(m_source.ALSource, ALSourceb.Looping, looping); App.CheckOpenALError(); UpdateSpeed(); UpdateVolume(); }