[API break] Changed the return type of get_num_preloaded_samples

to match the one of the C++ synth
This commit is contained in:
Paul Ferrand 2020-01-05 00:15:31 +01:00
parent 91e0401548
commit dabd5eb7a4
2 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

@ -66,7 +66,7 @@ int sfizz_get_num_curves(sfizz_synth_t* synth)
auto self = reinterpret_cast<sfz::Synth*>(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<sfz::Synth*>(synth);
return self->getNumPreloadedSamples();
@ -220,7 +220,7 @@ char* sfizz_get_unknown_opcodes(sfizz_synth_t* synth)
{
auto self = reinterpret_cast<sfz::Synth*>(synth);
const auto unknownOpcodes = self->getUnknownOpcodes();
int totalLength = 0;
size_t totalLength = 0;
for (auto& opcode: unknownOpcodes)
totalLength += opcode.length() + 1;