problems decoding MP3
John <[email protected]> Tue, 22 Oct 2019 20:49:58 +0100
| Newsgroups | gmane.comp.audio.mp3.lame |
|---|---|
| Message-ID | <[email protected]> |
I am fairly new to MP3 encoding/decoding but I have a task to add this to my project. I first implemented encoding and as far as I can tell that is working as expected, but my attempts to decode have hit a problem I do not understand. Decoding a mono MP3 file is OK except that there is a short silence at th start. When I try to decode a (joint) stereo file the left channel is correct (apart from a possible delay I have not chased yet) but the right channel is not. In the case of a simple sine wave I can see apparent jumps in phase with a regular pattern of about every 1100 samples. I am finding the documentation of the API a little difficult to follow. What I am doing is reading raw data into a buffer and calling hip_decode1_headers which seems to read the header information as expected. I have tried looked at the left and right arrays without enlightenment. After the first frame's worth (?) I use hip_decode1 after reading more raw data in a loop as I think the header should remain. Just to be clear I do no want to decode the whole file at once but in sections of my users' choice. I would appreciate any suggestions, comments or corrections. ==John ffitch