/// <summary> /// Creates a new stream instance using the provided stream as a source. /// </summary> public Mp3Stream(Stream sourceStream, int chunkSize) { SourceStream = sourceStream; JZBitStream = new javazoom.jl.decoder.Bitstream(new javazoom.jl.decoder.BackStream(SourceStream, chunkSize)); QueueOBuffer = new QueueOBuffer(); JZDecoder.OutputBuffer = QueueOBuffer; }
/// <summary> /// Creates a new stream instance using the provided stream as a source. /// </summary> public Mp3Stream(Stream sourceStream, int chunkSize) { SourceStream = sourceStream; JZBitStream = new javazoom.jl.decoder.Bitstream(new javazoom.jl.decoder.BackStream(SourceStream, chunkSize)); QueueOBuffer = new QueueOBuffer(); JZDecoder.OutputBuffer = QueueOBuffer; }
/// <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; }
/// <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; }