mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
PulseAudio: Don't try auto-starting the daemon by default.
This reason for this change is that it does not suit the trial and error architecture of mini_al's backend initialization. mal_context.pulse.tryAutoSpawn can be used to enable auto-starting.
This commit is contained in:
@@ -770,7 +770,7 @@ typedef struct
|
||||
{
|
||||
const char* pApplicationName;
|
||||
const char* pServerName;
|
||||
mal_bool32 noAutoSpawn; // Disables autospawning of the PulseAudio daemon.
|
||||
mal_bool32 tryAutoSpawn; // Enables autospawning of the PulseAudio daemon if necessary.
|
||||
} pulse;
|
||||
|
||||
struct
|
||||
@@ -8810,7 +8810,7 @@ static mal_result mal_device_init__pulse(mal_context* pContext, mal_device_type
|
||||
goto on_error1;
|
||||
}
|
||||
|
||||
int error = ((mal_pa_context_connect_proc)pContext->pulse.pa_context_connect)((mal_pa_context*)pDevice->pulse.pPulseContext, pContext->config.pulse.pServerName, (pContext->config.pulse.noAutoSpawn) ? MAL_PA_CONTEXT_NOAUTOSPAWN : 0, NULL);
|
||||
int error = ((mal_pa_context_connect_proc)pContext->pulse.pa_context_connect)((mal_pa_context*)pDevice->pulse.pPulseContext, pContext->config.pulse.pServerName, (pContext->config.pulse.tryAutoSpawn) ? 0 : MAL_PA_CONTEXT_NOAUTOSPAWN, NULL);
|
||||
if (error != MAL_PA_OK) {
|
||||
result = mal_post_error(pDevice, "[PulseAudio] Failed to connect PulseAudio context.", mal_result_from_pulse(error));
|
||||
goto on_error2;
|
||||
|
||||
Reference in New Issue
Block a user