diff options
author | wiz <wiz@pkgsrc.org> | 2014-09-16 21:44:52 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-09-16 21:44:52 +0000 |
commit | 9641c6fd3efe9cf324b51444dd5a6638b18349dc (patch) | |
tree | 70d8d01ccbe41ce7b457e01bb9248bed1c5efc75 /multimedia | |
parent | bd1f3588029c863171838b9f12103e7690d44f07 (diff) | |
download | pkgsrc-9641c6fd3efe9cf324b51444dd5a6638b18349dc.tar.gz |
Improve audio pause/playback patch; from Nat Sloss <nat@> again.
Bump PKGREVISION.
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/mpv/Makefile | 4 | ||||
-rw-r--r-- | multimedia/mpv/distinfo | 4 | ||||
-rw-r--r-- | multimedia/mpv/patches/patch-audio_out_ao__oss.c | 25 |
3 files changed, 14 insertions, 19 deletions
diff --git a/multimedia/mpv/Makefile b/multimedia/mpv/Makefile index 16047cce7cf..5571a3fbd90 100644 --- a/multimedia/mpv/Makefile +++ b/multimedia/mpv/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.3 2014/09/15 17:31:18 wiz Exp $ +# $NetBSD: Makefile,v 1.4 2014/09/16 21:44:52 wiz Exp $ DISTNAME= mpv-0.5.1 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= multimedia MASTER_SITES= -https://github.com/mpv-player/mpv/archive/v${PKGVERSION_NOREV}${EXTRACT_SUFX} diff --git a/multimedia/mpv/distinfo b/multimedia/mpv/distinfo index 641df575fb1..d55ae0c000b 100644 --- a/multimedia/mpv/distinfo +++ b/multimedia/mpv/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.2 2014/09/15 17:31:18 wiz Exp $ +$NetBSD: distinfo,v 1.3 2014/09/16 21:44:52 wiz Exp $ SHA1 (mpv-0.5.1.tar.gz) = a72be602156497545eeb78ee6adfe98720650f27 RMD160 (mpv-0.5.1.tar.gz) = f341e4647257cc35b902c3fe1787840f82a4052e Size (mpv-0.5.1.tar.gz) = 2578630 bytes -SHA1 (patch-audio_out_ao__oss.c) = ee387e66cafe3122dadabbd8246a2dbce90ed18d +SHA1 (patch-audio_out_ao__oss.c) = 8f28abfad37f4b0391e58ac52ed4c105548bf5e6 SHA1 (patch-audio_out_push.c) = bde00289d2490fcfe839e6d7c80d65e4f72dd482 diff --git a/multimedia/mpv/patches/patch-audio_out_ao__oss.c b/multimedia/mpv/patches/patch-audio_out_ao__oss.c index f6e877ba50e..05abb287168 100644 --- a/multimedia/mpv/patches/patch-audio_out_ao__oss.c +++ b/multimedia/mpv/patches/patch-audio_out_ao__oss.c @@ -1,4 +1,4 @@ -$NetBSD: patch-audio_out_ao__oss.c,v 1.1 2014/09/15 17:31:18 wiz Exp $ +$NetBSD: patch-audio_out_ao__oss.c,v 1.2 2014/09/16 21:44:52 wiz Exp $ https://github.com/mpv-player/mpv/issues/1080 @@ -46,27 +46,19 @@ https://github.com/mpv-player/mpv/issues/1080 ioctl(p->audio_fd, SNDCTL_DSP_RESET, NULL); #else close_device(ao); -@@ -548,11 +555,18 @@ static int play(struct ao *ao, void **da - int len = samples * ao->sstride; - if (len == 0) - return len; -+ - if (len > p->outburst || !(flags & AOPLAY_FINAL_CHUNK)) { +@@ -552,7 +559,10 @@ static int play(struct ao *ao, void **da len /= p->outburst; len *= p->outburst; } - len = write(p->audio_fd, data[0], len); + -+ if (p->audio_fd < 0) { -+ usleep((1000000 * samples) / (ao->bps + 1)); -+ return samples; -+ } else ++ if (p->audio_fd >= 0) + len = write(p->audio_fd, data[0], len); + return len / ao->sstride; } -@@ -560,9 +574,12 @@ static int play(struct ao *ao, void **da +@@ -560,9 +570,15 @@ static int play(struct ao *ao, void **da static void audio_resume(struct ao *ao) { struct priv *p = ao->priv; @@ -74,19 +66,22 @@ https://github.com/mpv-player/mpv/issues/1080 +#if !defined (SNDCTL_DSP_RESET) || defined(__NetBSD__) reset(ao); #endif -+ if (p->audio_fd < 0) ++ if (p->audio_fd < 0) { ++ ao->untimed = true; + return; ++ } else ++ ao->untimed=false; + int fillframes = get_space(ao) - p->prepause_space / ao->sstride; if (fillframes > 0) ao_play_silence(ao, fillframes); -@@ -572,6 +589,10 @@ static void audio_resume(struct ao *ao) +@@ -572,6 +588,10 @@ static void audio_resume(struct ao *ao) static float get_delay(struct ao *ao) { struct priv *p = ao->priv; + + if (p->audio_fd < 0) -+ return 1.0; ++ return 0.0250; + /* Calculate how many bytes/second is sent out */ if (p->audio_delay_method == 2) { |