public ALSource() { _sourceHandle = AL.GenSource(); ALHelper.CheckLastError(); Initialize(); }
public override void Dispose() { if (!_disposed) { AL.DeleteBuffer(BufferHandle); ALHelper.CheckLastError(); _disposed = true; } }
internal ALSound(WaveAudio waveAudio) { WaveAudio = waveAudio; BufferHandle = AL.GenBuffer(); ALHelper.CheckLastError(); AL.BufferData(BufferHandle, ALHelper.GetSoundFormat(WaveAudio.WaveInfo.Channels, WaveAudio.WaveInfo.BitDepth), ref WaveAudio.WaveData[0], WaveAudio.WaveData.Length, WaveAudio.WaveInfo.SampleRate); ALHelper.CheckLastError(); Duration = WaveAudio.Duration; }