1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-07 07:31:48 +00:00

ao_oss: minor simplification

Equivalent code.
This commit is contained in:
wm4 2014-09-06 12:58:48 +02:00
parent cf04ddca38
commit 4962a1ece3

View File

@ -499,13 +499,11 @@ static void reset(struct ao *ao)
static int get_space(struct ao *ao)
{
struct priv *p = ao->priv;
int playsize = p->outburst;
#ifdef SNDCTL_DSP_GETOSPACE
if (ioctl(p->audio_fd, SNDCTL_DSP_GETOSPACE, &p->zz) != -1) {
// calculate exact buffer space:
playsize = p->zz.fragments * p->zz.fragsize;
return playsize / ao->sstride;
return p->zz.fragments * p->zz.fragsize / ao->sstride;
}
#endif