Inheritance: IDisposable
Beispiel #1
0
        public bool FillBuffer(OggStream stream, int bufferId)
        {
            int readSamples;
            lock (readMutex)
            {
                readSamples = stream.Reader.ReadSamples(readSampleBuffer, 0, BufferSize);
                CastBuffer(readSampleBuffer, castBuffer, readSamples);
            }
            AL.BufferData(bufferId, stream.Reader.Channels == 1 ? ALFormat.Mono16 : ALFormat.Stereo16, castBuffer,
                readSamples * sizeof (short), stream.Reader.SampleRate);
            ALHelper.Check();

            return readSamples != BufferSize;
        }
Beispiel #2
0
 internal bool RemoveStream(OggStream stream)
 {
     lock (iterationMutex)
         return streams.Remove(stream);
 }
Beispiel #3
0
 internal bool AddStream(OggStream stream)
 {
     lock (iterationMutex)
         return streams.Add(stream);
 }