Skip to content

CoreAudio_Exclusive not compatible with Interger Format & Future required on Integer Mode #3072

@macdavis

Description

@macdavis

Firstly, I set the audio format to 24bit Integer. audio-format=s24

When the build-in audio device is selected, the exclusive mode works just fine. As indicated in the log, the ultimate format has been converted to 32bit float, which is still compatible with the build-in audio device.

[ad] Codec list:
[ad] lavc:libdcadec (dts) - dcadec DCA decoder
[ad] lavc:dca (dts) - DCA (DTS Coherent Acoustics)
[ad] spdif:dts - libavformat/spdifenc audio pass-through decoder
[ad] spdif:dts-hd (dts) - libavformat/spdifenc audio pass-through decoder
[ad] Opening audio decoder lavc:libdcadec
[ad] Requesting 1 threads for decoding.
[ad] Selected audio codec: dcadec DCA decoder [lavc:libdcadec]
[cplayer] Starting playback...
[af] Adding filter lavrresample
[lavrresample] Remix: 5.1(side) -> stereo
[lavrresample] Remix: 5.1(side) -> stereo
[af] Audio filter chain:
[af] [in] 48000Hz 5.1(side) 6ch s32p
[af] [lavrresample] 48000Hz stereo 2ch s24
[af] [out] 48000Hz stereo 2ch s24
[af] [ao] 48000Hz stereo 2ch s24
[ao] Trying audio driver 'coreaudio_exclusive'
[ao/coreaudio_exclusive] requested format: 48000 Hz, stereo channels, s24
[ao/coreaudio_exclusive] selected audio output device: Built-in Output (50)
[ao/coreaudio_exclusive] Using substream 0/1.
[ao/coreaudio_exclusive] our format: 48000.0Hz 24bit mcpl [12][6bpp][1fbp][6bpf][2ch] int LE S packed (s24)
[ao/coreaudio_exclusive] - 96000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 88200.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 48000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 44100.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 96000.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ao/coreaudio_exclusive] - 88200.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ao/coreaudio_exclusive] - 48000.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ao/coreaudio_exclusive] - 44100.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ao/coreaudio_exclusive] - 96000.0Hz 32bit mcpl [9][8bpp][1fbp][8bpf][2ch] float LE U packed (float)
[ao/coreaudio_exclusive] - 88200.0Hz 32bit mcpl [9][8bpp][1fbp][8bpf][2ch] float LE U packed (float)
[ao/coreaudio_exclusive] - 48000.0Hz 32bit mcpl [9][8bpp][1fbp][8bpf][2ch] float LE U packed (float)
[ao/coreaudio_exclusive] - 44100.0Hz 32bit mcpl [9][8bpp][1fbp][8bpf][2ch] float LE U packed (float)
[ao/coreaudio_exclusive] setting stream physical format: 48000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] format in use before switching: 48000.0Hz 32bit mcpl [9][8bpp][1fbp][8bpf][2ch] float LE U packed (float)
[ao/coreaudio_exclusive] actual format in use: 48000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] input channel layout:
[ao/coreaudio_exclusive] layout: tag: <0>, bitmap: <0>, descriptions <2>
[ao/coreaudio_exclusive] - description 0: label <4294967295, 64>, flags: <0>, coords: <0.000000, 0.000000, 0.000000>
[ao/coreaudio_exclusive] - description 1: label <4294967295, 64>, flags: <0>, coords: <0.000000, 0.000000, 0.000000>
[ao/coreaudio_exclusive] mp chmap: unknown2
[ao/coreaudio_exclusive] input channel layout:
[ao/coreaudio_exclusive] layout: tag: <0>, bitmap: <0>, descriptions <2>
[ao/coreaudio_exclusive] - description 0: label <1, 0>, flags: <0>, coords: <0.000000, 0.000000, 0.000000>
[ao/coreaudio_exclusive] - description 1: label <2, 1>, flags: <0>, coords: <0.000000, 0.000000, 0.000000>
[ao/coreaudio_exclusive] mp chmap: stereo
[ao/coreaudio_exclusive] Channel layouts:
[ao/coreaudio_exclusive] - stereo
[ao/coreaudio_exclusive] - mono
[ao/coreaudio_exclusive] result: stereo
[ao/coreaudio_exclusive] virtual format 48000.0Hz 32bit mcpl [9][8bpp][1fbp][8bpf][2ch] float LE U packed (float)
[ao/coreaudio_exclusive] Latency property cntl: 430 frames
[ao/coreaudio_exclusive] Latency property zisf: 512 frames
[ao/coreaudio_exclusive] Latency property tfas: 144 frames
[ao/coreaudio_exclusive] base latency: 22624 microseconds
[ao/coreaudio_exclusive] using soft-buffer of 9600 samples.
[cplayer] AO: [coreaudio_exclusive] 48000Hz stereo 2ch float
[cplayer] AO: Description: CoreAudio Exclusive Mode
[af] Removing filter lavrresample
[af] Adding filter lavrresample
[lavrresample] Remix: 5.1(side) -> stereo
[lavrresample] Remix: 5.1(side) -> stereo
[af] Audio filter chain:
[af] [in] 48000Hz 5.1(side) 6ch s32p
[af] [lavrresample] 48000Hz stereo 2ch float
[af] [out] 48000Hz stereo 2ch float
[af] [ao] 48000Hz stereo 2ch float

However, my external DAC (XMOS USB Audio 2.0) can only handle 24bit Integer. Therefore, the exclusive mode is no longer working. The error says “hardware format not supported”.

[ad] Codec list:
[ad] lavc:libdcadec (dts) - dcadec DCA decoder
[ad] lavc:dca (dts) - DCA (DTS Coherent Acoustics)
[ad] spdif:dts - libavformat/spdifenc audio pass-through decoder
[ad] spdif:dts-hd (dts) - libavformat/spdifenc audio pass-through decoder
[ad] Opening audio decoder lavc:libdcadec
[ad] Requesting 1 threads for decoding.
[ad] Selected audio codec: dcadec DCA decoder [lavc:libdcadec]
[cplayer] Starting playback...
[af] Adding filter lavrresample
[lavrresample] Remix: 5.1(side) -> stereo
[lavrresample] Remix: 5.1(side) -> stereo
[af] Audio filter chain:
[af] [in] 48000Hz 5.1(side) 6ch s32p
[af] [lavrresample] 48000Hz stereo 2ch s24
[af] [out] 48000Hz stereo 2ch s24
[af] [ao] 48000Hz stereo 2ch s24
[ao] Trying audio driver 'coreaudio_exclusive'
[ao/coreaudio_exclusive] requested format: 48000 Hz, stereo channels, s24
[ao/coreaudio_exclusive] selected audio output device: XMOS USB Audio 2.0 (60)
[ao/coreaudio_exclusive] Using substream 0/1.
[ao/coreaudio_exclusive] our format: 48000.0Hz 24bit mcpl [12][6bpp][1fbp][6bpf][2ch] int LE S packed (s24)
[ao/coreaudio_exclusive] - 192000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 176400.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 96000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 88200.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 48000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 44100.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 192000.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 176400.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 96000.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 88200.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 48000.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] - 44100.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] setting stream physical format: 48000.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] format in use before switching: 48000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] actual format in use: 48000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] input channel layout:
[ao/coreaudio_exclusive] layout: tag: <0>, bitmap: <0>, descriptions <2>
[ao/coreaudio_exclusive] - description 0: label <1, 0>, flags: <0>, coords: <0.000000, 0.000000, 0.000000>
[ao/coreaudio_exclusive] - description 1: label <2, 1>, flags: <0>, coords: <0.000000, 0.000000, 0.000000>
[ao/coreaudio_exclusive] mp chmap: stereo
[ao/coreaudio_exclusive] input channel layout:
[ao/coreaudio_exclusive] layout: tag: <0>, bitmap: <0>, descriptions <2>
[ao/coreaudio_exclusive] - description 0: label <1, 0>, flags: <0>, coords: <0.000000, 0.000000, 0.000000>
[ao/coreaudio_exclusive] - description 1: label <2, 1>, flags: <0>, coords: <0.000000, 0.000000, 0.000000>
[ao/coreaudio_exclusive] mp chmap: stereo
[ao/coreaudio_exclusive] Channel layouts:
[ao/coreaudio_exclusive] - stereo
[ao/coreaudio_exclusive] - stereo
[ao/coreaudio_exclusive] - mono
[ao/coreaudio_exclusive] result: stereo
[ao/coreaudio_exclusive] virtual format 48000.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ao/coreaudio_exclusive] hardware format not supported
[ao] Failed to initialize audio driver 'coreaudio_exclusive'
[cplayer] Could not open/initialize audio device -> no sound.
[ad] Uninit audio decoder.
[af] Removing filter lavrresample
[cplayer] Audio: no audio

While other Hi-Fi players, such as Audirvana Plus, JRiver, can work perfectly with my external DAC under the Exclusive access mode (Hog Mode). I wish that MPV can also make it. After all, the exclusive mode can achieve better sound quality.

In addition, I hope Integer Mode can also be developed as it further improves the sound quality. According to the author of Audirvana Plus, the Integer Mode has been brought back since OS X 10.9. The following link is his discussion about the Integer Mode. http://www.amr-audio.co.uk/large_image/MAC%20OSX%20audio%20players%20&%20Integer%20Mode.pdf
I hope it would be helpful.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions