mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-03 09:32:02 +00:00
Use float instead of fluid_real_t for overflow parameters and calculations
This commit is contained in:
parent
7d3ea52171
commit
ac5aa418ae
3 changed files with 10 additions and 10 deletions
|
@ -3168,8 +3168,8 @@ static fluid_voice_t*
|
||||||
fluid_synth_free_voice_by_kill_LOCAL(fluid_synth_t* synth)
|
fluid_synth_free_voice_by_kill_LOCAL(fluid_synth_t* synth)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
fluid_real_t best_prio = OVERFLOW_PRIO_CANNOT_KILL-1;
|
float best_prio = OVERFLOW_PRIO_CANNOT_KILL-1;
|
||||||
fluid_real_t this_voice_prio;
|
float this_voice_prio;
|
||||||
fluid_voice_t* voice;
|
fluid_voice_t* voice;
|
||||||
int best_voice_index=-1;
|
int best_voice_index=-1;
|
||||||
unsigned int ticks = fluid_synth_get_ticks(synth);
|
unsigned int ticks = fluid_synth_get_ticks(synth);
|
||||||
|
|
|
@ -1681,12 +1681,12 @@ fluid_voice_optimize_sample(fluid_sample_t* s)
|
||||||
return FLUID_OK;
|
return FLUID_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
fluid_real_t
|
float
|
||||||
fluid_voice_get_overflow_prio(fluid_voice_t* voice,
|
fluid_voice_get_overflow_prio(fluid_voice_t* voice,
|
||||||
fluid_overflow_prio_t* score,
|
fluid_overflow_prio_t* score,
|
||||||
unsigned int cur_time)
|
unsigned int cur_time)
|
||||||
{
|
{
|
||||||
fluid_real_t this_voice_prio = 0;
|
float this_voice_prio = 0;
|
||||||
|
|
||||||
/* Are we already overflowing? */
|
/* Are we already overflowing? */
|
||||||
if (!voice->can_access_overflow_rvoice) {
|
if (!voice->can_access_overflow_rvoice) {
|
||||||
|
|
|
@ -37,11 +37,11 @@ typedef struct _fluid_overflow_prio_t fluid_overflow_prio_t;
|
||||||
|
|
||||||
struct _fluid_overflow_prio_t
|
struct _fluid_overflow_prio_t
|
||||||
{
|
{
|
||||||
fluid_real_t percussion; /**< Is this voice on the drum channel? Then add this score */
|
float percussion; /**< Is this voice on the drum channel? Then add this score */
|
||||||
fluid_real_t released; /**< Is this voice in release stage? Then add this score (usually negative) */
|
float released; /**< Is this voice in release stage? Then add this score (usually negative) */
|
||||||
fluid_real_t sustained; /**< Is this voice sustained? Then add this score (usually negative) */
|
float sustained; /**< Is this voice sustained? Then add this score (usually negative) */
|
||||||
fluid_real_t volume; /**< Multiply current (or future) volume (a value between 0 and 1) */
|
float volume; /**< Multiply current (or future) volume (a value between 0 and 1) */
|
||||||
fluid_real_t age; /**< This score will be divided by the number of seconds the voice has lasted */
|
float age; /**< This score will be divided by the number of seconds the voice has lasted */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum fluid_voice_status
|
enum fluid_voice_status
|
||||||
|
@ -148,7 +148,7 @@ void fluid_voice_stop(fluid_voice_t* voice);
|
||||||
void fluid_voice_overflow_rvoice_finished(fluid_voice_t* voice);
|
void fluid_voice_overflow_rvoice_finished(fluid_voice_t* voice);
|
||||||
|
|
||||||
int fluid_voice_kill_excl(fluid_voice_t* voice);
|
int fluid_voice_kill_excl(fluid_voice_t* voice);
|
||||||
fluid_real_t fluid_voice_get_overflow_prio(fluid_voice_t* voice,
|
float fluid_voice_get_overflow_prio(fluid_voice_t* voice,
|
||||||
fluid_overflow_prio_t* score,
|
fluid_overflow_prio_t* score,
|
||||||
unsigned int cur_time);
|
unsigned int cur_time);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue