diff options
author | wm4 <wm4@nowhere> | 2014-11-09 11:45:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-09 11:45:04 +0100 |
commit | 5db0fbd95ec8790cd1a133bb57f701c5c9f970c0 (patch) | |
tree | f7a6d9a3c7dc656107ea440c47fefef563313125 /audio/out/ao_alsa.c | |
parent | 3d7d1f3f264e55857c83b8a94aa24081ae45dd4d (diff) | |
download | mpv-5db0fbd95ec8790cd1a133bb57f701c5c9f970c0.tar.bz2 mpv-5db0fbd95ec8790cd1a133bb57f701c5c9f970c0.tar.xz |
audio/out: consistently use double return type for get_delay
ao_get_delay() returns double, but the get_delay callback still
returned float.
Diffstat (limited to 'audio/out/ao_alsa.c')
-rw-r--r-- | audio/out/ao_alsa.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index 31c4ff6831..8d85a0a660 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -54,7 +54,7 @@ struct priv { snd_pcm_format_t alsa_fmt; int can_pause; snd_pcm_sframes_t prepause_frames; - float delay_before_pause; + double delay_before_pause; int buffersize; // in frames int outburst; // in frames @@ -84,7 +84,7 @@ struct priv { MP_WARN(ao, "%s: %s\n", (message), snd_strerror(err)); \ } while (0) -static float get_delay(struct ao *ao); +static double get_delay(struct ao *ao); static void uninit(struct ao *ao); /* to set/get/query special features/parameters */ @@ -586,7 +586,7 @@ static void audio_pause(struct ao *ao) if (snd_pcm_delay(p->alsa, &p->prepause_frames) < 0 || p->prepause_frames < 0) p->prepause_frames = 0; - p->delay_before_pause = p->prepause_frames / (float)ao->samplerate; + p->delay_before_pause = p->prepause_frames / (double)ao->samplerate; err = snd_pcm_drop(p->alsa); CHECK_ALSA_ERROR("pcm drop error"); @@ -697,7 +697,7 @@ alsa_error: } /* delay in seconds between first and last sample in buffer */ -static float get_delay(struct ao *ao) +static double get_delay(struct ao *ao) { struct priv *p = ao->priv; snd_pcm_sframes_t delay; @@ -713,7 +713,7 @@ static float get_delay(struct ao *ao) snd_pcm_forward(p->alsa, -delay); delay = 0; } - return (float)delay / (float)ao->samplerate; + return delay / (double)ao->samplerate; } #define MAX_POLL_FDS 20 |