MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / require_wav_shape

Function require_wav_shape

tests/unittests/test_audio_utility_api.cpp:54–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void require_wav_shape(const std::filesystem::path & path, int sample_rate) {
55 const auto wav = engine::audio::read_wav_f32(path);
56 require(wav.sample_rate == sample_rate, "output sample rate mismatch: " + path.string());
57 require(wav.channels == 1, "output channel count mismatch: " + path.string());
58 require(!wav.samples.empty(), "output WAV is empty: " + path.string());
59}
60
61} // namespace
62

Callers 1

mainFunction · 0.85

Calls 3

requireFunction · 0.70
read_wav_f32Function · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected