changeset 293:068235cf5bf7

Drop std:: from cout, cerr, endl -- pull these in through Debug.h
author Chris Cannam
date Tue, 26 Nov 2013 14:12:50 +0000
parents 3fc0df289533
children 933b5aed341a
files audioio/AudioCallbackPlaySource.cpp audioio/AudioGenerator.cpp audioio/AudioJACKTarget.cpp audioio/AudioPortAudioTarget.cpp audioio/AudioPulseAudioTarget.cpp audioio/AudioTargetFactory.cpp audioio/PlaySpeedRangeMapper.cpp framework/Document.cpp framework/MainWindowBase.cpp framework/SVFileReader.cpp framework/TransformUserConfigurator.cpp framework/VersionTester.cpp
diffstat 12 files changed, 345 insertions(+), 345 deletions(-) [+]
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/audioio/AudioCallbackPlaySource.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -107,7 +107,7 @@
 
     if (m_fillThread) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySource dtor: awakening thread" << std::endl;
+    cout << "AudioCallbackPlaySource dtor: awakening thread" << endl;
 #endif
         m_condition.wakeAll();
 	m_fillThread->wait();
@@ -164,7 +164,7 @@
     }
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "Adding model with " << modelChannels << " channels at rate " << model->getSampleRate() << std::endl;
+    cout << "Adding model with " << modelChannels << " channels at rate " << model->getSampleRate() << endl;
 #endif
 
     if (m_sourceSampleRate == 0) {
@@ -245,7 +245,7 @@
     }
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySource::addModel: now have " << m_models.size() << " model(s) -- emitting modelReplaced" << std::endl;
+    cout << "AudioCallbackPlaySource::addModel: now have " << m_models.size() << " model(s) -- emitting modelReplaced" << endl;
 #endif
 
     if (buffersChanged || srChanged) {
@@ -256,7 +256,7 @@
             this, SLOT(modelChanged(size_t, size_t)));
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySource::addModel: awakening thread" << std::endl;
+    cout << "AudioCallbackPlaySource::addModel: awakening thread" << endl;
 #endif
 
     m_condition.wakeAll();
@@ -280,7 +280,7 @@
     m_mutex.lock();
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySource::removeModel(" << model << ")" << std::endl;
+    cout << "AudioCallbackPlaySource::removeModel(" << model << ")" << endl;
 #endif
 
     disconnect(model, SIGNAL(modelChanged(size_t, size_t)),
@@ -302,11 +302,11 @@
     for (std::set<Model *>::const_iterator i = m_models.begin();
 	 i != m_models.end(); ++i) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-	std::cout << "AudioCallbackPlaySource::removeModel(" << model << "): checking end frame on model " << *i << std::endl;
+	cout << "AudioCallbackPlaySource::removeModel(" << model << "): checking end frame on model " << *i << endl;
 #endif
 	if ((*i)->getEndFrame() > lastEnd) lastEnd = (*i)->getEndFrame();
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-	std::cout << "(done, lastEnd now " << lastEnd << ")" << std::endl;
+	cout << "(done, lastEnd now " << lastEnd << ")" << endl;
 #endif
     }
     m_lastModelEndFrame = lastEnd;
@@ -324,7 +324,7 @@
     m_mutex.lock();
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySource::clearModels()" << std::endl;
+    cout << "AudioCallbackPlaySource::clearModels()" << endl;
 #endif
 
     m_models.clear();
@@ -370,8 +370,8 @@
 	m_writeBuffers->push_back(new RingBuffer<float>(m_ringBufferSize));
     }
 
-//    std::cout << "AudioCallbackPlaySource::clearRingBuffers: Created "
-//	      << count << " write buffers" << std::endl;
+//    cout << "AudioCallbackPlaySource::clearRingBuffers: Created "
+//	      << count << " write buffers" << endl;
 
     if (!haveLock) {
 	m_mutex.unlock();
@@ -397,13 +397,13 @@
     }
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cerr << "play(" << startFrame << ") -> playback model ";
+    cerr << "play(" << startFrame << ") -> playback model ";
 #endif
 
     startFrame = m_viewManager->alignReferenceToPlaybackFrame(startFrame);
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cerr << startFrame << std::endl;
+    cerr << startFrame << endl;
 #endif
 
     // The fill thread will automatically empty its buffers before
@@ -425,7 +425,7 @@
         for (size_t c = 0; c < getTargetChannelCount(); ++c) {
             RingBuffer<float> *rb = getReadRingBuffer(c);
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-            std::cerr << "reset ring buffer for channel " << c << std::endl;
+            cerr << "reset ring buffer for channel " << c << endl;
 #endif
             if (rb) rb->reset();
         }
@@ -450,7 +450,7 @@
     m_playing = true;
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySource::play: awakening thread" << std::endl;
+    cout << "AudioCallbackPlaySource::play: awakening thread" << endl;
 #endif
 
     m_condition.wakeAll();
@@ -472,7 +472,7 @@
     m_playing = false;
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySource::stop: awakening thread" << std::endl;
+    cout << "AudioCallbackPlaySource::stop: awakening thread" << endl;
 #endif
 
     m_condition.wakeAll();
