[MPlayer-cvslog] r34851 - trunk/libao2/ao_alsa.c

ib subversion at mplayerhq.hu
Tue Apr 10 15:17:49 CEST 2012


Author: ib
Date: Tue Apr 10 15:17:49 2012
New Revision: 34851

Log:
Clarify the used opening modes by improving the verbose status messages.

By now, the (only) message indicates that the device is always opened in
blocking mode, regardless of the "block" suboption to the ALSA output
driver.

Modified:
   trunk/libao2/ao_alsa.c

Modified: trunk/libao2/ao_alsa.c
==============================================================================
--- trunk/libao2/ao_alsa.c	Mon Apr  9 13:25:57 2012	(r34850)
+++ trunk/libao2/ao_alsa.c	Tue Apr 10 15:17:49 2012	(r34851)
@@ -463,6 +463,7 @@ static int init(int rate_hz, int channel
       int open_mode = block ? 0 : SND_PCM_NONBLOCK;
       int isac3 =  AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format);
       //modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC
+      mp_msg(MSGT_AO,MSGL_V,"alsa-init: opening device in %sblocking mode\n", block ? "" : "non-");
       if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0)
 	{
 	  if (err != -EBUSY && !block) {
@@ -480,7 +481,7 @@ static int init(int rate_hz, int channel
       if ((err = snd_pcm_nonblock(alsa_handler, 0)) < 0) {
          mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSetBlockMode, snd_strerror(err));
       } else {
-	mp_msg(MSGT_AO,MSGL_V,"alsa-init: pcm opened in blocking mode\n");
+	mp_msg(MSGT_AO,MSGL_V,"alsa-init: device reopened in blocking mode\n");
       }
 
       snd_pcm_hw_params_alloca(&alsa_hwparams);


More information about the MPlayer-cvslog mailing list