diff options
author | 2010-01-27 18:21:27 +0000 | |
---|---|---|
committer | 2010-01-27 18:21:27 +0000 | |
commit | 882ce0cd5e26f1b8d4360ba2a390670cc1f4ca6b (patch) | |
tree | 5e5929a003ed9bcd5bc516a5e43836b60eec0faf | |
parent | 5f326498f7e2de70361785baf4516e54dd2294ab (diff) |
Remove a useless global variable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30443 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_alsa.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index a117c95965..c46e3a0d41 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -74,8 +74,6 @@ static snd_pcm_sw_params_t *alsa_swparams; static size_t bytes_per_sample; -static int ao_noblock; - static int alsa_can_pause; #define ALSA_DEVICE_SIZE 256 @@ -467,13 +465,12 @@ static int init(int rate_hz, int channels, int format, int flags) print_help(); return 0; } - ao_noblock = !block; parse_device(alsa_device, device.str, device.len); mp_msg(MSGT_AO,MSGL_V,"alsa-init: using device %s\n", alsa_device); //setting modes for block or nonblock-mode - if (ao_noblock) { + if (!block) { open_mode = SND_PCM_NONBLOCK; } else { @@ -485,7 +482,7 @@ static int init(int rate_hz, int channels, int format, int flags) //modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0) { - if (err != -EBUSY && ao_noblock) { + if (err != -EBUSY && !block) { mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_OpenInNonblockModeFailed); if ((err = try_open_device(alsa_device, 0, isac3)) < 0) { mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PlaybackOpenError, snd_strerror(err)); |