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:
poljar (Damir Jelić) 2013-06-27 19:28:09 +02:00 committed by Tanu Kaskinen
parent e9822bfcb0
commit d806b19714
288 changed files with 3360 additions and 3360 deletions

View file

@ -56,7 +56,7 @@ static void pa_adrian_ec_fixate_spec(pa_sample_spec *rec_ss, pa_channel_map *rec
*rec_map = *out_map;
}
pa_bool_t pa_adrian_ec_init(pa_core *c, pa_echo_canceller *ec,
bool pa_adrian_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,
@ -93,12 +93,12 @@ pa_bool_t pa_adrian_ec_init(pa_core *c, pa_echo_canceller *ec,
goto fail;
pa_modargs_free(ma);
return TRUE;
return true;
fail:
if (ma)
pa_modargs_free(ma);
return FALSE;
return false;
}
void pa_adrian_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out) {

View file

@ -68,7 +68,7 @@ struct pa_echo_canceller_params {
void *apm;
uint32_t blocksize;
pa_sample_spec sample_spec;
pa_bool_t agc;
bool agc;
} webrtc;
#endif
/* each canceller-specific structure goes here */
@ -76,14 +76,14 @@ struct pa_echo_canceller_params {
/* Set this if canceller can do drift compensation. Also see set_drift()
* below */
pa_bool_t drift_compensation;
bool drift_compensation;
};
typedef struct pa_echo_canceller pa_echo_canceller;
struct pa_echo_canceller {
/* Initialise canceller engine. */
pa_bool_t (*init) (pa_core *c,
bool (*init) (pa_core *c,
pa_echo_canceller *ec,
pa_sample_spec *rec_ss,
pa_channel_map *rec_map,
@ -138,7 +138,7 @@ void pa_echo_canceller_set_capture_volume(pa_echo_canceller *ec, pa_cvolume *v);
uint32_t pa_echo_canceller_blocksize_power2(unsigned rate, unsigned ms);
/* Null canceller functions */
pa_bool_t pa_null_ec_init(pa_core *c, pa_echo_canceller *ec,
bool pa_null_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,
@ -148,7 +148,7 @@ void pa_null_ec_done(pa_echo_canceller *ec);
#ifdef HAVE_SPEEX
/* Speex canceller functions */
pa_bool_t pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec,
bool pa_speex_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,
@ -159,7 +159,7 @@ void pa_speex_ec_done(pa_echo_canceller *ec);
#ifdef HAVE_ADRIAN_EC
/* Adrian Andre's echo canceller */
pa_bool_t pa_adrian_ec_init(pa_core *c, pa_echo_canceller *ec,
bool pa_adrian_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,
@ -171,7 +171,7 @@ void pa_adrian_ec_done(pa_echo_canceller *ec);
#ifdef HAVE_WEBRTC
/* WebRTC canceller functions */
PA_C_DECL_BEGIN
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,

View file

@ -58,7 +58,7 @@
PA_MODULE_AUTHOR("Wim Taymans");
PA_MODULE_DESCRIPTION("Echo Cancellation");
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_LOAD_ONCE(false);
PA_MODULE_USAGE(
_("source_name=<name for the source> "
"source_properties=<properties for the source> "
@ -140,8 +140,8 @@ static const pa_echo_canceller ec_table[] = {
#define DEFAULT_CHANNELS 1
#define DEFAULT_ADJUST_TIME_USEC (1*PA_USEC_PER_SEC)
#define DEFAULT_ADJUST_TOLERANCE (5*PA_USEC_PER_MSEC)
#define DEFAULT_SAVE_AEC FALSE
#define DEFAULT_AUTOLOADED FALSE
#define DEFAULT_SAVE_AEC false
#define DEFAULT_AUTOLOADED false
#define MEMBLOCKQ_MAXLENGTH (16*1024*1024)
@ -206,29 +206,29 @@ struct userdata {
pa_core *core;
pa_module *module;
pa_bool_t autoloaded;
pa_bool_t dead;
pa_bool_t save_aec;
bool autoloaded;
bool dead;
bool save_aec;
pa_echo_canceller *ec;
uint32_t source_output_blocksize;
uint32_t source_blocksize;
uint32_t sink_blocksize;
pa_bool_t need_realign;
bool need_realign;
/* to wakeup the source I/O thread */
pa_asyncmsgq *asyncmsgq;
pa_rtpoll_item *rtpoll_item_read, *rtpoll_item_write;
pa_source *source;
pa_bool_t source_auto_desc;
bool source_auto_desc;
pa_source_output *source_output;
pa_memblockq *source_memblockq; /* echo canceler needs fixed sized chunks */
size_t source_skip;
pa_sink *sink;
pa_bool_t sink_auto_desc;
bool sink_auto_desc;
pa_sink_input *sink_input;
pa_memblockq *sink_memblockq;
int64_t send_counter; /* updated in sink IO thread */
@ -250,7 +250,7 @@ struct userdata {
FILE *canceled_file;
FILE *drift_file;
pa_bool_t use_volume_sharing;
bool use_volume_sharing;
struct {
pa_cvolume current_volume;
@ -479,9 +479,9 @@ static int source_set_state_cb(pa_source *s, pa_source_state_t state) {
pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
pa_atomic_store(&u->request_resync, 1);
pa_source_output_cork(u->source_output, FALSE);
pa_source_output_cork(u->source_output, false);
} else if (state == PA_SOURCE_SUSPENDED) {
pa_source_output_cork(u->source_output, TRUE);
pa_source_output_cork(u->source_output, true);
}
return 0;
@ -504,9 +504,9 @@ static int sink_set_state_cb(pa_sink *s, pa_sink_state_t state) {
pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
pa_atomic_store(&u->request_resync, 1);
pa_sink_input_cork(u->sink_input, FALSE);
pa_sink_input_cork(u->sink_input, false);
} else if (state == PA_SINK_SUSPENDED) {
pa_sink_input_cork(u->sink_input, TRUE);
pa_sink_input_cork(u->sink_input, true);
}
return 0;
@ -565,7 +565,7 @@ static void sink_request_rewind_cb(pa_sink *s) {
/* Just hand this one over to the master sink */
pa_sink_input_request_rewind(u->sink_input,
s->thread_info.rewind_nbytes, TRUE, FALSE, FALSE);
s->thread_info.rewind_nbytes, true, false, false);
}
/* Called from main context */
@ -579,7 +579,7 @@ static void source_set_volume_cb(pa_source *s) {
!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
return;
pa_source_output_set_volume(u->source_output, &s->real_volume, s->save_volume, TRUE);
pa_source_output_set_volume(u->source_output, &s->real_volume, s->save_volume, true);
}
/* Called from main context */
@ -593,7 +593,7 @@ static void sink_set_volume_cb(pa_sink *s) {
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
return;
pa_sink_input_set_volume(u->sink_input, &s->real_volume, s->save_volume, TRUE);
pa_sink_input_set_volume(u->sink_input, &s->real_volume, s->save_volume, true);
}
/* Called from main context. */
@ -608,7 +608,7 @@ static void source_get_volume_cb(pa_source *s) {
!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
return;
pa_source_output_get_volume(u->source_output, &v, TRUE);
pa_source_output_get_volume(u->source_output, &v, true);
if (pa_cvolume_equal(&s->real_volume, &v))
/* no change */
@ -1003,7 +1003,7 @@ static void source_output_process_rewind_cb(pa_source_output *o, size_t nbytes)
pa_memblockq_rewind(u->sink_memblockq, nbytes);
/* manipulate write index */
pa_memblockq_seek(u->source_memblockq, -nbytes, PA_SEEK_RELATIVE, TRUE);
pa_memblockq_seek(u->source_memblockq, -nbytes, PA_SEEK_RELATIVE, true);
pa_log_debug("Source rewind (%lld) %lld", (long long) nbytes,
(long long) pa_memblockq_get_length (u->source_memblockq));
@ -1058,7 +1058,7 @@ static int source_output_process_msg_cb(pa_msgobject *obj, int code, void *data,
if (u->source_output->source->thread_info.state == PA_SOURCE_RUNNING)
pa_memblockq_push_align(u->sink_memblockq, chunk);
else
pa_memblockq_flush_write(u->sink_memblockq, TRUE);
pa_memblockq_flush_write(u->sink_memblockq, true);
u->recv_counter += (int64_t) chunk->length;
@ -1069,9 +1069,9 @@ static int source_output_process_msg_cb(pa_msgobject *obj, int code, void *data,
/* manipulate write index, never go past what we have */
if (PA_SOURCE_IS_OPENED(u->source_output->source->thread_info.state))
pa_memblockq_seek(u->sink_memblockq, -offset, PA_SEEK_RELATIVE, TRUE);
pa_memblockq_seek(u->sink_memblockq, -offset, PA_SEEK_RELATIVE, true);
else
pa_memblockq_flush_write(u->sink_memblockq, TRUE);
pa_memblockq_flush_write(u->sink_memblockq, true);
pa_log_debug("Sink rewind (%lld)", (long long) offset);
@ -1363,7 +1363,7 @@ static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t s
if (PA_SINK_INPUT_IS_LINKED(state) &&
i->thread_info.state == PA_SINK_INPUT_INIT) {
pa_log_debug("Requesting rewind due to state change.");
pa_sink_input_request_rewind(i, 0, FALSE, TRUE, TRUE);
pa_sink_input_request_rewind(i, 0, false, true, true);
}
}
@ -1375,7 +1375,7 @@ static void source_output_kill_cb(pa_source_output *o) {
pa_assert_ctl_context();
pa_assert_se(u = o->userdata);
u->dead = TRUE;
u->dead = true;
/* The order here matters! We first kill the source output, followed
* by the source. That means the source callbacks must be protected
@ -1391,7 +1391,7 @@ static void source_output_kill_cb(pa_source_output *o) {
pa_log_debug("Source output kill %d", o->index);
pa_module_unload_request(u->module, TRUE);
pa_module_unload_request(u->module, true);
}
/* Called from main context */
@ -1401,7 +1401,7 @@ static void sink_input_kill_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
u->dead = TRUE;
u->dead = true;
/* The order here matters! We first kill the sink input, followed
* by the sink. That means the sink callbacks must be protected
@ -1417,11 +1417,11 @@ static void sink_input_kill_cb(pa_sink_input *i) {
pa_log_debug("Sink input kill %d", i->index);
pa_module_unload_request(u->module, TRUE);
pa_module_unload_request(u->module, true);
}
/* Called from main context. */
static pa_bool_t source_output_may_move_to_cb(pa_source_output *o, pa_source *dest) {
static bool source_output_may_move_to_cb(pa_source_output *o, pa_source *dest) {
struct userdata *u;
pa_source_output_assert_ref(o);
@ -1429,20 +1429,20 @@ static pa_bool_t source_output_may_move_to_cb(pa_source_output *o, pa_source *de
pa_assert_se(u = o->userdata);
if (u->dead || u->autoloaded)
return FALSE;
return false;
return (u->source != dest) && (u->sink != dest->monitor_of);
}
/* Called from main context */
static pa_bool_t sink_input_may_move_to_cb(pa_sink_input *i, pa_sink *dest) {
static bool sink_input_may_move_to_cb(pa_sink_input *i, pa_sink *dest) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
if (u->dead || u->autoloaded)
return FALSE;
return false;
return u->sink != dest;
}
@ -1539,9 +1539,9 @@ static int canceller_process_msg_cb(pa_msgobject *o, int code, void *userdata, i
pa_cvolume *v = (pa_cvolume *) userdata;
if (u->use_volume_sharing)
pa_source_set_volume(u->source, v, TRUE, FALSE);
pa_source_set_volume(u->source, v, true, false);
else
pa_source_output_set_volume(u->source_output, v, FALSE, TRUE);
pa_source_output_set_volume(u->source_output, v, false, true);
break;
}
@ -1698,9 +1698,9 @@ int pa__init(pa_module*m) {
u->core = m->core;
u->module = m;
m->userdata = u;
u->dead = FALSE;
u->dead = false;
u->use_volume_sharing = TRUE;
u->use_volume_sharing = true;
if (pa_modargs_get_value_boolean(ma, "use_volume_sharing", &u->use_volume_sharing) < 0) {
pa_log("use_volume_sharing= expects a boolean argument");
goto fail;
@ -1744,7 +1744,7 @@ int pa__init(pa_module*m) {
goto fail;
u->asyncmsgq = pa_asyncmsgq_new(0);
u->need_realign = TRUE;
u->need_realign = true;
source_output_ss = source_ss;
source_output_map = source_map;
@ -1815,7 +1815,7 @@ int pa__init(pa_module*m) {
if (!u->use_volume_sharing) {
pa_source_set_get_volume_callback(u->source, source_get_volume_cb);
pa_source_set_set_volume_callback(u->source, source_set_volume_cb);
pa_source_enable_decibel_volume(u->source, TRUE);
pa_source_enable_decibel_volume(u->source, true);
}
u->source->userdata = u;
@ -1865,7 +1865,7 @@ int pa__init(pa_module*m) {
pa_sink_set_set_mute_callback(u->sink, sink_set_mute_cb);
if (!u->use_volume_sharing) {
pa_sink_set_set_volume_callback(u->sink, sink_set_volume_cb);
pa_sink_enable_decibel_volume(u->sink, TRUE);
pa_sink_enable_decibel_volume(u->sink, true);
}
u->sink->userdata = u;
@ -1875,7 +1875,7 @@ int pa__init(pa_module*m) {
pa_source_output_new_data_init(&source_output_data);
source_output_data.driver = __FILE__;
source_output_data.module = m;
pa_source_output_new_data_set_source(&source_output_data, source_master, FALSE);
pa_source_output_new_data_set_source(&source_output_data, source_master, false);
source_output_data.destination_source = u->source;
pa_proplist_sets(source_output_data.proplist, PA_PROP_MEDIA_NAME, "Echo-Cancel Source Stream");
@ -1910,7 +1910,7 @@ int pa__init(pa_module*m) {
pa_sink_input_new_data_init(&sink_input_data);
sink_input_data.driver = __FILE__;
sink_input_data.module = m;
pa_sink_input_new_data_set_sink(&sink_input_data, sink_master, FALSE);
pa_sink_input_new_data_set_sink(&sink_input_data, sink_master, false);
sink_input_data.origin_sink = u->sink;
pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_NAME, "Echo-Cancel Sink Stream");
pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ROLE, "filter");
@ -2029,7 +2029,7 @@ void pa__done(pa_module*m) {
if (!(u = m->userdata))
return;
u->dead = TRUE;
u->dead = true;
/* See comments in source_output_kill_cb() above regarding
* destruction order! */

View file

@ -25,7 +25,7 @@ PA_C_DECL_BEGIN
#include "echo-cancel.h"
PA_C_DECL_END
pa_bool_t pa_null_ec_init(pa_core *c, pa_echo_canceller *ec,
bool pa_null_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,
@ -43,7 +43,7 @@ pa_bool_t pa_null_ec_init(pa_core *c, pa_echo_canceller *ec,
pa_sample_spec_snprint(strss_source, sizeof(strss_source), out_ss),
pa_sample_spec_snprint(strss_sink, sizeof(strss_sink), play_ss));
return TRUE;
return true;
}
void pa_null_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out) {

View file

@ -33,9 +33,9 @@
#define DEFAULT_FRAME_SIZE_MS 20
/* should be between 100-500 ms */
#define DEFAULT_FILTER_SIZE_MS 200
#define DEFAULT_AGC_ENABLED TRUE
#define DEFAULT_DENOISE_ENABLED TRUE
#define DEFAULT_ECHO_SUPPRESS_ENABLED TRUE
#define DEFAULT_AGC_ENABLED true
#define DEFAULT_DENOISE_ENABLED true
#define DEFAULT_ECHO_SUPPRESS_ENABLED true
#define DEFAULT_ECHO_SUPPRESS_ATTENUATION 0
static const char* const valid_modargs[] = {
@ -60,10 +60,10 @@ static void pa_speex_ec_fixate_spec(pa_sample_spec *rec_ss, pa_channel_map *rec_
*rec_map = *out_map;
}
static pa_bool_t pa_speex_ec_preprocessor_init(pa_echo_canceller *ec, pa_sample_spec *out_ss, uint32_t nframes, pa_modargs *ma) {
pa_bool_t agc;
pa_bool_t denoise;
pa_bool_t echo_suppress;
static bool pa_speex_ec_preprocessor_init(pa_echo_canceller *ec, pa_sample_spec *out_ss, uint32_t nframes, pa_modargs *ma) {
bool agc;
bool denoise;
bool echo_suppress;
int32_t echo_suppress_attenuation;
int32_t echo_suppress_attenuation_active;
@ -140,13 +140,13 @@ static pa_bool_t pa_speex_ec_preprocessor_init(pa_echo_canceller *ec, pa_sample_
} else
pa_log_info("All preprocessing options are disabled");
return TRUE;
return true;
fail:
return FALSE;
return false;
}
pa_bool_t pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec,
bool pa_speex_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,
@ -189,7 +189,7 @@ pa_bool_t pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec,
goto fail;
pa_modargs_free(ma);
return TRUE;
return true;
fail:
if (ma)
@ -202,7 +202,7 @@ fail:
speex_echo_state_destroy(ec->params.priv.speex.state);
ec->params.priv.speex.state = NULL;
}
return FALSE;
return false;
}
void pa_speex_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out) {

View file

@ -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) {