Skip to content
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

测试录音然后播放opus文件发现声音急促 #18

Open
ncwuguowei opened this issue Nov 10, 2020 · 1 comment
Open

测试录音然后播放opus文件发现声音急促 #18

ncwuguowei opened this issue Nov 10, 2020 · 1 comment

Comments

@ncwuguowei
Copy link

非常感谢你写的这个demo,能够将pcm流编码为opus文件输出。目前测试中发现录音后播放文件听到声音比较急促,像是录制的声音间隔太长被截取导致。从日志中发现录制间隔较长,试着把录制的buffer调整为较小的320,然后每次直接全部wirteFrame,发现编码出来的声音不正常。目前没有十分了解opusaudio.c中实现int writeFrame(uint8_t *framePcmBytes, unsigned int frameByteCount) 的逻辑。实现中每次写入buffer编码后都调整文件头是否必须,能否在终止录音时再补充(不考虑中间异常退出情况)? 另外,实现中感觉像是每次写入是重采样,是否是需要的。
为何调整写入的buffer大小会造成编码出来的声音不正常?(demo中默认时1920)

@nn-firc
Copy link

nn-firc commented Feb 13, 2022

该项目貌似过时了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants