diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-27 18:10:07 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-27 18:10:07 +0000 |
commit | 01a39f2fc3528481374a8a47e138b622e419f67b (patch) | |
tree | 8756b2863bfe6c863ecf80578f065eecceb79228 /libao2 | |
parent | 7be89f904dc3e6daa001e17e66a7a6edbff39c22 (diff) | |
download | mpv-01a39f2fc3528481374a8a47e138b622e419f67b.tar.bz2 mpv-01a39f2fc3528481374a8a47e138b622e419f67b.tar.xz |
Do not needlessly use (file-)global variables.
Since they also were initialized to a value and non-constant (changed
by ALSA) this might actually have caused bugs.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30440 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_alsa.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index ac9bb3b115..1ad746123a 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -72,14 +72,10 @@ static snd_pcm_format_t alsa_format; static snd_pcm_hw_params_t *alsa_hwparams; static snd_pcm_sw_params_t *alsa_swparams; -static unsigned int alsa_buffer_time = 500000; /* 0.5 s */ -static unsigned int alsa_fragcount = 16; - static size_t bytes_per_sample; static int ao_noblock = 0; -static int open_mode; static int alsa_can_pause = 0; #define ALSA_DEVICE_SIZE 256 @@ -319,6 +315,9 @@ static int try_open_device(const char *device, int open_mode, int try_ac3) */ static int init(int rate_hz, int channels, int format, int flags) { + unsigned int alsa_buffer_time = 500000; /* 0.5 s */ + unsigned int alsa_fragcount = 16; + int open_mode; int err; int block; strarg_t device; |