为声音添加延迟

发布于 2024-09-14 23:30:46 字数 255 浏览 5 评论 0原文

我将在 Silverlight 中编写一个由 2 个线程组成的应用程序,一个用于播放声音,另一个用于录制声音。录制的内容就是播放的内容加上一些环境噪音。

问题是Silverlight给要播放的声音添加了延迟,并且因为我不知道这个延迟是多少,所以我无法准确地知道录制某些内容时播放了什么。

您知道我在哪里可以找到有关此延迟的更多信息(它是多少,它是否恒定,如果我重新启动应用程序或计算机,它会改变吗?在不同的计算机中是否相同,...),或者如何我测量的精度是1ms?

I'm going to write an application in Silverlight that consists of 2 threads, one that plays sound and another that records sound. And whatever is recorded will be what was played plus some ambient noise.

The problem is that Silverlight adds a delay to the sound to be played, and because I don't know how much is this delay, I would not know precisely what was played when something is recorded.

Do you know where I can find more information about this delay (how much is it, is it constant, will it change if I restart my application or computer, will it be the same in different computers, ...), or how could I measure it with an accuracy of 1 ms?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

策马西风 2024-09-21 23:30:46

要测量延迟,您可以播放某种形式的生成声音(例如振幅递增的正弦波),捕获它并匹配输入和输出信号。

延迟本身是一个复杂的问题,尤其是在处理低延迟时。构建延迟涉及很多因素,包括 SL 本身、音频堆栈、操作系统和音频硬件。一些附加信息是 在这里

To measure the delay you can play some form of generated sound (like sin wave with increasing amplitudes), capture it and match input and output signals.

The delay itself is a complicated matter especially when dealing with low latencies. There are a lot of things involved in building delay including SL itself, audio stack, OS and audio hardware. Some additional info is here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文