@@ -525,7 +525,7 @@
 void
 AudioCallbackPlaySource::audioProcessingOverload()
 {
-    std::cerr << "Audio processing overload!" << std::endl;
+    cerr << "Audio processing overload!" << endl;
 
     if (!m_playing) return;
 
@@ -550,7 +550,7 @@
 AudioCallbackPlaySource::setTarget(AudioCallbackPlayTarget *target, size_t size)
 {
     m_target = target;
-    std::cout << "AudioCallbackPlaySource::setTarget: Block size -> " << size << std::endl;
+    cout << "AudioCallbackPlaySource::setTarget: Block size -> " << size << endl;
     if (size != 0) {
         m_blockSize = size;
     }
@@ -569,7 +569,7 @@
 size_t
 AudioCallbackPlaySource::getTargetBlockSize() const
 {
-//    std::cout << "AudioCallbackPlaySource::getTargetBlockSize() -> " << m_blockSize << std::endl;
+//    cout << "AudioCallbackPlaySource::getTargetBlockSize() -> " << m_blockSize << endl;
     return m_blockSize;
 }
 
@@ -698,7 +698,7 @@
     }
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-    std::cerr << "\nbuffered to: " << bufferedto_t << ", in buffer: " << inbuffer_t << ", time ratio " << timeRatio << "\n  stretcher latency: " << stretchlat_t << ", device latency: " << latency_t << "\n  since request: " << sincerequest_t << ", last retrieved quantity: " << lastretrieved_t << std::endl;
+    cerr << "\nbuffered to: " << bufferedto_t << ", in buffer: " << inbuffer_t << ", time ratio " << timeRatio << "\n  stretcher latency: " << stretchlat_t << ", device latency: " << latency_t << "\n  since request: " << sincerequest_t << ", last retrieved quantity: " << lastretrieved_t << endl;
 #endif
 
     RealTime end = RealTime::frame2RealTime(m_lastModelEndFrame, sourceRate);
@@ -755,12 +755,12 @@
         RealTime playstart_t = RealTime::frame2RealTime(m_playStartFrame,
                                                         sourceRate);
         if (playing_t < playstart_t) {
-//            std::cerr << "playing_t " << playing_t << " < playstart_t " 
-//                      << playstart_t << std::endl;
+//            cerr << "playing_t " << playing_t << " < playstart_t " 
+//                      << playstart_t << endl;
             if (/*!!! sincerequest_t > RealTime::zeroTime && */
                 m_playStartedAt + latency_t + stretchlat_t <
                 RealTime::fromSeconds(currentTime)) {
-//                std::cerr << "but we've been playing for long enough that I think we should disregard it (it probably results from loop wrapping)" << std::endl;
+//                cerr << "but we've been playing for long enough that I think we should disregard it (it probably results from loop wrapping)" << endl;
                 m_playStartFramePassed = true;
             } else {
                 playing_t = playstart_t;
@@ -771,13 +771,13 @@
     }
  
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-    std::cerr << "playing_t " << playing_t;
+    cerr << "playing_t " << playing_t;
 #endif
 
     playing_t = playing_t - m_rangeStarts[inRange];
  
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-    std::cerr << " as offset into range " << inRange << " (start =" << m_rangeStarts[inRange] << " duration =" << m_rangeDurations[inRange] << ") = " << playing_t << std::endl;
+    cerr << " as offset into range " << inRange << " (start =" << m_rangeStarts[inRange] << " duration =" << m_rangeDurations[inRange] << ") = " << playing_t << endl;
 #endif
 
     while (playing_t < RealTime::zeroTime) {
@@ -798,13 +798,13 @@
     playing_t = playing_t + m_rangeStarts[inRange];
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-    std::cerr << "  playing time: " << playing_t << std::endl;
+    cerr << "  playing time: " << playing_t << endl;
 #endif
 
     if (!looping) {
         if (inRange == m_rangeStarts.size()-1 &&
             playing_t >= m_rangeStarts[inRange] + m_rangeDurations[inRange]) {
-std::cerr << "Not looping, inRange " << inRange << " == rangeStarts.size()-1, playing_t " << playing_t << " >= m_rangeStarts[inRange] " << m_rangeStarts[inRange] << " + m_rangeDurations[inRange] " << m_rangeDurations[inRange] << " -- stopping" << std::endl;
+cerr << "Not looping, inRange " << inRange << " == rangeStarts.size()-1, playing_t " << playing_t << " >= m_rangeStarts[inRange] " << m_rangeStarts[inRange] << " + m_rangeDurations[inRange] " << m_rangeDurations[inRange] << " -- stopping" << endl;
             stop();
         }
     }
@@ -874,7 +874,7 @@
     }
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cerr << "Now have " << m_rangeStarts.size() << " play ranges" << std::endl;
+    cerr << "Now have " << m_rangeStarts.size() << " play ranges" << endl;
 #endif
 }
 
@@ -937,9 +937,9 @@
         }
 
 	if (!m_converter || !m_crapConverter) {
-	    std::cerr
+	    cerr
 		<< "AudioCallbackPlaySource::setModel: ERROR in creating samplerate converter: "
-		<< src_strerror(err) << std::endl;
+		<< src_strerror(err) << endl;
 
             if (m_converter) {
                 src_delete(m_converter);
@@ -988,7 +988,7 @@
 {
     RealTimePluginInstance *plugin = dynamic_cast<RealTimePluginInstance *>(a);
     if (a && !plugin) {
-        std::cerr << "WARNING: AudioCallbackPlaySource::setAuditioningEffect: auditionable object " << a << " is not a real-time plugin instance" << std::endl;
+        cerr << "WARNING: AudioCallbackPlaySource::setAuditioningEffect: auditionable object " << a << " is not a real-time plugin instance" << endl;
     }
 
     m_mutex.lock();
@@ -1100,9 +1100,9 @@
         RingBuffer<float> *rb = getReadRingBuffer(ch);
         
         if (!rb) {
-            std::cerr << "WARNING: AudioCallbackPlaySource::getSourceSamples: "
+            cerr << "WARNING: AudioCallbackPlaySource::getSourceSamples: "
                       << "No ring buffer available for channel " << ch
-                      << ", returning no data here" << std::endl;
+                      << ", returning no data here" << endl;
             count = 0;
             break;
         }
@@ -1110,12 +1110,12 @@
         size_t rs = rb->getReadSpace();
         if (rs < count) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-            std::cerr << "WARNING: AudioCallbackPlaySource::getSourceSamples: "
+            cerr << "WARNING: AudioCallbackPlaySource::getSourceSamples: "
                       << "Ring buffer for channel " << ch << " has only "
                       << rs << " (of " << count << ") samples available ("
                       << "ring buffer size is " << rb->getSize() << ", write "
                       << "space " << rb->getWriteSpace() << "), "
-                      << "reducing request size" << std::endl;
+                      << "reducing request size" << endl;
 #endif
             count = rs;
         }
@@ -1130,7 +1130,7 @@
 
     if (ratio != m_stretchRatio) {
         if (!ts) {
-            std::cerr << "WARNING: AudioCallbackPlaySource::getSourceSamples: Time ratio change to " << m_stretchRatio << " is pending, but no stretcher is set" << std::endl;
+            cerr << "WARNING: AudioCallbackPlaySource::getSourceSamples: Time ratio change to " << m_stretchRatio << " is pending, but no stretcher is set" << endl;
             m_stretchRatio = 1.f;
         } else {
             ts->setTimeRatio(m_stretchRatio);
@@ -1172,7 +1172,7 @@
 		got = rb->read(buffer[ch], request);
 	    
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-		std::cout << "AudioCallbackPlaySource::getSamples: got " << got << " (of " << count << ") samples on channel " << ch << ", signalling for more (possibly)" << std::endl;
+		cout << "AudioCallbackPlaySource::getSamples: got " << got << " (of " << count << ") samples on channel " << ch << ", signalling for more (possibly)" << endl;
 #endif
 	    }
 
@@ -1186,7 +1186,7 @@
         applyAuditioningEffect(count, buffer);
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySource::getSamples: awakening thread" << std::endl;
+    cout << "AudioCallbackPlaySource::getSamples: awakening thread" << endl;
 #endif
 
         m_condition.wakeAll();
@@ -1211,14 +1211,14 @@
         size_t got = reqd;
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-        std::cerr << "reqd = " <<reqd << ", channels = " << channels << ", ic = " << m_stretcherInputCount << std::endl;
+        cerr << "reqd = " <<reqd << ", channels = " << channels << ", ic = " << m_stretcherInputCount << endl;
 #endif
 
         for (size_t c = 0; c < channels; ++c) {
             if (c >= m_stretcherInputCount) continue;
             if (reqd > m_stretcherInputSizes[c]) {
                 if (c == 0) {
-                    std::cerr << "WARNING: resizing stretcher input buffer from " << m_stretcherInputSizes[c] << " to " << (reqd * 2) << std::endl;
+                    cerr << "WARNING: resizing stretcher input buffer from " << m_stretcherInputSizes[c] << " to " << (reqd * 2) << endl;
                 }
                 delete[] m_stretcherInputs[c];
                 m_stretcherInputSizes[c] = reqd * 2;
@@ -1246,13 +1246,13 @@
 #endif
                 
             } else {
-                std::cerr << "WARNING: No ring buffer available for channel " << c << " in stretcher input block" << std::endl;
+                cerr << "WARNING: No ring buffer available for channel " << c << " in stretcher input block" << endl;
             }
         }
 
         if (got < reqd) {
-            std::cerr << "WARNING: Read underrun in playback ("
-                      << got << " < " << reqd << ")" << std::endl;
+            cerr << "WARNING: Read underrun in playback ("
+                      << got << " < " << reqd << ")" << endl;
         }
 
         ts->process(m_stretcherInputs, got, false);
@@ -1262,7 +1262,7 @@
         if (got == 0) break;
 
         if (ts->available() == available) {
-            std::cerr << "WARNING: AudioCallbackPlaySource::getSamples: Added " << got << " samples to time stretcher, created no new available output samples (warned = " << warned << ")" << std::endl;
+            cerr << "WARNING: AudioCallbackPlaySource::getSamples: Added " << got << " samples to time stretcher, created no new available output samples (warned = " << warned << ")" << endl;
             if (++warned == 5) break;
         }
     }
@@ -1278,7 +1278,7 @@
     applyAuditioningEffect(count, buffer);
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySource::getSamples [stretched]: awakening thread" << std::endl;
+    cout << "AudioCallbackPlaySource::getSamples [stretched]: awakening thread" << endl;
 #endif
 
     m_condition.wakeAll();
@@ -1294,21 +1294,21 @@
     if (!plugin) return;
     
     if (plugin->getAudioInputCount() != getTargetChannelCount()) {
-//        std::cerr << "plugin input count " << plugin->getAudioInputCount() 
+//        cerr << "plugin input count " << plugin->getAudioInputCount() 
 //                  << " != our channel count " << getTargetChannelCount()
-//                  << std::endl;
+//                  << endl;
         return;
     }
     if (plugin->getAudioOutputCount() != getTargetChannelCount()) {
-//        std::cerr << "plugin output count " << plugin->getAudioOutputCount() 
+//        cerr << "plugin output count " << plugin->getAudioOutputCount() 
 //                  << " != our channel count " << getTargetChannelCount()
-//                  << std::endl;
+//                  << endl;
         return;
     }
     if (plugin->getBufferSize() < count) {
-//        std::cerr << "plugin buffer size " << plugin->getBufferSize() 
+//        cerr << "plugin buffer size " << plugin->getBufferSize() 
 //                  << " < our block size " << count
-//                  << std::endl;
+//                  << endl;
         return;
     }
 
@@ -1348,7 +1348,7 @@
     
     if (space == 0) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-        std::cout << "AudioCallbackPlaySourceFillThread: no space to fill" << std::endl;
+        cout << "AudioCallbackPlaySourceFillThread: no space to fill" << endl;
 #endif
         return false;
     }
@@ -1359,19 +1359,19 @@
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
     if (!readWriteEqual) {
-        std::cout << "AudioCallbackPlaySourceFillThread: note read buffers != write buffers" << std::endl;
+        cout << "AudioCallbackPlaySourceFillThread: note read buffers != write buffers" << endl;
     }
-    std::cout << "AudioCallbackPlaySourceFillThread: filling " << space << " frames" << std::endl;
+    cout << "AudioCallbackPlaySourceFillThread: filling " << space << " frames" << endl;
 #endif
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "buffered to " << f << " already" << std::endl;
+    cout << "buffered to " << f << " already" << endl;
 #endif
 
     bool resample = (getSourceSampleRate() != getTargetSampleRate());
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << (resample ? "" : "not ") << "resampling (source " << getSourceSampleRate() << ", target " << getTargetSampleRate() << ")" << std::endl;
+    cout << (resample ? "" : "not ") << "resampling (source " << getSourceSampleRate() << ", target " << getTargetSampleRate() << ")" << endl;
 #endif
 
     size_t channels = getTargetChannelCount();
@@ -1393,7 +1393,7 @@
     if (resample && !m_converter) {
 	static bool warned = false;
 	if (!warned) {
-	    std::cerr << "WARNING: sample rates differ, but no converter available!" << std::endl;
+	    cerr << "WARNING: sample rates differ, but no converter available!" << endl;
 	    warned = true;
 	}
     }
@@ -1463,7 +1463,7 @@
 
         if (m_timeStretcher && m_timeStretcher->getTimeRatio() < 0.4) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-            std::cout << "Using crappy converter" << std::endl;
+            cout << "Using crappy converter" << endl;
 #endif
             err = src_process(m_crapConverter, &data);
         } else {
@@ -1473,15 +1473,15 @@
 	size_t toCopy = size_t(got * ratio + 0.1);
 
 	if (err) {
-	    std::cerr
+	    cerr
 		<< "AudioCallbackPlaySourceFillThread: ERROR in samplerate conversion: "
-		<< src_strerror(err) << std::endl;
+		<< src_strerror(err) << endl;
 	    //!!! Then what?
 	} else {
 	    got = data.input_frames_used;
 	    toCopy = data.output_frames_gen;
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-	    std::cout << "Resampled " << got << " frames to " << toCopy << " frames" << std::endl;
+	    cout << "Resampled " << got << " frames to " << toCopy << " frames" << endl;
 #endif
 	}
 	
@@ -1503,9 +1503,9 @@
 	space = (reqSpace / generatorBlockSize) * generatorBlockSize;
 	if (space == 0) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-            std::cout << "requested fill of " << reqSpace
+            cout << "requested fill of " << reqSpace
                       << " is less than generator block size of "
-                      << generatorBlockSize << ", leaving it" << std::endl;
+                      << generatorBlockSize << ", leaving it" << endl;
 #endif
             return false;
         }
@@ -1533,14 +1533,14 @@
 	    if (wb) {
                 size_t actual = wb->write(bufferPtrs[c], got);
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-		std::cout << "Wrote " << actual << " samples for ch " << c << ", now "
+		cout << "Wrote " << actual << " samples for ch " << c << ", now "
 			  << wb->getReadSpace() << " to read" 
-			  << std::endl;
+			  << endl;
 #endif
                 if (actual < got) {
-                    std::cerr << "WARNING: Buffer overrun in channel " << c
+                    cerr << "WARNING: Buffer overrun in channel " << c
                               << ": wrote " << actual << " of " << got
-                              << " samples" << std::endl;
+                              << " samples" << endl;
                 }
             }
 	}
@@ -1549,7 +1549,7 @@
 	if (readWriteEqual) m_readBufferFill = f;
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-        std::cout << "Read buffer fill is now " << m_readBufferFill << std::endl;
+        cout << "Read buffer fill is now " << m_readBufferFill << endl;
 #endif
 
 	//!!! how do we know when ended? need to mark up a fully-buffered flag and check this if we find the buffers empty in getSourceSamples
@@ -1576,7 +1576,7 @@
     size_t channels = getTargetChannelCount();
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "Selection playback: start " << frame << ", size " << count <<", channels " << channels << std::endl;
+    cout << "Selection playback: start " << frame << ", size " << count <<", channels " << channels << endl;
 #endif
 
     if (chunkBufferPtrCount < channels) {
@@ -1654,11 +1654,11 @@
 	    nextChunkStart = chunkStart + chunkSize;
 	}
 	
-//	std::cout << "chunkStart " << chunkStart << ", chunkSize " << chunkSize << ", nextChunkStart " << nextChunkStart << ", frame " << frame << ", count " << count << ", processed " << processed << std::endl;
+//	cout << "chunkStart " << chunkStart << ", chunkSize " << chunkSize << ", nextChunkStart " << nextChunkStart << ", frame " << frame << ", count " << count << ", processed " << processed << endl;
 
 	if (!chunkSize) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-	    std::cout << "Ending selection playback at " << nextChunkStart << std::endl;
+	    cout << "Ending selection playback at " << nextChunkStart << endl;
 #endif
 	    // We need to maintain full buffers so that the other
 	    // thread can tell where it's got to in the playback -- so
@@ -1668,7 +1668,7 @@
 	}
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-	std::cout << "Selection playback: chunk at " << chunkStart << " -> " << nextChunkStart << " (size " << chunkSize << ")" << std::endl;
+	cout << "Selection playback: chunk at " << chunkStart << " -> " << nextChunkStart << " (size " << chunkSize << ")" << endl;
 #endif
 
 	size_t got = 0;
@@ -1710,7 +1710,7 @@
     }
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "Returning selection playback " << processed << " frames to " << nextChunkStart << std::endl;
+    cout << "Returning selection playback " << processed << " frames to " << nextChunkStart << endl;
 #endif
 
     frame = nextChunkStart;
@@ -1746,7 +1746,7 @@
     if (rb) {
 	size_t rs = rb->getReadSpace();
 	//!!! incorrect when in non-contiguous selection, see comments elsewhere
-//	std::cout << "rs = " << rs << std::endl;
+//	cout << "rs = " << rs << endl;
 	if (rs < rf) rf -= rs;
 	else rf = 0;
     }
@@ -1763,17 +1763,17 @@
 	    if (c == 0) {
 		
 		size_t wrs = wb->getReadSpace();
-//		std::cout << "wrs = " << wrs << std::endl;
+//		cout << "wrs = " << wrs << endl;
 
 		if (wrs < wf) wf -= wrs;
 		else wf = 0;
-//		std::cout << "wf = " << wf << std::endl;
+//		cout << "wf = " << wf << endl;
 		
 		if (wf < rf) skip = rf - wf;
 		if (skip == 0) break;
 	    }
 
-//	    std::cout << "skipping " << skip << std::endl;
+//	    cout << "skipping " << skip << endl;
 	    wb->skip(skip);
 	}
     }
@@ -1782,7 +1782,7 @@
     m_readBuffers = m_writeBuffers;
     m_readBufferFill = m_writeBufferFill;
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-    std::cerr << "unified" << std::endl;
+    cerr << "unified" << endl;
 #endif
 }
 
@@ -1792,7 +1792,7 @@
     AudioCallbackPlaySource &s(m_source);
     
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    std::cout << "AudioCallbackPlaySourceFillThread starting" << std::endl;
+    cout << "AudioCallbackPlaySourceFillThread starting" << endl;
 #endif
 
     s.m_mutex.lock();
