Skip to content

Commit

Permalink
🔨 [CI] Fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Oct 30, 2023
1 parent 6156379 commit d26f7e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)

# ---Set output folder. Needs to be consistent so we know the path to load our audio files---
set_target_properties(${PROJECT_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../build)
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../build/${CMAKE_BUILD_TYPE})

# ---Set warning level---
if(MSVC)
Expand Down
8 changes: 4 additions & 4 deletions tests/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ auto main(int argc, char* argv[]) -> int
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");
Cool::load_audio_file(RtAudioW::player(), exe_path::dir() / "../../tests/res/Monteverdi - L'Orfeo, Toccata.mp3");
RtAudioW::player().play();

static constexpr size_t N = 1024; // input size NB: Must be a power of 2 for dj::fft1d
Expand Down Expand Up @@ -93,7 +93,7 @@ auto main(int argc, char* argv[]) -> int

TEST_CASE("Loading a .wav file")
{
Cool::load_audio_file(RtAudioW::player(), exe_path::dir() / "../tests/res/10-1000-10000-20000.wav");
Cool::load_audio_file(RtAudioW::player(), exe_path::dir() / "../../tests/res/10-1000-10000-20000.wav");

CHECK(RtAudioW::player().audio_data().channels_count == 1);
CHECK(RtAudioW::player().audio_data().sample_rate == 41000);
Expand All @@ -102,7 +102,7 @@ TEST_CASE("Loading a .wav file")

TEST_CASE("Loading a .mp3 file")
{
Cool::load_audio_file(RtAudioW::player(), exe_path::dir() / "../tests/res/Monteverdi - L'Orfeo, Toccata.mp3");
Cool::load_audio_file(RtAudioW::player(), exe_path::dir() / "../../tests/res/Monteverdi - L'Orfeo, Toccata.mp3");

CHECK(RtAudioW::player().audio_data().channels_count == 2);
CHECK(RtAudioW::player().audio_data().sample_rate == 44100);
Expand All @@ -112,7 +112,7 @@ TEST_CASE("Loading a .mp3 file")
TEST_CASE("dj_fft test : Opening a .wav file, reading its content in a struct, computing the FFT on it")
{
// Load the audio file
Cool::load_audio_file(RtAudioW::player(), exe_path::dir() / "../tests/res/10-1000-10000-20000.wav");
Cool::load_audio_file(RtAudioW::player(), exe_path::dir() / "../../tests/res/10-1000-10000-20000.wav");

size_t N = 65536; // input size NB: Must be a power of 2
std::vector<std::complex<float>> myData; // input data
Expand Down

0 comments on commit d26f7e1

Please sign in to comment.