mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Allow setting the channel map that is requested from PulseAudio
This commit is contained in:
committed by
David Reid
parent
e1328d9d8a
commit
d87230b4bd
+6
-2
@@ -7107,6 +7107,7 @@ struct ma_device_config
|
||||
{
|
||||
const char* pStreamNamePlayback;
|
||||
const char* pStreamNameCapture;
|
||||
int pChannelMap;
|
||||
} pulse;
|
||||
struct
|
||||
{
|
||||
@@ -8755,6 +8756,9 @@ then be set directly on the structure. Below are the members of the `ma_device_c
|
||||
pulse.pStreamNameCapture
|
||||
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
|
||||
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
|
||||
@@ -30487,7 +30491,7 @@ static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_confi
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
if (pDescriptorCapture->sampleRate != 0) {
|
||||
@@ -30639,7 +30643,7 @@ static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_confi
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
|
||||
Reference in New Issue
Block a user