forked from len0rd/rockbox
Forget about fixedpoint.c in any HWCODEC bin.
It bloats to much just for one simple use. Just use a simple function for shifting sound setting decimal places. Change-Id: I1a7d37cce6ada3c6e6600dc0d301f354ffeff231
This commit is contained in:
parent
333f4f52be
commit
540e5d103f
2 changed files with 5 additions and 5 deletions
|
|
@ -159,12 +159,11 @@ radio/radioart.c
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fixedpoint.c
|
|
||||||
|
|
||||||
#if CONFIG_CODEC == SWCODEC
|
#if CONFIG_CODEC == SWCODEC
|
||||||
#if INPUT_SRC_CAPS != 0
|
#if INPUT_SRC_CAPS != 0
|
||||||
audio_path.c
|
audio_path.c
|
||||||
#endif /* INPUT_SRC_CAPS != 0 */
|
#endif /* INPUT_SRC_CAPS != 0 */
|
||||||
|
fixedpoint.c
|
||||||
pcmbuf.c
|
pcmbuf.c
|
||||||
codec_thread.c
|
codec_thread.c
|
||||||
playback.c
|
playback.c
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "fixedpoint.h"
|
|
||||||
#ifdef HAVE_SW_VOLUME_CONTROL
|
#ifdef HAVE_SW_VOLUME_CONTROL
|
||||||
#include "pcm_sw_volume.h"
|
#include "pcm_sw_volume.h"
|
||||||
#endif /* HAVE_SW_VOLUME_CONTROL */
|
#endif /* HAVE_SW_VOLUME_CONTROL */
|
||||||
|
|
@ -128,8 +127,10 @@ static int current_eq_band_gain[AUDIOHW_EQ_BAND_NUM]; /* tenth dB */
|
||||||
/* Return the sound value scaled to centibels (tenth-decibels) */
|
/* Return the sound value scaled to centibels (tenth-decibels) */
|
||||||
static int sound_value_to_cb(int setting, int value)
|
static int sound_value_to_cb(int setting, int value)
|
||||||
{
|
{
|
||||||
long e = (1 - sound_numdecimals(setting)) << 16;
|
int shift = 1 - sound_numdecimals(setting);
|
||||||
return fp_mul(value, fp_exp10(e, 16), 16);
|
if (shift < 0) do { value /= 10; } while (++shift);
|
||||||
|
if (shift > 0) do { value *= 10; } while (--shift);
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_prescaled_volume(void)
|
static void set_prescaled_volume(void)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue