Beispiel #1
0
        private void BeginWav(WAVData wavData, string volumeGroup, string startGroup)
        {
            var buffer        = AL.GenBuffer();
            var currentSource = GenSourceWithVolume(volumeGroup);

            var soundFormat = wavData.SoundFormat;

            AL.BufferData(buffer, soundFormat, wavData.Data, wavData.Data.Length, wavData.Rate);

            AL.Source(currentSource, ALSourcei.Buffer, buffer);

            this.Play(currentSource, () => { AL.DeleteBuffer(buffer); }, false, null, startGroup);
        }
Beispiel #2
0
 public void WavPlay(WAVData wavData, string volumeGroup = AudioEngine.DefaultVolumeGroup, string startGroup = DefaultStartGroup)
 {
     this.BeginWav(wavData, volumeGroup, startGroup);
 }