From 8a3a2834b84ba9cdb4b9c505b124774f14034d27 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 16 May 2018 20:19:09 +0200 Subject: Store file list in instrument and make initial connections fomr UI connections to project storage. --- src/audioextractor.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/audioextractor.cc') diff --git a/src/audioextractor.cc b/src/audioextractor.cc index eb86b2f..98cbccb 100644 --- a/src/audioextractor.cc +++ b/src/audioextractor.cc @@ -33,6 +33,8 @@ #include +#include "project.h" + #define INSTRUMENT_VERSION "2.0" typedef struct @@ -41,8 +43,11 @@ typedef struct float *data; } audiodata_t; -AudioExtractor::AudioExtractor(Selections &s, QObject *parent) - : QObject(parent), selections(s) +AudioExtractor::AudioExtractor(Instrument& instrument, Selections &selections, + QObject *parent) + : QObject(parent) + , instrument(instrument) + , selections(selections) { } @@ -275,6 +280,7 @@ void AudioExtractor::addFile(QString file, QString name) pair.first = file; pair.second = name; audiofiles.push_back(pair); + instrument.setFileList(audiofiles); } void AudioExtractor::removeFile(QString file, QString name) @@ -285,10 +291,11 @@ void AudioExtractor::removeFile(QString file, QString name) if(file == j->first/* && name == j->second*/) { audiofiles.erase(j); - return; + break; } j++; } + instrument.setFileList(audiofiles); } void AudioExtractor::setOutputPrefix(const QString &p) -- cgit v1.2.3