File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
examples-desktop/generator Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ add_executable (generator generator.cpp)
38
38
# use main() from arduino_emulator
39
39
target_compile_definitions (arduino_emulator PUBLIC -DDEFINE_MAIN )
40
40
41
+ target_compile_definitions (portaudio PUBLIC -DPA_USE_COREAUDIO=1 )
42
+
41
43
# specify libraries
42
44
target_link_libraries (generator portaudio_static arduino_emulator arduino-audio-tools )
43
45
Original file line number Diff line number Diff line change @@ -49,13 +49,16 @@ class PortAudioStream : public BufferedStream {
49
49
void begin (PortAudioConfig info) {
50
50
LOGD (__FUNCTION__);
51
51
this ->info = info;
52
+ LOGD (" Pa_Initialize" );
52
53
err = Pa_Initialize ();
54
+ LOGD (" Pa_Initialize - done" );
53
55
if ( err != paNoError ) {
54
56
LOGE ( " PortAudio error: %s\n " , Pa_GetErrorText ( err ) );
55
57
return ;
56
58
}
57
59
58
60
/* Open an audio I/O stream. */
61
+ LOGD (" Pa_OpenDefaultStream" );
59
62
err = Pa_OpenDefaultStream ( &stream,
60
63
info.is_input ? info.channels : 0 , /* no input channels */
61
64
info.is_output ? info.channels : 0 , /* stereo output */
@@ -68,6 +71,7 @@ class PortAudioStream : public BufferedStream {
68
71
nullptr , /* this is your callback function */
69
72
nullptr ); /* This is a pointer that will be passed to
70
73
your callback*/
74
+ LOGD (" Pa_OpenDefaultStream - done" );
71
75
if ( err != paNoError ) {
72
76
LOGE ( " PortAudio error: %s\n " , Pa_GetErrorText ( err ) );
73
77
}
You can’t perform that action at this time.
0 commit comments