Cosmetics
This commit is contained in:
@@ -638,7 +638,7 @@ inline float evalVolumeRatio(int freq, int volume)
|
|||||||
return result;
|
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 duration = 0;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|||||||
@@ -448,11 +448,11 @@ void evalFunctions()
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(VOLUME_CHIP)
|
#if defined(HARDWARE_VOLUME)
|
||||||
case FUNC_VOLUME:
|
case FUNC_VOLUME:
|
||||||
{
|
{
|
||||||
getvalue_t raw = getValue(CFN_PARAM(cfn));
|
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) {
|
if (abs(requiredSpeakerVolumeRawLast - raw) > VOLUME_HYSTERESIS) {
|
||||||
requiredSpeakerVolumeRawLast = raw;
|
requiredSpeakerVolumeRawLast = raw;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ enum menuGeneralSetupItems {
|
|||||||
ITEM_SETUP_BATT_RANGE,
|
ITEM_SETUP_BATT_RANGE,
|
||||||
ITEM_SETUP_SOUND_LABEL,
|
ITEM_SETUP_SOUND_LABEL,
|
||||||
ITEM_SETUP_BEEP_MODE,
|
ITEM_SETUP_BEEP_MODE,
|
||||||
ITEM_SETUP_SPEAKER_VOLUME,
|
ITEM_SETUP_GENERAL_VOLUME,
|
||||||
ITEM_SETUP_BEEP_VOLUME,
|
ITEM_SETUP_BEEP_VOLUME,
|
||||||
ITEM_SETUP_BEEP_LENGTH,
|
ITEM_SETUP_BEEP_LENGTH,
|
||||||
ITEM_SETUP_SPEAKER_PITCH,
|
ITEM_SETUP_SPEAKER_PITCH,
|
||||||
@@ -205,7 +205,7 @@ void menuGeneralSetup(uint8_t event)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ITEM_SETUP_SPEAKER_VOLUME:
|
case ITEM_SETUP_GENERAL_VOLUME:
|
||||||
{
|
{
|
||||||
lcd_putsLeft(y, STR_SPEAKER_VOLUME);
|
lcd_putsLeft(y, STR_SPEAKER_VOLUME);
|
||||||
uint8_t b = g_eeGeneral.speakerVolume+VOLUME_LEVEL_DEF;
|
uint8_t b = g_eeGeneral.speakerVolume+VOLUME_LEVEL_DEF;
|
||||||
|
|||||||
+1
-1
@@ -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 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
|
// must be done before limits because of the applyLimit function: it checks for safety switches which would be not initialized otherwise
|
||||||
if (tick10ms) {
|
if (tick10ms) {
|
||||||
#if defined(VOLUME_CHIP)
|
#if defined(HARDWARE_VOLUME)
|
||||||
requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF;
|
requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -459,7 +459,13 @@ bool audioPushBuffer(AudioBuffer * buffer)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(VOLUME_CHIP)
|
#if defined(PCBHORUS)
|
||||||
|
void audioConsumeCurrentBuffer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HARDWARE_VOLUME)
|
||||||
void setScaledVolume(uint8_t volume)
|
void setScaledVolume(uint8_t volume)
|
||||||
{
|
{
|
||||||
simuAudio.currentVolume = min<int>((volumeScale[min<uint8_t>(volume, VOLUME_LEVEL_MAX)] * simuAudio.volumeGain) / 10, 127);
|
simuAudio.currentVolume = min<int>((volumeScale[min<uint8_t>(volume, VOLUME_LEVEL_MAX)] * simuAudio.volumeGain) / 10, 127);
|
||||||
|
|||||||
@@ -277,6 +277,6 @@ void setVolume(uint8_t volume)
|
|||||||
|
|
||||||
int32_t getVolume()
|
int32_t getVolume()
|
||||||
{
|
{
|
||||||
return 0; // TODO
|
return -1; // TODO
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user