diff data/fileio/WavFileWriter.cpp @ 1428:87ae75da6527

Convert some cerrs to SVCERRs. Apart from anything else, this makes MSVC2017 happy
author Chris Cannam
date Thu, 01 Mar 2018 14:43:40 +0000
parents 1bc6f70cb4c7
children 48e9f538e6e9
line wrap: on
line diff
--- a/data/fileio/WavFileWriter.cpp	Mon Dec 11 09:28:40 2017 +0000
+++ b/data/fileio/WavFileWriter.cpp	Thu Mar 01 14:43:40 2018 +0000
@@ -19,11 +19,13 @@
 #include "base/Selection.h"
 #include "base/TempWriteFile.h"
 #include "base/Exceptions.h"
+#include "base/Debug.h"
 
 #include <QFileInfo>
 
 #include <iostream>
 #include <cmath>
+#include <string>
 
 using namespace std;
 
@@ -41,7 +43,7 @@
 
     int fileRate = int(round(m_sampleRate));
     if (m_sampleRate != sv_samplerate_t(fileRate)) {
-        cerr << "WavFileWriter: WARNING: Non-integer sample rate "
+        SVCERR << "WavFileWriter: WARNING: Non-integer sample rate "
              << m_sampleRate << " presented, rounding to " << fileRate
              << endl;
     }
@@ -61,7 +63,7 @@
         m_file = sf_open(writePath.toLocal8Bit(), SFM_WRITE, &fileInfo);
 #endif
         if (!m_file) {
-            cerr << "WavFileWriter: Failed to open file ("
+            SVCERR << "WavFileWriter: Failed to open file ("
                  << sf_strerror(m_file) << ")" << endl;
             m_error = QString("Failed to open audio file '%1' for writing")
                 .arg(writePath);