-Fixed issue with Cancel button of LoadSample

This commit is contained in:
Harry van Haaren 2013-08-22 02:25:58 +01:00
parent 29c5d3b83a
commit 9c67e1cebf
2 changed files with 5 additions and 1 deletions

View file

@ -342,7 +342,7 @@ class ClipSelector : public Fl_Button
else if ( strcmp(m->label(), "Load") == 0 )
{
clipSelectorLoad( ID, clipNum );
loadClip( clipNum, "---" );
//loadClip( clipNum, "---" );
}
else if ( strcmp(m->label(), "1") == 0 ) {
EventLooperLoopLength e = EventLooperLoopLength(ID, clipNum ,1);

View file

@ -33,6 +33,10 @@ static string choose_file()
static void clipSelectorLoad(int track, int scene)
{
string filePathName = choose_file();
if ( strcmp( filePathName.c_str(), "" ) == 0 )
return;
AudioBuffer* ab = Worker::loadSample( filePathName );
EventLooperLoad e = EventLooperLoad( track, scene, ab );
writeToDspRingbuffer( &e );