最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c - How to optimize audio playback for lowest latency using the Waveform API? - Stack Overflow

programmeradmin3浏览0评论

I'm working with a 2-channel, 32-bit float, 44100 Hz audio format and using float chunks[2][2048*8] for smooth playback. Currently, this chunk size is the smallest that can play without distortion, although sometimes I need to restart the program to eliminate distortion. When using a chunk for example size of 2048*5 it's choppy but if i re-run couple of times, it plays smoothly.

In an attempt to improve performance, I implemented a thread for the callback function, but this did not resolve the problem. I also created a separate test project with only audio output, where the system handled a chunk size of 3000 floats without issue. However, I'm unable to replicate this performance in my main media player project, and I need advice on how to optimize for consistent low-latency playback without sacrificing smoothness.

Any suggestions on how to improve latency and stability for small chunk sizes in my media player?

发布评论

评论列表(0)

  1. 暂无评论