summaryrefslogtreecommitdiff
path: root/src/tests/audio/test_wav_dump.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/audio/test_wav_dump.cc')
-rw-r--r--src/tests/audio/test_wav_dump.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/tests/audio/test_wav_dump.cc b/src/tests/audio/test_wav_dump.cc
index 85b168d..9175153 100644
--- a/src/tests/audio/test_wav_dump.cc
+++ b/src/tests/audio/test_wav_dump.cc
@@ -5,6 +5,7 @@
#include "audio/audio_engine.h"
#include "audio/backend/wav_dump_backend.h"
#include "audio/ring_buffer.h"
+#include "../common/audio_test_fixture.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
@@ -38,8 +39,7 @@ void test_wav_format_matches_live_audio() {
audio_init();
// Initialize AudioEngine
- AudioEngine engine;
- engine.init();
+ AudioTestFixture fixture;
// Create WAV dump backend
WavDumpBackend wav_backend;
@@ -59,7 +59,7 @@ void test_wav_format_matches_live_audio() {
float music_time = 0.0f;
for (float t = 0.0f; t < duration; t += update_dt) {
// Update audio engine (triggers patterns)
- engine.update(music_time, update_dt);
+ fixture.engine().update(music_time, update_dt);
music_time += update_dt;
// Render audio ahead
@@ -76,7 +76,6 @@ void test_wav_format_matches_live_audio() {
// Shutdown
wav_backend.shutdown();
- engine.shutdown();
audio_shutdown();
// Read and verify WAV header
@@ -192,8 +191,7 @@ void test_clipping_detection() {
const char* test_file = "test_clipping.wav";
audio_init();
- AudioEngine engine;
- engine.init();
+ AudioTestFixture fixture;
WavDumpBackend wav_backend;
wav_backend.set_output_file(test_file);
@@ -225,7 +223,6 @@ void test_clipping_detection() {
printf(" Detected %zu clipped samples (expected 200)\n", clipped);
wav_backend.shutdown();
- engine.shutdown();
audio_shutdown();
// Clean up