【问题标题】:is it safe to use out of bounds SimpleAudioEngine volume ranges?使用越界的 SimpleAudioEngine 音量范围是否安全?
【发布时间】:2013-03-18 22:35:06
【问题描述】:

我有几行。
第 2 行已记录在案。
第一行越界了,它确实有效。

尽管文档和其他 QA 说范围是 0f 到 1f :
在更高的音量上,比如 20、30;确实增加了音效的音量。所以它起作用了。

正常吗?或者可能是一个错误? 如果我使用超出文档中给出的范围可能会很危险吗?例如:setEffectsVolume:15f 而不是 0f-1f 范围?

    //this is undocumented also out of bounds,somehow really increases volume to 6x.
    1. [SimpleAudioEngine sharedEngine].effectsVolume=6.0f;

    //this is normal because inbounds of range
    2. [SimpleAudioEngine sharedEngine].effectsVolume=.2;

【问题讨论】:

    标签: audio cocos2d-iphone range volume simpleaudioengine


    【解决方案1】:

    可能(并且将会)发生的最坏情况是音频质量下降。

    音量级别 1.0f 表示效果以其录制的音量播放(分别以数字方式存储)。上面的一切都会使声音播放得更响亮,但会放大失真。将其视为缩放图像,您会注意到随着放大,它会丢失细节。效果相同。

    【讨论】:

      猜你喜欢
      • 2011-12-08
      • 2021-02-25
      • 2017-08-18
      • 1970-01-01
      • 1970-01-01
      • 2018-09-27
      • 1970-01-01
      • 1970-01-01
      • 2010-09-20
      相关资源
      最近更新 更多