Skip to content

Commit 7b7506b

Browse files
committed
PortAudio compile error
1 parent aae2af9 commit 7b7506b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/AudioLibs/PortAudioStream.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ class PortAudioStream : public BufferedStream {
6464
};
6565

6666
// start with default configuration
67-
void begin() {
68-
begin(defaultConfig());
67+
bool begin() {
68+
return begin(defaultConfig());
6969
}
7070

7171
// start with the indicated configuration
72-
void begin(PortAudioConfig info) {
72+
bool begin(PortAudioConfig info) {
7373
LOGD(LOG_METHOD);
7474
this->info = info;
7575

@@ -79,7 +79,7 @@ class PortAudioStream : public BufferedStream {
7979
LOGD("Pa_Initialize - done");
8080
if( err != paNoError ) {
8181
LOGE( "PortAudio error: %s\n", Pa_GetErrorText( err ) );
82-
return;
82+
return false;
8383
}
8484

8585
// calculate frames
@@ -99,11 +99,13 @@ class PortAudioStream : public BufferedStream {
9999
LOGD("Pa_OpenDefaultStream - done");
100100
if( err != paNoError ) {
101101
LOGE( "PortAudio error: %s\n", Pa_GetErrorText( err ) );
102+
return false;
102103
}
103104
} else {
104105
LOGI("basic audio information is missing...");
106+
return false;
105107
}
106-
108+
return true;
107109
}
108110

109111
void end() {

0 commit comments

Comments
 (0)