summaryrefslogtreecommitdiffstats
path: root/firmware/export/pcm_sw_volume.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-04-23 03:20:49 -0400
committerMichael Sevakis <jethead71@rockbox.org>2013-04-27 06:59:27 +0200
commit08199cd6cb1e2c600eb16ce077cc308fee82de33 (patch)
tree5c33c39092a5f5aa65f6ac104f3fee54c5041519 /firmware/export/pcm_sw_volume.h
parent370ed6de7c7596b2a1f6a2f99c8070bd179b4abd (diff)
downloadrockbox-08199cd.tar.gz
rockbox-08199cd.tar.bz2
rockbox-08199cd.zip
Provide high resolution volume and prescaler to hosted targets.
HAVE_SW_VOLUME_CONTROL is required and at this time only affects the SDL targets using pcm-sdl.c. Enables balance control in SDL targets, unless mono volume is in use. Compiles software volume control as unbuffered when PCM_SW_VOLUME_UNBUFFERED is defined. This avoids the overhead and extra latency introduced by the double buffer when it is not needed. Use this config when the target's PCM driver is buffered and sufficient latency exists to perform safely the volume scaling. Simulated targets that are double-buffered when made as native targets remain so in the sim in order to run the same code. Change-Id: Ifa77d2d3ae7376c65afecdfc785a084478cb5ffb Reviewed-on: http://gerrit.rockbox.org/457 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'firmware/export/pcm_sw_volume.h')
-rw-r--r--firmware/export/pcm_sw_volume.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/export/pcm_sw_volume.h b/firmware/export/pcm_sw_volume.h
index b5d70654a1..5088eadeb1 100644
--- a/firmware/export/pcm_sw_volume.h
+++ b/firmware/export/pcm_sw_volume.h
@@ -21,6 +21,12 @@
#ifndef PCM_SW_VOLUME_H
#define PCM_SW_VOLUME_H
+/***
+ ** Note: Only PCM drivers that are themselves buffered should use the
+ ** PCM_SW_VOLUME_UNBUFFERED configuration. This may be part of the platform,
+ ** the library or a hardware necessity. Normally, it shouldn't be used and
+ ** only the port developer can properly decide.
+ **/
#ifdef HAVE_SW_VOLUME_CONTROL
#include <audiohw.h>