@@ -1809,7 +1809,7 @@
 	if (work && s.m_playing && s.getSourceSampleRate()) {
 	    
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-	    std::cout << "AudioCallbackPlaySourceFillThread: not waiting" << std::endl;
+	    cout << "AudioCallbackPlaySourceFillThread: not waiting" << endl;
 #endif
 
 	    s.m_mutex.unlock();
@@ -1826,22 +1826,22 @@
 	    if (s.m_playing) ms /= 10;
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-            if (!s.m_playing) std::cout << std::endl;
-	    std::cout << "AudioCallbackPlaySourceFillThread: waiting for " << ms << "ms..." << std::endl;
+            if (!s.m_playing) cout << endl;
+	    cout << "AudioCallbackPlaySourceFillThread: waiting for " << ms << "ms..." << endl;
 #endif
 	    
 	    s.m_condition.wait(&s.m_mutex, size_t(ms));
 	}
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-	std::cout << "AudioCallbackPlaySourceFillThread: awoken" << std::endl;
+	cout << "AudioCallbackPlaySourceFillThread: awoken" << endl;
 #endif
 
 	work = false;
 
 	if (!s.getSourceSampleRate()) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-            std::cout << "AudioCallbackPlaySourceFillThread: source sample rate is zero" << std::endl;
+            cout << "AudioCallbackPlaySourceFillThread: source sample rate is zero" << endl;
 #endif
             continue;
         }
@@ -1850,7 +1850,7 @@
 
 	if (playing && !previouslyPlaying) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-	    std::cout << "AudioCallbackPlaySourceFillThread: playback state changed, resetting" << std::endl;
+	    cout << "AudioCallbackPlaySourceFillThread: playback state changed, resetting" << endl;
 #endif
 	    for (size_t c = 0; c < s.getTargetChannelCount(); ++c) {
 		RingBuffer<float> *rb = s.getReadRingBuffer(c);
--- a/audioio/AudioGenerator.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/audioio/AudioGenerator.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -78,9 +78,9 @@
     try {
         m_sampleDir = TempDirectory::getInstance()->getSubDirectoryPath("samples");
     } catch (DirectoryCreationFailed f) {
-        std::cerr << "WARNING: AudioGenerator::initialiseSampleDir:"
+        cerr << "WARNING: AudioGenerator::initialiseSampleDir:"
                   << " Failed to create temporary sample directory"
-                  << std::endl;
+                  << endl;
         m_sampleDir = "";
         return;
     }
@@ -94,10 +94,10 @@
         QString target = QDir(m_sampleDir).filePath(fileName);
 
         if (!file.copy(target)) {
-            std::cerr << "WARNING: AudioGenerator::getSampleDir: "
+            cerr << "WARNING: AudioGenerator::getSampleDir: "
                       << "Unable to copy " << fileName.toStdString()
                       << " into temporary directory \""
-                      << m_sampleDir << "\"" << std::endl;
+                      << m_sampleDir << "\"" << endl;
         } else {
             QFile tf(target);
             tf.setPermissions(tf.permissions() |
@@ -140,9 +140,9 @@
 {
     const Model *model = dynamic_cast<const Model *>(playable);
     if (!model) {
-        std::cerr << "WARNING: AudioGenerator::playPluginIdChanged: playable "
+        cerr << "WARNING: AudioGenerator::playPluginIdChanged: playable "
                   << playable << " is not a supported model type"
-                  << std::endl;
+                  << endl;
         return;
     }
 
@@ -164,9 +164,9 @@
 
     const Model *model = dynamic_cast<const Model *>(playable);
     if (!model) {
-        std::cerr << "WARNING: AudioGenerator::playPluginIdChanged: playable "
+        cerr << "WARNING: AudioGenerator::playPluginIdChanged: playable "
                   << playable << " is not a supported model type"
-                  << std::endl;
+                  << endl;
         return;
     }
 
@@ -231,7 +231,7 @@
 	RealTimePluginFactory::instanceFor(pluginId);
     
     if (!factory) {
-	std::cerr << "Failed to get plugin factory" << std::endl;
+	cerr << "Failed to get plugin factory" << endl;
 	return 0;
     }
 	
@@ -240,7 +240,7 @@
 	(pluginId, 0, 0, m_sourceSampleRate, m_pluginBlockSize, m_targetChannelCount);
 
     if (!instance) {
-	std::cerr << "Failed to instantiate plugin " << pluginId << std::endl;
+	cerr << "Failed to instantiate plugin " << pluginId << endl;
         return 0;
     }
 
@@ -251,11 +251,11 @@
     }
     std::string defaultProgram = instance->getProgram(0, 0);
     if (defaultProgram != "") {
-//        std::cerr << "first selecting default program " << defaultProgram << std::endl;
+//        cerr << "first selecting default program " << defaultProgram << endl;
         instance->selectProgram(defaultProgram);
     }
     if (program != "") {
-//        std::cerr << "now selecting desired program " << program << std::endl;
+//        cerr << "now selecting desired program " << program << endl;
         instance->selectProgram(program.toStdString());
     }
     instance->setIdealChannelCount(m_targetChannelCount); // reset!
@@ -348,7 +348,7 @@
 			 float **buffer, size_t fadeIn, size_t fadeOut)
 {
     if (m_sourceSampleRate == 0) {
-	std::cerr << "WARNING: AudioGenerator::mixModel: No base source sample rate available" << std::endl;
+	cerr << "WARNING: AudioGenerator::mixModel: No base source sample rate available" << endl;
 	return frameCount;
     }
 
@@ -364,7 +364,7 @@
     bool playing = !parameters->isPlayMuted();
     if (!playing) {
 #ifdef DEBUG_AUDIO_GENERATOR
-        std::cout << "AudioGenerator::mixModel(" << model << "): muted" << std::endl;
+        cout << "AudioGenerator::mixModel(" << model << "): muted" << endl;
 #endif
         return frameCount;
     }
@@ -372,7 +372,7 @@
     if (m_soloing) {
         if (m_soloModelSet.find(model) == m_soloModelSet.end()) {
 #ifdef DEBUG_AUDIO_GENERATOR
-            std::cout << "AudioGenerator::mixModel(" << model << "): not one of the solo'd models" << std::endl;
+            cout << "AudioGenerator::mixModel(" << model << "): not one of the solo'd models" << endl;
 #endif
             return frameCount;
         }
@@ -520,8 +520,8 @@
     size_t got = blocks * m_pluginBlockSize;
 
 #ifdef DEBUG_AUDIO_GENERATOR
-    std::cout << "mixModel [synthetic note]: frames " << frames
-	      << ", blocks " << blocks << std::endl;
+    cout << "mixModel [synthetic note]: frames " << frames
+	      << ", blocks " << blocks << endl;
 #endif
 
     snd_seq_event_t onEv;
@@ -565,7 +565,7 @@
 		offEv.data.note.note = noteOffs.begin()->pitch;
 
 #ifdef DEBUG_AUDIO_GENERATOR
-		std::cerr << "mixModel [synthetic]: sending note-off event at time " << eventTime << " frame " << noteOffs.begin()->frame << " pitch " << noteOffs.begin()->pitch << std::endl;
+		cerr << "mixModel [synthetic]: sending note-off event at time " << eventTime << " frame " << noteOffs.begin()->frame << " pitch " << noteOffs.begin()->pitch << endl;
 #endif
 
 		plugin->sendEvent(eventTime, &offEv);
@@ -579,7 +579,7 @@
                 onEv.data.note.note = ni->midiPitch;
             } else {
 #ifdef DEBUG_AUDIO_GENERATOR
-                std::cerr << "mixModel [synthetic]: non-pitch-quantized notes are not supported [yet], quantizing" << std::endl;
+                cerr << "mixModel [synthetic]: non-pitch-quantized notes are not supported [yet], quantizing" << endl;
 #endif
                 onEv.data.note.note = Pitch::getPitchForFrequency(ni->frequency);
             }
@@ -589,7 +589,7 @@
 	    plugin->sendEvent(eventTime, &onEv);
 
 #ifdef DEBUG_AUDIO_GENERATOR
-	    std::cout << "mixModel [synthetic]: note at frame " << noteFrame << ", block start " << (startFrame + i * m_pluginBlockSize) << ", resulting time " << eventTime << std::endl;
+	    cout << "mixModel [synthetic]: note at frame " << noteFrame << ", block start " << (startFrame + i * m_pluginBlockSize) << ", resulting time " << eventTime << endl;
 #endif
 	    
 	    noteOffs.insert
@@ -606,7 +606,7 @@
 	    offEv.data.note.note = noteOffs.begin()->pitch;
 
 #ifdef DEBUG_AUDIO_GENERATOR
-            std::cerr << "mixModel [synthetic]: sending leftover note-off event at time " << eventTime << " frame " << noteOffs.begin()->frame << " pitch " << noteOffs.begin()->pitch << std::endl;
+            cerr << "mixModel [synthetic]: sending leftover note-off event at time " << eventTime << " frame " << noteOffs.begin()->frame << " pitch " << noteOffs.begin()->pitch << endl;
 #endif
 
 	    plugin->sendEvent(eventTime, &offEv);
@@ -618,7 +618,7 @@
 
 	for (size_t c = 0; c < m_targetChannelCount; ++c) {
 #ifdef DEBUG_AUDIO_GENERATOR
-	    std::cout << "mixModel [synthetic]: adding " << m_pluginBlockSize << " samples from plugin output " << c << std::endl;
+	    cout << "mixModel [synthetic]: adding " << m_pluginBlockSize << " samples from plugin output " << c << endl;
 #endif
 
 	    size_t sourceChannel = (c % plugin->getAudioOutputCount());
--- a/audioio/AudioJACKTarget.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/audioio/AudioJACKTarget.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -50,9 +50,9 @@
             if (!library) library = ::dlopen("libjack.so.0", RTLD_NOW);
             if (!library) library = ::dlopen("libjack.so", RTLD_NOW);
             if (!library) {
-                std::cerr << "WARNING: AudioJACKTarget: Failed to load JACK library: "
+                cerr << "WARNING: AudioJACKTarget: Failed to load JACK library: "
                           << ::dlerror() << " (tried .so, .so.0, .so.1)"
-                          << std::endl;
+                          << endl;
             }
             attempted = true;
         }
@@ -60,8 +60,8 @@
     }
     void *symbol = ::dlsym(library, name);
     if (!symbol) {
-        std::cerr << "WARNING: AudioJACKTarget: Failed to locate symbol "
-                  << name << ": " << ::dlerror() << std::endl;
+        cerr << "WARNING: AudioJACKTarget: Failed to locate symbol "
+                  << name << ": " << ::dlerror() << endl;
     }
     symbols[name] = symbol;
     return symbol;
@@ -231,8 +231,8 @@
                                 options, &status);
     
     if (!m_client) {
-        std::cerr << "AudioJACKTarget: Failed to connect to JACK server: status code "
-                  << status << std::endl;
+        cerr << "AudioJACKTarget: Failed to connect to JACK server: status code "
+                  << status << endl;
         return;
     }
 
@@ -243,8 +243,8 @@
     jack_set_process_callback(m_client, processStatic, this);
 
     if (jack_activate(m_client)) {
-	std::cerr << "ERROR: AudioJACKTarget: Failed to activate JACK client"
-		  << std::endl;
+	cerr << "ERROR: AudioJACKTarget: Failed to activate JACK client"
+		  << endl;
     }
 
     if (m_source) {
@@ -276,15 +276,15 @@
             std::vector<jack_port_t *>::iterator itr = m_outputs.end();
             --itr;
             jack_port_t *port = *itr;
-            std::cerr << "unregister " << m_outputs.size() << std::endl;
+            cerr << "unregister " << m_outputs.size() << endl;
             if (port) jack_port_unregister(m_client, port);
             m_outputs.erase(itr);
         }
-        std::cerr << "Deactivating... ";
+        cerr << "Deactivating... ";
 	jack_deactivate(m_client);
-        std::cerr << "done\nClosing... ";
+        cerr << "done\nClosing... ";
 	jack_client_close(m_client);
-        std::cerr << "done" << std::endl;
+        cerr << "done" << endl;
     }
 
     m_client = 0;
@@ -368,9 +368,9 @@
 				  0);
 
 	if (!port) {
-	    std::cerr
+	    cerr
 		<< "ERROR: AudioJACKTarget: Failed to create JACK output port "
-		<< m_outputs.size() << std::endl;
+		<< m_outputs.size() << endl;
 	} else {
 	    m_source->setTargetPlayLatency(jack_port_get_latency(port));
 	}
@@ -408,12 +408,12 @@
     }
 
 #ifdef DEBUG_AUDIO_JACK_TARGET    
