EspoirX / StarrySky

🔥A Powerful and Streamline MusicLibrary(一个丰富的音乐播放封装库,支持多种音频格式,完美解决你的问题。)
https://github.com/EspoirX/StarrySky
MIT License
1.4k stars 211 forks source link

amr文件seekto无效 #218

Open lichenchenisapuppy opened 1 year ago

lichenchenisapuppy commented 1 year ago

使用amr格式的音频url播放的时候,seekto后会从头开始播放 测试步骤: 替换demo中TestActivity.kt第157行的url为任意一个amr文件的url复现

目前为找到原因,也未搜索到相关的issues,所以请大佬看看是否有什么办法处理,3q。 另外这个库个人感觉很好用

lichenchenisapuppy commented 1 year ago

aac的文件也不行 不知道是不是录制出来就不行
我试了下MP4 wav都可以 。

lichenchenisapuppy commented 1 year ago

mediarecorder对象如下设置时可以: setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); setAudioEncoder(MediaRecorder.AudioEncoder.AAC); 如果换成 setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR); setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB) 使用seekto的时候就不行了

0toN commented 9 months ago

mediarecorder对象如下设置时可以: setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); setAudioEncoder(MediaRecorder.AudioEncoder.AAC); 如果换成 setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR); setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB) 使用seekto的时候就不行了

mediarecorder对象在哪里设置呢?