mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
-a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
-a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
-exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
-e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;
and:
sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
-e '181,194!s/\bTRUE\b/true/' -e \
'181,194!s/\bFALSE\b/false/' pulsecore/macro.h
This commit is contained in:
parent
e9822bfcb0
commit
d806b19714
288 changed files with 3360 additions and 3360 deletions
|
|
@ -56,7 +56,7 @@ struct pa_dbusiface_stream {
|
|||
dbus_bool_t mute;
|
||||
pa_proplist *proplist;
|
||||
|
||||
pa_bool_t has_volume;
|
||||
bool has_volume;
|
||||
|
||||
pa_dbus_protocol *dbus_protocol;
|
||||
pa_subscription *subscription;
|
||||
|
|
@ -356,7 +356,7 @@ static void handle_get_volume(DBusConnection *conn, DBusMessage *msg, void *user
|
|||
|
||||
static void handle_set_volume(DBusConnection *conn, DBusMessage *msg, DBusMessageIter *iter, void *userdata) {
|
||||
pa_dbusiface_stream *s = userdata;
|
||||
pa_bool_t volume_writable = TRUE;
|
||||
bool volume_writable = true;
|
||||
DBusMessageIter array_iter;
|
||||
int stream_channels = 0;
|
||||
dbus_uint32_t *volume = NULL;
|
||||
|
|
@ -369,7 +369,7 @@ static void handle_set_volume(DBusConnection *conn, DBusMessage *msg, DBusMessag
|
|||
pa_assert(iter);
|
||||
pa_assert(s);
|
||||
|
||||
volume_writable = (s->type == STREAM_TYPE_PLAYBACK) ? s->sink_input->volume_writable : FALSE;
|
||||
volume_writable = (s->type == STREAM_TYPE_PLAYBACK) ? s->sink_input->volume_writable : false;
|
||||
|
||||
if (!s->has_volume || !volume_writable) {
|
||||
char *str = stream_to_string(s);
|
||||
|
|
@ -405,7 +405,7 @@ static void handle_set_volume(DBusConnection *conn, DBusMessage *msg, DBusMessag
|
|||
new_vol.values[i] = volume[i];
|
||||
}
|
||||
|
||||
pa_sink_input_set_volume(s->sink_input, &new_vol, TRUE, TRUE);
|
||||
pa_sink_input_set_volume(s->sink_input, &new_vol, true, true);
|
||||
|
||||
pa_dbus_send_empty_reply(conn, msg);
|
||||
}
|
||||
|
|
@ -427,7 +427,7 @@ static void handle_get_mute(DBusConnection *conn, DBusMessage *msg, void *userda
|
|||
|
||||
static void handle_set_mute(DBusConnection *conn, DBusMessage *msg, DBusMessageIter *iter, void *userdata) {
|
||||
pa_dbusiface_stream *s = userdata;
|
||||
dbus_bool_t mute = FALSE;
|
||||
dbus_bool_t mute = false;
|
||||
|
||||
pa_assert(conn);
|
||||
pa_assert(msg);
|
||||
|
|
@ -441,7 +441,7 @@ static void handle_set_mute(DBusConnection *conn, DBusMessage *msg, DBusMessageI
|
|||
return;
|
||||
}
|
||||
|
||||
pa_sink_input_set_mute(s->sink_input, mute, TRUE);
|
||||
pa_sink_input_set_mute(s->sink_input, mute, true);
|
||||
|
||||
pa_dbus_send_empty_reply(conn, msg);
|
||||
}
|
||||
|
|
@ -621,7 +621,7 @@ static void handle_move(DBusConnection *conn, DBusMessage *msg, void *userdata)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pa_sink_input_move_to(s->sink_input, sink, TRUE) < 0) {
|
||||
if (pa_sink_input_move_to(s->sink_input, sink, true) < 0) {
|
||||
pa_dbus_send_error(conn, msg, DBUS_ERROR_FAILED,
|
||||
"Moving playback stream %u to sink %s failed.", s->sink_input->index, sink->name);
|
||||
return;
|
||||
|
|
@ -634,7 +634,7 @@ static void handle_move(DBusConnection *conn, DBusMessage *msg, void *userdata)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pa_source_output_move_to(s->source_output, source, TRUE) < 0) {
|
||||
if (pa_source_output_move_to(s->source_output, source, true) < 0) {
|
||||
pa_dbus_send_error(conn, msg, DBUS_ERROR_FAILED,
|
||||
"Moving record stream %u to source %s failed.", s->source_output->index, source->name);
|
||||
return;
|
||||
|
|
@ -736,12 +736,12 @@ static void subscription_cb(pa_core *c, pa_subscription_event_type_t t, uint32_t
|
|||
}
|
||||
|
||||
if (s->type == STREAM_TYPE_PLAYBACK) {
|
||||
pa_bool_t new_mute = FALSE;
|
||||
bool new_mute = false;
|
||||
|
||||
if (s->has_volume) {
|
||||
pa_cvolume new_volume;
|
||||
|
||||
pa_sink_input_get_volume(s->sink_input, &new_volume, TRUE);
|
||||
pa_sink_input_get_volume(s->sink_input, &new_volume, true);
|
||||
|
||||
if (!pa_cvolume_equal(&s->volume, &new_volume)) {
|
||||
dbus_uint32_t volume[PA_CHANNELS_MAX];
|
||||
|
|
@ -857,7 +857,7 @@ pa_dbusiface_stream *pa_dbusiface_stream_new_playback(pa_dbusiface_core *core, p
|
|||
s->has_volume = pa_sink_input_is_volume_readable(sink_input);
|
||||
|
||||
if (s->has_volume)
|
||||
pa_sink_input_get_volume(sink_input, &s->volume, TRUE);
|
||||
pa_sink_input_get_volume(sink_input, &s->volume, true);
|
||||
else
|
||||
pa_cvolume_init(&s->volume);
|
||||
|
||||
|
|
@ -889,9 +889,9 @@ pa_dbusiface_stream *pa_dbusiface_stream_new_record(pa_dbusiface_core *core, pa_
|
|||
s->source = pa_source_ref(source_output->source);
|
||||
s->sample_rate = source_output->sample_spec.rate;
|
||||
pa_cvolume_init(&s->volume);
|
||||
s->mute = FALSE;
|
||||
s->mute = false;
|
||||
s->proplist = pa_proplist_copy(source_output->proplist);
|
||||
s->has_volume = FALSE;
|
||||
s->has_volume = false;
|
||||
s->dbus_protocol = pa_dbus_protocol_get(source_output->core);
|
||||
s->subscription = pa_subscription_new(source_output->core, PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT, subscription_cb, s);
|
||||
s->send_event_slot = pa_hook_connect(&source_output->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_SEND_EVENT],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue