Skip to content

Commit 63d72d6

Browse files
committed
Additional Log messages
1 parent 1cb23cf commit 63d72d6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

examples-desktop/generator/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ add_executable (generator generator.cpp)
3838
# use main() from arduino_emulator
3939
target_compile_definitions(arduino_emulator PUBLIC -DDEFINE_MAIN)
4040

41+
target_compile_definitions(portaudio PUBLIC -DPA_USE_COREAUDIO=1)
42+
4143
# specify libraries
4244
target_link_libraries(generator portaudio_static arduino_emulator arduino-audio-tools)
4345

src/AudioTools/PortAudioStream.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,16 @@ class PortAudioStream : public BufferedStream {
4949
void begin(PortAudioConfig info) {
5050
LOGD(__FUNCTION__);
5151
this->info = info;
52+
LOGD("Pa_Initialize");
5253
err = Pa_Initialize();
54+
LOGD("Pa_Initialize - done");
5355
if( err != paNoError ) {
5456
LOGE( "PortAudio error: %s\n", Pa_GetErrorText( err ) );
5557
return;
5658
}
5759

5860
/* Open an audio I/O stream. */
61+
LOGD("Pa_OpenDefaultStream");
5962
err = Pa_OpenDefaultStream( &stream,
6063
info.is_input ? info.channels : 0, /* no input channels */
6164
info.is_output ? info.channels : 0, /* stereo output */
@@ -68,6 +71,7 @@ class PortAudioStream : public BufferedStream {
6871
nullptr, /* this is your callback function */
6972
nullptr ); /*This is a pointer that will be passed to
7073
your callback*/
74+
LOGD("Pa_OpenDefaultStream - done");
7175
if( err != paNoError ) {
7276
LOGE( "PortAudio error: %s\n", Pa_GetErrorText( err ) );
7377
}

0 commit comments

Comments
 (0)