mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
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:
parent
44e7817702
commit
aab15433c8
2 changed files with 7 additions and 7 deletions
|
|
@ -68,9 +68,9 @@ struct spa_audio_aec_methods {
|
||||||
const struct spa_audio_aec_events *events,
|
const struct spa_audio_aec_events *events,
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
int (*init) (void *data, const struct spa_dict *args, const struct spa_audio_info_raw *info);
|
int (*init) (void *object, 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 (*run) (void *object, const float *rec[], const float *play[], float *out[], uint32_t n_samples);
|
||||||
int (*set_props) (void *data, const struct spa_dict *args);
|
int (*set_props) (void *object, const struct spa_dict *args);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define spa_audio_aec_method(o,method,version,...) \
|
#define spa_audio_aec_method(o,method,version,...) \
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,9 @@ static bool webrtc_get_spa_bool(const struct spa_dict *args, const char *key, bo
|
||||||
return default_value;
|
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 extended_filter = webrtc_get_spa_bool(args, "webrtc.extended_filter", true);
|
||||||
bool delay_agnostic = webrtc_get_spa_bool(args, "webrtc.delay_agnostic", 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;
|
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 config =
|
||||||
webrtc::StreamConfig(impl->info.rate, impl->info.channels, false);
|
webrtc::StreamConfig(impl->info.rate, impl->info.channels, false);
|
||||||
unsigned int num_blocks = n_samples * 1000 / impl->info.rate / 10;
|
unsigned int num_blocks = n_samples * 1000 / impl->info.rate / 10;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue