[MPlayer-cvslog] r35537 - in trunk: libaf/af_format.h libao2/ao_alsa.c
reimar
subversion at mplayerhq.hu
Fri Nov 30 21:10:40 CET 2012
Author: reimar
Date: Fri Nov 30 21:10:40 2012
New Revision: 35537
Log:
Make AF_FORMAT_IS_IEC61937 include AF_FORMAT_IS_AC3.
Our AC3 "sample format" is also iec61937.
Modified:
trunk/libaf/af_format.h
trunk/libao2/ao_alsa.c
Modified: trunk/libaf/af_format.h
==============================================================================
--- trunk/libaf/af_format.h Fri Nov 30 21:08:29 2012 (r35536)
+++ trunk/libaf/af_format.h Fri Nov 30 21:10:40 2012 (r35537)
@@ -115,7 +115,7 @@
#define AF_FORMAT_UNKNOWN (-1)
#define AF_FORMAT_IS_AC3(fmt) (((fmt) & AF_FORMAT_SPECIAL_MASK) == AF_FORMAT_AC3)
-#define AF_FORMAT_IS_IEC61937(fmt) (((fmt) & AF_FORMAT_SPECIAL_MASK) == AF_FORMAT_IEC61937)
+#define AF_FORMAT_IS_IEC61937(fmt) (AF_FORMAT_IS_AC3(fmt) || ((fmt) & AF_FORMAT_SPECIAL_MASK) == AF_FORMAT_IEC61937)
int af_str2fmt(const char *str);
int af_str2fmt_short(const char *str);
Modified: trunk/libao2/ao_alsa.c
==============================================================================
--- trunk/libao2/ao_alsa.c Fri Nov 30 21:08:29 2012 (r35536)
+++ trunk/libao2/ao_alsa.c Fri Nov 30 21:10:40 2012 (r35537)
@@ -111,7 +111,7 @@ static int control(int cmd, void *arg)
long get_vol, set_vol;
float f_multi;
- if(AF_FORMAT_IS_AC3(ao_data.format) || AF_FORMAT_IS_IEC61937(ao_data.format))
+ if(AF_FORMAT_IS_IEC61937(ao_data.format))
return CONTROL_TRUE;
if(mixer_channel) {
@@ -410,7 +410,7 @@ static int init(int rate_hz, int channel
* while opening the abstract alias for the spdif subdevice
* 'iec958'
*/
- if (AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format)) {
+ if (AF_FORMAT_IS_IEC61937(format)) {
device.str = "iec958";
mp_msg(MSGT_AO,MSGL_V,"alsa-spdif-init: playing AC3/iec61937/iec958, %i channels\n", channels);
}
@@ -461,7 +461,7 @@ static int init(int rate_hz, int channel
if (!alsa_handler) {
int open_mode = block ? 0 : SND_PCM_NONBLOCK;
- int isac3 = AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format);
+ int isac3 = 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)
More information about the MPlayer-cvslog
mailing list