comparison main/MainWindow.cpp @ 428:5f22e0bbe4ba

Use new write mode option for WavFileWriter
author Chris Cannam
date Wed, 11 May 2011 11:05:10 +0100
parents aa8117d79702
children db0c86c4e5e9 9de86c1b980e
comparison
equal deleted inserted replaced
415:aa8117d79702 428:5f22e0bbe4ba
2304 break; 2304 break;
2305 } 2305 }
2306 2306
2307 WavFileWriter subwriter(subpath, 2307 WavFileWriter subwriter(subpath,
2308 model->getSampleRate(), 2308 model->getSampleRate(),
2309 model->getChannelCount()); 2309 model->getChannelCount(),
2310 WavFileWriter::WriteToTemporary);
2310 subwriter.writeModel(model, &subms); 2311 subwriter.writeModel(model, &subms);
2311 ok = subwriter.isOK(); 2312 ok = subwriter.isOK();
2312 2313
2313 if (!ok) { 2314 if (!ok) {
2314 error = subwriter.getError(); 2315 error = subwriter.getError();
2319 } 2320 }
2320 2321
2321 if (!multiple) { 2322 if (!multiple) {
2322 WavFileWriter writer(path, 2323 WavFileWriter writer(path,
2323 model->getSampleRate(), 2324 model->getSampleRate(),
2324 model->getChannelCount()); 2325 model->getChannelCount(),
2326 WavFileWriter::WriteToTemporary);
2325 writer.writeModel(model, selectionToWrite); 2327 writer.writeModel(model, selectionToWrite);
2326 ok = writer.isOK(); 2328 ok = writer.isOK();
2327 error = writer.getError(); 2329 error = writer.getError();
2328 } 2330 }
2329 2331