Skip to content

Commit

Permalink
Temporary fixes for demos, see sfztools#1148
Browse files Browse the repository at this point in the history
  • Loading branch information
redtide committed May 21, 2023
1 parent 56b0f4d commit 91928fb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 12 deletions.
39 changes: 29 additions & 10 deletions demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,42 @@ if(TARGET Qt5::Widgets)
set_target_properties(sfizz_demo_stretch_tuning PROPERTIES AUTOUIC ON)
endif()

add_executable(eq_apply EQ.cpp)
target_link_libraries(eq_apply PRIVATE sfizz::internal sfizz::sndfile sfizz::cxxopts sfizz::filesystem)

add_executable(filter_apply Filter.cpp)
target_link_libraries(filter_apply PRIVATE sfizz::internal sfizz::sndfile sfizz::cxxopts sfizz::filesystem)
if(SFIZZ_USE_SNDFILE)
add_executable(eq_apply EQ.cpp)
target_link_libraries(eq_apply PRIVATE
sfizz::cxxopts
sfizz::filesystem
sfizz::internal
sfizz::sndfile
)
add_executable(filter_apply Filter.cpp)
target_link_libraries(filter_apply PRIVATE
sfizz::cxxopts
sfizz::filesystem
sfizz::internal
sfizz::sndfile
)
endif()

add_executable(sfizz_plot_curve PlotCurve.cpp)
target_link_libraries(sfizz_plot_curve PRIVATE sfizz::internal)

add_executable(sfizz_plot_wavetables PlotWavetables.cpp)
target_link_libraries(sfizz_plot_wavetables PRIVATE sfizz::internal)

add_executable(sfizz_plot_lfo PlotLFO.cpp)
target_link_libraries(sfizz_plot_lfo PRIVATE sfizz::internal sfizz::sndfile sfizz::cxxopts)

add_executable(sfizz_file_instrument FileInstrument.cpp)
target_link_libraries(sfizz_file_instrument PRIVATE sfizz::internal sfizz::sndfile)
if(SFIZZ_USE_SNDFILE)
add_executable(sfizz_plot_lfo PlotLFO.cpp)
target_link_libraries(sfizz_plot_lfo PRIVATE
sfizz::cxxopts
sfizz::internal
sfizz::sndfile
)
add_executable(sfizz_file_instrument FileInstrument.cpp)
target_link_libraries(sfizz_file_instrument PRIVATE
sfizz::internal
sfizz::sndfile
)
endif()

add_executable(sfizz_file_wavetable FileWavetable.cpp)
target_link_libraries(sfizz_file_wavetable PRIVATE sfizz::internal)
Expand Down
4 changes: 2 additions & 2 deletions demos/FileWavetable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ int main(int argc, char *argv[])

sfz::WavetableInfo wt {};

sfz::FileMetadataReader reader;
if (!reader.open(path)) {
sfz::FileMetadataReader reader(path);
if (!reader.open()) {
fprintf(stderr, "Cannot open file\n");
return 1;
}
Expand Down
1 change: 1 addition & 0 deletions demos/PlotLFO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ int main(int argc, char* argv[])

sfzPath = argv[1];
}
// FIXME: OptionException was replaced by some cxxopts::exceptions::???
catch (cxxopts::OptionException& ex) {
std::cerr << ex.what() << "\n";
return 1;
Expand Down

0 comments on commit 91928fb

Please sign in to comment.