Support multichannel devices

33 views
Skip to first unread message

yuri kochmarev

unread,
Nov 13, 2023, 4:04:13 AM11/13/23
to discuss-webrtc
Hi all, tell please.
How to properly bypass the limitation when checking audio format support?

(core_audio_utility_win.cc)
function IsFormatSupported() return false when the Initialize output audio device.

my logs

(core_audio_base_win.cc:350): Init[Output] (core_audio_base_win.cc:373): Unique device identifier: device_id={0.0.0.00000000}.{aa227f70-a3af-4c3d-a7d2-2ebdd8ee2cea}, role=Console (core_audio_utility_win.cc:753): CreateDevice (core_audio_utility_win.cc:287): CreateDeviceInternal: id={0.0.0.00000000}.{aa227f70-a3af-4c3d-a7d2-2ebdd8ee2cea}, flow=Render, role=Console (core_audio_utility_win.cc:1499): CreateMeterInformation (core_audio_base_win.cc:397): Using IAudioClient3 (core_audio_utility_win.cc:887): CreateClient3 (core_audio_utility_win.cc:916): SetClientProperties (core_audio_utility_win.cc:943): supports_offload: 0 (core_audio_utility_win.cc:963): options: 0x0 (core_audio_utility_win.cc:1167): GetPreferredAudioParameters (core_audio_utility_win.cc:1007): GetSharedModeMixFormat (core_audio_utility_win.cc:1054): wFormatTag: WAVE_FORMAT_EXTENSIBLE (0xFFFE), nChannels: 8, nSamplesPerSec: 48000, nAvgBytesPerSec: 1536000, nBlockAlign: 32, wBitsPerSample: 32, cbSize: 22 [+] wValidBitsPerSample: 32, dwChannelMask: FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | BACK_LEFT | BACK_RIGHT | SIDE_LEFT | SIDE_RIGHT (8), SubFormat: KSDATAFORMAT_SUBTYPE_IEEE_FLOAT (core_audio_utility_win.cc:1101): GetDevicePeriod (core_audio_utility_win.cc:1118): device_period: 10 [ms] (core_audio_utility_win.cc:1120): minimum_period: 3 [ms] (core_audio_utility_win.cc:639): AudioParameters: sample_rate=48000, channels=8, frames_per_buffer=480, frames_per_10ms_buffer=480, bytes_per_frame=16, bytes_per_buffer=7680, bytes_per_10ms_buffer=7680, size_in_ms=10 (core_audio_base_win.cc:450): Using channel upmixing in WASAPI audio engine (2 => 8) (core_audio_base_win.cc:466): wFormatTag: WAVE_FORMAT_EXTENSIBLE (0xFFFE), nChannels: 2, nSamplesPerSec: 48000, nAvgBytesPerSec: 192000, nBlockAlign: 4, wBitsPerSample: 16, cbSize: 22 [+] wValidBitsPerSample: 16, dwChannelMask: FRONT_LEFT | FRONT_RIGHT (2), SubFormat: KSDATAFORMAT_SUBTYPE_PCM (core_audio_utility_win.cc:1062): IsFormatSupported (core_audio_utility_win.cc:1073): wFormatTag: WAVE_FORMAT_EXTENSIBLE (0xFFFE), nChannels: 2, nSamplesPerSec: 48000, nAvgBytesPerSec: 192000, nBlockAlign: 4, wBitsPerSample: 16, cbSize: 22 [+] wValidBitsPerSample: 16, dwChannelMask: FRONT_LEFT | FRONT_RIGHT (2), SubFormat: KSDATAFORMAT_SUBTYPE_PCM (core_audio_utility_win.cc:1081): Exact format is not supported, but a closest match exists (core_audio_utility_win.cc:1083): wFormatTag: WAVE_FORMAT_EXTENSIBLE (0xFFFE), nChannels: 8, nSamplesPerSec: 48000, nAvgBytesPerSec: 1536000, nBlockAlign: 32, wBitsPerSample: 32, cbSize: 22 [+] wValidBitsPerSample: 32, dwChannelMask: FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | BACK_LEFT | BACK_RIGHT | SIDE_LEFT | SIDE_RIGHT (8), SubFormat: KSDATAFORMAT_SUBTYPE_IEEE_FLOAT

Then I call start playout, but crash occurs, because initialization with false.

thanks in advance



Reply all
Reply to author
Forward
0 new messages