mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-29 04:31:49 +01:00
masked interrupts during float operations
This commit is contained in:
parent
9e1c7d6ce8
commit
edf479a257
@ -3,8 +3,8 @@
|
|||||||
/* C Conversion by Eke-Eke for use in Genesis Plus (2009). */
|
/* C Conversion by Eke-Eke for use in Genesis Plus (2009). */
|
||||||
|
|
||||||
#include "Fir_Resampler.h"
|
#include "Fir_Resampler.h"
|
||||||
|
#include "shared.h"
|
||||||
|
|
||||||
//#include <assert.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -149,6 +149,10 @@ double Fir_Resampler_time_ratio( double new_factor, double rolloff )
|
|||||||
double pos = 0.0;
|
double pos = 0.0;
|
||||||
res = -1;
|
res = -1;
|
||||||
|
|
||||||
|
#ifdef NGC
|
||||||
|
u32 level = IRQ_Disable();
|
||||||
|
#endif
|
||||||
|
|
||||||
for ( r = 1; r <= MAX_RES; r++ )
|
for ( r = 1; r <= MAX_RES; r++ )
|
||||||
{
|
{
|
||||||
pos += ratio;
|
pos += ratio;
|
||||||
@ -191,6 +195,10 @@ double Fir_Resampler_time_ratio( double new_factor, double rolloff )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NGC
|
||||||
|
IRQ_Restore(level);
|
||||||
|
#endif
|
||||||
|
|
||||||
Fir_Resampler_clear();
|
Fir_Resampler_clear();
|
||||||
|
|
||||||
return ratio;
|
return ratio;
|
||||||
@ -229,7 +237,6 @@ int Fir_Resampler_written( void )
|
|||||||
void Fir_Resampler_write( long count )
|
void Fir_Resampler_write( long count )
|
||||||
{
|
{
|
||||||
write_pos += count;
|
write_pos += count;
|
||||||
// assert( write_pos <= ( buffer + buffer_size ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Fir_Resampler_read( sample_t* out, long count )
|
int Fir_Resampler_read( sample_t* out, long count )
|
||||||
|
@ -1868,10 +1868,6 @@ static void init_tables(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NGC
|
|
||||||
IRQ_Restore(level);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* build Logarithmic Sinus table */
|
/* build Logarithmic Sinus table */
|
||||||
for (i=0; i<SIN_LEN; i++)
|
for (i=0; i<SIN_LEN; i++)
|
||||||
{
|
{
|
||||||
@ -1896,6 +1892,10 @@ static void init_tables(void)
|
|||||||
sin_tab[ i ] = n*2 + (m>=0.0? 0: 1 );
|
sin_tab[ i ] = n*2 + (m>=0.0? 0: 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NGC
|
||||||
|
IRQ_Restore(level);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* build LFO PM modulation table */
|
/* build LFO PM modulation table */
|
||||||
for(i = 0; i < 8; i++) /* 8 PM depths */
|
for(i = 0; i < 8; i++) /* 8 PM depths */
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user