Skip to content

Commit

Permalink
🚨 Fix tests compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Nov 3, 2023
1 parent 391cd42 commit 0046832
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ auto main(int argc, char* argv[]) -> int
)
{
// Input stream
std::vector<float> data_from_input_stream{};
RtAudioW::InputStream input_stream{[&](std::span<float const> buffer) {
data_from_input_stream.assign(buffer.begin(), buffer.end());
},
[](RtAudioErrorType /* type */, std::string const& error_message) {
std::cerr << error_message << '\n';
}};
RtAudioW::InputStream input_stream{
[](RtAudioErrorType /* type */, std::string const& error_message) {
std::cerr << error_message << '\n';
}};
// Load the audio file
Cool::load_audio_file(RtAudioW::player(), exe_path::dir() / "../../tests/res/Monteverdi - L'Orfeo, Toccata.mp3");
RtAudioW::player().play();
Expand Down Expand Up @@ -74,6 +71,10 @@ auto main(int argc, char* argv[]) -> int
}
ImGui::EndCombo();
}
auto data_from_input_stream = std::vector<float>{};
input_stream.for_each_sample(512, [&](float const sample) {
data_from_input_stream.push_back(sample);
});
ImGui::PlotHistogram(
"Input Data",
data_from_input_stream.data(),
Expand Down

0 comments on commit 0046832

Please sign in to comment.