PDA

View Full Version : before I buy one of these things...



mark___h
2006-04-29, 05:32
could you tell me if it's possile to set the digital output on the squeezebox to always send 16-bit 44.1kHz data?

I will be playing FLACs and MP3s. I heard that FLACs are output 16-bit/44.1kHz, but that MP3 streams are converted to give a 24-bit output. Thing is, I need a 16-bit input for my DAC.

Thanks for the help,

dean
2006-04-29, 08:00
Mark,

On Apr 29, 2006, at 5:32 AM, mark___h wrote:
> I will be playing FLACs and MP3s. I heard that FLACs are output
> 16-bit/44.1kHz, but that MP3 streams are converted to give a 24-bit
> output. Thing is, I need a 16-bit input for my DAC.
That's right, the MP3s are decoded at 24-bits, but also, if you use
the volume control it will take advantage of the extra resolution.

16-bit DACs will typically ignore any additional bits on the S/PDIF
outputs. What model DAC are you using?

inguz
2006-04-29, 08:26
Hey, I didn't know that. Can SB play 24-bit WAV or any other lossless format?

mark___h
2006-04-29, 10:12
Dean,

I'm using a perpetual technologies P1A interpolation engine and P3A upsampling DAC. The interpolation engine converts a 16-bit signal to 24-bit, but processes it rather than dithering it like the Burr Brown in the Squeezebox. I would prefer the 24 bits to be produced by the P1A.

I have been looking in these forums, and it looks like you can set slimserver to convert both FLAC and MP3 to WAV and stream that to the squeezebox. I wonder if the WAV stream from both would be 16-bit/44.1kHz?

radish
2006-04-29, 15:33
I may be showing my ignorance here, but why would a 16-bit to 24-bit conversion involve dithering? Wouldn't you just pad the LSB with 0?

Plus, of course, the Burr Brown is a DAC which isn't involved at all if you use SPDIF.

Michaelwagner
2006-04-29, 16:48
why would a 16-bit to 24-bit conversion involve dithering?

I think dithering occurs when the DAC is indecisive. :-)

funkstar
2006-04-30, 02:53
Only if the DAC was manufacturered between Feb 20th and March 20th of any given year. Piscies are terrible for being indecisive...

;)

Michaelwagner
2006-04-30, 07:13
I used to be indecisive, but now I'm not so sure :-)

Michaelwagner
2006-04-30, 07:23
But seriously, folks,
http://en.wikipedia.org/wiki/Dithering
is a nice explanation.

Dithering is more usually used to reduce bit depth, not increase it.

It's an odd use for dithering ... it actually adds random noise (low intensity, but still) to the signal.

What Radish described is zeroing the extra bits.

You could insert random values in the extra bits, making it sound a bit more "rich". But it's noise being added. It's hard to imagine more than 1 or 2 extra bits being of value. The rest would be total nonsense.

When dithering to reduce bit depth:

Dithering can have multiple values in a 2-d universe like graphics where there are 4 direct neighbours and 4 diagonal neighbours to interpolate, but in sound sampling, which is linear, I would have thought 1 extra bit of dithering would be all you'd ever need. So I too am confused by the discussion of 8 bits of dither.

mark___h
2006-04-30, 07:42
Radish,

Googlage allows me to tell you that a 16-bit signal can be converted to a 24-bit signal by algorithmic redithering; by adding dither in the form of triangular-probability-density function white noise.

In difference to this, in the P1A, the digital audio datastream is routed to a high-powered programmable DSP (an Analog Devices SHARC 21065L with 32-bit block floating-point math) that dynamically tracks the signal and derives a better estimate of the 24-bit data than that possible with a static dithering algorithm.

Unfortunately, google was unable to improve my understanding of either process at all.:P

radish
2006-04-30, 08:32
Well I have a basic understanding of the principles, but I still don't get it. You're going to all this effort to rip your CDs to lossless, and transport those 16 bits flawlessly throughout the system until you finally the DAC and you add in 8 bits of (almost) random noise. Huh? Anyway, this isn't the audiophile forum so I'm going to stay away from that discussion :)

