File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed 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