Good day !
I would like to use NAudio to stream music from a local server I have that serves mp3s over http. Currently, I don't think NAudio supportrs this as I get an exception when trying to load a downloaded stream.
So far here is my code:
mainOutputStream = CreateInputStream(track.TrackUri.OriginalString);
waveOut = new NAudio.Wave.WasapiOut(NAudio.CoreAudioApi.AudioClientShareMode.Shared, false, 300);
if (waveOut != null)
var stream = (new WebClient()).OpenRead(fileName);
And this is the portion that creates the wavestream
WaveStream mp3Reader = new Mp3FileReader(stream);
//WaveStream pcmStream = WaveFormatConversionStream.CreatePcmStream(mp3Reader);
//WaveStream blockAlignedStream = new BlockAlignReductionStream(mp3Reader);
inputStream = new WaveChannel32(mp3Reader);
inputStream.Pan = 0;
inputStream.Volume = 1;
Upon creating the Mp3FileReader, I get an exception stating:
"This stream does not support seek operations."
Are there any plans to support streaming in the near future? Anybody have a working solution for this ?