mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-22 15:42:54 +00:00
mark voice helper functions inline
fluid_voice_calculate_gain_amplitude() fluid_rvoice_get_sample()
This commit is contained in:
parent
0619f103ea
commit
0dde0c1aff
2 changed files with 4 additions and 2 deletions
|
@ -123,7 +123,8 @@ void fluid_rvoice_dsp_config (void)
|
|||
* Combines the most significant 16 bit part of a sample with a potentially present
|
||||
* least sig. 8 bit part in order to create a 24 bit sample.
|
||||
*/
|
||||
static int32_t fluid_rvoice_get_sample(const short int* dsp_msb, const char* dsp_lsb, unsigned int idx)
|
||||
static FLUID_INLINE int32_t
|
||||
fluid_rvoice_get_sample(const short int* dsp_msb, const char* dsp_lsb, unsigned int idx)
|
||||
{
|
||||
/* cast sample to unsigned type, so we can safely shift and bitwise or
|
||||
* without relying on undefined behaviour (should never happen anyway ofc...) */
|
||||
|
|
|
@ -436,7 +436,8 @@ void fluid_voice_start(fluid_voice_t* voice)
|
|||
* @param gain The gain value in the range [0.0 ; 1.0]
|
||||
* @return An amplitude used by rvoice_mixer's buffers
|
||||
*/
|
||||
static fluid_real_t fluid_voice_calculate_gain_amplitude(const fluid_voice_t* voice, fluid_real_t gain)
|
||||
static FLUID_INLINE fluid_real_t
|
||||
fluid_voice_calculate_gain_amplitude(const fluid_voice_t* voice, fluid_real_t gain)
|
||||
{
|
||||
/* we use 24bit samples in fluid_rvoice_dsp. in order to normalize float
|
||||
* samples to [0.0;1.0] divide samples by the max. value of an int24 and
|
||||
|
|
Loading…
Reference in a new issue