mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
add sanity check for bpm value
This commit is contained in:
parent
fe1b68a069
commit
ac6d1fc4cc
1 changed files with 5 additions and 2 deletions
|
@ -173,9 +173,12 @@ static void gmastertrack_button_callback(Fl_Widget *w, void *data)
|
||||||
const char* answer = fl_input("Enter BPM value: ");
|
const char* answer = fl_input("Enter BPM value: ");
|
||||||
if(answer) {
|
if(answer) {
|
||||||
int bpm = atoi(answer);
|
int bpm = atoi(answer);
|
||||||
|
|
||||||
|
if ( bpm >= MIN_TEMPO && bpm <= MAX_TEMPO) {
|
||||||
EventTimeBPM e = EventTimeBPM( bpm );
|
EventTimeBPM e = EventTimeBPM( bpm );
|
||||||
writeToDspRingbuffer( &e );
|
writeToDspRingbuffer( &e );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
EventTimeTempoTap e;
|
EventTimeTempoTap e;
|
||||||
writeToDspRingbuffer( &e );
|
writeToDspRingbuffer( &e );
|
||||||
|
|
Loading…
Add table
Reference in a new issue