mirror of https://github.com/arendst/Tasmota.git
Merge pull request #13483 from Jason2866/fix_audio
Fix audio compile for ESP32 Core 2.0.0
This commit is contained in:
commit
d7ef04aeeb
|
@ -190,6 +190,7 @@ TSFDEF void tsf_channel_set_bank(tsf* f, int channel, int bank);
|
|||
TSFDEF int tsf_channel_set_bank_preset(tsf* f, int channel, int bank, int preset_number);
|
||||
TSFDEF void tsf_channel_set_pan(tsf* f, int channel, float pan);
|
||||
TSFDEF void tsf_channel_set_volume(tsf* f, int channel, float volume);
|
||||
TSFDEF void tsf_channel_set_volume_to_one(tsf* f, int channel); // solves a Compiler bug!! TODO: refactor after compiler fix!!
|
||||
TSFDEF void tsf_channel_set_pitchwheel(tsf* f, int channel, int pitch_wheel);
|
||||
TSFDEF void tsf_channel_set_pitchrange(tsf* f, int channel, float pitch_range);
|
||||
TSFDEF void tsf_channel_set_tuning(tsf* f, int channel, float tuning);
|
||||
|
@ -2054,6 +2055,10 @@ TSFDEF void tsf_channel_sounds_off_all(tsf* f, int channel)
|
|||
tsf_voice_endquick(v, f->outSampleRate);
|
||||
}
|
||||
|
||||
TSFDEF void tsf_channel_set_volume_to_one(tsf* f, int channel){
|
||||
tsf_channel_set_volume(f, channel, 1.0f);
|
||||
}
|
||||
|
||||
TSFDEF void tsf_channel_midi_control(tsf* f, int channel, int controller, int control_value)
|
||||
{
|
||||
struct tsf_channel* c = tsf_channel_init(f, channel);
|
||||
|
@ -2079,7 +2084,7 @@ TSFDEF void tsf_channel_midi_control(tsf* f, int channel, int controller, int co
|
|||
c->midiVolume = c->midiExpression = 16383;
|
||||
c->midiPan = 8192;
|
||||
c->bank = 0;
|
||||
tsf_channel_set_volume(f, channel, 1.0f);
|
||||
tsf_channel_set_volume_to_one(f, channel);
|
||||
tsf_channel_set_pan(f, channel, 0.5f);
|
||||
tsf_channel_set_pitchrange(f, channel, 2.0f);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue