From 59756a7c5d3759db932b5a177bf897c1c6c409cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Lebrun?= Date: Thu, 8 Jun 2023 15:31:18 +0200 Subject: [PATCH] examples: fix indent --- doc/tutorial1.c | 6 +++--- doc/tutorial2.c | 48 ++++++++++++++++++++++++------------------------ doc/tutorial4.c | 16 ++++++++-------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/doc/tutorial1.c b/doc/tutorial1.c index 050aa88d2..2fc2ca4b9 100644 --- a/doc/tutorial1.c +++ b/doc/tutorial1.c @@ -11,9 +11,9 @@ int main(int argc, char *argv[]) pw_init(&argc, &argv); fprintf(stdout, "Compiled with libpipewire %s\n" - "Linked with libpipewire %s\n", - pw_get_headers_version(), - pw_get_library_version()); + "Linked with libpipewire %s\n", + pw_get_headers_version(), + pw_get_library_version()); return 0; } /* [code] */ diff --git a/doc/tutorial2.c b/doc/tutorial2.c index 66647d7dc..e6ead6840 100644 --- a/doc/tutorial2.c +++ b/doc/tutorial2.c @@ -20,37 +20,37 @@ static const struct pw_registry_events registry_events = { int main(int argc, char *argv[]) { - struct pw_main_loop *loop; - struct pw_context *context; - struct pw_core *core; - struct pw_registry *registry; - struct spa_hook registry_listener; + struct pw_main_loop *loop; + struct pw_context *context; + struct pw_core *core; + struct pw_registry *registry; + struct spa_hook registry_listener; - pw_init(&argc, &argv); + pw_init(&argc, &argv); - loop = pw_main_loop_new(NULL /* properties */); - context = pw_context_new(pw_main_loop_get_loop(loop), - NULL /* properties */, - 0 /* user_data size */); + loop = pw_main_loop_new(NULL /* properties */); + context = pw_context_new(pw_main_loop_get_loop(loop), + NULL /* properties */, + 0 /* user_data size */); - core = pw_context_connect(context, - NULL /* properties */, - 0 /* user_data size */); + core = pw_context_connect(context, + NULL /* properties */, + 0 /* user_data size */); - registry = pw_core_get_registry(core, PW_VERSION_REGISTRY, - 0 /* user_data size */); + registry = pw_core_get_registry(core, PW_VERSION_REGISTRY, + 0 /* user_data size */); - spa_zero(registry_listener); - pw_registry_add_listener(registry, ®istry_listener, - ®istry_events, NULL); + spa_zero(registry_listener); + pw_registry_add_listener(registry, ®istry_listener, + ®istry_events, NULL); - pw_main_loop_run(loop); + pw_main_loop_run(loop); - pw_proxy_destroy((struct pw_proxy*)registry); - pw_core_disconnect(core); - pw_context_destroy(context); - pw_main_loop_destroy(loop); + pw_proxy_destroy((struct pw_proxy*)registry); + pw_core_disconnect(core); + pw_context_destroy(context); + pw_main_loop_destroy(loop); - return 0; + return 0; } /* [code] */ diff --git a/doc/tutorial4.c b/doc/tutorial4.c index ff0cb2774..67cb0c8dc 100644 --- a/doc/tutorial4.c +++ b/doc/tutorial4.c @@ -43,15 +43,15 @@ static void on_process(void *userdata) stride = sizeof(int16_t) * DEFAULT_CHANNELS; n_frames = buf->datas[0].maxsize / stride; - for (i = 0; i < n_frames; i++) { - data->accumulator += M_PI_M2 * 440 / DEFAULT_RATE; - if (data->accumulator >= M_PI_M2) - data->accumulator -= M_PI_M2; + for (i = 0; i < n_frames; i++) { + data->accumulator += M_PI_M2 * 440 / DEFAULT_RATE; + if (data->accumulator >= M_PI_M2) + data->accumulator -= M_PI_M2; - val = sin(data->accumulator) * DEFAULT_VOLUME * 16767.f; - for (c = 0; c < DEFAULT_CHANNELS; c++) - *dst++ = val; - } + val = sin(data->accumulator) * DEFAULT_VOLUME * 16767.f; + for (c = 0; c < DEFAULT_CHANNELS; c++) + *dst++ = val; + } buf->datas[0].chunk->offset = 0; buf->datas[0].chunk->stride = stride;