diff stream/stream_radio.c @ 27390:9d95dc936e66

Introduce CONFIG_ALSA preprocessor directive for ALSA 0.9 and 1.x. Use it in all the places that checked for either ALSA 0.9 or 1.x.
author diego
date Wed, 06 Aug 2008 23:19:29 +0000
parents eb7bdbd98210
children 0f1b5b68af32
line wrap: on
line diff
--- a/stream/stream_radio.c	Wed Aug 06 07:50:44 2008 +0000
+++ b/stream/stream_radio.c	Wed Aug 06 23:19:29 2008 +0000
@@ -715,7 +715,7 @@
     int ret;
 
     switch (ai->type) {
-#if defined(CONFIG_ALSA9) || defined(CONFIG_ALSA1X)
+#ifdef CONFIG_ALSA
     case AUDIO_IN_ALSA:
         //device opened in non-blocking mode
         ret = snd_pcm_readi(ai->alsa.handle, buffer, ai->alsa.chunk_size);
@@ -836,7 +836,7 @@
 
     priv->do_capture=1;
     mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_CaptureStarting);
-#if defined(CONFIG_ALSA9) || defined(CONFIG_ALSA1X)
+#ifdef CONFIG_ALSA
     while ((tmp = strrchr(priv->radio_param->adevice, '='))){
         tmp[0] = ':';
         //adevice option looks like ALSA device name. Switching to ALSA
@@ -862,7 +862,7 @@
     if(is_oss)
         ioctl(priv->audio_in.oss.audio_fd, SNDCTL_DSP_NONBLOCK, 0);
 #endif
-#if defined(CONFIG_ALSA9) || defined(CONFIG_ALSA1X)
+#ifdef CONFIG_ALSA
     if(!is_oss)
         snd_pcm_nonblock(priv->audio_in.alsa.handle,1);
 #endif