1

I'm using NAudio's WaveStream and BlockAlignReductionStream to read data from MP3 files. it all works great using the Read method, which reads into a byte[] buffer, but I'm wondering what happens when the format is different than 8-bit PCM, or when there's more than 1 channel?

I mean, it probably reads 16-bit PCM format as the high-order byte first and than the low-order byte, so it's basically a short. but what if there are 2 channels? does it read from both? one sample from the first and one sample from the other? or the exact oposite... or what? and does the same happen for 32-bit float format?

Thanks.

Symbol
  • 145
  • 3
  • 10

1 Answers1

1

The MP3 decoders available in NAudio all decompress to 16 bit audio, not 8 bit. The sample data will come as a series of 16 bit integers, in intel byte order, and samples will be interleaved left, right etc for stereo audio.

Mark Heath
  • 48,273
  • 29
  • 137
  • 194