diff options
author | 2015-05-20 21:24:59 +0200 | |
---|---|---|
committer | 2015-05-20 21:24:59 +0200 | |
commit | f10abf48d7f3eddd91db264f30d0bfa581c921f4 (patch) | |
tree | 697d8a63c55e89cfa6194aae8a6edd4aa1142137 /src/emu/sound | |
parent | a082abcd7d85e6c851e7283eff917e8111a37413 (diff) |
Another round of -Wextra -Wdouble-promotion fixes. (nw)
Diffstat (limited to 'src/emu/sound')
-rw-r--r-- | src/emu/sound/aica.c | 4 | ||||
-rw-r--r-- | src/emu/sound/discrete.c | 2 | ||||
-rw-r--r-- | src/emu/sound/fm.c | 8 | ||||
-rw-r--r-- | src/emu/sound/multipcm.c | 2 | ||||
-rw-r--r-- | src/emu/sound/scsp.c | 6 | ||||
-rw-r--r-- | src/emu/sound/sidvoice.c | 2 | ||||
-rw-r--r-- | src/emu/sound/spu.c | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c index 25023db43cc..225d3e396e1 100644 --- a/src/emu/sound/aica.c +++ b/src/emu/sound/aica.c @@ -24,10 +24,10 @@ #define LFIX(v) ((unsigned int) ((float) (1<<LFO_SHIFT)*(v))) //Convert DB to multiply amplitude -#define DB(v) LFIX(pow(10.0,v/20.0)) +#define DB(v) LFIX(powf(10.0f,v/20.0f)) //Convert cents to step increment -#define CENTS(v) LFIX(pow(2.0,v/1200.0)) +#define CENTS(v) LFIX(powf(2.0f,v/1200.0f)) /* AICA features 64 programmable slots diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c index 980cf034774..e0998a271d6 100644 --- a/src/emu/sound/discrete.c +++ b/src/emu/sound/discrete.c @@ -648,7 +648,7 @@ void discrete_device::display_profiling(void) discrete_step_interface *step; if ((*node)->interface(step)) if (step->run_time > tresh) - printf("%3d: %20s %8.2f %10.2f\n", (*node)->index(), (*node)->module_name(), (float) step->run_time / (float) total * 100.0, ((float) step->run_time) / (float) m_total_samples); + printf("%3d: %20s %8.2f %10.2f\n", (*node)->index(), (*node)->module_name(), (double) step->run_time / (double) total * 100.0, ((double) step->run_time) / (double) m_total_samples); } /* Task information */ diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c index 1e14bf132b1..f5ddf3cdf55 100644 --- a/src/emu/sound/fm.c +++ b/src/emu/sound/fm.c @@ -2548,7 +2548,7 @@ static void FM_ADPCMAWrite(YM2610 *F2610,int r,int v) if( (v>>c)&1 ) { /**** start adpcm ****/ - adpcm[c].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2610->OPN.ST.freqbase)/3.0); + adpcm[c].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2610->OPN.ST.freqbase)/3.0f); adpcm[c].now_addr = adpcm[c].start<<1; adpcm[c].now_step = 0; adpcm[c].adpcm_acc = 0; @@ -3043,9 +3043,9 @@ void ym2608_reset_chip(void *chip) for( i = 0; i < 6; i++ ) { if (i<=3) /* channels 0,1,2,3 */ - F2608->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/3.0); + F2608->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/3.0f); else /* channels 4 and 5 work with slower clock */ - F2608->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/6.0); + F2608->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/6.0f); F2608->adpcm[i].start = YM2608_ADPCM_ROM_addr[i*2]; F2608->adpcm[i].end = YM2608_ADPCM_ROM_addr[i*2+1]; @@ -3721,7 +3721,7 @@ void ym2610_reset_chip(void *chip) /**** ADPCM work initial ****/ for( i = 0; i < 6 ; i++ ) { - F2610->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2610->OPN.ST.freqbase)/3.0); + F2610->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2610->OPN.ST.freqbase)/3.0f); F2610->adpcm[i].now_addr = 0; F2610->adpcm[i].now_step = 0; F2610->adpcm[i].start = 0; diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c index 3050d07cc17..37399e10c36 100644 --- a/src/emu/sound/multipcm.c +++ b/src/emu/sound/multipcm.c @@ -158,7 +158,7 @@ void multipcm_device::EG_Calc(SLOT *slot) #define LFIX(v) ((unsigned int) ((float) (1<<LFO_SHIFT)*(v))) //Convert DB to multiply amplitude -#define DB(v) LFIX(pow(10.0,v/20.0)) +#define DB(v) LFIX(powf(10.0f,v/20.0f)) //Convert cents to step increment #define CENTS(v) LFIX(powf(2.0f,v/1200.0f)) diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c index bd9995ba559..eb9479e4782 100644 --- a/src/emu/sound/scsp.c +++ b/src/emu/sound/scsp.c @@ -590,7 +590,7 @@ void scsp_device::init() t=ARTimes[i]; //In ms if(t!=0.0) { - step=(1023*1000.0)/( 44100.0f*t); + step=(1023*1000.0)/( 44100.0*t); scale=(double) (1<<EG_SHIFT); m_ARTABLE[i]=(int) (step*scale); } @@ -1432,10 +1432,10 @@ READ16_MEMBER( scsp_device::midi_out_r ) #define LFIX(v) ((unsigned int) ((float) (1<<LFO_SHIFT)*(v))) //Convert DB to multiply amplitude -#define DB(v) LFIX(pow(10.0,v/20.0)) +#define DB(v) LFIX(powf(10.0f,v/20.0f)) //Convert cents to step increment -#define CENTS(v) LFIX(pow(2.0,v/1200.0)) +#define CENTS(v) LFIX(powf(2.0f,v/1200.0f)) static const float LFOFreq[32]= diff --git a/src/emu/sound/sidvoice.c b/src/emu/sound/sidvoice.c index 8f9f1c1f3ee..2dd42bcf3c4 100644 --- a/src/emu/sound/sidvoice.c +++ b/src/emu/sound/sidvoice.c @@ -344,7 +344,7 @@ INLINE void waveCalcFilter(sidOperator* pVoice) else if (pVoice->sid->filter.Type == 0x40) { float tmp, tmp2; - pVoice->filtLow += ( pVoice->filtRef * pVoice->sid->filter.Dy * 0.1 ); + pVoice->filtLow += ( pVoice->filtRef * pVoice->sid->filter.Dy * 0.1f ); tmp = (float)pVoice->filtIO - pVoice->filtLow; tmp -= pVoice->filtRef * pVoice->sid->filter.ResDy; pVoice->filtRef += ( tmp * (pVoice->sid->filter.Dy) ); diff --git a/src/emu/sound/spu.c b/src/emu/sound/spu.c index be836f543a4..433f7737ba6 100644 --- a/src/emu/sound/spu.c +++ b/src/emu/sound/spu.c @@ -2333,9 +2333,9 @@ void spu_device::set_xa_format(const float _freq, const int channels) // Adjust frequency to compensate for slightly slower/faster frame rate // float freq=44100.0; //(_freq*get_adjusted_frame_rate())/ps1hw.rcnt->get_vertical_refresh(); - xa_freq=(unsigned int)((_freq/44100.0)*4096.0f); + xa_freq=(unsigned int)((_freq/44100.0f)*4096.0f); xa_channels=channels; - xa_spf=(unsigned int)(_freq/60.0)*channels; + xa_spf=(unsigned int)(_freq/60.0f)*channels; } // |