audio: pipewire: Tidy up formatting

This commit is contained in:
Frank Praznik 2022-02-08 13:29:40 -05:00 committed by Ethan Lee
parent 9da9e85cba
commit 228db35287
1 changed files with 29 additions and 29 deletions

View File

@ -109,7 +109,7 @@ static int (*PIPEWIRE_pw_properties_setf)(struct pw_properties *, const char *,
#ifdef SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC
static const char *pipewire_library = SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC;
static void * pipewire_handle = NULL;
static void *pipewire_handle = NULL;
static int
pipewire_dlsym(const char *fn, void **addr)
@ -254,9 +254,9 @@ struct io_node
/* The global hotplug thread and associated objects. */
static struct pw_thread_loop *hotplug_loop;
static struct pw_core * hotplug_core;
static struct pw_context * hotplug_context;
static struct pw_registry * hotplug_registry;
static struct pw_core *hotplug_core;
static struct pw_context *hotplug_context;
static struct pw_registry *hotplug_registry;
static struct spa_hook hotplug_registry_listener;
static struct spa_hook hotplug_core_listener;
static struct spa_list hotplug_pending_list;
@ -398,7 +398,7 @@ pending_list_clear()
static void *
node_object_new(Uint32 id, const char *type, Uint32 version, const void *funcs, const struct pw_core_events *core_events)
{
struct pw_proxy * proxy;
struct pw_proxy *proxy;
struct node_object *node;
/* Create the proxy object */
@ -442,7 +442,7 @@ static void
core_events_interface_callback(void *object, uint32_t id, int seq)
{
struct node_object *node = object;
struct io_node * io = node->userdata;
struct io_node *io = node->userdata;
if (id == PW_ID_CORE && seq == node->seq) {
/*
@ -492,7 +492,7 @@ static SDL_bool
get_range_param(const struct spa_pod *param, Uint32 key, int *def, int *min, int *max)
{
const struct spa_pod_prop *prop;
struct spa_pod * value;
struct spa_pod *value;
Uint32 n_values, choice;
prop = spa_pod_find_prop(param, NULL, key);
@ -546,8 +546,8 @@ static void
node_event_info(void *object, const struct pw_node_info *info)
{
struct node_object *node = object;
struct io_node * io = node->userdata;
const char * prop_val;
struct io_node *io = node->userdata;
const char *prop_val;
Uint32 i;
if (info) {
@ -569,7 +569,7 @@ static void
node_event_param(void *object, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param)
{
struct node_object *node = object;
struct io_node * io = node->userdata;
struct io_node *io = node->userdata;
/* Get the default frequency */
if (io->spec.freq == 0) {
@ -622,7 +622,7 @@ registry_event_global_callback(void *object, uint32_t id, uint32_t permissions,
const char *media_class = spa_dict_lookup(props, PW_KEY_MEDIA_CLASS);
if (media_class) {
const char * node_desc;
const char *node_desc;
struct io_node *io;
SDL_bool is_capture;
int str_buffer_len;
@ -882,9 +882,9 @@ initialize_spa_info(const SDL_AudioSpec *spec, struct spa_audio_info_raw *info)
static void
output_callback(void *data)
{
struct pw_buffer * pw_buf;
struct pw_buffer *pw_buf;
struct spa_buffer *spa_buf;
Uint8 * dst;
Uint8 *dst;
_THIS = (SDL_AudioDevice *)data;
struct pw_stream *stream = this->hidden->stream;
@ -951,9 +951,9 @@ output_callback(void *data)
static void
input_callback(void *data)
{
struct pw_buffer * pw_buf;
struct pw_buffer *pw_buf;
struct spa_buffer *spa_buf;
Uint8 * src;
Uint8 *src;
_THIS = (SDL_AudioDevice *)data;
struct pw_stream *stream = this->hidden->stream;
@ -1074,10 +1074,10 @@ PIPEWIRE_OpenDevice(_THIS, const char *devname)
Uint8 pod_buffer[PW_POD_BUFFER_LENGTH];
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(pod_buffer, sizeof(pod_buffer));
struct spa_audio_info_raw spa_info = { 0 };
const struct spa_pod * params = NULL;
const struct spa_pod *params = NULL;
struct SDL_PrivateAudioData *priv;
struct pw_properties * props;
const char * app_name, *stream_name, *stream_role, *error;
struct pw_properties *props;
const char *app_name, *stream_name, *stream_role, *error;
const Uint32 node_id = this->handle == NULL ? PW_ID_ANY : PW_HANDLE_TO_ID(this->handle);
SDL_bool iscapture = this->iscapture;
int res;