Skip to content

Commit ea3c344

Browse files
committed
quality problems
1 parent 16b1c20 commit ea3c344

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/AACDecoderHelix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ class AACDecoderHelix : public CommonHelix {
8787
/// decods the data and removes the decoded frame from the buffer
8888
void decode(Range r) {
8989
LOG(Debug, "decode %d", r.end);
90-
int len = r.end;
91-
int bytesLeft = r.end; //r.end; //r.end; // buffer_size
90+
int len = buffer_size - r.start;
91+
int bytesLeft = len;
9292
uint8_t* ptr = frame_buffer + r.start;
9393

9494
int result = AACDecode(decoder, &ptr, &bytesLeft, pwm_buffer);

src/MP3DecoderHelix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ class MP3DecoderHelix : public CommonHelix {
107107
/// decods the data
108108
void decode(Range r) {
109109
LOG(Debug, "decode %d", r.end);
110-
int len = r.end;
111-
int bytesLeft = r.end-r.start; //r.end; //r.end; // buffer_size
110+
int len = buffer_size - r.start;
111+
int bytesLeft = len;
112112
uint8_t* ptr = frame_buffer + r.start;
113113

114114
int result = MP3Decode(decoder, &ptr, &bytesLeft, pwm_buffer, mp3_type);

0 commit comments

Comments
 (0)