To answer your initial question, I don't believe the SB does any dithering. In the case of a 16-bit source (WAV, FLAC, etc) I believe it outputs either at real 16-bit or 24-bit with zero padding (i.e. no dithering). I don't know which - you should drop a line to Slim to find out. In the case of an mp3 source, well the original material is 24-bit, kind of. When you decode an mp3 you can choose the bit depth to get it at, regardless of the bit depth of the original. Of course by selecting the 24-bit you're not getting bits that weren't in the original, you're just getting closer to the "ideal" output from the mp3 perceptual encoding (which is all floating point). So there you have a 24-bit signal, which is passed to the SPDIF as 24 bits (all used). I think there would be very little point in trying to improve that signal.

ChrisOwens
2006-05-01, 12:05
I've just been doing a little experimenting to see the SB3's behavior. This is something that I haven't done much of since I started a couple of months ago.

My testing was done with a Squeezebox v3, fw48, Slimserver 6.2.1 (I haven't upgraded this particular machine yet).

I used a TOSLINK (optical) cable to connect the SB3 to an M-Audio Transit USB soundcard. I used Audacity for recording and for trimming the recording down to the original size. Then I used the Wava wave file comparison tool, as well as the XVI hex editor to examine the resulting file.

The SB3 seems to be passing 24-bit wav and aiff (uncompressed) data through digitally without altering it (which is what I'd hope for, really). 16-bit uncompressed data is also passed through untouched.

I did run across Bug 3303 and/or Bug 2990 during my testing.

Note the SPDIF format understands the difference between 16-bit and 24-bit data. That is, 16-bit data is NOT the same as 24-bit with the 8 least significant bits all zeroes.

MP3 files (even ones recorded from 16-bit content) are played back by Slimserver and the SB3 as 24-bit to fully realize the MP3 format's "noise shaping" feature. I'm not convinced that this has a measurable effect, but I didn't test that on this occasion.

So, in this particular case, since you have a DAC I'm going to assume you're not going to be encoding your library in MP3 format. FLAC, wav, aiff, and other uncompressed 16-bit formats will certainly output only 16 bits, which seems like it ought to work fine with your setup.

If you play any MP3 files or files encoded in 24 bits, they will play as 24 bits, which you should be aware of as you set up your system. I looked at the data I could find on line about the P1A, but it's not clear to me what the device does when passed 24-bit data. You may wish to contact Perpetual Technologies to verify if incoming data is truncated to the selected resolution or if data at a higher resolution is passed through untouched, for example.

ChrisOwens
2006-05-01, 12:12
I forgot to mention: I did of course change the audio volume setting for the player under test in Slimserver to 'Digital output level is fixed'.

Otherwise, the output is scaled, and bit-accuracy is compromised. Note even when you allow scaling, we do bend over backwards to try to make sure the output is as accurate as possible, but since I wished to perform a binary comparison, this was a required setting for this test.

P Floding
2006-05-01, 12:56
I forgot to mention: I did of course change the audio volume setting for the player under test in Slimserver to 'Digital output level is fixed'.

Otherwise, the output is scaled, and bit-accuracy is compromised. Note even when you allow scaling, we do bend over backwards to try to make sure the output is as accurate as possible, but since I wished to perform a binary comparison, this was a required setting for this test.

According to other SD people (can't remember if it was the CEO or CTO) there is absolutely no difference between "fixed output level" and just setting the volume to 40.

Regards

abdomen
2006-05-01, 13:02
Hey, I didn't know that. Can SB play 24-bit WAV or any other lossless format?
I think the answer is yes...

"FIXED"
- 24/48 audio files (WAV or FLAC) not playing on SB2 (http://bugs.slimdevices.com/show_bug.cgi?id=1820)
- Jerky sound with some 24/48 FLAC files (http://bugs.slimdevices.com/show_bug.cgi?id=1859)

...but...

Being looked into:
- 24 bits / 48 kHz FLAC files do no play continuously. (http://bugs.slimdevices.com/show_bug.cgi?id=3303)