Mercurial > hg > svapp
comparison audioio/AudioPulseAudioTarget.cpp @ 154:386b02c926bf
* Merge from one-fftdataserver-per-fftmodel branch. This bit of
reworking (which is not described very accurately by the title of
the branch) turns the MatrixFile object into something that either
reads or writes, but not both, and separates the FFT file cache
reader and writer implementations separately. This allows the
FFT data server to have a single thread owning writers and one reader
per "customer" thread, and for all locking to be vastly simplified
and concentrated in the data server alone (because none of the
classes it makes use of is used in more than one thread at a time).
The result is faster and more trustworthy code.
author | Chris Cannam |
---|---|
date | Tue, 27 Jan 2009 13:25:10 +0000 |
parents | 4c9c04645685 |
children | 3bd87e04f060 |
comparison
equal
deleted
inserted
replaced
153:99afa5fa8d30 | 154:386b02c926bf |
---|---|
163 pa_usec_t latency = 0; | 163 pa_usec_t latency = 0; |
164 int negative = 0; | 164 int negative = 0; |
165 if (pa_stream_get_latency(m_stream, &latency, &negative)) { | 165 if (pa_stream_get_latency(m_stream, &latency, &negative)) { |
166 std::cerr << "AudioPulseAudioTarget::contextStateChanged: Failed to query latency" << std::endl; | 166 std::cerr << "AudioPulseAudioTarget::contextStateChanged: Failed to query latency" << std::endl; |
167 } | 167 } |
168 std::cerr << "Latency = " << latency << " usec" << std::endl; | 168 // std::cerr << "Latency = " << latency << " usec" << std::endl; |
169 int latframes = (latency / 1000000.f) * float(m_sampleRate); | 169 int latframes = (latency / 1000000.f) * float(m_sampleRate); |
170 std::cerr << "that's " << latframes << " frames" << std::endl; | 170 // std::cerr << "that's " << latframes << " frames" << std::endl; |
171 m_source->setTargetPlayLatency(latframes); //!!! buh | 171 m_source->setTargetPlayLatency(latframes); //!!! buh |
172 } | 172 } |
173 | 173 |
174 static float *output = 0; | 174 static float *output = 0; |
175 static float **tmpbuf = 0; | 175 static float **tmpbuf = 0; |