fix low quality not working in acquireDirect
performance may be reduced
This commit is contained in:
parent
584305f1fa
commit
032ff82955
4 changed files with 22 additions and 23 deletions
5
extern/blip_buf/blip_buf.c
vendored
5
extern/blip_buf/blip_buf.c
vendored
|
|
@ -299,7 +299,7 @@ possibly-wider fixed_t. On 32-bit platforms, this is likely more efficient.
|
|||
And by having pre_shift 32, a 32-bit platform can easily do the shift by
|
||||
simply ignoring the low half. */
|
||||
|
||||
void blip_add_delta( blip_t* m, unsigned time, int delta )
|
||||
void blip_add_delta_slow( blip_t* m, unsigned time, int delta )
|
||||
{
|
||||
unsigned fixed = (unsigned) ((time * m->factor + m->offset) >> pre_shift);
|
||||
buf_t* out = SAMPLES( m ) + m->avail + (fixed >> frac_bits);
|
||||
|
|
@ -350,3 +350,6 @@ void blip_add_delta_fast( blip_t* m, unsigned time, int delta )
|
|||
out [7] += delta * delta_unit - delta2;
|
||||
out [8] += delta2;
|
||||
}
|
||||
|
||||
/* (tildearrow) ability to change blip_add_delta at runtime */
|
||||
void (*blip_add_delta)( blip_t*, unsigned int, int )=blip_add_delta_slow;
|
||||
5
extern/blip_buf/blip_buf.h
vendored
5
extern/blip_buf/blip_buf.h
vendored
|
|
@ -35,8 +35,11 @@ blip_max_ratio = 1 << 20 };
|
|||
/** Clears entire buffer. Afterwards, blip_samples_avail() == 0. */
|
||||
void blip_clear( blip_t* );
|
||||
|
||||
/** (tildearrow) ability to change blip_add_delta at runtime */
|
||||
extern void (*blip_add_delta)( blip_t*, unsigned int, int );
|
||||
|
||||
/** Adds positive/negative delta into buffer at specified clock time. */
|
||||
void blip_add_delta( blip_t*, unsigned int clock_time, int delta );
|
||||
void blip_add_delta_slow( blip_t*, unsigned int clock_time, int delta );
|
||||
|
||||
/** Same as blip_add_delta(), but uses faster, lower-quality synthesis. */
|
||||
void blip_add_delta_fast( blip_t*, unsigned int clock_time, int delta );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue