aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar cladisch <cladisch@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-13 10:49:12 +0000
committerGravatar cladisch <cladisch@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-13 10:49:12 +0000
commit6bab259faf696972785525734b20a05e6c1a93d8 (patch)
tree20bfaab01e8b4c878896580c8cb4066d9e38f7d1
parentd0a7ad9b3fff3c34b0fe373237d1af58ef56a173 (diff)
Do not try to count hardware sound cards because there might be none
when using a software plugin for JACK/OSS/Polypaudio/Bluetooth/etc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17849 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libao2/ao_alsa.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c
index 4ed5779d65..bff2cb6270 100644
--- a/libao2/ao_alsa.c
+++ b/libao2/ao_alsa.c
@@ -272,7 +272,6 @@ static int str_maxlen(strarg_t *str) {
static int init(int rate_hz, int channels, int format, int flags)
{
int err;
- int cards = -1;
int block;
strarg_t device;
snd_pcm_uframes_t bufsize;
@@ -298,12 +297,6 @@ static int init(int rate_hz, int channels, int format, int flags)
snd_lib_error_set_handler(alsa_error_handler);
- if ((err = snd_card_next(&cards)) < 0 || cards < 0)
- {
- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: no soundcards found: %s\n", snd_strerror(err));
- return(0);
- }
-
ao_data.samplerate = rate_hz;
ao_data.format = format;
ao_data.channels = channels;
@@ -427,7 +420,7 @@ static int init(int rate_hz, int channels, int format, int flags)
ao_noblock = !block;
parse_device(alsa_device, device.str, device.len);
- mp_msg(MSGT_AO,MSGL_INFO,"alsa-init: %d soundcard%s found, using: %s\n", cards+1,(cards >= 0) ? "" : "s", alsa_device);
+ mp_msg(MSGT_AO,MSGL_INFO,"alsa-init: using device %s\n", alsa_device);
//setting modes for block or nonblock-mode
if (ao_noblock) {