Browse Source

Add debug messages to Audio Interface

tags/v0.5.0
Andrew Belt 7 years ago
parent
commit
046861c858
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/core/AudioInterface.cpp

+ 4
- 0
src/core/AudioInterface.cpp View File

@@ -265,6 +265,7 @@ void AudioInterface::openDevice(int deviceId, float sampleRate, int blockSize) {

try {
// Don't use stream parameters if 0 input or output channels
debug("Opening audio stream %d", deviceId);
stream.openStream(
numOutputs == 0 ? NULL : &outParameters,
numInputs == 0 ? NULL : &inParameters,
@@ -276,6 +277,7 @@ void AudioInterface::openDevice(int deviceId, float sampleRate, int blockSize) {
}

try {
debug("Starting audio stream %d", deviceId);
stream.startStream();
}
catch (RtAudioError &e) {
@@ -293,7 +295,9 @@ void AudioInterface::closeDevice() {

if (stream.isStreamOpen()) {
try {
debug("Aborting audio stream %d", deviceId);
stream.abortStream();
debug("Closing audio stream %d", deviceId);
stream.closeStream();
}
catch (RtAudioError &e) {


Loading…
Cancel
Save