Skip to content
Snippets Groups Projects
Commit d8b34212 authored by SeeLook's avatar SeeLook :musical_note:
Browse files

Brought back Nootini to live, adjusted to new TpichFinder approach

parent e57b46ff
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ set(NOOTINI_SRC
../../src/plugins/charts/txaxis.cpp
../../src/plugins/charts/tyaxis.cpp
../../src/plugins/charts/ttiphandler.cpp
../../src//plugins/charts/tgroupedqaunit.cpp
../../src/plugins/settings/tvolumeslider.cpp
)
......
/***************************************************************************
* Copyright (C) 2015 by Tomasz Bojczuk *
* Copyright (C) 2015-2016 by Tomasz Bojczuk *
* tomaszbojczuk@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
......@@ -151,7 +151,7 @@ void NaudioLoader::fillTartiniParams(TartiniParams* tp) {
m_pf->setMinimalDuration(Tcore::gl()->A->minDuration);
m_pf->setSplitByVolChange(Tcore::gl()->A->minSplitVol > 0.0);
m_pf->setSplitVolume(Tcore::gl()->A->minSplitVol / 100.0);
m_pf->resetFinder();
m_pf->stop(true);
m_totalChunks = m_samplesCount / m_pf->aGl()->framesPerChunk + 1;
}
}
......@@ -179,19 +179,22 @@ void NaudioLoader::threadFinished() {
void NaudioLoader::performThread() {
qint16 chL, chR;
qint16* buffer = new qint16[m_pf->aGl()->framesPerChunk];
for (int i = 0; i < m_pf->aGl()->framesPerChunk; ++i) {
if (m_samplesCount > m_pf->currentChunk() * m_pf->aGl()->framesPerChunk + i) {
m_in >> chL;
chL = qFromBigEndian<qint16>(chL);
if (m_channelsNr == 2) {
m_in >> chR;
chR = qFromBigEndian<qint16>(chR);
chL = ((qint32)chL + (qint32)chR) / 2; // mix channels to mono
}
m_pf->fillBuffer(float(double(chL) / 32760.0f));
m_in >> chL;
chL = qFromBigEndian<qint16>(chL);
if (m_channelsNr == 2) {
m_in >> chR;
chR = qFromBigEndian<qint16>(chR);
chL = ((qint32)chL + (qint32)chR) / 2; // mix channels to mono
}
buffer[i] = chL;
} else
m_pf->fillBuffer(0.0f);
buffer[i] = 0;
}
m_pf->copyToBufferOffline(buffer);
delete[] buffer;
}
......
......@@ -227,7 +227,7 @@ void Nchart::setXnumber(int xN) {
"<span style=\"color: " + minVolumeColor.name() + "\";>" + QString("min. volume: <b>%1</b>").arg(Tcore::gl()->A->minimalVol * 100) + "</span><br>"
"<span style=\"color: " + minDurColor.name() + "\";>" + QString("min. duration: <b>%1 [ms]</b>").arg(Tcore::gl()->A->minDuration * 1000) + "</span>" +
QString("<br>chunk time: <b>%1 [ms]</b>").arg(m_pitchF->chunkTime() * 1000));
settingsTexts->setPos(xMap(xN - 2), yMap(100));
settingsTexts->setPos(xMap(xN - 2), yMap(110));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment