[synthclone] push by surfacep...@gmail.com - Make sure not to try to remove a sample twice when a sampler job is ab... on 2012-12-21 06:19 GMT

1 view
Skip to first unread message

synth...@googlecode.com

unread,
Dec 21, 2012, 1:19:29 AM12/21/12
to synthclone-...@googlegroups.com
Revision: cd31f08eed97
Author: Devin Anderson <surface...@gmail.com>
Date: Thu Dec 20 22:19:11 2012
Log: Make sure not to try to remove a sample twice when a sampler job
is aborted.

http://code.google.com/p/synthclone/source/detail?r=cd31f08eed97

Modified:
/src/synthclone/session.cpp
/src/synthclone/util.cpp

=======================================
--- /src/synthclone/session.cpp Tue Nov 13 10:47:32 2012
+++ /src/synthclone/session.cpp Thu Dec 20 22:19:11 2012
@@ -1303,9 +1303,6 @@
currentSamplerJobSample->setTemporary(true);
delete currentSamplerJobSample;
currentSamplerJobSample = 0;
- if (! QFile(path).remove()) {
- emit samplerJobError("failed to remove sample at '%1'");
- }
}
bool removed = zoneSamplerJobMap.remove(currentSamplerJob->getZone());
assert(removed);
@@ -2180,10 +2177,9 @@
case synthclone::SamplerJob::TYPE_SAMPLE:
{
QString path = createUniqueSampleFile(*directory);
- sample = new synthclone::Sample(path, this);
+ sample = new synthclone::Sample(path, false, this);
QScopedPointer<synthclone::Sample>
samplePtr(sample);
- status =
- synthclone::Zone::STATUS_SAMPLER_SAMPLING;
+ status = synthclone::Zone::STATUS_SAMPLER_SAMPLING;
stream = new synthclone::SampleOutputStream
(*sample, sessionSampleData.getSampleRate(),
sessionSampleData.getSampleChannelCount());
=======================================
--- /src/synthclone/util.cpp Mon Oct 8 22:53:45 2012
+++ /src/synthclone/util.cpp Thu Dec 20 22:19:11 2012
@@ -46,7 +46,9 @@
}
tempFile.close();
tempFile.setAutoRemove(false);
- return QFileInfo(tempFile).absoluteFilePath();
+ QFileInfo fileInfo(tempFile);
+ assert(fileInfo.exists());
+ return fileInfo.absoluteFilePath();
}

bool
Reply all
Reply to author
Forward
0 new messages