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


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


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


Loading…
Cancel
Save