2012-02-06, 19:31
A small clarification from my side: as I said before, this patch does audio processing just the same as baseline code from the main development trunk, it only adds the capability of passing a few more encoded audio stream formats as-is to an external decoder (usually an AVR). At least it was meant this way Baseline WASAPI renderer opens the device in exclusive mode, so does the patched one. LPCM and AC3/dts bitstream output to S/PDIF or HDMI is exactly as before.
Regarding stereo and multichannel FLAC, I ran a test with two files. The first one is 96kHz, 24bit, 5.1:
My AVR told me it's getting 6 channels at 96kHz sample rate - fine.
The second one is 176.4kHz, 24bit, 2.0:
My AVR was reporting 2 channels at 174.4k sample rate - fine as well.
Too bad, it seems that the FLAC decoder returns mere 16bit samples rather than the expected 24bit ones
A comment on the DTS settings: baseline code has the option to select between DTS passthrough for streams up to DTS-96/24 or decoding to multichannel LPCM. DTS-HD was decoded in any case, just like Dolby Digital Plus and Dolby TrueHD. With my patch, users may select up to which level the external decoder is able (or is allowed) to handle DTS streams by itself. DTS streams with a more demanding level will then either be decoded to LPCM by XBMC (using the same decoders just as before), or the embedded non-HD stream is extracted and routed to the external decoder. So, the former 'DTS enabled' switch is equivalent to the settings pair 'DTS-96/24' plus 'decode to LPCM'.
Regarding stereo and multichannel FLAC, I ran a test with two files. The first one is 96kHz, 24bit, 5.1:
Code:
17:38:58 T:2852 INFO: PAPlayer: Playing D:\Media\3 Doors Down - [2002] Away From The Sun (5.1).flac
17:38:58 T:2852 DEBUG: PAPlayer: Creating new audio renderer
17:38:58 T:2852 DEBUG: CWin32WASAPI::Initialize: endpoint device Realtek HDMI Output (ATI HDMI Audio)
17:38:58 T:2852 INFO: CPCMRemap: Configured speaker layout: 5.1
17:38:58 T:2852 INFO: CPCMRemap: I channel map: FL,FR,CE,LFE,BL,BR
17:38:58 T:2852 INFO: CPCMRemap: O channel map: FL,FR,CE,LFE,BL,BR
17:38:58 T:2852 DEBUG: CPCMRemap: Downmix normalization is disabled
17:38:58 T:2852 DEBUG: CPCMRemap: FL = FL(1.000000*)
17:38:58 T:2852 DEBUG: CPCMRemap: FR = FR(1.000000*)
17:38:58 T:2852 DEBUG: CPCMRemap: CE = CE(1.000000*)
17:38:58 T:2852 DEBUG: CPCMRemap: LFE = LFE(1.000000*)
17:38:58 T:2852 DEBUG: CPCMRemap: BL = BL(1.000000*)
17:38:58 T:2852 DEBUG: CPCMRemap: BR = BR(1.000000*)
17:38:58 T:2852 DEBUG: CWin32WASAPI::Initialize - Channels: 6 - SampleRate: 96000 - SampleBit: 16 - Resample false - IsMusic true - IsPassthrough 0 - audioDevice: Realtek HDMI Output (ATI HDMI Audio)
17:38:58 T:2852 DEBUG: CWin32WASAPI::Initialize: Packet Size = 11520. Avg Bytes Per Second = 1152000.
The second one is 176.4kHz, 24bit, 2.0:
Code:
17:39:15 T:2852 INFO: PAPlayer: Playing D:\Media\Brooke, Jonatha - [2001] Steady Pull (2.0).flac
17:39:15 T:2852 DEBUG: PAPlayer: Creating new audio renderer
17:39:15 T:2852 DEBUG: CWin32WASAPI::Initialize: endpoint device Realtek HDMI Output (ATI HDMI Audio)
17:39:15 T:2852 INFO: CPCMRemap: Configured speaker layout: 5.1
17:39:15 T:2852 INFO: CPCMRemap: I channel map: FL,FR
17:39:15 T:2852 INFO: CPCMRemap: O channel map: FL,FR
17:39:15 T:2852 DEBUG: CPCMRemap: Downmix normalization is disabled
17:39:15 T:2852 DEBUG: CPCMRemap: FL = FL(1.000000*)
17:39:15 T:2852 DEBUG: CPCMRemap: FR = FR(1.000000*)
17:39:15 T:2852 DEBUG: CWin32WASAPI::Initialize: Packet Size = 7168. Avg Bytes Per Second = 705600.
17:39:15 T:2852 DEBUG: CWin32WASAPI::Initialize - Channels: 2 - SampleRate: 176400 - SampleBit: 16 - Resample false - IsMusic true - IsPassthrough 0 - audioDevice: Realtek HDMI Output (ATI HDMI Audio)
Too bad, it seems that the FLAC decoder returns mere 16bit samples rather than the expected 24bit ones
A comment on the DTS settings: baseline code has the option to select between DTS passthrough for streams up to DTS-96/24 or decoding to multichannel LPCM. DTS-HD was decoded in any case, just like Dolby Digital Plus and Dolby TrueHD. With my patch, users may select up to which level the external decoder is able (or is allowed) to handle DTS streams by itself. DTS streams with a more demanding level will then either be decoded to LPCM by XBMC (using the same decoders just as before), or the embedded non-HD stream is extracted and routed to the external decoder. So, the former 'DTS enabled' switch is equivalent to the settings pair 'DTS-96/24' plus 'decode to LPCM'.