diff options
author | Christoph Heinrich <christoph.heinrich@student.tugraz.at> | 2023-02-20 04:32:50 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-02-21 17:15:17 +0000 |
commit | 91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29 (patch) | |
tree | 448b141d92c9ea7636954213b587aaf380fc21db /audio/out/ao_alsa.c | |
parent | b9850a6e8c45f95563a703af7f21dfe1c1ee40b6 (diff) | |
download | mpv-91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29.tar.bz2 mpv-91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29.tar.xz |
options: transition options from OPT_FLAG to OPT_BOOL
c78482045444c488bb7948305d583a55d17cd236 introduced a bool option type
as a replacement for the flag type, but didn't actually transition and
remove the flag type because it would have been too much mundane work.
Diffstat (limited to 'audio/out/ao_alsa.c')
-rw-r--r-- | audio/out/ao_alsa.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index ee43578e4a..64a41901c3 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -56,9 +56,9 @@ struct ao_alsa_opts { char *mixer_device; char *mixer_name; int mixer_index; - int resample; - int ni; - int ignore_chmap; + bool resample; + bool ni; + bool ignore_chmap; int buffer_time; int frags; }; @@ -66,12 +66,12 @@ struct ao_alsa_opts { #define OPT_BASE_STRUCT struct ao_alsa_opts static const struct m_sub_options ao_alsa_conf = { .opts = (const struct m_option[]) { - {"alsa-resample", OPT_FLAG(resample)}, + {"alsa-resample", OPT_BOOL(resample)}, {"alsa-mixer-device", OPT_STRING(mixer_device)}, {"alsa-mixer-name", OPT_STRING(mixer_name)}, {"alsa-mixer-index", OPT_INT(mixer_index), M_RANGE(0, 99)}, - {"alsa-non-interleaved", OPT_FLAG(ni)}, - {"alsa-ignore-chmap", OPT_FLAG(ignore_chmap)}, + {"alsa-non-interleaved", OPT_BOOL(ni)}, + {"alsa-ignore-chmap", OPT_BOOL(ignore_chmap)}, {"alsa-buffer-time", OPT_INT(buffer_time), M_RANGE(0, INT_MAX)}, {"alsa-periods", OPT_INT(frags), M_RANGE(0, INT_MAX)}, {0} @@ -80,7 +80,6 @@ static const struct m_sub_options ao_alsa_conf = { .mixer_device = "default", .mixer_name = "Master", .mixer_index = 0, - .ni = 0, .buffer_time = 100000, .frags = 4, }, |