Mercurial > hg > sonic-visualiser
comparison main/OSCHandler.cpp @ 428:5f22e0bbe4ba
Use new write mode option for WavFileWriter
author | Chris Cannam |
---|---|
date | Wed, 11 May 2011 11:05:10 +0100 |
parents | 635b79462d3e |
children | 9de86c1b980e |
comparison
equal
deleted
inserted
replaced
415:aa8117d79702 | 428:5f22e0bbe4ba |
---|---|
104 if (QFileInfo(path).exists()) { | 104 if (QFileInfo(path).exists()) { |
105 std::cerr << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in export" << std::endl; | 105 std::cerr << "MainWindow::handleOSCMessage: Refusing to overwrite existing file in export" << std::endl; |
106 } else { | 106 } else { |
107 WavFileWriter writer(path, | 107 WavFileWriter writer(path, |
108 getMainModel()->getSampleRate(), | 108 getMainModel()->getSampleRate(), |
109 getMainModel()->getChannelCount()); | 109 getMainModel()->getChannelCount(), |
110 WavFileWriter::WriteToTemporary); | |
110 MultiSelection ms = m_viewManager->getSelection(); | 111 MultiSelection ms = m_viewManager->getSelection(); |
111 if (!ms.getSelections().empty()) { | 112 if (!ms.getSelections().empty()) { |
112 writer.writeModel(getMainModel(), &ms); | 113 writer.writeModel(getMainModel(), &ms); |
113 } else { | 114 } else { |
114 writer.writeModel(getMainModel()); | 115 writer.writeModel(getMainModel()); |