mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-01 00:21:14 +00:00
avoid bad function cast warnings
This commit is contained in:
parent
0dde0c1aff
commit
05a4989498
1 changed files with 5 additions and 5 deletions
|
@ -123,7 +123,7 @@ void fluid_rvoice_dsp_config (void)
|
||||||
* Combines the most significant 16 bit part of a sample with a potentially present
|
* 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.
|
* least sig. 8 bit part in order to create a 24 bit sample.
|
||||||
*/
|
*/
|
||||||
static FLUID_INLINE int32_t
|
static FLUID_INLINE fluid_real_t
|
||||||
fluid_rvoice_get_sample(const short int* dsp_msb, const char* dsp_lsb, unsigned int idx)
|
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
|
/* cast sample to unsigned type, so we can safely shift and bitwise or
|
||||||
|
@ -138,7 +138,7 @@ fluid_rvoice_get_sample(const short int* dsp_msb, const char* dsp_lsb, unsigned
|
||||||
lsb = (uint8_t)dsp_lsb[idx];
|
lsb = (uint8_t)dsp_lsb[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int32_t)((msb << 8) | lsb);
|
return (fluid_real_t)((int32_t)((msb << 8) | lsb));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No interpolation. Just take the sample, which is closest to
|
/* No interpolation. Just take the sample, which is closest to
|
||||||
|
@ -219,7 +219,7 @@ fluid_rvoice_dsp_interpolate_linear (fluid_rvoice_dsp_t *voice)
|
||||||
unsigned int dsp_i = 0;
|
unsigned int dsp_i = 0;
|
||||||
unsigned int dsp_phase_index;
|
unsigned int dsp_phase_index;
|
||||||
unsigned int end_index;
|
unsigned int end_index;
|
||||||
int32_t point;
|
fluid_real_t point;
|
||||||
fluid_real_t *coeffs;
|
fluid_real_t *coeffs;
|
||||||
int looping;
|
int looping;
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ fluid_rvoice_dsp_interpolate_4th_order (fluid_rvoice_dsp_t *voice)
|
||||||
unsigned int dsp_i = 0;
|
unsigned int dsp_i = 0;
|
||||||
unsigned int dsp_phase_index;
|
unsigned int dsp_phase_index;
|
||||||
unsigned int start_index, end_index;
|
unsigned int start_index, end_index;
|
||||||
int32_t start_point, end_point1, end_point2;
|
fluid_real_t start_point, end_point1, end_point2;
|
||||||
fluid_real_t *coeffs;
|
fluid_real_t *coeffs;
|
||||||
int looping;
|
int looping;
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ fluid_rvoice_dsp_interpolate_7th_order (fluid_rvoice_dsp_t *voice)
|
||||||
unsigned int dsp_i = 0;
|
unsigned int dsp_i = 0;
|
||||||
unsigned int dsp_phase_index;
|
unsigned int dsp_phase_index;
|
||||||
unsigned int start_index, end_index;
|
unsigned int start_index, end_index;
|
||||||
int32_t start_points[3], end_points[3];
|
fluid_real_t start_points[3], end_points[3];
|
||||||
fluid_real_t *coeffs;
|
fluid_real_t *coeffs;
|
||||||
int looping;
|
int looping;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue