Recently Written · git

sad

sad (2f30.org simple audio daemon) with a Cygwin/OSS port on branch cygwin

git clone https://github.com/equwal/sad

Log | Files | Refs


commit 29a81782e752a5ee6a10cbe72c2e60d1c692f138
Hiltjo Posthuma <hiltjo@codemadness.org>
2014-12-28 23:18:37 +0100

alsa: put device at top

 alsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/alsa.c b/alsa.c
index c1cc48d..0d117db 100644
--- a/alsa.c
+++ b/alsa.c
@@ -13,6 +13,7 @@
 static snd_pcm_t *hdl;
 static snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE;
 static const int frame_size = 4; /* TODO: don't hardcode */
+static const char *device = "default"; /* TODO: make configurable? */
 
 static int
 alsavol(int vol)
@@ -23,7 +24,6 @@ alsavol(int vol)
 static int
 alsaopen(int bits, int rate, int channels)
 {
-	const char *device = "default"; /* TODO: make configurable? */
 	int r;
 
 	if ((r = snd_pcm_open(&hdl, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) {