[Horus] VS1053B Volume added. No ticks at all compared to Taranis!

This commit is contained in:
Bertrand Songis
2016-01-20 19:52:14 +01:00
parent da76106465
commit 6c54374ed8
9 changed files with 85 additions and 35 deletions
@@ -20,12 +20,6 @@
#include "../../opentx.h"
const int8_t volumeScale[VOLUME_LEVEL_MAX+1] =
{
0, 1, 2, 3, 5, 9, 13, 17, 22, 27, 33, 40,
64, 82, 96, 105, 112, 117, 120, 122, 124, 125, 126, 127
};
#if !defined(SIMU)
bool dacIdle = true;
@@ -325,7 +325,6 @@ void audioEnd(void) ;
void dacStart(void);
void dacStop(void);
void setSampleRate(uint32_t frequency);
extern const int8_t volumeScale[];
#define VOLUME_LEVEL_MAX 23
#define VOLUME_LEVEL_DEF 12
void setScaledVolume(uint8_t volume);
+5
View File
@@ -243,6 +243,11 @@ void eepromWaitEepromStandbyState(void)
}
#if !defined(BOOT)
const uint8_t volumeScale[VOLUME_LEVEL_MAX+1] = {
0, 1, 2, 3, 5, 9, 13, 17, 22, 27, 33, 40,
64, 82, 96, 105, 112, 117, 120, 122, 124, 125, 126, 127
};
void setScaledVolume(uint8_t volume)
{
if (volume > VOLUME_LEVEL_MAX) {