Skip to content
Snippets Groups Projects
Commit 56aebb88 authored by yanmorin's avatar yanmorin
Browse files

Test with other portaudio flags
parent dd52e9d8
Branches
Tags
No related merge requests found
......@@ -86,10 +86,11 @@ AudioLayer::openDevice (int index)
2, portaudio::INT16, true,
portaudio::System::instance().deviceByIndex(index).defaultLowInputLatency(),
NULL);
// we could put 0 instead of FRAME_PER_BUFFER to be variable
portaudio::StreamParameters const params(inParams, outParams,
SAMPLING_RATE, FRAME_PER_BUFFER, paNoFlag);
SAMPLING_RATE, paFramesPerBufferUnspecified, paPrimeOutputBuffersUsingStreamCallback | paNeverDropInput /*paNoFlag*/);
// Create (and open) a new Stream, using the AudioLayer::audioCallback
_stream = new portaudio::MemFunCallbackStream<AudioLayer>(params,
......
......@@ -60,7 +60,7 @@ ToneThread::run (void) {
// How long do 'size' samples play ?
// let's play it a bit smaller that it should to put more inside the buffer
unsigned int play_time = _size / (SAMPLING_RATE/1000);
unsigned int play_time = _size / (SAMPLING_RATE/1000) - 20;
ManagerImpl& manager = Manager::instance();
manager.getAudioDriver()->flushMain();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment