Commit d87230b4 authored by Timo Schwarzer's avatar Timo Schwarzer Committed by David Reid

Allow setting the channel map that is requested from PulseAudio

parent e1328d9d
...@@ -11,6 +11,7 @@ v0.11.22 - TBD ...@@ -11,6 +11,7 @@ v0.11.22 - TBD
* Web: Fix a JavaScript error when initializing and then uninitializing a context before any interactivity. * Web: Fix a JavaScript error when initializing and then uninitializing a context before any interactivity.
* AAudio: The default minimum SDK version has been increased from 26 to 27 when enabling AAudio. If you need to support version 26, you can use `#define MA_AAUDIO_MIN_ANDROID_SDK_VERSION 26`. * AAudio: The default minimum SDK version has been increased from 26 to 27 when enabling AAudio. If you need to support version 26, you can use `#define MA_AAUDIO_MIN_ANDROID_SDK_VERSION 26`.
* AAudio: Fix ma_device_get_info() implementation * AAudio: Fix ma_device_get_info() implementation
* PulseAudio: Allow setting the channel map requested from PulseAudio in device configs
v0.11.21 - 2023-11-15 v0.11.21 - 2023-11-15
......
...@@ -7107,6 +7107,7 @@ struct ma_device_config ...@@ -7107,6 +7107,7 @@ struct ma_device_config
{ {
const char* pStreamNamePlayback; const char* pStreamNamePlayback;
const char* pStreamNameCapture; const char* pStreamNameCapture;
int pChannelMap;
} pulse; } pulse;
struct struct
{ {
...@@ -8755,6 +8756,9 @@ then be set directly on the structure. Below are the members of the `ma_device_c ...@@ -8755,6 +8756,9 @@ then be set directly on the structure. Below are the members of the `ma_device_c
pulse.pStreamNameCapture pulse.pStreamNameCapture
PulseAudio only. Sets the stream name for capture. PulseAudio only. Sets the stream name for capture.
pulse.pChannelMap
PulseAudio only. Sets the channel map that is requested from PulseAudio. See MA_PA_CHANNEL_MAP_* constants. Defaults to MA_PA_CHANNEL_MAP_AIFF.
coreaudio.allowNominalSampleRateChange coreaudio.allowNominalSampleRateChange
Core Audio only. Desktop only. When enabled, allows the sample rate of the device to be changed at the operating system level. This Core Audio only. Desktop only. When enabled, allows the sample rate of the device to be changed at the operating system level. This
is disabled by default in order to prevent intrusive changes to the user's system. This is useful if you want to use a sample rate is disabled by default in order to prevent intrusive changes to the user's system. This is useful if you want to use a sample rate
...@@ -30487,7 +30491,7 @@ static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_confi ...@@ -30487,7 +30491,7 @@ static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_confi
} }
/* Use a default channel map. */ /* Use a default channel map. */
((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, MA_PA_CHANNEL_MAP_DEFAULT); ((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, pConfig->pulse.pChannelMap);
/* Use the requested sample rate if one was specified. */ /* Use the requested sample rate if one was specified. */
if (pDescriptorCapture->sampleRate != 0) { if (pDescriptorCapture->sampleRate != 0) {
...@@ -30639,7 +30643,7 @@ static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_confi ...@@ -30639,7 +30643,7 @@ static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_confi
} }
/* Use a default channel map. */ /* Use a default channel map. */
((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, MA_PA_CHANNEL_MAP_DEFAULT); ((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, pConfig->pulse.pChannelMap);
/* Use the requested sample rate if one was specified. */ /* Use the requested sample rate if one was specified. */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment