mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 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
|
|
@ -40,14 +40,14 @@ PA_C_DECL_END
|
|||
|
||||
#define BLOCK_SIZE_US 10000
|
||||
|
||||
#define DEFAULT_HIGH_PASS_FILTER TRUE
|
||||
#define DEFAULT_NOISE_SUPPRESSION TRUE
|
||||
#define DEFAULT_ANALOG_GAIN_CONTROL TRUE
|
||||
#define DEFAULT_DIGITAL_GAIN_CONTROL FALSE
|
||||
#define DEFAULT_MOBILE FALSE
|
||||
#define DEFAULT_HIGH_PASS_FILTER true
|
||||
#define DEFAULT_NOISE_SUPPRESSION true
|
||||
#define DEFAULT_ANALOG_GAIN_CONTROL true
|
||||
#define DEFAULT_DIGITAL_GAIN_CONTROL false
|
||||
#define DEFAULT_MOBILE false
|
||||
#define DEFAULT_ROUTING_MODE "speakerphone"
|
||||
#define DEFAULT_COMFORT_NOISE TRUE
|
||||
#define DEFAULT_DRIFT_COMPENSATION FALSE
|
||||
#define DEFAULT_COMFORT_NOISE true
|
||||
#define DEFAULT_DRIFT_COMPENSATION false
|
||||
|
||||
static const char* const valid_modargs[] = {
|
||||
"high_pass_filter",
|
||||
|
|
@ -76,13 +76,13 @@ static int routing_mode_from_string(const char *rmode) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
pa_bool_t pa_webrtc_ec_init(pa_core *c, pa_echo_canceller *ec,
|
||||
bool pa_webrtc_ec_init(pa_core *c, pa_echo_canceller *ec,
|
||||
pa_sample_spec *rec_ss, pa_channel_map *rec_map,
|
||||
pa_sample_spec *play_ss, pa_channel_map *play_map,
|
||||
pa_sample_spec *out_ss, pa_channel_map *out_map,
|
||||
uint32_t *nframes, const char *args) {
|
||||
webrtc::AudioProcessing *apm = NULL;
|
||||
pa_bool_t hpf, ns, agc, dgc, mobile, cn;
|
||||
bool hpf, ns, agc, dgc, mobile, cn;
|
||||
int rm = -1;
|
||||
pa_modargs *ma;
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ pa_bool_t pa_webrtc_ec_init(pa_core *c, pa_echo_canceller *ec,
|
|||
goto fail;
|
||||
}
|
||||
|
||||
dgc = agc ? FALSE : DEFAULT_DIGITAL_GAIN_CONTROL;
|
||||
dgc = agc ? false : DEFAULT_DIGITAL_GAIN_CONTROL;
|
||||
if (pa_modargs_get_value_boolean(ma, "digital_gain_control", &dgc) < 0) {
|
||||
pa_log("Failed to parse digital_gain_control value");
|
||||
goto fail;
|
||||
|
|
@ -197,17 +197,17 @@ pa_bool_t pa_webrtc_ec_init(pa_core *c, pa_echo_canceller *ec,
|
|||
if (mobile && rm <= webrtc::EchoControlMobile::kEarpiece) {
|
||||
/* Maybe this should be a knob, but we've got a lot of knobs already */
|
||||
apm->gain_control()->set_mode(webrtc::GainControl::kFixedDigital);
|
||||
ec->params.priv.webrtc.agc = FALSE;
|
||||
ec->params.priv.webrtc.agc = false;
|
||||
} else if (dgc) {
|
||||
apm->gain_control()->set_mode(webrtc::GainControl::kAdaptiveDigital);
|
||||
ec->params.priv.webrtc.agc = FALSE;
|
||||
ec->params.priv.webrtc.agc = false;
|
||||
} else {
|
||||
apm->gain_control()->set_mode(webrtc::GainControl::kAdaptiveAnalog);
|
||||
if (apm->gain_control()->set_analog_level_limits(0, PA_VOLUME_NORM-1) != apm->kNoError) {
|
||||
pa_log("Failed to initialise AGC");
|
||||
goto fail;
|
||||
}
|
||||
ec->params.priv.webrtc.agc = TRUE;
|
||||
ec->params.priv.webrtc.agc = true;
|
||||
}
|
||||
|
||||
apm->gain_control()->Enable(true);
|
||||
|
|
@ -221,7 +221,7 @@ pa_bool_t pa_webrtc_ec_init(pa_core *c, pa_echo_canceller *ec,
|
|||
*nframes = ec->params.priv.webrtc.blocksize / pa_frame_size(out_ss);
|
||||
|
||||
pa_modargs_free(ma);
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
fail:
|
||||
if (ma)
|
||||
|
|
@ -229,7 +229,7 @@ fail:
|
|||
if (apm)
|
||||
webrtc::AudioProcessing::Destroy(apm);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void pa_webrtc_ec_play(pa_echo_canceller *ec, const uint8_t *play) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue