mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
spa: remove unnecessary indirection for some spa_log_topics
This results in shorter machine code since it removes one pointer load and a NULL check.
This commit is contained in:
parent
d2b5b53c08
commit
8256a2d5a6
13 changed files with 39 additions and 35 deletions
|
|
@ -23,8 +23,8 @@
|
|||
#include "mix-ops.h"
|
||||
|
||||
#undef SPA_LOG_TOPIC_DEFAULT
|
||||
#define SPA_LOG_TOPIC_DEFAULT log_topic
|
||||
static struct spa_log_topic *log_topic = &SPA_LOG_TOPIC(0, "spa.audiomixer");
|
||||
#define SPA_LOG_TOPIC_DEFAULT &log_topic
|
||||
static struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.audiomixer");
|
||||
|
||||
#define DEFAULT_RATE 48000
|
||||
#define DEFAULT_CHANNELS 2
|
||||
|
|
@ -918,7 +918,7 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
this = (struct impl *) handle;
|
||||
|
||||
this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
|
||||
spa_log_topic_init(this->log, log_topic);
|
||||
spa_log_topic_init(this->log, &log_topic);
|
||||
|
||||
this->data_loop = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DataLoop);
|
||||
if (this->data_loop == NULL) {
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
#include "mix-ops.h"
|
||||
|
||||
#undef SPA_LOG_TOPIC_DEFAULT
|
||||
#define SPA_LOG_TOPIC_DEFAULT log_topic
|
||||
static struct spa_log_topic *log_topic = &SPA_LOG_TOPIC(0, "spa.mixer-dsp");
|
||||
#define SPA_LOG_TOPIC_DEFAULT &log_topic
|
||||
static struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.mixer-dsp");
|
||||
|
||||
#define MAX_BUFFERS 64
|
||||
#define MAX_PORTS 512
|
||||
|
|
@ -855,7 +855,7 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
this = (struct impl *) handle;
|
||||
|
||||
this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
|
||||
spa_log_topic_init(this->log, log_topic);
|
||||
spa_log_topic_init(this->log, &log_topic);
|
||||
|
||||
this->data_loop = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DataLoop);
|
||||
if (this->data_loop == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue