From: kazu Date: Sun, 16 Jun 2024 04:54:26 +0000 (+0000) Subject: Change `ksynth_get_polyphony` `ksynth_get_max_polyphony` `ksynth_get_polyphony_for_ch... X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;p=ksynth.git Change `ksynth_get_polyphony` `ksynth_get_max_polyphony` `ksynth_get_polyphony_for_channel` return type `int` from `unsigned int` git-svn-id: file:///raid/svn-main/kazu-ksynth/trunk@48 7b47e76f-e598-2f43-bc14-414d160cc389 --- diff --git a/src/ksynth.c b/src/ksynth.c index 514b59a..55bcc14 100644 --- a/src/ksynth.c +++ b/src/ksynth.c @@ -297,7 +297,7 @@ void ksynth_cc(struct KSynth* ksynth_instance, unsigned char channel, unsigned c } } -int ksynth_get_polyphony(struct KSynth* ksynth_instance) { +unsigned int ksynth_get_polyphony(struct KSynth* ksynth_instance) { if(!ksynth_instance) { fprintf(stderr, "[KSynth] Error: Invalid KSynth instance.\n"); return -1; @@ -306,7 +306,7 @@ int ksynth_get_polyphony(struct KSynth* ksynth_instance) { return ksynth_instance->polyphony; }; -int ksynth_get_max_polyphony(struct KSynth* ksynth_instance) { +unsigned int ksynth_get_max_polyphony(struct KSynth* ksynth_instance) { if(!ksynth_instance) { fprintf(stderr, "[KSynth] Error: Invalid KSynth instance.\n"); return -1; @@ -486,7 +486,7 @@ float ksynth_get_rendering_time(struct KSynth* ksynth_instance) { return ksynth_instance->rendering_time; } -int ksynth_get_polyphony_for_channel(struct KSynth* ksynth_instance, unsigned char channel) { +unsigned int ksynth_get_polyphony_for_channel(struct KSynth* ksynth_instance, unsigned char channel) { if(!ksynth_instance) { fprintf(stderr, "[KSynth] Error: Invalid KSynth instance.\n"); return -1; diff --git a/src/ksynth.h b/src/ksynth.h index 6b8231d..17d67ca 100644 --- a/src/ksynth.h +++ b/src/ksynth.h @@ -177,7 +177,7 @@ void ksynth_cc(struct KSynth* ksynth_instance, unsigned char channel, unsigned c * @param ksynth_instance KSynthインスタンスへのポインタ * @return 現在のポリフォニー */ -int ksynth_get_polyphony(struct KSynth* ksynth_instance); +unsigned int ksynth_get_polyphony(struct KSynth* ksynth_instance); /** * @~english @@ -192,7 +192,7 @@ int ksynth_get_polyphony(struct KSynth* ksynth_instance); * @param ksynth_instance KSynthインスタンスへのポインタ * @return 最大ポリフォニー */ -int ksynth_get_max_polyphony(struct KSynth* ksynth_instance); +unsigned int ksynth_get_max_polyphony(struct KSynth* ksynth_instance); /** * @~english @@ -305,7 +305,7 @@ float ksynth_get_rendering_time(struct KSynth* ksynth_instance); * @param channel MIDIチャンネル * @return 指定されたMIDIチャンネルのアクティブなポリフォニーの数 */ -int ksynth_get_polyphony_for_channel(struct KSynth* ksynth_instance, unsigned char channel); +unsigned int ksynth_get_polyphony_for_channel(struct KSynth* ksynth_instance, unsigned char channel); /** * @~english