spa: aec: rename first argument of methods in spa_audio_aec_methods

The first parameter is a pointer to the object implementing the aec
interface, the name `object` is better than `data`.
This commit is contained in:
Barnabás Pőcze 2022-07-22 01:49:48 +02:00 committed by Wim Taymans
parent 44e7817702
commit aab15433c8
2 changed files with 7 additions and 7 deletions

View file

@ -68,9 +68,9 @@ struct spa_audio_aec_methods {
const struct spa_audio_aec_events *events,
void *data);
int (*init) (void *data, const struct spa_dict *args, const struct spa_audio_info_raw *info);
int (*run) (void *data, const float *rec[], const float *play[], float *out[], uint32_t n_samples);
int (*set_props) (void *data, const struct spa_dict *args);
int (*init) (void *object, const struct spa_dict *args, const struct spa_audio_info_raw *info);
int (*run) (void *object, const float *rec[], const float *play[], float *out[], uint32_t n_samples);
int (*set_props) (void *object, const struct spa_dict *args);
};
#define spa_audio_aec_method(o,method,version,...) \

View file

@ -58,9 +58,9 @@ static bool webrtc_get_spa_bool(const struct spa_dict *args, const char *key, bo
return default_value;
}
static int webrtc_init(void *data, const struct spa_dict *args, const struct spa_audio_info_raw *info)
static int webrtc_init(void *object, const struct spa_dict *args, const struct spa_audio_info_raw *info)
{
auto impl = static_cast<struct impl_data*>(data);
auto impl = static_cast<struct impl_data*>(object);
bool extended_filter = webrtc_get_spa_bool(args, "webrtc.extended_filter", true);
bool delay_agnostic = webrtc_get_spa_bool(args, "webrtc.delay_agnostic", true);
@ -120,9 +120,9 @@ static int webrtc_init(void *data, const struct spa_dict *args, const struct spa
return 0;
}
static int webrtc_run(void *data, const float *rec[], const float *play[], float *out[], uint32_t n_samples)
static int webrtc_run(void *object, const float *rec[], const float *play[], float *out[], uint32_t n_samples)
{
auto impl = static_cast<struct impl_data*>(data);
auto impl = static_cast<struct impl_data*>(object);
webrtc::StreamConfig config =
webrtc::StreamConfig(impl->info.rate, impl->info.channels, false);
unsigned int num_blocks = n_samples * 1000 / impl->info.rate / 10;