summaryrefslogtreecommitdiff
path: root/src/instrumentwidget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/instrumentwidget.cc')
-rw-r--r--src/instrumentwidget.cc20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/instrumentwidget.cc b/src/instrumentwidget.cc
index 0058f93..d7b0024 100644
--- a/src/instrumentwidget.cc
+++ b/src/instrumentwidget.cc
@@ -86,7 +86,7 @@ InstrumentWidget::InstrumentWidget(Settings& settings, Instrument& instrument)
central->setLayout(lv);
setCentralWidget(central);
- extractor = new AudioExtractor(instrument, selections, this);
+ extractor = new AudioExtractor(instrument, this);
canvaswidget = new CanvasWidget(this);
QToolBar* toolbar = addToolBar(tr("Tools"));
@@ -199,12 +199,6 @@ QWidget* InstrumentWidget::createFilesTab()
connect(filelist, SIGNAL(masterFileChanged(QString)),
this, SLOT(loadFile(QString)));
connect(loadbtn, SIGNAL(clicked()), filelist, SLOT(addFiles()));
- connect(filelist, SIGNAL(fileAdded(QString, QString)),
- extractor, SLOT(addFile(QString, QString)));
- connect(filelist, SIGNAL(fileRemoved(QString, QString)),
- extractor, SLOT(removeFile(QString, QString)));
- connect(filelist, SIGNAL(nameChanged(QString, QString)),
- extractor, SLOT(changeName(QString, QString)));
l->addWidget(filelist);
if(!instrument.getMasterFile().isEmpty())
@@ -366,17 +360,13 @@ QWidget* InstrumentWidget::createExportTab()
prefix = new QLineEdit();
prefix->setText(instrument.getPrefix());
connect(prefix, SIGNAL(textChanged(const QString &)),
- extractor, SLOT(setOutputPrefix(const QString &)));
- connect(prefix, SIGNAL(textChanged(const QString &)),
this, SLOT(prefixChanged()));
l->addWidget(prefix);
l->addWidget(new QLabel(tr("Export path:")));
QHBoxLayout* lo_exportp = new QHBoxLayout();
lineed_exportp = new QLineEdit();
- lineed_exportp->setText(instrument.getExportPath());
- connect(lineed_exportp, SIGNAL(textChanged(const QString &)),
- extractor, SLOT(setExportPath(const QString &)));
+ lineed_exportp->setText(instrument.getProject().getExportPath());
connect(lineed_exportp, SIGNAL(textChanged(const QString &)),
this, SLOT(exportPathChanged()));
lo_exportp->addWidget(lineed_exportp);
@@ -409,7 +399,7 @@ void InstrumentWidget::prefixChanged()
void InstrumentWidget::exportPathChanged()
{
- instrument.setExportPath(lineed_exportp->text());
+ instrument.getProject().setExportPath(lineed_exportp->text());
}
void InstrumentWidget::playSamples()
@@ -486,12 +476,12 @@ void InstrumentWidget::loadFile(QString filename)
qApp->processEvents();
sorter->setWavData(NULL, 0);
- player.setPcmData(NULL, 0);
+ player.setPcmData(NULL, 0, 0);
canvaswidget->canvas->load(filename);
sorter->setWavData(canvaswidget->canvas->data, canvaswidget->canvas->size);
- player.setPcmData(canvaswidget->canvas->data, canvaswidget->canvas->size);
+ player.setPcmData(canvaswidget->canvas->data, canvaswidget->canvas->size, canvaswidget->canvas->samplerate);
statusBar()->showMessage(tr("Ready"));
setCursor(Qt::ArrowCursor);