changeset 81:0948bf800422

* More latency for PortAudio output * ...
author Chris Cannam
date Thu, 24 Jan 2008 22:49:19 +0000
parents 448ff6e34b99
children 1fa8d5e28d0f
files audioio/AudioPortAudioTarget.cpp framework/Document.cpp
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/audioio/AudioPortAudioTarget.cpp	Thu Jan 24 14:35:43 2008 +0000
+++ b/audioio/AudioPortAudioTarget.cpp	Thu Jan 24 22:49:19 2008 +0000
@@ -63,9 +63,14 @@
 			       m_sampleRate, m_bufferSize, 0,
 			       processStatic, this);
 #else
-    err = Pa_OpenDefaultStream(&m_stream, 0, 2, paFloat32,
-			       m_sampleRate, m_bufferSize,
-			       processStatic, this);
+    PaStreamParameters op;
+    op.device = 0;
+    op.channelCount = 2;
+    op.sampleFormat = paFloat32;
+    op.suggestedLatency = 0.2;
+    op.hostApiSpecificStreamInfo = 0;
+    err = Pa_OpenStream(&m_stream, 0, &op, m_sampleRate, m_bufferSize,
+                        paNoFlag, processStatic, this);
 #endif    
 
     if (err != paNoError) {
--- a/framework/Document.cpp	Thu Jan 24 14:35:43 2008 +0000
+++ b/framework/Document.cpp	Thu Jan 24 22:49:19 2008 +0000
@@ -36,7 +36,7 @@
 #include "data/model/SparseTimeValueModel.h"
 #include "data/model/AlignmentModel.h"
 
-#define DEBUG_DOCUMENT 1
+//#define DEBUG_DOCUMENT 1
 
 //!!! still need to handle command history, documentRestored/documentModified
 
@@ -793,6 +793,8 @@
     transform.setStepSize(transform.getBlockSize()/2);
     transform.setParameter("serialise", 1);
 
+    std::cerr << "Document::alignModel: Alignment transform step size " << transform.getStepSize() << ", block size " << transform.getBlockSize() << std::endl;
+
 //!!!    QString args = "<plugin param-serialise=\"1\"/>";
 //    Model *transformOutput = factory->transform(id, aggregate, context, args);