Internal class used to queue samples that are being obtained from an Mp3 stream. This merges the old mp3stream OBuffer with the javazoom SampleBuffer code for the highest efficiency... well, not the highest possible. The highest I'm willing to sweat over. --trs This class handles stereo 16-bit data! Switch it out if you want mono or something.
Inheritance: javazoom.jl.decoder.Obuffer
Exemplo n.º 1
0
        /// <summary>
        /// Creates a new stream instance using the provided stream as a source.
        ///
        /// TODO: allow selecting stereo or mono in the constructor (note that
        ///   this also requires "implementing" the stereo format).
        /// </summary>
        public Mp3Stream(Stream sourceStream, int chunkSize)
        {
            FormatRep    = SoundFormat.Pcm16BitStereo;
            SourceStream = sourceStream;
            JZBitStream  = new javazoom.jl.decoder.Bitstream(new javazoom.jl.decoder.BackStream(SourceStream, chunkSize));
            QueueOBuffer = new OBuffer16BitStereo();

            JZDecoder.OutputBuffer = QueueOBuffer;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new stream instance using the provided stream as a source.
        ///
        /// TODO: allow selecting stereo or mono in the constructor (note that
        ///   this also requires "implementing" the stereo format).
        /// </summary>
        public Mp3Stream(Stream sourceStream, int chunkSize)
        {
            FormatRep = SoundFormat.Pcm16BitStereo;
                   SourceStream = sourceStream;
                   JZBitStream = new javazoom.jl.decoder.Bitstream(new javazoom.jl.decoder.BackStream(SourceStream, chunkSize));
                   QueueOBuffer = new OBuffer16BitStereo();

                   JZDecoder.OutputBuffer = QueueOBuffer;
        }