diff options
Diffstat (limited to 'audio/out/ao_null.c')
-rw-r--r-- | audio/out/ao_null.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/audio/out/ao_null.c b/audio/out/ao_null.c index 2f58ea22c3..0cda8d9604 100644 --- a/audio/out/ao_null.c +++ b/audio/out/ao_null.c @@ -28,7 +28,6 @@ #include "mpv_talloc.h" -#include "config.h" #include "osdep/timer.h" #include "options/m_option.h" #include "common/common.h" @@ -44,13 +43,13 @@ struct priv { int buffersize; // samples bool playing; - int untimed; + bool untimed; float bufferlen; // seconds float speed; // multiplier float latency_sec; // seconds float latency; // samples - int broken_eof; - int broken_delay; + bool broken_eof; + bool broken_delay; // Minimal unit of audio samples that can be written at once. If play() is // called with sizes not aligned to this, a rounded size will be returned. @@ -109,8 +108,6 @@ static int init(struct ao *ao) priv->last_time = mp_time_sec(); - ao->period_size = priv->outburst; - return 0; } @@ -119,10 +116,11 @@ static void uninit(struct ao *ao) { } -// stop playing and empty buffers (for seeking/pause) +// stop playing and empty buffers (for seeking) static void reset(struct ao *ao) { struct priv *priv = ao->priv; + priv->paused = false; priv->buffered = 0; priv->playing = false; } @@ -218,13 +216,13 @@ const struct ao_driver audio_out_null = { .speed = 1, }, .options = (const struct m_option[]) { - {"untimed", OPT_FLAG(untimed)}, + {"untimed", OPT_BOOL(untimed)}, {"buffer", OPT_FLOAT(bufferlen), M_RANGE(0, 100)}, {"outburst", OPT_INT(outburst), M_RANGE(1, 100000)}, {"speed", OPT_FLOAT(speed), M_RANGE(0, 10000)}, {"latency", OPT_FLOAT(latency_sec), M_RANGE(0, 100)}, - {"broken-eof", OPT_FLAG(broken_eof)}, - {"broken-delay", OPT_FLAG(broken_delay)}, + {"broken-eof", OPT_BOOL(broken_eof)}, + {"broken-delay", OPT_BOOL(broken_delay)}, {"channel-layouts", OPT_CHANNELS(channel_layouts)}, {"format", OPT_AUDIOFORMAT(format)}, {0} |