audioboy77/OpenMP3

right channel is muted :(

Closed this issue · 5 comments

kirby.zip
I played this sound
but right channel is muted at first part

I copied OpenMP result to sound buffer like this

// readed - Buffer from OpenMP3
// nsample - from OpenMP3
// dest - Stereo sound buffer pointer
float * src1 = readed[0];
float * src2 = readed[1];
float src1_end = src1 + nsamples;
while (src1 != src1_end)
{
	*dest++ = (short)((*src1++) * SHRT_MAX);
	*dest++ = (short)((*src2++) * SHRT_MAX);
}

When i debug that, second channel is zero filled
image

Thanks for simple MP3 library!

lieff commented

Probably it's because actual data starts from 12523 byte. Correct ID3 skipping may help (or ID3 tag may be invalid).

lieff commented

I've checked other decoder, and it seems file handled correctly, ID3 skipped, stereo present:
image

#5
sound is corrected when i changed it!

can you submit the file, i will take a look

I uploaded sound file in first comment!