Commit f455c4b0 authored by David Reid's avatar David Reid

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.
parent 4d6a0ecb
...@@ -770,7 +770,7 @@ typedef struct ...@@ -770,7 +770,7 @@ typedef struct
{ {
const char* pApplicationName; const char* pApplicationName;
const char* pServerName; const char* pServerName;
mal_bool32 noAutoSpawn; // Disables autospawning of the PulseAudio daemon. mal_bool32 tryAutoSpawn; // Enables autospawning of the PulseAudio daemon if necessary.
} pulse; } pulse;
struct struct
...@@ -8810,7 +8810,7 @@ static mal_result mal_device_init__pulse(mal_context* pContext, mal_device_type ...@@ -8810,7 +8810,7 @@ static mal_result mal_device_init__pulse(mal_context* pContext, mal_device_type
goto on_error1; 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) { if (error != MAL_PA_OK) {
result = mal_post_error(pDevice, "[PulseAudio] Failed to connect PulseAudio context.", mal_result_from_pulse(error)); result = mal_post_error(pDevice, "[PulseAudio] Failed to connect PulseAudio context.", mal_result_from_pulse(error));
goto on_error2; goto on_error2;
......
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