mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
restyled code after stereo added
This commit is contained in:
parent
ed72627245
commit
08bdc1ff09
6 changed files with 128 additions and 133 deletions
|
@ -327,8 +327,7 @@ int DiskWriter::writeAudioBuffer(int track, int scene, AudioBuffer* ab,
|
|||
frameBuf[1] = ab->getDataR()[i];
|
||||
outfile.writef( frameBuf, 1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
LUPPP_WARN("%s","Sample has zero samples");
|
||||
}
|
||||
|
||||
|
|
|
@ -101,8 +101,9 @@ void AudioEditor::show( AudioBuffer* buf, bool modal )
|
|||
|
||||
if ( !ab ) {
|
||||
LUPPP_WARN("called with ab == 0");
|
||||
} else {
|
||||
// TODO right (stereo)
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<float>& tmp = ab->getDataL();
|
||||
int size = tmp.size();
|
||||
waveform->setData( &tmp[0], size );
|
||||
|
@ -115,12 +116,9 @@ void AudioEditor::show( AudioBuffer* buf, bool modal )
|
|||
// figure out BPM values from size
|
||||
for( int i = 0; i < 7; i++ ) {
|
||||
int beat = beats[i];
|
||||
|
||||
int fpb = size / beat;
|
||||
|
||||
int bpm = (gui->samplerate / fpb) * 60;
|
||||
|
||||
|
||||
if ( bpm < 60 || bpm > 220 ) {
|
||||
// disable option: not valid
|
||||
beatButtons[i]->setGreyOut( true );
|
||||
|
@ -167,8 +165,6 @@ void AudioEditor::show( AudioBuffer* buf, bool modal )
|
|||
// no valid BPM range..?
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
window->set_modal();
|
||||
window->show();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue