oshcar wrote: > are you saying that with flac there is actually no padding going on ? > that 32 bit is how it streams in ( for lack of better description ) ? > > how does wav return samples ? > > how come i never see 16bit unless i force it ?
As a result of decoding, flac returns 32 bits samples but tells you what the length of samples is (see https://xiph.org/flac/format.html). So when it returns this array of 32 bits samples, they are right justified (i.e. if these are 8 bits samples, he first 24+1 bits from the left are 0 for a positive integer and 1 for a negative as it's 2's complement). If you look at what squeezelite does, we re-align these samples to the left in the internal buffer and then they are sent to the DAC/mixer with potentially re-alignement / truncation depending what the DAC supports. In other words, these left-justified 32 bits buffers can be truncated to 16 bits integers and then send to the DAC/mixer if it has been configured to accept 16 bits. But again, padding does not matter. A DAC configured to receive 32 bits and getting 16 bits data in a 32 bits word, left-justified and with 16 trailing 0, will produce the same result as it if was configured to receive 16 bits and would actually receive the same 16 bits samples as before. LMS 8.2 on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3 ------------------------------------------------------------------------ philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261 View this thread: http://forums.slimdevices.com/showthread.php?t=114947 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
