forked from len0rd/rockbox
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>
This commit is contained in:
parent
370ed6de7c
commit
08199cd6cb
9 changed files with 189 additions and 106 deletions
|
|
@ -106,8 +106,9 @@ static void pcm_play_data_start_int(const void *addr, size_t size);
|
|||
static void pcm_play_pause_int(bool play);
|
||||
void pcm_play_stop_int(void);
|
||||
|
||||
#ifndef HAVE_SW_VOLUME_CONTROL
|
||||
/** Standard hw volume control functions - otherwise, see pcm_sw_volume.c **/
|
||||
#if !defined(HAVE_SW_VOLUME_CONTROL) || defined(PCM_SW_VOLUME_UNBUFFERED)
|
||||
/** Standard hw volume/unbuffered control functions - otherwise, see
|
||||
** pcm_sw_volume.c **/
|
||||
static inline void pcm_play_dma_start_int(const void *addr, size_t size)
|
||||
{
|
||||
pcm_play_dma_start(addr, size);
|
||||
|
|
@ -150,7 +151,7 @@ bool pcm_play_dma_complete_callback(enum pcm_dma_status status,
|
|||
pcm_play_stop_int();
|
||||
return false;
|
||||
}
|
||||
#endif /* ndef HAVE_SW_VOLUME_CONTROL */
|
||||
#endif /* !HAVE_SW_VOLUME_CONTROL || PCM_SW_VOLUME_UNBUFFERED */
|
||||
|
||||
static void pcm_play_data_start_int(const void *addr, size_t size)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue