Cosmetics

This commit is contained in:
Bertrand Songis
2016-01-20 15:19:53 +01:00
parent 3b3555df48
commit da76106465
6 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -638,7 +638,7 @@ inline float evalVolumeRatio(int freq, int volume)
return result;
}
int ToneContext::mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade)
int ToneContext::mixBuffer(AudioBuffer * buffer, int volume, unsigned int fade)
{
int duration = 0;
int result = 0;
+2 -2
View File
@@ -448,11 +448,11 @@ void evalFunctions()
break;
#endif
#if defined(VOLUME_CHIP)
#if defined(HARDWARE_VOLUME)
case FUNC_VOLUME:
{
getvalue_t raw = getValue(CFN_PARAM(cfn));
//only set volume if input changed more than hysteresis
// only set volume if input changed more than hysteresis
if (abs(requiredSpeakerVolumeRawLast - raw) > VOLUME_HYSTERESIS) {
requiredSpeakerVolumeRawLast = raw;
}
+2 -2
View File
@@ -46,7 +46,7 @@ enum menuGeneralSetupItems {
ITEM_SETUP_BATT_RANGE,
ITEM_SETUP_SOUND_LABEL,
ITEM_SETUP_BEEP_MODE,
ITEM_SETUP_SPEAKER_VOLUME,
ITEM_SETUP_GENERAL_VOLUME,
ITEM_SETUP_BEEP_VOLUME,
ITEM_SETUP_BEEP_LENGTH,
ITEM_SETUP_SPEAKER_PITCH,
@@ -205,7 +205,7 @@ void menuGeneralSetup(uint8_t event)
#endif
break;
case ITEM_SETUP_SPEAKER_VOLUME:
case ITEM_SETUP_GENERAL_VOLUME:
{
lcd_putsLeft(y, STR_SPEAKER_VOLUME);
uint8_t b = g_eeGeneral.speakerVolume+VOLUME_LEVEL_DEF;
+1 -1
View File
@@ -1049,7 +1049,7 @@ void evalMixes(uint8_t tick10ms)
// must be done after mixing because some functions use the inputs/channels values
// must be done before limits because of the applyLimit function: it checks for safety switches which would be not initialized otherwise
if (tick10ms) {
#if defined(VOLUME_CHIP)
#if defined(HARDWARE_VOLUME)
requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF;
#endif
+7 -1
View File
@@ -459,7 +459,13 @@ bool audioPushBuffer(AudioBuffer * buffer)
}
#endif
#if defined(VOLUME_CHIP)
#if defined(PCBHORUS)
void audioConsumeCurrentBuffer()
{
}
#endif
#if defined(HARDWARE_VOLUME)
void setScaledVolume(uint8_t volume)
{
simuAudio.currentVolume = min<int>((volumeScale[min<uint8_t>(volume, VOLUME_LEVEL_MAX)] * simuAudio.volumeGain) / 10, 127);
+1 -1
View File
@@ -277,6 +277,6 @@ void setVolume(uint8_t volume)
int32_t getVolume()
{
return 0; // TODO
return -1; // TODO
}
#endif