[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/10] Use afplay and libao for playing sound on OS X in dummy
From: |
Boris Dušek |
Subject: |
[PATCH 06/10] Use afplay and libao for playing sound on OS X in dummy |
Date: |
Mon, 23 Jul 2012 15:22:31 +0200 |
From: Boris Dus?ek <address@hidden>
To: address@hidden
afplay is command present from Leopard (10.5).
libao is the only audio output module that makes sense on OS X because
it uses Core Audio and does not try to replace it.
---
src/audio/libao.c | 4 ++++
src/modules/dummy.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/audio/libao.c b/src/audio/libao.c
index 3c473eb..ce934c6 100644
--- a/src/audio/libao.c
+++ b/src/audio/libao.c
@@ -221,7 +221,11 @@ static void libao_set_loglevel(int level)
static char const *libao_get_playcmd(void)
{
+#ifdef __APPLE__
+ return "afplay";
+#else
return NULL;
+#endif
}
/* Provide the libao backend. */
diff --git a/src/modules/dummy.c b/src/modules/dummy.c
index 6784cb8..c66223f 100644
--- a/src/modules/dummy.c
+++ b/src/modules/dummy.c
@@ -232,9 +232,13 @@ void _dummy_child()
#define PLAY_CMD(cmd) #cmd " " DATADIR "/dummy-message.wav > /dev/null 2>
/dev/null"
static const char *const play_cmds[] = {
+#ifdef __APPLE__
+ PLAY_CMD(afplay),
+#else
PLAY_CMD(play),
PLAY_CMD(aplay),
PLAY_CMD(paplay),
+#endif
NULL
};
#undef PLAY_CMD
--
1.7.7.5 (Apple Git-26)
- [PATCH 01/10] Remove references to TEMP_FAILURE_RETRY, Boris Dušek, 2012/07/23
- [PATCH 02/10] Do not exit on localization init fail, Boris Dušek, 2012/07/23
- [PATCH 03/10] Fix termination of threads in spd_close, Boris Dušek, 2012/07/23
- [PATCH 04/10] Cleanup execution of commands in dummy, Boris Dušek, 2012/07/23
- [PATCH 05/10] Fix audio module dynamic opening on OS X, Boris Dušek, 2012/07/23
- [PATCH 06/10] Use afplay and libao for playing sound on OS X in dummy,
Boris Dušek <=
- [PATCH 07/10] Abstract unnamed semaphore interface and add OS X implementation, Boris Dušek, 2012/07/23
- [PATCH 08/10] Use launchd on OS X for launching the server, Boris Dušek, 2012/07/23
- [PATCH 09/10] Installation instructions for OS X, Boris Dušek, 2012/07/23
- [PATCH 10/10] Native SSM output module for OS X, Boris Dušek, 2012/07/23