mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
PulseAudio: Use the channel map used when initializing the PA stream.
This is an attempt to work around an issue with PipeWire.
This commit is contained in:
-11
@@ -30177,7 +30177,6 @@ static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_confi
|
||||
ma_pa_channel_map cmap;
|
||||
ma_pa_buffer_attr attr;
|
||||
const ma_pa_sample_spec* pActualSS = NULL;
|
||||
const ma_pa_channel_map* pActualCMap = NULL;
|
||||
const ma_pa_buffer_attr* pActualAttr = NULL;
|
||||
ma_uint32 iChannel;
|
||||
ma_pa_stream_flags_t streamFlags;
|
||||
@@ -30335,11 +30334,6 @@ static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_confi
|
||||
fixed sooner than later. I might remove this hack later.
|
||||
*/
|
||||
if (pDescriptorCapture->channels > 2) {
|
||||
pActualCMap = ((ma_pa_stream_get_channel_map_proc)pDevice->pContext->pulse.pa_stream_get_channel_map)((ma_pa_stream*)pDevice->pulse.pStreamCapture);
|
||||
if (pActualCMap != NULL) {
|
||||
cmap = *pActualCMap;
|
||||
}
|
||||
|
||||
for (iChannel = 0; iChannel < pDescriptorCapture->channels; ++iChannel) {
|
||||
pDescriptorCapture->channelMap[iChannel] = ma_channel_position_from_pulse(cmap.map[iChannel]);
|
||||
}
|
||||
@@ -30489,11 +30483,6 @@ static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_confi
|
||||
fixed sooner than later. I might remove this hack later.
|
||||
*/
|
||||
if (pDescriptorPlayback->channels > 2) {
|
||||
pActualCMap = ((ma_pa_stream_get_channel_map_proc)pDevice->pContext->pulse.pa_stream_get_channel_map)((ma_pa_stream*)pDevice->pulse.pStreamPlayback);
|
||||
if (pActualCMap != NULL) {
|
||||
cmap = *pActualCMap;
|
||||
}
|
||||
|
||||
for (iChannel = 0; iChannel < pDescriptorPlayback->channels; ++iChannel) {
|
||||
pDescriptorPlayback->channelMap[iChannel] = ma_channel_position_from_pulse(cmap.map[iChannel]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user