-    std::cout << "AudioJACKTarget::process(" << nframes << "): have a source" << std::endl;
+    cout << "AudioJACKTarget::process(" << nframes << "): have a source" << endl;
 #endif
 
 #ifdef DEBUG_AUDIO_JACK_TARGET    
     if (m_bufferSize != nframes) {
-	std::cerr << "WARNING: m_bufferSize != nframes (" << m_bufferSize << " != " << nframes << ")" << std::endl;
+	cerr << "WARNING: m_bufferSize != nframes (" << m_bufferSize << " != " << nframes << ")" << endl;
     }
 #endif
 
@@ -462,7 +462,7 @@
 int
 AudioJACKTarget::xrun()
 {
-    std::cerr << "AudioJACKTarget: xrun!" << std::endl;
+    cerr << "AudioJACKTarget: xrun!" << endl;
     if (m_source) m_source->audioProcessingOverload();
     return 0;
 }
--- a/audioio/AudioPortAudioTarget.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/audioio/AudioPortAudioTarget.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -40,12 +40,12 @@
     PaError err;
 
 #ifdef DEBUG_AUDIO_PORT_AUDIO_TARGET
-    std::cerr << "AudioPortAudioTarget: Initialising for PortAudio v19" << std::endl;
+    cerr << "AudioPortAudioTarget: Initialising for PortAudio v19" << endl;
 #endif
 
     err = Pa_Initialize();
     if (err != paNoError) {
-	std::cerr << "ERROR: AudioPortAudioTarget: Failed to initialize PortAudio: " << Pa_GetErrorText(err) << std::endl;
+	cerr << "ERROR: AudioPortAudioTarget: Failed to initialize PortAudio: " << Pa_GetErrorText(err) << endl;
 	return;
     }
 
@@ -67,7 +67,7 @@
 
     if (err != paNoError) {
 
-        std::cerr << "WARNING: AudioPortAudioTarget: Failed to open PortAudio stream with default frames per buffer, trying again with fixed frames per buffer..." << std::endl;
+        cerr << "WARNING: AudioPortAudioTarget: Failed to open PortAudio stream with default frames per buffer, trying again with fixed frames per buffer..." << endl;
         
         err = Pa_OpenStream(&m_stream, 0, &op, m_sampleRate,
                             1024,
@@ -76,8 +76,8 @@
     }
 
     if (err != paNoError) {
-	std::cerr << "ERROR: AudioPortAudioTarget: Failed to open PortAudio stream: " << Pa_GetErrorText(err) << std::endl;
-        std::cerr << "Note: device ID was " << op.device << std::endl;
+	cerr << "ERROR: AudioPortAudioTarget: Failed to open PortAudio stream: " << Pa_GetErrorText(err) << endl;
+        cerr << "Note: device ID was " << op.device << endl;
 	m_stream = 0;
 	Pa_Terminate();
 	return;
@@ -87,12 +87,12 @@
     m_latency = int(info->outputLatency * m_sampleRate + 0.001);
     if (m_bufferSize < m_latency) m_bufferSize = m_latency;
 
-    std::cerr << "PortAudio latency = " << m_latency << " frames" << std::endl;
+    cerr << "PortAudio latency = " << m_latency << " frames" << endl;
 
     err = Pa_StartStream(m_stream);
 
     if (err != paNoError) {
-	std::cerr << "ERROR: AudioPortAudioTarget: Failed to start PortAudio stream: " << Pa_GetErrorText(err) << std::endl;
+	cerr << "ERROR: AudioPortAudioTarget: Failed to start PortAudio stream: " << Pa_GetErrorText(err) << endl;
 	Pa_CloseStream(m_stream);
 	m_stream = 0;
 	Pa_Terminate();
@@ -100,14 +100,14 @@
     }
 
     if (m_source) {
-	std::cerr << "AudioPortAudioTarget: block size " << m_bufferSize << std::endl;
+	cerr << "AudioPortAudioTarget: block size " << m_bufferSize << endl;
 	m_source->setTarget(this, m_bufferSize);
 	m_source->setTargetSampleRate(m_sampleRate);
 	m_source->setTargetPlayLatency(m_latency);
     }
 
 #ifdef DEBUG_PORT_AUDIO_TARGET
-    std::cerr << "AudioPortAudioTarget: initialised OK" << std::endl;
+    cerr << "AudioPortAudioTarget: initialised OK" << endl;
 #endif
 }
 
@@ -128,14 +128,14 @@
 	PaError err;
 	err = Pa_CloseStream(m_stream);
 	if (err != paNoError) {
-	    std::cerr << "ERROR: AudioPortAudioTarget: Failed to close PortAudio stream: " << Pa_GetErrorText(err) << std::endl;
+	    cerr << "ERROR: AudioPortAudioTarget: Failed to close PortAudio stream: " << Pa_GetErrorText(err) << endl;
 	}
 
-        std::cerr << "terminating" << std::endl;
+        cerr << "terminating" << endl;
 
 	err = Pa_Terminate();
         if (err != paNoError) {
-            std::cerr << "ERROR: AudioPortAudioTarget: Failed to terminate PortAudio: " << Pa_GetErrorText(err) << std::endl;
+            cerr << "ERROR: AudioPortAudioTarget: Failed to terminate PortAudio: " << Pa_GetErrorText(err) << endl;
 	}   
     }
 
--- a/audioio/AudioPulseAudioTarget.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/audioio/AudioPulseAudioTarget.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -41,12 +41,12 @@
     m_done(false)
 {
 #ifdef DEBUG_AUDIO_PULSE_AUDIO_TARGET
-    std::cerr << "AudioPulseAudioTarget: Initialising for PulseAudio" << std::endl;
+    cerr << "AudioPulseAudioTarget: Initialising for PulseAudio" << endl;
 #endif
 
     m_loop = pa_mainloop_new();
     if (!m_loop) {
-        std::cerr << "ERROR: AudioPulseAudioTarget: Failed to create main loop" << std::endl;
+        cerr << "ERROR: AudioPulseAudioTarget: Failed to create main loop" << endl;
         return;
     }
 
@@ -64,33 +64,33 @@
     m_spec.format = PA_SAMPLE_FLOAT32NE;
 
 #ifdef DEBUG_AUDIO_PULSE_AUDIO_TARGET
-    std::cerr << "AudioPulseAudioTarget: Creating context" << std::endl;
+    cerr << "AudioPulseAudioTarget: Creating context" << endl;
 #endif
 
     m_context = pa_context_new(m_api, source->getClientName().toLocal8Bit().data());
     if (!m_context) {
-        std::cerr << "ERROR: AudioPulseAudioTarget: Failed to create context object" << std::endl;
+        cerr << "ERROR: AudioPulseAudioTarget: Failed to create context object" << endl;
         return;
     }
 
     pa_context_set_state_callback(m_context, contextStateChangedStatic, this);
 
 #ifdef DEBUG_AUDIO_PULSE_AUDIO_TARGET
-    std::cerr << "AudioPulseAudioTarget: Connecting to default server..." << std::endl;
+    cerr << "AudioPulseAudioTarget: Connecting to default server..." << endl;
 #endif
 
     pa_context_connect(m_context, 0, // default server
                        (pa_context_flags_t)PA_CONTEXT_NOAUTOSPAWN, 0);
 
 #ifdef DEBUG_AUDIO_PULSE_AUDIO_TARGET
-    std::cerr << "AudioPulseAudioTarget: Starting main loop" << std::endl;
+    cerr << "AudioPulseAudioTarget: Starting main loop" << endl;
 #endif
 
     m_loopThread = new MainLoopThread(m_loop);
     m_loopThread->start();
 
 #ifdef DEBUG_PULSE_AUDIO_TARGET
-    std::cerr << "AudioPulseAudioTarget: initialised OK" << std::endl;
+    cerr << "AudioPulseAudioTarget: initialised OK" << endl;
 #endif
 }
 
@@ -166,7 +166,7 @@
 AudioPulseAudioTarget::streamWrite(size_t requested)
 {
 #ifdef DEBUG_AUDIO_PULSE_AUDIO_TARGET_PLAY
-    std::cout << "AudioPulseAudioTarget::streamWrite(" << requested << ")" << std::endl;
+    cout << "AudioPulseAudioTarget::streamWrite(" << requested << ")" << endl;
 #endif
     if (m_done) return;
 
@@ -192,11 +192,11 @@
     size_t nframes = requested / (sourceChannels * sizeof(float));
 
     if (nframes > m_bufferSize) {
-        std::cerr << "WARNING: AudioPulseAudioTarget::streamWrite: nframes " << nframes << " > m_bufferSize " << m_bufferSize << std::endl;
+        cerr << "WARNING: AudioPulseAudioTarget::streamWrite: nframes " << nframes << " > m_bufferSize " << m_bufferSize << endl;
     }
 
 #ifdef DEBUG_AUDIO_PULSE_AUDIO_TARGET_PLAY
-    std::cout << "AudioPulseAudioTarget::streamWrite: nframes = " << nframes << std::endl;
+    cout << "AudioPulseAudioTarget::streamWrite: nframes = " << nframes << endl;
 #endif
 
     if (!tmpbuf || tmpbufch != sourceChannels || int(tmpbufsz) < nframes) {
@@ -226,10 +226,10 @@
     size_t received = m_source->getSourceSamples(nframes, tmpbuf);
 
 #ifdef DEBUG_AUDIO_PULSE_AUDIO_TARGET_PLAY
-    std::cerr << "requested " << nframes << ", received " << received << std::endl;
+    cerr << "requested " << nframes << ", received " << received << endl;
 
     if (received < nframes) {
-        std::cerr << "*** WARNING: Wrong number of frames received" << std::endl;
+        cerr << "*** WARNING: Wrong number of frames received" << endl;
     }
 #endif
 
@@ -319,11 +319,11 @@
             pa_usec_t latency = 0;
             int negative = 0;
             if (pa_stream_get_latency(m_stream, &latency, &negative)) {
-                std::cerr << "AudioPulseAudioTarget::streamStateChanged: Failed to query latency" << std::endl;
+                cerr << "AudioPulseAudioTarget::streamStateChanged: Failed to query latency" << endl;
             }
-            std::cerr << "Latency = " << latency << " usec" << std::endl;
+            cerr << "Latency = " << latency << " usec" << endl;
             int latframes = (latency / 1000000.f) * float(m_sampleRate);
-            std::cerr << "that's " << latframes << " frames" << std::endl;
+            cerr << "that's " << latframes << " frames" << endl;
 
             const pa_buffer_attr *attr;
             if (!(attr = pa_stream_get_buffer_attr(m_stream))) {
@@ -337,7 +337,7 @@
                 m_source->setTarget(this, targetLength);
                 m_source->setTargetSampleRate(m_sampleRate);
                 if (latframes == 0) latframes = targetLength;
-                std::cerr << "latency = " << latframes << std::endl;
+                cerr << "latency = " << latframes << endl;
                 m_source->setTargetPlayLatency(latframes);
             }
         }
@@ -345,8 +345,8 @@
 
         case PA_STREAM_FAILED:
         default:
-            std::cerr << "AudioPulseAudioTarget::streamStateChanged: Error: "
-                      << pa_strerror(pa_context_errno(m_context)) << std::endl;
+            cerr << "AudioPulseAudioTarget::streamStateChanged: Error: "
+                      << pa_strerror(pa_context_errno(m_context)) << endl;
             //!!! do something...
             break;
     }
@@ -394,7 +394,7 @@
                  pa_stream_flags_t(PA_STREAM_INTERPOLATE_TIMING |
                                    PA_STREAM_AUTO_TIMING_UPDATE),
                  0, 0)) { //??? return value
-                std::cerr << "AudioPulseAudioTarget: Failed to connect playback stream" << std::endl;
+                cerr << "AudioPulseAudioTarget: Failed to connect playback stream" << endl;
             }
 
             break;
@@ -406,8 +406,8 @@
 
         case PA_CONTEXT_FAILED:
         default:
-            std::cerr << "AudioPulseAudioTarget::contextStateChanged: Error: "
-                      << pa_strerror(pa_context_errno(m_context)) << std::endl;
+            cerr << "AudioPulseAudioTarget::contextStateChanged: Error: "
+                      << pa_strerror(pa_context_errno(m_context)) << endl;
             //!!! do something...
             break;
     }
--- a/audioio/AudioTargetFactory.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/audioio/AudioTargetFactory.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -135,7 +135,7 @@
 #endif
 
         if (!target || !target->isOK()) {
-            std::cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open the requested target (\"" << m_default << "\")" << std::endl;
+            cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open the requested target (\"" << m_default << "\")" << endl;
             delete target;
             return 0;
         } else {
@@ -147,7 +147,7 @@
     target = new AudioJACKTarget(source);
     if (target->isOK()) return target;
     else {
-	std::cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open JACK target" << std::endl;
+	cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open JACK target" << endl;
 	delete target;
     }
 #endif
@@ -156,7 +156,7 @@
     target = new AudioPulseAudioTarget(source);
     if (target->isOK()) return target;
     else {
-	std::cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open PulseAudio target" << std::endl;
+	cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open PulseAudio target" << endl;
 	delete target;
     }
 #endif
@@ -165,7 +165,7 @@
     target = new AudioCoreAudioTarget(source);
     if (target->isOK()) return target;
     else {
-	std::cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open CoreAudio target" << std::endl;
+	cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open CoreAudio target" << endl;
 	delete target;
     }
 #endif
@@ -174,12 +174,12 @@
     target = new AudioPortAudioTarget(source);
     if (target->isOK()) return target;
     else {
-	std::cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open PortAudio target" << std::endl;
+	cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open PortAudio target" << endl;
 	delete target;
     }
 #endif
 
-    std::cerr << "WARNING: AudioTargetFactory::createCallbackTarget: No suitable targets available" << std::endl;
+    cerr << "WARNING: AudioTargetFactory::createCallbackTarget: No suitable targets available" << endl;
     return 0;
 }
 
--- a/audioio/PlaySpeedRangeMapper.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/audioio/PlaySpeedRangeMapper.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -51,7 +51,7 @@
         position = position + half;
     }
 
-//    std::cerr << "value = " << value << " slow = " << slow << " factor = " << factor << " position = " << position << std::endl;
+//    cerr << "value = " << value << " slow = " << slow << " factor = " << factor << " position = " << position << endl;
 
     return position;
 }
@@ -70,7 +70,7 @@
     float pc;
     if (factor < 1.0) pc = ((1.0 / factor) - 1.0) * 100.0;
     else pc = (1.0 - factor) * 100.0;
-//    std::cerr << "position = " << position << " percent = " << pc << std::endl;
+//    cerr << "position = " << position << " percent = " << pc << endl;
     return pc;
 }
 
@@ -87,7 +87,7 @@
         factor = 1.0 / (1.0 + (value / 100.0));
     }
 
-//    std::cerr << "value = " << value << " factor = " << factor << std::endl;
+//    cerr << "value = " << value << " factor = " << factor << endl;
     return factor;
 }
 
@@ -121,7 +121,7 @@
 
     if (!slow) factor = 1.0 / factor;
 
-//    std::cerr << "position = " << position << " slow = " << slow << " factor = " << factor << std::endl;
+//    cerr << "position = " << position << " slow = " << slow << " factor = " << factor << endl;
 
     return factor;
 }
--- a/framework/Document.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/framework/Document.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -58,7 +58,7 @@
     //the document, be nice to fix that
 
 #ifdef DEBUG_DOCUMENT
-    std::cerr << "\n\nDocument::~Document: about to clear command history" << std::endl;
+    cerr << "\n\nDocument::~Document: about to clear command history" << endl;
 #endif
     CommandHistory::getInstance()->clear();
     
@@ -139,7 +139,7 @@
 	LayerFactory::getInstance()->getValidLayerTypes(model);
 
     if (types.empty()) {
-	std::cerr << "WARNING: Document::importLayer: no valid display layer for model" << std::endl;
+	cerr << "WARNING: Document::importLayer: no valid display layer for model" << endl;
 	return 0;
     }
 
