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_oss.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_oss.c')
-rw-r--r-- | audio/out/ao_oss.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c index 08266d96ce..5dc1ea9830 100644 --- a/audio/out/ao_oss.c +++ b/audio/out/ao_oss.c @@ -546,7 +546,7 @@ static int play(struct ao *ao, void **data, int samples, int flags) } // return: 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; if (p->audio_fd < 0) { @@ -560,18 +560,18 @@ static float get_delay(struct ao *ao) #ifdef SNDCTL_DSP_GETODELAY int r = 0; if (ioctl(p->audio_fd, SNDCTL_DSP_GETODELAY, &r) != -1) - return ((float)r) / (float)ao->bps; + return r / (double)ao->bps; #endif p->audio_delay_method = 1; // fallback if not supported } if (p->audio_delay_method == 1) { audio_buf_info zz = {0}; if (ioctl(p->audio_fd, SNDCTL_DSP_GETOSPACE, &zz) != -1) { - return ((float)(p->buffersize - zz.bytes)) / (float)ao->bps; + return (p->buffersize - zz.bytes) / (double)ao->bps; } p->audio_delay_method = 0; // fallback if not supported } - return ((float)p->buffersize) / (float)ao->bps; + return p->buffersize / (double)ao->bps; } |