зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1598148 - P2: Update cubeb to a971bf1. r=kinetik
Pick commits: a971bf1 - Bump the priority of audiounit-rust in default init ea39471 - Merge branch 'Filoppi-patch-1' 2cc3a02 - Fix conversion from com_heap_ptr. 0bd0338 - Merge branch 'patch-1' of https://github.com/Filoppi/cubeb into Filoppi-patch-1 b69886c - As suggested 20cb7e0 - Fixed small memory leak Applying a patch on top of a971bf1a045b0e5dcaffd2a15c3255677f43cd2d Differential Revision: https://phabricator.services.mozilla.com/D54055
This commit is contained in:
Родитель
1ed88894b6
Коммит
168b47f125
|
@ -19,5 +19,5 @@ origin:
|
|||
license: "ISC"
|
||||
|
||||
# update.sh will update this value
|
||||
release: "575bd443893638da4a88468576e4e10b706c7a6c (2020-06-30 22:57:45 +1200)"
|
||||
release: "a971bf1a045b0e5dcaffd2a15c3255677f43cd2d (2020-07-07 11:53:43 +1200)"
|
||||
|
||||
|
|
|
@ -200,12 +200,12 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam
|
|||
#if defined(USE_ALSA)
|
||||
alsa_init,
|
||||
#endif
|
||||
#if defined(USE_AUDIOUNIT)
|
||||
audiounit_init,
|
||||
#endif
|
||||
#if defined(USE_AUDIOUNIT_RUST)
|
||||
audiounit_rust_init,
|
||||
#endif
|
||||
#if defined(USE_AUDIOUNIT)
|
||||
audiounit_init,
|
||||
#endif
|
||||
#if defined(USE_WASAPI)
|
||||
wasapi_init,
|
||||
#endif
|
||||
|
|
|
@ -1777,17 +1777,18 @@ handle_channel_layout(cubeb_stream * stm, EDataFlow direction, com_heap_ptr<WAV
|
|||
waveformatex_update_derived_properties(mix_format.get());
|
||||
|
||||
/* Check if wasapi will accept our channel layout request. */
|
||||
WAVEFORMATEX * closest;
|
||||
WAVEFORMATEX * tmp = nullptr;
|
||||
HRESULT hr = audio_client->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED,
|
||||
mix_format.get(),
|
||||
&closest);
|
||||
&tmp);
|
||||
com_heap_ptr<WAVEFORMATEX> closest(tmp);
|
||||
if (hr == S_FALSE) {
|
||||
/* Channel layout not supported, but WASAPI gives us a suggestion. Use it,
|
||||
and handle the eventual upmix/downmix ourselves. Ignore the subformat of
|
||||
the suggestion, since it seems to always be IEEE_FLOAT. */
|
||||
LOG("Using WASAPI suggested format: channels: %d", closest->nChannels);
|
||||
XASSERT(closest->wFormatTag == WAVE_FORMAT_EXTENSIBLE);
|
||||
WAVEFORMATEXTENSIBLE * closest_pcm = reinterpret_cast<WAVEFORMATEXTENSIBLE *>(closest);
|
||||
WAVEFORMATEXTENSIBLE * closest_pcm = reinterpret_cast<WAVEFORMATEXTENSIBLE *>(closest.get());
|
||||
format_pcm->dwChannelMask = closest_pcm->dwChannelMask;
|
||||
mix_format->nChannels = closest->nChannels;
|
||||
waveformatex_update_derived_properties(mix_format.get());
|
||||
|
|
Загрузка…
Ссылка в новой задаче