@@ -220,7 +220,7 @@
 	LayerFactory::getInstance()->getValidLayerTypes(newModel);
 
     if (types.empty()) {
-	std::cerr << "WARNING: Document::createLayerForTransformer: no valid display layer for output of transform " << transform.getIdentifier() << std::endl;
+	cerr << "WARNING: Document::createLayerForTransformer: no valid display layer for output of transform " << transform.getIdentifier() << endl;
         newModel->aboutToDelete();
         emit modelAboutToBeDeleted(newModel);
         m_models.erase(newModel);
@@ -282,14 +282,14 @@
     // delete any of the models.
 
 #ifdef DEBUG_DOCUMENT
-    std::cerr << "Document::setMainModel: Have "
-              << m_layers.size() << " layers" << std::endl;
-    std::cerr << "Models now: ";
+    cerr << "Document::setMainModel: Have "
+              << m_layers.size() << " layers" << endl;
+    cerr << "Models now: ";
     for (ModelMap::const_iterator i = m_models.begin(); i != m_models.end(); ++i) {
-        std::cerr << i->first << " ";
+        cerr << i->first << " ";
     } 
-    std::cerr << std::endl;
-    std::cerr << "Old main model: " << oldMainModel << std::endl;
+    cerr << endl;
+    cerr << "Old main model: " << oldMainModel << endl;
 #endif
 
     for (LayerSet::iterator i = m_layers.begin(); i != m_layers.end(); ++i) {
@@ -298,30 +298,30 @@
 	Model *model = layer->getModel();
 
 #ifdef DEBUG_DOCUMENT
-        std::cerr << "Document::setMainModel: inspecting model "
+        cerr << "Document::setMainModel: inspecting model "
                   << (model ? model->objectName(): "(null)") << " in layer "
-                  << layer->objectName() << std::endl;
+                  << layer->objectName() << endl;
 #endif
 
 	if (model == oldMainModel) {
 #ifdef DEBUG_DOCUMENT
-            std::cerr << "... it uses the old main model, replacing" << std::endl;
+            cerr << "... it uses the old main model, replacing" << endl;
 #endif
 	    LayerFactory::getInstance()->setModel(layer, m_mainModel);
 	    continue;
 	}
 
         if (!model) {
-            std::cerr << "WARNING: Document::setMainModel: Null model in layer "
-                      << layer << std::endl;
+            cerr << "WARNING: Document::setMainModel: Null model in layer "
+                      << layer << endl;
 	    // get rid of this hideous degenerate
 	    obsoleteLayers.push_back(layer);
 	    continue;
 	}
 
 	if (m_models.find(model) == m_models.end()) {
-	    std::cerr << "WARNING: Document::setMainModel: Unknown model "
-		      << model << " in layer " << layer << std::endl;
+	    cerr << "WARNING: Document::setMainModel: Unknown model "
+		      << model << " in layer " << layer << endl;
 	    // and this one
 	    obsoleteLayers.push_back(layer);
 	    continue;
@@ -331,7 +331,7 @@
             (m_models[model].source == oldMainModel)) {
 
 #ifdef DEBUG_DOCUMENT
-            std::cerr << "... it uses a model derived from the old main model, regenerating" << std::endl;
+            cerr << "... it uses a model derived from the old main model, regenerating" << endl;
 #endif
 
 	    // This model was derived from the previous main
@@ -351,8 +351,8 @@
                                 message);
 	    
 	    if (!replacementModel) {
-		std::cerr << "WARNING: Document::setMainModel: Failed to regenerate model for transform \""
-			  << transformId << "\"" << " in layer " << layer << std::endl;
+		cerr << "WARNING: Document::setMainModel: Failed to regenerate model for transform \""
+			  << transformId << "\"" << " in layer " << layer << endl;
                 if (failedTransformers.find(transformId)
                     == failedTransformers.end()) {
                     emit modelRegenerationFailed(layer->objectName(),
@@ -368,20 +368,20 @@
                                                   message);
                 }
 #ifdef DEBUG_DOCUMENT
-                std::cerr << "Replacing model " << model << " (type "
+                cerr << "Replacing model " << model << " (type "
                           << typeid(*model).name() << ") with model "
                           << replacementModel << " (type "
                           << typeid(*replacementModel).name() << ") in layer "
                           << layer << " (name " << layer->objectName() << ")"
-                          << std::endl;
+                          << endl;
 #endif
                 RangeSummarisableTimeValueModel *rm =
                     dynamic_cast<RangeSummarisableTimeValueModel *>(replacementModel);
 #ifdef DEBUG_DOCUMENT
                 if (rm) {
-                    std::cerr << "new model has " << rm->getChannelCount() << " channels " << std::endl;
+                    cerr << "new model has " << rm->getChannelCount() << " channels " << endl;
                 } else {
-                    std::cerr << "new model " << replacementModel << " is not a RangeSummarisableTimeValueModel!" << std::endl;
+                    cerr << "new model " << replacementModel << " is not a RangeSummarisableTimeValueModel!" << endl;
                 }
 #endif
 		setModel(layer, replacementModel);
@@ -433,16 +433,16 @@
                           Model *outputModelToAdd)
 {
     if (m_models.find(outputModelToAdd) != m_models.end()) {
-	std::cerr << "WARNING: Document::addDerivedModel: Model already added"
-		  << std::endl;
+	cerr << "WARNING: Document::addDerivedModel: Model already added"
+		  << endl;
 	return;
     }
 
 #ifdef DEBUG_DOCUMENT
     if (input.getModel()) {
-        std::cerr << "Document::addDerivedModel: source is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << std::endl;
+        cerr << "Document::addDerivedModel: source is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << endl;
     } else {
-        std::cerr << "Document::addDerivedModel: source is " << input.getModel() << std::endl;
+        cerr << "Document::addDerivedModel: source is " << input.getModel() << endl;
     }
 #endif
 
@@ -458,11 +458,11 @@
 
 #ifdef DEBUG_DOCUMENT
     SVDEBUG << "Document::addDerivedModel: Added model " << outputModelToAdd << endl;
-    std::cerr << "Models now: ";
+    cerr << "Models now: ";
     for (ModelMap::const_iterator i = m_models.begin(); i != m_models.end(); ++i) {
-        std::cerr << i->first << " ";
+        cerr << i->first << " ";
     } 
-    std::cerr << std::endl;
+    cerr << endl;
 #endif
 
     emit modelAdded(outputModelToAdd);
@@ -473,8 +473,8 @@
 Document::addImportedModel(Model *model)
 {
     if (m_models.find(model) != m_models.end()) {
-	std::cerr << "WARNING: Document::addImportedModel: Model already added"
-		  << std::endl;
+	cerr << "WARNING: Document::addImportedModel: Model already added"
+		  << endl;
 	return;
     }
 
@@ -486,11 +486,11 @@
 
 #ifdef DEBUG_DOCUMENT
     SVDEBUG << "Document::addImportedModel: Added model " << model << endl;
-    std::cerr << "Models now: ";
+    cerr << "Models now: ";
     for (ModelMap::const_iterator i = m_models.begin(); i != m_models.end(); ++i) {
-        std::cerr << i->first << " ";
+        cerr << i->first << " ";
     } 
-    std::cerr << std::endl;
+    cerr << endl;
 #endif
 
     if (m_autoAlignment) alignModel(model);
@@ -531,7 +531,7 @@
          .getPluginVersion());
 
     if (!model) {
-	std::cerr << "WARNING: Document::addDerivedModel: no output model for transform " << transform.getIdentifier() << std::endl;
+	cerr << "WARNING: Document::addDerivedModel: no output model for transform " << transform.getIdentifier() << endl;
     } else {
 	addDerivedModel(applied, input, model);
     }
@@ -555,16 +555,16 @@
     if (m_models.find(model) != m_models.end()) {
 	
 	if (m_models[model].refcount == 0) {
-	    std::cerr << "WARNING: Document::releaseModel: model " << model
-		      << " reference count is zero already!" << std::endl;
+	    cerr << "WARNING: Document::releaseModel: model " << model
+		      << " reference count is zero already!" << endl;
 	} else {
 	    if (--m_models[model].refcount == 0) {
 		toDelete = true;
 	    }
 	}
     } else { 
-	std::cerr << "WARNING: Document::releaseModel: Unfound model "
-		  << model << std::endl;
+	cerr << "WARNING: Document::releaseModel: Unfound model "
+		  << model << endl;
 	toDelete = true;
     }
 
@@ -592,11 +592,11 @@
 
 #ifdef DEBUG_DOCUMENT
         SVDEBUG << "Document::releaseModel: Deleted model " << model << endl;
-        std::cerr << "Models now: ";
+        cerr << "Models now: ";
         for (ModelMap::const_iterator i = m_models.begin(); i != m_models.end(); ++i) {
-            std::cerr << i->first << " ";
+            cerr << i->first << " ";
         } 
-        std::cerr << std::endl;
+        cerr << endl;
 #endif
 
 	delete model;
@@ -609,15 +609,15 @@
     if (m_layerViewMap.find(layer) != m_layerViewMap.end() &&
 	m_layerViewMap[layer].size() > 0) {
 
-	std::cerr << "WARNING: Document::deleteLayer: Layer "
+	cerr << "WARNING: Document::deleteLayer: Layer "
 		  << layer << " [" << layer->objectName() << "]"
 		  << " is still used in " << m_layerViewMap[layer].size()
-		  << " views!" << std::endl;
+		  << " views!" << endl;
 
 	if (force) {
 
 #ifdef DEBUG_DOCUMENT
-	    std::cerr << "(force flag set -- deleting from all views)" << std::endl;
+	    cerr << "(force flag set -- deleting from all views)" << endl;
 #endif
 
 	    for (std::set<View *>::iterator j = m_layerViewMap[layer].begin();
@@ -661,11 +661,11 @@
     if (model && 
 	model != m_mainModel &&
 	m_models.find(model) == m_models.end()) {
-	std::cerr << "ERROR: Document::setModel: Layer " << layer
+	cerr << "ERROR: Document::setModel: Layer " << layer
 		  << " (\"" << layer->objectName().toStdString()
                   << "\") wants to use unregistered model " << model
 		  << ": register the layer's model before setting it!"
-		  << std::endl;
+		  << endl;
 	return;
     }
 
@@ -715,9 +715,9 @@
     } else {
 	if (model != m_mainModel &&
 	    m_models.find(model) == m_models.end()) {
-	    std::cerr << "ERROR: Document::addLayerToView: Layer " << layer
+	    cerr << "ERROR: Document::addLayerToView: Layer " << layer
 		      << " has unregistered model " << model
-		      << " -- register the layer's model before adding the layer!" << std::endl;
+		      << " -- register the layer's model before adding the layer!" << endl;
 	    return;
 	}
     }
@@ -741,9 +741,9 @@
 
     if (m_layerViewMap[layer].find(view) !=
 	m_layerViewMap[layer].end()) {
-	std::cerr << "WARNING: Document::addToLayerViewMap:"
+	cerr << "WARNING: Document::addToLayerViewMap:"
 		  << " Layer " << layer << " -> view " << view << " already in"
-		  << " layer view map -- internal inconsistency" << std::endl;
+		  << " layer view map -- internal inconsistency" << endl;
     }
 
     m_layerViewMap[layer].insert(view);
@@ -756,9 +756,9 @@
 {
     if (m_layerViewMap[layer].find(view) ==
 	m_layerViewMap[layer].end()) {
-	std::cerr << "WARNING: Document::removeFromLayerViewMap:"
+	cerr << "WARNING: Document::removeFromLayerViewMap:"
 		  << " Layer " << layer << " -> view " << view << " not in"
-		  << " layer view map -- internal inconsistency" << std::endl;
+		  << " layer view map -- internal inconsistency" << endl;
     }
 
     m_layerViewMap[layer].erase(view);
@@ -923,7 +923,7 @@
         (transformOutput);
 
     if (!path) {
-        std::cerr << "Document::alignModel: ERROR: Failed to create alignment path (no MATCH plugin?)" << std::endl;
+        cerr << "Document::alignModel: ERROR: Failed to create alignment path (no MATCH plugin?)" << endl;
         emit alignmentFailed(id, message);
         delete transformOutput;
         delete aggregateModel;
--- a/framework/MainWindowBase.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/framework/MainWindowBase.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -101,8 +101,8 @@
 #include <cstdio>
 #include <errno.h>
 
-using std::cerr;
-using std::endl;
+
+
 
 using std::vector;
 using std::map;
@@ -120,10 +120,10 @@
     char errstr[256];
     XGetErrorText(dpy, err->error_code, errstr, 256);
     if (err->error_code != BadWindow) {
-	std::cerr << "Sonic Visualiser: X Error: "
+	cerr << "Sonic Visualiser: X Error: "
 		  << errstr << " " << int(err->error_code)
 		  << "\nin major opcode:  "
-		  << int(err->request_code) << std::endl;
+		  << int(err->request_code) << endl;
     }
     return 0;
 }
@@ -290,7 +290,7 @@
         QTimer *oscTimer = new QTimer(this);
         connect(oscTimer, SIGNAL(timeout()), this, SLOT(pollOSC()));
         oscTimer->start(1000);
-        std::cerr << "Finished setting up OSC interface" << std::endl;
+        cerr << "Finished setting up OSC interface" << endl;
     }
 }
 
@@ -578,7 +578,7 @@
 
     int frame = m_playSource->getCurrentBufferedFrame();
 
-//    std::cerr << "currentPaneChanged: current frame (in ref model) = " << frame << std::endl;
+//    cerr << "currentPaneChanged: current frame (in ref model) = " << frame << endl;
 
     View::ModelSet soloModels = p->getModels();
     
@@ -1073,7 +1073,7 @@
         RDFImporter::RDFDocumentType rdfType = 
             RDFImporter::identifyDocumentType
             (QUrl::fromLocalFile(source.getLocalFilename()).toString());
-//        std::cerr << "RDF type: " << (int)rdfType << std::endl;
+//        cerr << "RDF type: " << (int)rdfType << endl;
         if (rdfType == RDFImporter::AudioRefAndAnnotations ||
             rdfType == RDFImporter::AudioRef) {
             rdfSession = true;
@@ -1132,7 +1132,7 @@
         templateName = getDefaultSessionTemplate();
     }
 
-    std::cerr << "template is: \"" << templateName.toStdString() << "\"" << std::endl;
+    cerr << "template is: \"" << templateName.toStdString() << "\"" << endl;
 
     if (!source.isAvailable()) return FileOpenFailed;
     source.waitForData();
@@ -1153,7 +1153,7 @@
 	return FileOpenFailed;
     }
 
-//    std::cerr << "mode = " << mode << std::endl;
+//    cerr << "mode = " << mode << endl;
 
     if (mode == AskUser) {
         if (getMainModel()) {
@@ -1230,15 +1230,15 @@
 
         if (!checkSaveModified()) return FileOpenCancelled;
 
-        std::cerr << "SV looking for template " << templateName << std::endl;
+        cerr << "SV looking for template " << templateName << endl;
         if (templateName != "") {
             FileOpenStatus tplStatus = openSessionTemplate(templateName);
             if (tplStatus == FileOpenCancelled) {
-                std::cerr << "Template load cancelled" << std::endl;
+                cerr << "Template load cancelled" << endl;
                 return FileOpenCancelled;
             }
             if (tplStatus != FileOpenFailed) {
-                std::cerr << "Template load succeeded" << std::endl;
+                cerr << "Template load succeeded" << endl;
                 loadedTemplate = true;
             }
         }
@@ -1414,13 +1414,13 @@
     
     if (!pane) {
 	// shouldn't happen, as the menu action should have been disabled
-	std::cerr << "WARNING: MainWindowBase::openLayer: no current pane" << std::endl;
+	cerr << "WARNING: MainWindowBase::openLayer: no current pane" << endl;
 	return FileOpenWrongMode;
     }
 
     if (!getMainModel()) {
 	// shouldn't happen, as the menu action should have been disabled
-	std::cerr << "WARNING: MainWindowBase::openLayer: No main model -- hence no default sample rate available" << std::endl;
+	cerr << "WARNING: MainWindowBase::openLayer: No main model -- hence no default sample rate available" << endl;
 	return FileOpenWrongMode;
     }
 
@@ -1432,7 +1432,7 @@
     RDFImporter::RDFDocumentType rdfType = 
         RDFImporter::identifyDocumentType(QUrl::fromLocalFile(path).toString());
 
-//    std::cerr << "RDF type:  (in layer) " << (int) rdfType << std::endl;
+//    cerr << "RDF type:  (in layer) " << (int) rdfType << endl;
 
     if (rdfType != RDFImporter::NotRDF) {
 
@@ -1447,9 +1447,9 @@
         QFile file(path);
         
         if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
-            std::cerr << "ERROR: MainWindowBase::openLayer("
+            cerr << "ERROR: MainWindowBase::openLayer("
                       << source.getLocation().toStdString()
-                      << "): Failed to open file for reading" << std::endl;
+                      << "): Failed to open file for reading" << endl;
             return FileOpenFailed;
         }
         
@@ -1466,10 +1466,10 @@
         reader.parse(inputSource);
         
         if (!reader.isOK()) {
-            std::cerr << "ERROR: MainWindowBase::openLayer("
+            cerr << "ERROR: MainWindowBase::openLayer("
                       << source.getLocation().toStdString()
                       << "): Failed to read XML file: "
-                      << reader.getErrorString() << std::endl;
+                      << reader.getErrorString() << endl;
             return FileOpenFailed;
         }
 
@@ -1546,7 +1546,7 @@
     
     if (!pane) {
 	// shouldn't happen, as the menu action should have been disabled
-	std::cerr << "WARNING: MainWindowBase::openImage: no current pane" << std::endl;
+	cerr << "WARNING: MainWindowBase::openImage: no current pane" << endl;
 	return FileOpenWrongMode;
     }
 
@@ -1572,7 +1572,7 @@
 
     // We don't put the image file in Recent Files
 
-    std::cerr << "openImage: trying location \"" << source.getLocation() << "\" in image layer" << std::endl;
+    cerr << "openImage: trying location \"" << source.getLocation() << "\" in image layer" << endl;
 
     if (!il->addImage(m_viewManager->getGlobalCentreFrame(), source.getLocation())) {
         if (newLayer) {
@@ -1611,7 +1611,7 @@
             RDFImporter::identifyDocumentType
             (QUrl::fromLocalFile(source.getLocalFilename()).toString());
 
-//        std::cerr << "RDF type: " << (int)rdfType << std::endl;
+//        cerr << "RDF type: " << (int)rdfType << endl;
 
         if (rdfType == RDFImporter::AudioRefAndAnnotations ||
             rdfType == RDFImporter::AudioRef) {
@@ -1623,7 +1623,7 @@
         if (source.getExtension().toLower() == "xml") {
             if (SVFileReader::identifyXmlFile(source.getLocalFilename()) ==
                 SVFileReader::SVSessionFile) {
-                std::cerr << "This XML file looks like a session file, attempting to open it as a session" << std::endl;
+                cerr << "This XML file looks like a session file, attempting to open it as a session" << endl;
             } else {
                 return FileOpenFailed;
             }
@@ -1726,7 +1726,7 @@
     ResourceFinder rf;
     QString tfile = rf.getResourcePath("templates", templateName + ".svt");
     if (tfile != "") {
-        std::cerr << "SV loading template file " << tfile.toStdString() << std::endl;
+        cerr << "SV loading template file " << tfile.toStdString() << endl;
         return openSessionTemplate(FileSource("file:" + tfile));
     } else {
         return FileOpenFailed;
@@ -1736,7 +1736,7 @@
 MainWindowBase::FileOpenStatus
 MainWindowBase::openSessionTemplate(FileSource source)
 {
-    std::cerr << "MainWindowBase::openSessionTemplate(" << source.getLocation().toStdString() << ")" << std::endl;
+    cerr << "MainWindowBase::openSessionTemplate(" << source.getLocation().toStdString() << ")" << endl;
 
     if (!source.isAvailable()) return FileOpenFailed;
     source.waitForData();
@@ -2065,10 +2065,10 @@
 
         BZipFileDevice bzFile(temp.getTemporaryFilename());
         if (!bzFile.open(QIODevice::WriteOnly)) {
-            std::cerr << "Failed to open session file \""
+            cerr << "Failed to open session file \""
                       << temp.getTemporaryFilename().toStdString()
                       << "\" for writing: "
-                      << bzFile.errorString() << std::endl;
+                      << bzFile.errorString() << endl;
             return false;
         }
 
@@ -2110,10 +2110,10 @@
 
         QFile file(temp.getTemporaryFilename());
         if (!file.open(QIODevice::WriteOnly)) {
-            std::cerr << "Failed to open session template file \""
+            cerr << "Failed to open session template file \""
                       << temp.getTemporaryFilename().toStdString()
                       << "\" for writing: "
-                      << file.errorString().toStdString() << std::endl;
+                      << file.errorString().toStdString() << endl;
             return false;
         }
         
@@ -3026,7 +3026,7 @@
     removeLayerEditDialog(layer);
 
     if (m_timeRulerLayer && (layer == m_timeRulerLayer)) {
-//	std::cerr << "(this is the time ruler layer)" << std::endl;
+//	cerr << "(this is the time ruler layer)" << endl;
 	m_timeRulerLayer = 0;
     }
 }
--- a/framework/SVFileReader.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/framework/SVFileReader.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -97,9 +97,9 @@
 SVFileReader::~SVFileReader()
 {
     if (!m_awaitingDatasets.empty()) {
-	std::cerr << "WARNING: SV-XML: File ended with "
+	cerr << "WARNING: SV-XML: File ended with "
 		  << m_awaitingDatasets.size() << " unfilled model dataset(s)"
-		  << std::endl;
+		  << endl;
     }
 
     std::set<Model *> unaddedModels;
@@ -112,9 +112,9 @@
     }
 
     if (!unaddedModels.empty()) {
-	std::cerr << "WARNING: SV-XML: File contained "
+	cerr << "WARNING: SV-XML: File contained "
 		  << unaddedModels.size() << " unused models"
-		  << std::endl;
+		  << endl;
 	while (!unaddedModels.empty()) {
 	    delete *unaddedModels.begin();
 	    unaddedModels.erase(unaddedModels.begin());
@@ -235,13 +235,13 @@
         ok = readParameter(attributes);
 
     } else {
-        std::cerr << "WARNING: SV-XML: Unexpected element \""
-                  << name.toLocal8Bit().data() << "\"" << std::endl;
+        cerr << "WARNING: SV-XML: Unexpected element \""
+                  << name.toLocal8Bit().data() << "\"" << endl;
     }
 
     if (!ok) {
-	std::cerr << "WARNING: SV-XML: Failed to completely process element \""
-		  << name.toLocal8Bit().data() << "\"" << std::endl;
+	cerr << "WARNING: SV-XML: Failed to completely process element \""
+		  << name.toLocal8Bit().data() << "\"" << endl;
     }
 
     return true;
@@ -255,7 +255,7 @@
     if (m_inRow) {
 	ok = readRowData(text);
 	if (!ok) {
-	    std::cerr << "WARNING: SV-XML: Failed to read row data content for row " << m_rowNumber << std::endl;
+	    cerr << "WARNING: SV-XML: Failed to read row data content for row " << m_rowNumber << endl;
 	}
     }
 
@@ -285,7 +285,7 @@
 	    }
 
 	    if (!foundInAwaiting) {
-		std::cerr << "WARNING: SV-XML: Dataset precedes model, or no model uses dataset" << std::endl;
+		cerr << "WARNING: SV-XML: Dataset precedes model, or no model uses dataset" << endl;
 	    }
 	}
 
@@ -300,12 +300,12 @@
 
         if (!m_currentDerivedModel) {
             if (m_currentDerivedModel < 0) {
-                std::cerr << "WARNING: SV-XML: Bad derivation output model id "
-                          << m_currentDerivedModelId << std::endl;
+                cerr << "WARNING: SV-XML: Bad derivation output model id "
+                          << m_currentDerivedModelId << endl;
             } else if (haveModel(m_currentDerivedModelId)) {
-                std::cerr << "WARNING: SV-XML: Derivation has existing model "
+                cerr << "WARNING: SV-XML: Derivation has existing model "
                           << m_currentDerivedModelId
-                          << " as target, not regenerating" << std::endl;
+                          << " as target, not regenerating" << endl;
             } else {
                 QString message;
                 m_currentDerivedModel = m_models[m_currentDerivedModelId] =
@@ -362,7 +362,7 @@
 	.arg(exception.message())
 	.arg(exception.lineNumber())
 	.arg(exception.columnNumber());
-    std::cerr << m_errorString.toLocal8Bit().data() << std::endl;
+    cerr << m_errorString.toLocal8Bit().data() << endl;
     return QXmlDefaultHandler::error(exception);
 }
 
@@ -374,7 +374,7 @@
 	.arg(exception.message())
 	.arg(exception.lineNumber())
 	.arg(exception.columnNumber());
-    std::cerr << m_errorString.toLocal8Bit().data() << std::endl;
+    cerr << m_errorString.toLocal8Bit().data() << endl;
     return QXmlDefaultHandler::fatalError(exception);
 }
 
@@ -382,7 +382,7 @@
 #define READ_MANDATORY(TYPE, NAME, CONVERSION)		      \
     TYPE NAME = attributes.value(#NAME).trimmed().CONVERSION(&ok); \
     if (!ok) { \
-	std::cerr << "WARNING: SV-XML: Missing or invalid mandatory " #TYPE " attribute \"" #NAME "\"" << std::endl; \
+	cerr << "WARNING: SV-XML: Missing or invalid mandatory " #TYPE " attribute \"" #NAME "\"" << endl; \
 	return false; \
     }
 
@@ -435,8 +435,8 @@
     READ_MANDATORY(int, id, toInt);
 
     if (haveModel(id)) {
-	std::cerr << "WARNING: SV-XML: Ignoring duplicate model id " << id
-		  << std::endl;
+	cerr << "WARNING: SV-XML: Ignoring duplicate model id " << id
+		  << endl;
 	return false;
     }
 
@@ -465,9 +465,9 @@
         file.waitForStatus();
 
         if (!file.isOK()) {
-            std::cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path << "\" for wave file model: " << file.getErrorString() << std::endl;
+            cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path << "\" for wave file model: " << file.getErrorString() << endl;
         } else if (!file.isAvailable()) {
-            std::cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path << "\" for wave file model: Source unavailable" << std::endl;
+            cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path << "\" for wave file model: Source unavailable" << endl;
         } else {
 
             file.waitForData();
@@ -537,8 +537,8 @@
 
 	} else {
 
-	    std::cerr << "WARNING: SV-XML: Unexpected dense model dimension ("
-		      << dimensions << ")" << std::endl;
+	    cerr << "WARNING: SV-XML: Unexpected dense model dimension ("
+		      << dimensions << ")" << endl;
 	}
     } else if (type == "sparse") {
 
@@ -649,8 +649,8 @@
 
 	} else {
 
-	    std::cerr << "WARNING: SV-XML: Unexpected sparse model dimension ("
-		      << dimensions << ")" << std::endl;
+	    cerr << "WARNING: SV-XML: Unexpected sparse model dimension ("
+		      << dimensions << ")" << endl;
 	}
 
     } else if (type == "alignment") {
@@ -664,25 +664,25 @@
         if (m_models.find(reference) != m_models.end()) {
             refModel = m_models[reference];
         } else {
-            std::cerr << "WARNING: SV-XML: Unknown reference model id "
+            cerr << "WARNING: SV-XML: Unknown reference model id "
                       << reference << " in alignment model id " << id
-                      << std::endl;
+                      << endl;
         }
 
         if (m_models.find(aligned) != m_models.end()) {
             alignedModel = m_models[aligned];
         } else {
-            std::cerr << "WARNING: SV-XML: Unknown aligned model id "
+            cerr << "WARNING: SV-XML: Unknown aligned model id "
                       << aligned << " in alignment model id " << id
-                      << std::endl;
+                      << endl;
         }
 
         if (m_models.find(path) != m_models.end()) {
             pathModel = m_models[path];
         } else {
-            std::cerr << "WARNING: SV-XML: Unknown path model id "
+            cerr << "WARNING: SV-XML: Unknown path model id "
                       << path << " in alignment model id " << id
-                      << std::endl;
+                      << endl;
         }
 
         if (refModel && alignedModel && pathModel) {
@@ -690,9 +690,9 @@
                 (refModel, alignedModel, 0, 0);
             PathModel *pm = dynamic_cast<PathModel *>(pathModel);
             if (!pm) {
-                std::cerr << "WARNING: SV-XML: Model id " << path
+                cerr << "WARNING: SV-XML: Model id " << path
                           << " referenced as path for alignment " << id
-                          << " is not a path model" << std::endl;
+                          << " is not a path model" << endl;
             } else {
                 model->setPath(pm);
                 pm->setCompletion(100);
@@ -705,8 +705,8 @@
         
     } else {
 
-	std::cerr << "WARNING: SV-XML: Unexpected model type \""
-		  << type.toLocal8Bit().data() << "\" for model id " << id << std::endl;
+	cerr << "WARNING: SV-XML: Unexpected model type \""
+		  << type.toLocal8Bit().data() << "\" for model id " << id << endl;
     }
 
     return false;
@@ -719,16 +719,16 @@
     m_currentPane = 0;
     
     if (type != "pane") {
-	std::cerr << "WARNING: SV-XML: Unexpected view type \""
-		  << type.toLocal8Bit().data() << "\"" << std::endl;
+	cerr << "WARNING: SV-XML: Unexpected view type \""
+		  << type.toLocal8Bit().data() << "\"" << endl;
 	return false;
     }
 
     m_currentPane = m_paneCallback.addPane();
 
     if (!m_currentPane) {
-	std::cerr << "WARNING: SV-XML: Internal error: Failed to add pane!"
-		  << std::endl;
+	cerr << "WARNING: SV-XML: Internal error: Failed to add pane!"
+		  << endl;
 	return false;
     }
 
@@ -777,9 +777,9 @@
     id = attributes.value("id").trimmed().toInt(&ok);
 
     if (!ok) {
-	std::cerr << "WARNING: SV-XML: No layer id for layer of type \""
+	cerr << "WARNING: SV-XML: No layer id for layer of type \""
 		  << type.toLocal8Bit().data()
-		  << "\"" << std::endl;
+		  << "\"" << endl;
 	return false;
     }
 
@@ -795,8 +795,8 @@
     if (m_inData) {
 
 	if (m_layers.find(id) != m_layers.end()) {
-	    std::cerr << "WARNING: SV-XML: Ignoring duplicate layer id " << id
-		      << " in data section" << std::endl;
+	    cerr << "WARNING: SV-XML: Ignoring duplicate layer id " << id
+		      << " in data section" << endl;
 	    return false;
 	}
 
@@ -811,8 +811,8 @@
     } else {
 
 	if (!m_currentPane) {
-	    std::cerr << "WARNING: SV-XML: No current pane for layer " << id
-		      << " in view section" << std::endl;
+	    cerr << "WARNING: SV-XML: No current pane for layer " << id
+		      << " in view section" << endl;
 	    return false;
 	}
 
@@ -821,9 +821,9 @@
 	    layer = m_layers[id];
 	
 	} else {
-	    std::cerr << "WARNING: SV-XML: Layer id " << id 
+	    cerr << "WARNING: SV-XML: Layer id " << id 
 		      << " in view section has not been defined -- defining it here"
-		      << std::endl;
+		      << endl;
 
 	    layer = m_document->createLayer
 		(LayerFactory::getInstance()->getLayerTypeForName(type));
@@ -836,9 +836,9 @@
     }
 	    
     if (!layer) {
-	std::cerr << "WARNING: SV-XML: Failed to add layer of type \""
+	cerr << "WARNING: SV-XML: Failed to add layer of type \""
 		  << type.toLocal8Bit().data()
-		  << "\"" << std::endl;
+		  << "\"" << endl;
 	return false;
     }
 
@@ -859,8 +859,8 @@
 		Model *model = m_models[modelId];
 		m_document->setModel(layer, model);
 	    } else {
-		std::cerr << "WARNING: SV-XML: Unknown model id " << modelId
-			  << " in layer definition" << std::endl;
+		cerr << "WARNING: SV-XML: Unknown model id " << modelId
+			  << " in layer definition" << endl;
 	    }
 	}
 
@@ -901,7 +901,7 @@
     READ_MANDATORY(int, dimensions, toInt);
     
     if (m_awaitingDatasets.find(id) == m_awaitingDatasets.end()) {
-	std::cerr << "WARNING: SV-XML: Unwanted dataset " << id << std::endl;
+	cerr << "WARNING: SV-XML: Unwanted dataset " << id << endl;
 	return false;
     }
     
@@ -911,8 +911,8 @@
     if (haveModel(modelId)) {
 	model = m_models[modelId];
     } else {
-	std::cerr << "WARNING: SV-XML: Internal error: Unknown model " << modelId
-		  << " expecting dataset " << id << std::endl;
+	cerr << "WARNING: SV-XML: Internal error: Unknown model " << modelId
+		  << " expecting dataset " << id << endl;
 	return false;
     }
 
@@ -941,7 +941,7 @@
     }
 
     if (!good) {
-	std::cerr << "WARNING: SV-XML: Model id " << modelId << " has wrong number of dimensions or inappropriate type for " << dimensions << "-D dataset " << id << std::endl;
+	cerr << "WARNING: SV-XML: Model id " << modelId << " has wrong number of dimensions or inappropriate type for " << dimensions << "-D dataset " << id << endl;
 	m_currentDataset = 0;
 	return false;
     }
@@ -963,7 +963,7 @@
 	(m_currentDataset);
 
     if (sodm) {
-//        std::cerr << "Current dataset is a sparse one dimensional model" << std::endl;
+//        cerr << "Current dataset is a sparse one dimensional model" << endl;
 	QString label = attributes.value("label");
 	sodm->addPoint(SparseOneDimensionalModel::Point(frame, label));
 	return true;
@@ -973,7 +973,7 @@
 	(m_currentDataset);
 
     if (stvm) {
-//        std::cerr << "Current dataset is a sparse time-value model" << std::endl;
+//        cerr << "Current dataset is a sparse time-value model" << endl;
 	float value = 0.0;
 	value = attributes.value("value").trimmed().toFloat(&ok);
 	QString label = attributes.value("label");
@@ -984,7 +984,7 @@
     NoteModel *nm = dynamic_cast<NoteModel *>(m_currentDataset);
 
     if (nm) {
-//        std::cerr << "Current dataset is a note model" << std::endl;
+//        cerr << "Current dataset is a note model" << endl;
 	float value = 0.0;
 	value = attributes.value("value").trimmed().toFloat(&ok);
 	size_t duration = 0;
@@ -1002,7 +1002,7 @@
     RegionModel *rm = dynamic_cast<RegionModel *>(m_currentDataset);
 
     if (rm) {
-//        std::cerr << "Current dataset is a note model" << std::endl;
+//        cerr << "Current dataset is a note model" << endl;
 	float value = 0.0;
 	value = attributes.value("value").trimmed().toFloat(&ok);
 	size_t duration = 0;
@@ -1015,7 +1015,7 @@
     TextModel *tm = dynamic_cast<TextModel *>(m_currentDataset);
 
     if (tm) {
-//        std::cerr << "Current dataset is a text model" << std::endl;
+//        cerr << "Current dataset is a text model" << endl;
 	float height = 0.0;
 	height = attributes.value("height").trimmed().toFloat(&ok);
 	QString label = attributes.value("label");
@@ -1027,7 +1027,7 @@
     PathModel *pm = dynamic_cast<PathModel *>(m_currentDataset);
 
     if (pm) {
-//        std::cerr << "Current dataset is a path model" << std::endl;
+//        cerr << "Current dataset is a path model" << endl;
         int mapframe = attributes.value("mapframe").trimmed().toInt(&ok);
 //        SVDEBUG << "SVFileReader::addPointToDataset: PathModel: frame = " << frame << ", mapframe = " << mapframe << ", ok = " << ok << endl;
 	pm->addPoint(PathModel::Point(frame, mapframe));
@@ -1037,7 +1037,7 @@
     ImageModel *im = dynamic_cast<ImageModel *>(m_currentDataset);
 
     if (im) {
-//        std::cerr << "Current dataset is an image model" << std::endl;
+//        cerr << "Current dataset is an image model" << endl;
 	QString image = attributes.value("image");
 	QString label = attributes.value("label");
 //        SVDEBUG << "SVFileReader::addPointToDataset: ImageModel: frame = " << frame << ", image = " << image << ", label = " << label << ", ok = " << ok << endl;
@@ -1045,7 +1045,7 @@
 	return ok;
     }
 
-    std::cerr << "WARNING: SV-XML: Point element found in non-point dataset" << std::endl;
+    cerr << "WARNING: SV-XML: Point element found in non-point dataset" << endl;
 
     return false;
 }
@@ -1062,8 +1062,8 @@
 	bool ok = false;
 	int n = attributes.value("number").trimmed().toInt(&ok);
 	if (!ok) {
-	    std::cerr << "WARNING: SV-XML: Missing or invalid bin number"
-		      << std::endl;
+	    cerr << "WARNING: SV-XML: Missing or invalid bin number"
+		      << endl;
 	    return false;
 	}
 
@@ -1073,7 +1073,7 @@
 	return true;
     }
 
-    std::cerr << "WARNING: SV-XML: Bin definition found in incompatible dataset" << std::endl;
+    cerr << "WARNING: SV-XML: Bin definition found in incompatible dataset" << endl;
 
     return false;
 }
@@ -1087,14 +1087,14 @@
     bool ok = false;
     m_rowNumber = attributes.value("n").trimmed().toInt(&ok);
     if (!ok) {
-	std::cerr << "WARNING: SV-XML: Missing or invalid row number"
-		  << std::endl;
+	cerr << "WARNING: SV-XML: Missing or invalid row number"
+		  << endl;
 	return false;
     }
     
     m_inRow = true;
 
-//    std::cerr << "SV-XML: In row " << m_rowNumber << std::endl;
+//    cerr << "SV-XML: In row " << m_rowNumber << endl;
     
     return true;
 }
@@ -1117,8 +1117,8 @@
 
 	    if (values.size() == dtdm->getHeight()) {
 		if (!warned) {
-		    std::cerr << "WARNING: SV-XML: Too many y-bins in 3-D dataset row "
-			      << m_rowNumber << std::endl;
+		    cerr << "WARNING: SV-XML: Too many y-bins in 3-D dataset row "
+			      << m_rowNumber << endl;
 		    warned = true;
 		}
 	    }
@@ -1126,9 +1126,9 @@
 	    bool ok;
 	    float value = i->toFloat(&ok);
 	    if (!ok) {
-		std::cerr << "WARNING: SV-XML: Bad floating-point value "
+		cerr << "WARNING: SV-XML: Bad floating-point value "
 			  << i->toLocal8Bit().data()
-			  << " in row data" << std::endl;
+			  << " in row data" << endl;
 	    } else {
 		values.push_back(value);
 	    }
@@ -1138,7 +1138,7 @@
 	return true;
     }
 
-    std::cerr << "WARNING: SV-XML: Row data found in non-row dataset" << std::endl;
+    cerr << "WARNING: SV-XML: Row data found in non-row dataset" << endl;
 
     return false;
 }
@@ -1151,7 +1151,7 @@
     modelId = attributes.value("model").trimmed().toInt(&modelOk);
 
     if (!modelOk) {
-	std::cerr << "WARNING: SV-XML: No model id specified for derivation" << std::endl;
+	cerr << "WARNING: SV-XML: No model id specified for derivation" << endl;
 	return false;
     }
 
@@ -1243,7 +1243,7 @@
     modelId = attributes.value("model").trimmed().toInt(&modelOk);
 
     if (!modelOk) {
-	std::cerr << "WARNING: SV-XML: No model id specified for play parameters" << std::endl;
+	cerr << "WARNING: SV-XML: No model id specified for play parameters" << endl;
 	return false;
     }
 
@@ -1255,10 +1255,10 @@
             getPlayParameters(m_models[modelId]);
 
         if (!parameters) {
-            std::cerr << "WARNING: SV-XML: Play parameters for model "
+            cerr << "WARNING: SV-XML: Play parameters for model "
                       << modelId
                       << " not found - has model been added to document?"
-                      << std::endl;
+                      << endl;
             return false;
         }
         
@@ -1276,12 +1276,12 @@
         
         m_currentPlayParameters = parameters;
 
-//        std::cerr << "Current play parameters for model: " << m_models[modelId] << ": " << m_currentPlayParameters << std::endl;
+//        cerr << "Current play parameters for model: " << m_models[modelId] << ": " << m_currentPlayParameters << endl;
 
     } else {
 
-	std::cerr << "WARNING: SV-XML: Unknown model " << modelId
-		  << " for play parameters" << std::endl;
+	cerr << "WARNING: SV-XML: Unknown model " << modelId
+		  << " for play parameters" << endl;
         return false;
     }
 
@@ -1292,7 +1292,7 @@
 SVFileReader::readPlugin(const QXmlAttributes &attributes)
 {
     if (m_currentDerivedModelId < 0 && !m_currentPlayParameters) {
-        std::cerr << "WARNING: SV-XML: Plugin found outside derivation or play parameters" << std::endl;
+        cerr << "WARNING: SV-XML: Plugin found outside derivation or play parameters" << endl;
         return false;
     }
 
@@ -1325,7 +1325,7 @@
 SVFileReader::readTransform(const QXmlAttributes &attributes)
 {
     if (m_currentDerivedModelId < 0) {
-        std::cerr << "WARNING: SV-XML: Transform found outside derivation" << std::endl;
+        cerr << "WARNING: SV-XML: Transform found outside derivation" << endl;
         return false;
     }
 
@@ -1338,14 +1338,14 @@
 SVFileReader::readParameter(const QXmlAttributes &attributes)
 {
     if (m_currentDerivedModelId < 0) {
-        std::cerr << "WARNING: SV-XML: Parameter found outside derivation" << std::endl;
+        cerr << "WARNING: SV-XML: Parameter found outside derivation" << endl;
         return false;
     }
 
     QString name = attributes.value("name");
     if (name == "") {
-        std::cerr << "WARNING: SV-XML: Ignoring nameless transform parameter"
-                  << std::endl;
+        cerr << "WARNING: SV-XML: Ignoring nameless transform parameter"
+                  << endl;
         return false;
     }
 
@@ -1375,7 +1375,7 @@
               << m_inLayer << ", layer " << m_currentLayer << endl;
 
     if (!m_inLayer) {
-        std::cerr << "WARNING: SV-XML: Measurement found outside layer" << std::endl;
+        cerr << "WARNING: SV-XML: Measurement found outside layer" << endl;
         return false;
     }
 
--- a/framework/TransformUserConfigurator.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/framework/TransformUserConfigurator.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -81,7 +81,7 @@
 	std::vector<Vamp::Plugin::OutputDescriptor> od =
 	    vp->getOutputDescriptors();
 
-	std::cerr << "configure: looking for output: " << output << std::endl;
+	cerr << "configure: looking for output: " << output << endl;
 
 	if (od.size() > 1) {
 	    for (size_t i = 0; i < od.size(); ++i) {
@@ -173,12 +173,12 @@
     if (selectedInput != "") {
 	if (modelMap.contains(selectedInput)) {
 	    inputModel = modelMap.value(selectedInput);
-	    std::cerr << "Found selected input \"" << selectedInput << "\" in model map, result is " << inputModel << std::endl;
+	    cerr << "Found selected input \"" << selectedInput << "\" in model map, result is " << inputModel << endl;
 	} else {
-	    std::cerr << "Failed to find selected input \"" << selectedInput << "\" in model map" << std::endl;
+	    cerr << "Failed to find selected input \"" << selectedInput << "\" in model map" << endl;
 	}
     } else {
-	std::cerr << "Selected input empty: \"" << selectedInput << "\"" << std::endl;
+	cerr << "Selected input empty: \"" << selectedInput << "\"" << endl;
     }
         
     // Write parameters back to transform object
--- a/framework/VersionTester.cpp	Wed Oct 09 14:56:20 2013 +0100
+++ b/framework/VersionTester.cpp	Tue Nov 26 14:12:50 2013 +0000
@@ -34,7 +34,7 @@
     m_nm(new QNetworkAccessManager)
 {
     QUrl url(QString("http://%1/%2").arg(hostname).arg(versionFilePath));
-    std::cerr << "VersionTester: URL is " << url << std::endl;
+    cerr << "VersionTester: URL is " << url << endl;
     m_reply = m_nm->get(QNetworkRequest(url));
     connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)),
             this, SLOT(error(QNetworkReply::NetworkError)));
@@ -78,7 +78,7 @@
 void
 VersionTester::error(QNetworkReply::NetworkError)
 {
-    std::cerr << "VersionTester: error: " << m_reply->errorString() << std::endl;
+    cerr << "VersionTester: error: " << m_reply->errorString() << endl;
     m_httpFailed = true;
 }
 
@@ -93,7 +93,7 @@
 
     int status = r->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
     if (status / 100 != 2) {
-        std::cerr << "VersionTester: error: http status = " << status << std::endl;
+        cerr << "VersionTester: error: http status = " << status << endl;
         return;
     }