зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1449555 - Update libcubeb to 7f4f3b6e. r=padenot
This commit is contained in:
Родитель
01c8f2adc7
Коммит
a310920353
|
@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
|
|||
|
||||
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
|
||||
|
||||
The git commit ID used was f34f392de5158feb46202e8ae58528bfb42f2759 (2018-03-27 17:45:10 -0400)
|
||||
The git commit ID used was 7f4f3b6eaedffb9ac8a0d3199433b0390e82a815 (2018-04-13 23:32:06 +1200)
|
||||
|
|
|
@ -1347,24 +1347,25 @@ audiounit_set_channel_layout(AudioUnit unit,
|
|||
|
||||
|
||||
OSStatus r;
|
||||
int channels = cubeb_channel_layout_nb_channels(layout);
|
||||
uint32_t nb_channels = cubeb_channel_layout_nb_channels(layout);
|
||||
|
||||
// We do not use CoreAudio standard layout for lack of documentation on what
|
||||
// the actual channel orders are. So we set a custom layout.
|
||||
size_t size = offsetof(AudioChannelLayout, mChannelDescriptions[channels]);
|
||||
size_t size = offsetof(AudioChannelLayout, mChannelDescriptions[nb_channels]);
|
||||
auto au_layout = make_sized_audio_channel_layout(size);
|
||||
au_layout->mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelDescriptions;
|
||||
au_layout->mNumberChannelDescriptions = channels;
|
||||
au_layout->mNumberChannelDescriptions = nb_channels;
|
||||
|
||||
uint32_t channels = 0;
|
||||
cubeb_channel_layout channelMap = layout;
|
||||
int i = 0;
|
||||
while (channelMap != 0) {
|
||||
XASSERT(i < channels);
|
||||
for (uint32_t i = 0; channelMap != 0; ++i) {
|
||||
XASSERT(channels < nb_channels);
|
||||
uint32_t channel = (channelMap & 1) << i;
|
||||
if (channel != 0) {
|
||||
au_layout->mChannelDescriptions[i].mChannelLabel =
|
||||
au_layout->mChannelDescriptions[channels].mChannelLabel =
|
||||
cubeb_channel_to_channel_label(static_cast<cubeb_channel>(channel));
|
||||
au_layout->mChannelDescriptions[i].mChannelFlags = kAudioChannelFlags_AllOff;
|
||||
i += 1;
|
||||
au_layout->mChannelDescriptions[channels].mChannelFlags = kAudioChannelFlags_AllOff;
|
||||
channels++;
|
||||
}
|
||||
channelMap = channelMap >> 1;
|
||||
}
|
||||
|
|
|
@ -994,7 +994,6 @@ HRESULT register_notification_client(cubeb_stream * stm)
|
|||
IID_PPV_ARGS(stm->device_enumerator.receive()));
|
||||
if (FAILED(hr)) {
|
||||
LOG("Could not get device enumerator: %lx", hr);
|
||||
XASSERT(hr != CO_E_NOTINITIALIZED);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -1041,7 +1040,6 @@ HRESULT get_endpoint(com_ptr<IMMDevice> & device, LPCWSTR devid)
|
|||
IID_PPV_ARGS(enumerator.receive()));
|
||||
if (FAILED(hr)) {
|
||||
LOG("Could not get device enumerator: %lx", hr);
|
||||
XASSERT(hr != CO_E_NOTINITIALIZED);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -1062,7 +1060,6 @@ HRESULT get_default_endpoint(com_ptr<IMMDevice> & device, EDataFlow direction)
|
|||
IID_PPV_ARGS(enumerator.receive()));
|
||||
if (FAILED(hr)) {
|
||||
LOG("Could not get device enumerator: %lx", hr);
|
||||
XASSERT(hr != CO_E_NOTINITIALIZED);
|
||||
return hr;
|
||||
}
|
||||
hr = enumerator->GetDefaultAudioEndpoint(direction, eConsole, device.receive());
|
||||
|
@ -2310,7 +2307,6 @@ wasapi_enumerate_devices(cubeb * context, cubeb_device_type type,
|
|||
CLSCTX_INPROC_SERVER, IID_PPV_ARGS(enumerator.receive()));
|
||||
if (FAILED(hr)) {
|
||||
LOG("Could not get device enumerator: %lx", hr);
|
||||
XASSERT(hr != CO_E_NOTINITIALIZED);
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче