Add wrappers
This commit is contained in:
parent
bd55c14782
commit
fbbd3b88c6
6 changed files with 47 additions and 0 deletions
10
src/sfizz.h
10
src/sfizz.h
|
|
@ -424,6 +424,16 @@ SFIZZ_EXPORTED_API char* sfizz_get_unknown_opcodes(sfizz_synth_t* synth);
|
|||
*/
|
||||
SFIZZ_EXPORTED_API bool sfizz_should_reload_file(sfizz_synth_t* synth);
|
||||
|
||||
/**
|
||||
* @brief Check if the scala file should be reloaded.
|
||||
* Depending on the platform this can create file descriptors.
|
||||
*
|
||||
* @param synth The synth.
|
||||
*
|
||||
* @return @true if the scala file has been modified since loading.
|
||||
*/
|
||||
SFIZZ_EXPORTED_API bool sfizz_should_reload_scala(sfizz_synth_t* synth);
|
||||
|
||||
/**
|
||||
* @brief Enable logging of timings to sidecar CSV files. This can produce
|
||||
* many outputs so use with caution.
|
||||
|
|
|
|||
|
|
@ -350,6 +350,16 @@ public:
|
|||
*/
|
||||
bool shouldReloadFile();
|
||||
|
||||
/**
|
||||
* @brief Check if the tuning (scala) file should be reloaded.
|
||||
*
|
||||
* Depending on the platform this can create file descriptors.
|
||||
*
|
||||
* @return true if a scala file has been loaded and has changed
|
||||
* @return false
|
||||
*/
|
||||
bool shouldReloadScala();
|
||||
|
||||
/**
|
||||
* @brief Enable logging of timings to sidecar CSV files. This can produce
|
||||
* many outputs so use with caution.
|
||||
|
|
|
|||
|
|
@ -1212,6 +1212,11 @@ bool sfz::Synth::shouldReloadFile()
|
|||
return (checkModificationTime() > modificationTime);
|
||||
}
|
||||
|
||||
bool sfz::Synth::shouldReloadScala()
|
||||
{
|
||||
return resources.tuning.shouldReloadScala();
|
||||
}
|
||||
|
||||
void sfz::Synth::enableLogging(absl::string_view prefix) noexcept
|
||||
{
|
||||
resources.logger.enableLogging(prefix);
|
||||
|
|
|
|||
|
|
@ -423,6 +423,17 @@ public:
|
|||
* @return false
|
||||
*/
|
||||
bool shouldReloadFile();
|
||||
|
||||
/**
|
||||
* @brief Check if the tuning (scala) file should be reloaded.
|
||||
*
|
||||
* Depending on the platform this can create file descriptors.
|
||||
*
|
||||
* @return true if a scala file has been loaded and has changed
|
||||
* @return false
|
||||
*/
|
||||
bool shouldReloadScala();
|
||||
|
||||
/**
|
||||
* @brief Enable logging of timings to sidecar CSV files. This can produce
|
||||
* many outputs so use with caution.
|
||||
|
|
|
|||
|
|
@ -221,6 +221,11 @@ bool sfz::Sfizz::shouldReloadFile()
|
|||
return synth->shouldReloadFile();
|
||||
}
|
||||
|
||||
bool sfz::Sfizz::shouldReloadScala()
|
||||
{
|
||||
return synth->shouldReloadScala();
|
||||
}
|
||||
|
||||
void sfz::Sfizz::enableLogging() noexcept
|
||||
{
|
||||
synth->enableLogging();
|
||||
|
|
|
|||
|
|
@ -275,6 +275,12 @@ bool sfizz_should_reload_file(sfizz_synth_t* synth)
|
|||
return self->shouldReloadFile();
|
||||
}
|
||||
|
||||
bool sfizz_should_reload_scala(sfizz_synth_t* synth)
|
||||
{
|
||||
auto self = reinterpret_cast<sfz::Synth*>(synth);
|
||||
return self->shouldReloadScala();
|
||||
}
|
||||
|
||||
void sfizz_enable_logging(sfizz_synth_t* synth)
|
||||
{
|
||||
auto self = reinterpret_cast<sfz::Synth*>(synth);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue