Ejemplo n.º 1
0
        public WaveStreamReader(SoundBuffer sound, bool closeStreamOnDispose = false)
            : base()
        {
            Sound = sound;
            _closeStreamOnDispose = closeStreamOnDispose;

            LoadData();
        }
Ejemplo n.º 2
0
        internal void ResetBuffer()
        {
            // First stop the sound in case it is playing
            Stop();

            // Detach the buffer
            if (_buffer != null)
            {
                ALChecker.Check(() => AL.Source(Handle, ALSourcei.Buffer, 0));
                _buffer.DetachSound(this);
                _buffer = null;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of <see cref="Sound"/> class
 /// with specified <see cref="SoundBuffer"/>.
 /// </summary>
 /// <param name="buffer">The <see cref="SoundBuffer"/> containing souhd sample.</param>
 public Sound(SoundBuffer buffer)
 {
     Buffer = buffer;
 }
 public VorbisStreamReader(SoundBuffer sound, bool closeStreamOnDispose = false)
     : base(sound.Stream, closeStreamOnDispose)
 {
     Sound = sound;
 }
Ejemplo n.º 5
0
        internal void ResetBuffer()
        {
            // First stop the sound in case it is playing
            Stop();

            // Detach the buffer
            if (_buffer != null)
            {
                ALChecker.Check(() => AL.Source(Handle, ALSourcei.Buffer, 0));
                _buffer.DetachSound(this);
                _buffer = null;
            }
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of <see cref="Sound"/> class
 /// with specified <see cref="SoundBuffer"/>.
 /// </summary>
 /// <param name="buffer">The <see cref="SoundBuffer"/> containing souhd sample.</param>
 public Sound(SoundBuffer buffer)
 {
     Buffer = buffer;
 }
Ejemplo n.º 7
0
 internal void Remove(SoundBuffer stream)
 {
     _sounds.Remove(stream);
 }
Ejemplo n.º 8
0
 internal void Add(SoundBuffer stream)
 {
     _sounds.Add(stream);
 }