应用程序中的声音播放器会在声音结束时添加噪音/噼啪声 [英] Sound player in app adds a noise/crackle at the end of the sound

查看:61
本文介绍了应用程序中的声音播放器会在声音结束时添加噪音/噼啪声的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的声音播放器应用程序。 出于某种原因,在每个声音结束时,它们就像是一点噪音。 声音文件中不存在此噪音,使用8.1模拟器时也不会出现这种情况。 用户可以将每个声音
保存为铃声/通知。噪音不会发生在我的应用程序之外,如果用户将其保存为铃声,则不会发生噪音。所以这不是一个大问题,但是如果可以的话,我想修理它。

Ive got a simply sound player app.  For some reason, at the end of each sound, theres like a little blip of a noise.  This noise is not present in the sound files nor does this occur when using the 8.1 Emulator.  The users can save each sound as a ringtone/notification. The noise doesn't occur outside of my app, if the user saves it as a ringtone the noise does not occur. So it isnt a huge deal, but Id like to fix it if I can.

我的设备是Lumia 920并且正在运行WP 8.1开发者预览版。文件是mp3。


My device is a Lumia 920 and im running the WP 8.1 Developer Preview. The files are mp3.

有关寻找什么的建议可能导致此问题?

Any suggestions on what to look for that could cause this?

推荐答案

您好,

您听到的内容可能有多种原因。如果您使用的文件少于一秒,您可能会遇到缓冲区问题,您正在使用的音频播放器正在创建一个大的声音缓冲区并且没有填充零。
音频设备需要字节对齐的数据,一些未使用的缓冲区将被发送。如果你有小文件,你应该使用像XAudio 2这样的技术来播放它们。 XAudio 2针对小持续时间的音频文件进行了优化。

There could be multiple causes to what you are hearing. If the files that you are using are less than one second you can have buffer problems where the audio player you are using is creating a large sound buffer and it is not getting filled with zeros. The audio device requires byte aligned data and some of the unused buffer is getting sent down. If you have small files you should use a technology like XAudio 2 to play them back. XAudio 2 is optimized for small duration audio files.

另一种可能的情况是,您的音频不会以零交叉结束。由于数字音频的解码方式,未完全结束的音频可能会导致听到咔嗒声或砰砰声。如果您正在回放
来回放或重复播放相同的剪辑,这通常会更加明显。高端音频编辑器能够将波形锁定到零交叉点,以确保文件末尾没有伪像。

Another possiblitly is that your audio does not end with a zero crossing. Due to the way digital audio is decoded, audio that does not end cleanly can cause an audible click or pop. This is usually more pronounced if you are playing clips back to back or repeatedly playing the same clip. High end audio editors are able to lock the waveform to zero crossings to make sure that there is no artifact at the end of the file.

我希望这有帮助,

詹姆斯


这篇关于应用程序中的声音播放器会在声音结束时添加噪音/噼啪声的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