Skip to content

Commit 16818ec

Browse files
committed
sound problem, if channels = 1
schreibfaul1/ESP32-MiniWebRadio#470
1 parent 765e535 commit 16818ec

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Audio.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*
44
* Created on: Oct 26.2018
55
*
6-
* Version 3.0.12c
7-
* Updated on: Jul 28.2024
6+
* Version 3.0.12d
7+
* Updated on: Jul 29.2024
88
* Author: Wolle (schreibfaul1)
99
*
1010
*/
@@ -2409,7 +2409,7 @@ void Audio::playChunk() {
24092409
s2[LEFTCHANNEL] += 0x8000;
24102410
s2[RIGHTCHANNEL] += 0x8000;
24112411
}
2412-
i += m_channels;
2412+
i += m_bitsPerSample == 16 ? 2 : 1;
24132413
validSamples -= 1;
24142414
}
24152415
if(audio_process_i2s) {

src/Audio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*
44
* Created on: Oct 28,2018
55
*
6-
* Version 3.0.12c
7-
* Updated on: Jul 28.2024
6+
* Version 3.0.12d
7+
* Updated on: Jul 29.2024
88
* Author: Wolle (schreibfaul1)
99
*/
1010

0 commit comments

Comments
 (0)