mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-04 16:51:37 -05:00
Nicer Handling
This commit is contained in:
parent
b00eee264e
commit
c78b76b193
1 changed files with 7 additions and 2 deletions
|
@ -285,15 +285,20 @@ void setRecordBarsCb(Fl_Widget *w, void* data)
|
|||
|
||||
ClipSelector *track = (ClipSelector*)w;
|
||||
long bars = (long)data;
|
||||
if(bars == -2){
|
||||
if(bars == -2) {
|
||||
const char* answer = fl_input("Enter a custom number: ");
|
||||
if(!answer || atoi(bars) <= 0|| atoi(bars) > MAX_BARS) {
|
||||
if(!answer) {
|
||||
bars = -1;
|
||||
fl_message("Please enter value between 1 and %.", MAX_BARS);
|
||||
} else
|
||||
bars = atoi(answer);
|
||||
}
|
||||
|
||||
if(bars <= 0 || bars > MAX_BARS) {
|
||||
bars = -1;
|
||||
fl_message("Please enter value between 1 and %.", MAX_BARS);
|
||||
}
|
||||
|
||||
EventLooperBarsToRecord e(track->ID, track->getLastClipNum(), bars);
|
||||
writeToDspRingbuffer( &e );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue