Commit 319ba94a authored by Max Kellermann's avatar Max Kellermann

output_control: ao_command() calls ao_command_async()

Merge some code.
parent 1025f0be
...@@ -47,20 +47,19 @@ static void ao_command_wait(struct audio_output *ao) ...@@ -47,20 +47,19 @@ static void ao_command_wait(struct audio_output *ao)
} }
} }
static void ao_command(struct audio_output *ao, enum audio_output_command cmd) static void ao_command_async(struct audio_output *ao,
enum audio_output_command cmd)
{ {
assert(ao->command == AO_COMMAND_NONE); assert(ao->command == AO_COMMAND_NONE);
ao->command = cmd; ao->command = cmd;
g_cond_signal(ao->cond); g_cond_signal(ao->cond);
ao_command_wait(ao);
} }
static void ao_command_async(struct audio_output *ao, static void
enum audio_output_command cmd) ao_command(struct audio_output *ao, enum audio_output_command cmd)
{ {
assert(ao->command == AO_COMMAND_NONE); ao_command_async(ao, cmd);
ao->command = cmd; ao_command_wait(ao);
g_cond_signal(ao->cond);
} }
void void
......
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