-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug修正 #9
base: master
Are you sure you want to change the base?
Bug修正 #9
Conversation
PockerKID
commented
Sep 1, 2020
- 修正单声道PCM转MP3播放变快的问题
- 修正只初始化一次时,多次调用转换只有第一次正常的问题
@PockerKID I have the exact bug that the converted MP3 file from an input WAV file has different durations and can't figure out why. Is it possible to use your PR as the library as it seems you fixed that bug? |
Hi @tim162 , I used this library four months ago to convert pcm or wav file to mp3, and i found that there would be problems when converting mono files, it‘s’ similar to issues #2 , #3 and #4 . After searching, I found this library does not handle mono conversion, so i forked and modified it refer to Audio speed changes on converting WAV to MP3 The other problem I fixed was related to multiple conversions. I have multiple files to convert. These files have the same sampling rate, sound channel and other parameters. I only called Mp3Converter.init method once, and found that only the first conversion was normal, so i modified it. I don’t know if your problem is caused by the above problems, you can download source code from my repo and compile aar file to try to solve your problem. (I tried to compile on Jitpack.io, but an error was reported. XD) |
@PockerKID Thanks for your help. I was able to compile your version to .aar and convert the files using your version. Unfortunately the duration of the converted .MP3 file is still different from the original .WAV file. I am using Changing channel to 2 makes the sound play faster. Am I doing sth wrong or maybe still bugs? |
Hi @tim162 , I tested some longer wav files and tried to convert them. The problem you mentioned did occur, but I'm sorry, I haven't found what caused the problem. Before, I mainly converted pcm to mp3. I rarely converted wav files. At the time, there were only a few short wav files, so I didn’t find this problem. |
@PockerKID Yeah thanks for your help! I also didn't find the cause of the problem. Nevertheless I would prefer using this library as it's very convenient and small (the other one increased apk size from 5 mb to 40 mb). So if anyone stumbles across that bug in the future and knows a fix, let me know. Thanks! |