mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-15 20:59:08 +01:00
removed useless assertion checks (for debug only)
This commit is contained in:
parent
545b4dcf49
commit
7ea121f18c
@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
#include "blip_buf.h"
|
#include "blip_buf.h"
|
||||||
|
|
||||||
#define BLIP_ASSERT 1
|
|
||||||
|
|
||||||
#ifdef BLIP_ASSERT
|
#ifdef BLIP_ASSERT
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
#endif
|
||||||
@ -236,11 +234,10 @@ int blip_read_samples( blip_t* m, short out [], int count)
|
|||||||
buf_t const* in = SAMPLES( m );
|
buf_t const* in = SAMPLES( m );
|
||||||
buf_t const* end = in + count;
|
buf_t const* end = in + count;
|
||||||
int sum = m->integrator;
|
int sum = m->integrator;
|
||||||
int s;
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* Eliminate fraction */
|
/* Eliminate fraction */
|
||||||
s = ARITH_SHIFT( sum, delta_bits );
|
int s = ARITH_SHIFT( sum, delta_bits );
|
||||||
|
|
||||||
sum += *in++;
|
sum += *in++;
|
||||||
|
|
||||||
@ -275,24 +272,23 @@ int blip_mix_samples( blip_t* m, short out [], int count)
|
|||||||
buf_t const* in = SAMPLES( m );
|
buf_t const* in = SAMPLES( m );
|
||||||
buf_t const* end = in + count;
|
buf_t const* end = in + count;
|
||||||
int sum = m->integrator;
|
int sum = m->integrator;
|
||||||
int s, temp;
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* Eliminate fraction */
|
/* Eliminate fraction */
|
||||||
s = ARITH_SHIFT( sum, delta_bits );
|
int s = ARITH_SHIFT( sum, delta_bits );
|
||||||
|
|
||||||
sum += *in++;
|
sum += *in++;
|
||||||
|
|
||||||
/* Add to current buffer */
|
|
||||||
temp = s + *out;
|
|
||||||
|
|
||||||
CLAMP( temp );
|
|
||||||
|
|
||||||
*out = temp;
|
|
||||||
out += 2;
|
|
||||||
|
|
||||||
/* High-pass filter */
|
/* High-pass filter */
|
||||||
sum -= s << (delta_bits - bass_shift);
|
sum -= s << (delta_bits - bass_shift);
|
||||||
|
|
||||||
|
/* Add current buffer value */
|
||||||
|
s += *out;
|
||||||
|
|
||||||
|
CLAMP( s );
|
||||||
|
|
||||||
|
*out = s;
|
||||||
|
out += 2;
|
||||||
}
|
}
|
||||||
while ( in != end );
|
while ( in != end );
|
||||||
m->integrator = sum;
|
m->integrator = sum;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user