summaryrefslogtreecommitdiff
path: root/firmware/export/pcm-internal.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-08-23 14:18:08 -0400
committerMichael Sevakis <jethead71@rockbox.org>2014-03-08 08:04:41 +0100
commit61d0583384b81de28498544ea3ec2e5c8eba42be (patch)
tree0901394a414674d70c82ee56cdfece1c7cce682a /firmware/export/pcm-internal.h
parent62b10e383cc7439508e57751dbcdf0d8a617cf1a (diff)
downloadrockbox-61d0583384b81de28498544ea3ec2e5c8eba42be.tar.gz
rockbox-61d0583384b81de28498544ea3ec2e5c8eba42be.zip
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>
Diffstat (limited to 'firmware/export/pcm-internal.h')
-rw-r--r--firmware/export/pcm-internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/export/pcm-internal.h b/firmware/export/pcm-internal.h
index 2b73f64ef6..7670f99f04 100644
--- a/firmware/export/pcm-internal.h
+++ b/firmware/export/pcm-internal.h
@@ -57,6 +57,7 @@ void pcm_sw_volume_copy_buffer(void *dst, const void *src, size_t size);
57#endif 57#endif
58#endif /* PCM_SW_VOLUME_UNBUFFERED */ 58#endif /* PCM_SW_VOLUME_UNBUFFERED */
59 59
60void pcm_sync_pcm_factors(void);
60#endif /* HAVE_SW_VOLUME_CONTROL */ 61#endif /* HAVE_SW_VOLUME_CONTROL */
61 62
62#define PCM_SAMPLE_SIZE (2 * sizeof (int16_t)) 63#define PCM_SAMPLE_SIZE (2 * sizeof (int16_t))