forked from len0rd/rockbox
Greatly reduce volume-change zipper artifacts with SW volume.
Uses a cosine factor to smoothly shift the PCM level from the old level to the new one over the length of a frame. Implements indirect calls to PCM scaling function instead of testing conditions on every callback, cleanly assigning a different call to do the volume transition. The volume change call then assigns the final scaling function. Change-Id: If1004b92a91c5ca766dd0e4014ec274636e8ed26 Reviewed-on: http://gerrit.rockbox.org/763 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
This commit is contained in:
parent
62b10e383c
commit
61d0583384
3 changed files with 108 additions and 28 deletions
|
|
@ -57,6 +57,7 @@ void pcm_sw_volume_copy_buffer(void *dst, const void *src, size_t size);
|
|||
#endif
|
||||
#endif /* PCM_SW_VOLUME_UNBUFFERED */
|
||||
|
||||
void pcm_sync_pcm_factors(void);
|
||||
#endif /* HAVE_SW_VOLUME_CONTROL */
|
||||
|
||||
#define PCM_SAMPLE_SIZE (2 * sizeof (int16_t))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue