From dabd5eb7a47956208a83432e3ad95f46765bd0e2 Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Sun, 5 Jan 2020 00:15:31 +0100 Subject: [PATCH] [API break] Changed the return type of get_num_preloaded_samples to match the one of the C++ synth --- src/sfizz.h | 4 ++-- src/sfizz/sfizz_wrapper.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sfizz.h b/src/sfizz.h index 0ad610d1..da9aa914 100644 --- a/src/sfizz.h +++ b/src/sfizz.h @@ -107,7 +107,7 @@ int sfizz_get_num_curves(sfizz_synth_t* synth); * * @return int the number of preloaded samples */ -int sfizz_get_num_preloaded_samples(sfizz_synth_t* synth); +size_t sfizz_get_num_preloaded_samples(sfizz_synth_t* synth); /** * @brief Returns the number of active voices. Note that this function is a * basic indicator and does not aim to be perfect. In particular, it @@ -116,7 +116,7 @@ int sfizz_get_num_preloaded_samples(sfizz_synth_t* synth); * * @param synth The synth * - * @return int the number of playing voices + * @return size_t the number of playing voices */ int sfizz_get_num_active_voices(sfizz_synth_t* synth); diff --git a/src/sfizz/sfizz_wrapper.cpp b/src/sfizz/sfizz_wrapper.cpp index 74e04fc4..fb8d54ed 100644 --- a/src/sfizz/sfizz_wrapper.cpp +++ b/src/sfizz/sfizz_wrapper.cpp @@ -66,7 +66,7 @@ int sfizz_get_num_curves(sfizz_synth_t* synth) auto self = reinterpret_cast(synth); return self->getNumCurves(); } -int sfizz_get_num_preloaded_samples(sfizz_synth_t* synth) +size_t sfizz_get_num_preloaded_samples(sfizz_synth_t* synth) { auto self = reinterpret_cast(synth); return self->getNumPreloadedSamples(); @@ -220,7 +220,7 @@ char* sfizz_get_unknown_opcodes(sfizz_synth_t* synth) { auto self = reinterpret_cast(synth); const auto unknownOpcodes = self->getUnknownOpcodes(); - int totalLength = 0; + size_t totalLength = 0; for (auto& opcode: unknownOpcodes) totalLength += opcode.length() + 1;