Mercurial > mplayer.hg
comparison libao2/ao_alsa.c @ 35443:f045a1d92c06
Make AF_FORMAT_IS_IEC61937 include AF_FORMAT_IS_AC3.
Our AC3 "sample format" is also iec61937.
author | reimar |
---|---|
date | Fri, 30 Nov 2012 20:10:40 +0000 |
parents | 4078c5a09d8e |
children | e53785e5205b |
comparison
equal
deleted
inserted
replaced
35442:2b45dfcde03c | 35443:f045a1d92c06 |
---|---|
109 | 109 |
110 long pmin, pmax; | 110 long pmin, pmax; |
111 long get_vol, set_vol; | 111 long get_vol, set_vol; |
112 float f_multi; | 112 float f_multi; |
113 | 113 |
114 if(AF_FORMAT_IS_AC3(ao_data.format) || AF_FORMAT_IS_IEC61937(ao_data.format)) | 114 if(AF_FORMAT_IS_IEC61937(ao_data.format)) |
115 return CONTROL_TRUE; | 115 return CONTROL_TRUE; |
116 | 116 |
117 if(mixer_channel) { | 117 if(mixer_channel) { |
118 char *test_mix_index; | 118 char *test_mix_index; |
119 | 119 |
408 * sets opening sequence for SPDIF | 408 * sets opening sequence for SPDIF |
409 * sets also the playback and other switches 'on the fly' | 409 * sets also the playback and other switches 'on the fly' |
410 * while opening the abstract alias for the spdif subdevice | 410 * while opening the abstract alias for the spdif subdevice |
411 * 'iec958' | 411 * 'iec958' |
412 */ | 412 */ |
413 if (AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format)) { | 413 if (AF_FORMAT_IS_IEC61937(format)) { |
414 device.str = "iec958"; | 414 device.str = "iec958"; |
415 mp_msg(MSGT_AO,MSGL_V,"alsa-spdif-init: playing AC3/iec61937/iec958, %i channels\n", channels); | 415 mp_msg(MSGT_AO,MSGL_V,"alsa-spdif-init: playing AC3/iec61937/iec958, %i channels\n", channels); |
416 } | 416 } |
417 else | 417 else |
418 /* in any case for multichannel playback we should select | 418 /* in any case for multichannel playback we should select |
459 | 459 |
460 mp_msg(MSGT_AO,MSGL_V,"alsa-init: using device %s\n", alsa_device); | 460 mp_msg(MSGT_AO,MSGL_V,"alsa-init: using device %s\n", alsa_device); |
461 | 461 |
462 if (!alsa_handler) { | 462 if (!alsa_handler) { |
463 int open_mode = block ? 0 : SND_PCM_NONBLOCK; | 463 int open_mode = block ? 0 : SND_PCM_NONBLOCK; |
464 int isac3 = AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format); | 464 int isac3 = AF_FORMAT_IS_IEC61937(format); |
465 //modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC | 465 //modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC |
466 mp_msg(MSGT_AO,MSGL_V,"alsa-init: opening device in %sblocking mode\n", block ? "" : "non-"); | 466 mp_msg(MSGT_AO,MSGL_V,"alsa-init: opening device in %sblocking mode\n", block ? "" : "non-"); |
467 if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0) | 467 if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0) |
468 { | 468 { |
469 if (err != -EBUSY && !block) { | 469 if (err != -EBUSY && !block) { |