Skip to content

Commit 23ee309

Browse files
committed
2 parents 05dd1b9 + 6c2a774 commit 23ee309

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/" # source directory
1515
PATTERN "*.h" # select header files
1616
)
1717

18-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests)
18+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests EXCLUDE_FROM_ALL)

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)