diff --git a/src/sfizz.h b/src/sfizz.h index d79a10e3..6dee8b7b 100644 --- a/src/sfizz.h +++ b/src/sfizz.h @@ -966,7 +966,7 @@ SFIZZ_EXPORTED_API bool sfizz_should_reload_scala(sfizz_synth_t* synth); * @par Thread-safety constraints * - TBD ? */ -SFIZZ_EXPORTED_API void sfizz_enable_logging(sfizz_synth_t* synth); +SFIZZ_EXPORTED_API void sfizz_enable_logging(sfizz_synth_t* synth, const char* prefix); /** * @brief Disable logging. @@ -991,7 +991,7 @@ SFIZZ_EXPORTED_API void sfizz_disable_logging(sfizz_synth_t* synth); * @par Thread-safety constraints * - TBD ? */ -SFIZZ_EXPORTED_API void sfizz_set_logging_prefix(sfizz_synth_t* synth, const char* prefix); +SFIZZ_EXPORTED_API SFIZZ_DEPRECATED_API void sfizz_set_logging_prefix(sfizz_synth_t* synth, const char* prefix); /** * @brief Shuts down the current processing, clear buffers and reset the voices. diff --git a/src/sfizz.hpp b/src/sfizz.hpp index 9c36743e..2feb9fe1 100644 --- a/src/sfizz.hpp +++ b/src/sfizz.hpp @@ -886,7 +886,7 @@ public: * @par Thread-safety constraints * - TBD ? */ - void enableLogging() noexcept; + SFIZZ_DEPRECATED_API void enableLogging() noexcept; /** * @brief Enable logging of timings to sidecar CSV files. @@ -912,7 +912,7 @@ public: * @par Thread-safety constraints * - TBD ? */ - void setLoggingPrefix(const std::string& prefix) noexcept; + SFIZZ_DEPRECATED_API void setLoggingPrefix(const std::string& prefix) noexcept; /** * @brief Disable logging of timings to sidecar CSV files. diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index 9ac490d1..77173a4e 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -1941,12 +1941,6 @@ void Synth::enableLogging(absl::string_view prefix) noexcept impl.resources_.logger.enableLogging(prefix); } -void Synth::setLoggingPrefix(absl::string_view prefix) noexcept -{ - Impl& impl = *impl_; - impl.resources_.logger.setPrefix(prefix); -} - void Synth::disableLogging() noexcept { Impl& impl = *impl_; diff --git a/src/sfizz/Synth.h b/src/sfizz/Synth.h index 709833d4..4e9815d1 100644 --- a/src/sfizz/Synth.h +++ b/src/sfizz/Synth.h @@ -630,12 +630,6 @@ public: * */ void enableLogging(absl::string_view prefix = "") noexcept; - /** - * @brief Enable logging of timings to sidecar CSV files. This can produce - * many outputs so use with caution. - * - */ - void setLoggingPrefix(absl::string_view prefix) noexcept; /** * @brief Disable logging; * diff --git a/src/sfizz/sfizz.cpp b/src/sfizz/sfizz.cpp index c3a98ee0..57cb8e24 100644 --- a/src/sfizz/sfizz.cpp +++ b/src/sfizz/sfizz.cpp @@ -338,7 +338,7 @@ void sfz::Sfizz::enableLogging(const std::string& prefix) noexcept void sfz::Sfizz::setLoggingPrefix(const std::string& prefix) noexcept { - synth->synth.setLoggingPrefix(prefix); + } void sfz::Sfizz::disableLogging() noexcept diff --git a/src/sfizz/sfizz_wrapper.cpp b/src/sfizz/sfizz_wrapper.cpp index 8a720d03..4c5c4ca1 100644 --- a/src/sfizz/sfizz_wrapper.cpp +++ b/src/sfizz/sfizz_wrapper.cpp @@ -309,19 +309,22 @@ bool sfizz_should_reload_scala(sfizz_synth_t* synth) return synth->synth.shouldReloadScala(); } -void sfizz_enable_logging(sfizz_synth_t* synth) +void sfizz_enable_logging(sfizz_synth_t* synth, const char* prefix) { - return synth->synth.enableLogging(); + if (prefix) + synth->synth.enableLogging(prefix); + else + synth->synth.enableLogging(); } void sfizz_set_logging_prefix(sfizz_synth_t* synth, const char* prefix) { - return synth->synth.setLoggingPrefix(prefix); + } void sfizz_disable_logging(sfizz_synth_t* synth) { - return synth->synth.disableLogging(); + synth->synth.disableLogging(); } void sfizz_all_sound_off(sfizz_synth_t* synth)