Skip to content

Commit 9cf86a5

Browse files
committed
Correct return value of AudioOutI2SClass::canPlay
1 parent a0ad7f6 commit 9cf86a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/AudioOutI2S.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ int AudioOutI2SClass::canPlay(AudioIn& input)
3737
int bitsPerSample = input.bitsPerSample();
3838
int channels = input.channels();
3939

40-
if (bitsPerSample != 8 || bitsPerSample != 16 || bitsPerSample != 32) {
41-
return 1;
40+
if (bitsPerSample != 8 && bitsPerSample != 16 && bitsPerSample != 32) {
41+
return 0;
4242
}
4343

4444
if (channels != 2) {
45-
return 1;
45+
return 0;
4646
}
4747

48-
return 0;
48+
return 1;
4949
}
5050

5151
int AudioOutI2SClass::play(AudioIn& input)

0 commit comments

Comments
 (0)