summaryrefslogtreecommitdiff
path: root/src/audio/audio.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-01 00:58:20 +0100
committerskal <pascal.massimino@gmail.com>2026-02-01 01:13:53 +0100
commit18eb8a07ba39a8aad1c75521cee027b9c9c72e40 (patch)
tree87e498dbaffdd591eb94fddca315f6ba28756a32 /src/audio/audio.cc
parent03cd94817097e59a0809b222e0e1e74dd9a8ede7 (diff)
clang-format
Diffstat (limited to 'src/audio/audio.cc')
-rw-r--r--src/audio/audio.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/audio/audio.cc b/src/audio/audio.cc
index b482e64..e4abbf8 100644
--- a/src/audio/audio.cc
+++ b/src/audio/audio.cc
@@ -4,12 +4,12 @@
#include "audio.h"
-#ifndef DEMO_BUILD_TOOLS
+#if !defined(DEMO_BUILD_TOOLS)
#define MA_NO_FLAC
#define MA_NO_ENCODING
#define MA_NO_MP3
#define MA_NO_WAV
-#endif
+#endif /* !defined(DEMO_BUILD_TOOLS) */
#define MINIAUDIO_IMPLEMENTATION
#include "miniaudio.h"
#include "synth.h"
@@ -18,10 +18,10 @@
static ma_device g_device;
-void audio_data_callback(ma_device *pDevice, void *pOutput, const void *pInput,
+void audio_data_callback(ma_device* pDevice, void* pOutput, const void* pInput,
ma_uint32 frameCount) {
(void)pInput;
- float *fOutput = (float *)pOutput;
+ float* fOutput = (float*)pOutput;
synth_render(fOutput, (int)frameCount);
}
@@ -48,7 +48,7 @@ void audio_start() {
}
}
-#ifndef STRIP_ALL
+#if !defined(STRIP_ALL)
void audio_render_silent(float duration_sec) {
const int sample_rate = 32000;
const int chunk_size = 512;
@@ -62,9 +62,10 @@ void audio_render_silent(float duration_sec) {
total_frames -= frames_to_render;
}
}
-#endif
+#endif /* !defined(STRIP_ALL) */
-void audio_update() {}
+void audio_update() {
+}
void audio_shutdown() {
ma_device_stop(&g_device);