Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: when playing streams (MP3, AAC, etc) what does Foobar200 send to the DAC (Read 898 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

when playing streams (MP3, AAC, etc) what does Foobar200 send to the DAC

hi:
When playing an internet stream (e.g. MP3, AAC, or OGG audio stream from some online radio station), what format does Foobar2000 deliver to the DAC chip (sound card or external audio player)?

Is it sending 16-bit PCM (wav) at the same sample rate as the compressed stream?  24-bit?  32-bit?
Is the audio being re-sampling to some (mystery) fixed rate?

How can we cause Foobar2000 to tell us what format it is sending as output to the DAC?

Can we specify the output format we want???
I am using ASIO to feed an external DAC (via USB).  (Seems to work fine.  Can even play 24-bit 352Ksample/sec FLAC.)

The PLAYBACK->OUTPUT configuration page has an area called "Output Format".  BUT, the control field is grayed-out, with the message that the "output data format will be chosen automatically for the selected device". 
There is NO status information provided.  (No indication WHAT output format was "automatically" selected for me...)

Thanks for any info.


Re: when playing streams (MP3, AAC, etc) what does Foobar200 send to the DAC

Reply #1
The format DAC gets depends on the output method, your device capabilities, and in some cases on Windows version and settings.

With DirectSound on Windows XP you can configure the output bitdepth in the player and I recall the OS mixer only resampled if needed. So if nothing was playing and you started playback, the sample rate of the first track would be locked for the mixer.

With DirectSound and WASAPI shared outputs on anything since XP the signal is resampled to the sampling rate Windows is configured to use. The mixer gets 32-bit floating point signal from the player and Windows converts that to the bitdepth configured for the output.

With WASAPI exclusive and ASIO outputs the DAC is supposed to get the same sample rate as the source. The outputs query the sound device for the highest bit-depth they support and outputs in that format. So if your sound card supports 24 bits per sample you'll get 24 bps output.

Note that resampling is irrelevant from quality perspective. Your DAC will resample the signal anyway and most likely with worse quality than computer software. Proper resampling won't cause audible changes.

Re: when playing streams (MP3, AAC, etc) what does Foobar200 send to the DAC

Reply #2
SO, the MP3 and AAC decoders (et al)  recreate a PCM stream at the original sampling-rate used by the encoder.
If the DAC is capable of 24-bit (or 32bit), do the MP3/AAC/vorbis/et-al decoders actually create a full 24-bit depth (or 32bit depth) PCM stream to feed to the DAC?  (OR, do they just create 16 bits, and then zero-pad it before sending to the DAC device?)
How sophisticated / high-quality are the MP3/AAC/vorbis/et-al decoders that are built-in to Foobar2000?
Is JRiver (or anyone else) doing a better job decoding the MP3/AAC/Vorbis/et-al streams?  (or is everyone using the same compressed-audio decoder libraries?)
I am using a DAC that is only based on the ESS saber32 es9018.  (Not some crazy high end FPGA-based DAC.)  So discussion is mostly academic for my education.

Re: when playing streams (MP3, AAC, etc) what does Foobar200 send to the DAC

Reply #3
The lossy format decoders you mentioned output 32-bit floating point samples in foobar2000. They are as high quality as they can be - they decode the formats correctly and don't clip or alter the output. Some other player may have 64-bit decoding but that is unnecessary. 32-bit float offers practically infinite dynamic range and over 144 dB bit-perfect signal-to-noise ratio.

Lossless formats are decoded to the bit-depth of the original source file and then converted to 32-bit float for the player pipeline. This is lossless unless the source file's bitdepth is above 25 bps. Again, it won't be audibly different as the differences are way beyond the threshold of hearing, but it means you can't use foobar's Converter to losslessly convert for example 32-bit integer PCM file to another format.

Re: when playing streams (MP3, AAC, etc) what does Foobar200 send to the DAC

Reply #4
A ok.  Thanks very much!
Would be a nice addition to put a "processing and output" technical display (like the little Audio Path "gear" in the header of JRiver.