File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,4 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/" # source directory
15
15
PATTERN "*.h" # select header files
16
16
)
17
17
18
- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /tests )
18
+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /tests EXCLUDE_FROM_ALL )
Original file line number Diff line number Diff line change @@ -64,12 +64,12 @@ class PortAudioStream : public BufferedStream {
64
64
};
65
65
66
66
// start with default configuration
67
- void begin () {
68
- begin (defaultConfig ());
67
+ bool begin () {
68
+ return begin (defaultConfig ());
69
69
}
70
70
71
71
// start with the indicated configuration
72
- void begin (PortAudioConfig info) {
72
+ bool begin (PortAudioConfig info) {
73
73
LOGD (LOG_METHOD);
74
74
this ->info = info;
75
75
@@ -79,7 +79,7 @@ class PortAudioStream : public BufferedStream {
79
79
LOGD (" Pa_Initialize - done" );
80
80
if ( err != paNoError ) {
81
81
LOGE ( " PortAudio error: %s\n " , Pa_GetErrorText ( err ) );
82
- return ;
82
+ return false ;
83
83
}
84
84
85
85
// calculate frames
@@ -99,11 +99,13 @@ class PortAudioStream : public BufferedStream {
99
99
LOGD (" Pa_OpenDefaultStream - done" );
100
100
if ( err != paNoError ) {
101
101
LOGE ( " PortAudio error: %s\n " , Pa_GetErrorText ( err ) );
102
+ return false ;
102
103
}
103
104
} else {
104
105
LOGI (" basic audio information is missing..." );
106
+ return false ;
105
107
}
106
-
108
+ return true ;
107
109
}
108
110
109
111
void end () {
You can’t perform that action at this time.
0 commit comments