aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-01-10 21:52:38 +0100
committerMax Kellermann <max@duempel.org>2011-01-10 21:52:38 +0100
commit319ba94a527ac29d3b42543f0f9679a60bc308d6 (patch)
tree5f50887d0e05141c9a6a057253fcec8088372bff /src/output_control.c
parent1025f0be915b93887ada998aa793ddf0becc2ccd (diff)
downloadmpd-319ba94a527ac29d3b42543f0f9679a60bc308d6.tar.gz
mpd-319ba94a527ac29d3b42543f0f9679a60bc308d6.tar.xz
mpd-319ba94a527ac29d3b42543f0f9679a60bc308d6.zip
output_control: ao_command() calls ao_command_async()
Merge some code.
Diffstat (limited to 'src/output_control.c')
-rw-r--r--src/output_control.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/output_control.c b/src/output_control.c
index 161404f78..371730ef2 100644
--- a/src/output_control.c
+++ b/src/output_control.c
@@ -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);
ao->command = cmd;
g_cond_signal(ao->cond);
- ao_command_wait(ao);
}
-static void ao_command_async(struct audio_output *ao,
- enum audio_output_command cmd)
+static void
+ao_command(struct audio_output *ao, enum audio_output_command cmd)
{
- assert(ao->command == AO_COMMAND_NONE);
- ao->command = cmd;
- g_cond_signal(ao->cond);
+ ao_command_async(ao, cmd);
+ ao_command_wait(ao);
}
void