gpt4 book ai didi

objective-c - SKAudioNode的音量

转载 作者:行者123 更新时间:2023-12-02 23:33:56 26 4
gpt4 key购买 nike

我正在使用SKAudioNode播放游戏音乐。我想知道:节点的volume的最大值和最小值是多少?我正在使用SKAction进行更改:[SKAction changeVolumeTo:0 duration:0];非常感谢您的帮助!

最佳答案

如果您按ctrl键单击Xco​​de中对代码的操作,则会弹出其中包含参数的详细信息

class func changeVolume(to v: Float, duration: TimeInterval) ->SKAction

Description - Creates an action that changes an audio node’s volume toa new value. When the action executes, the audio node’s volumeanimates from its current value to its new value. For moreinformation, see AVAudio3DMixing.

This action - v The new value for the volume. The value should bebetween 0.0 (silence) and 1.0 (maximum value for source audio),inclusive.

duration - The duration of the animation, in seconds.

Returns A new action object.

SDKs iOS 9.0+, macOS 10.11+, tvOS 9.0+, watchOS 2.0+

关于objective-c - SKAudioNode的音量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48370505/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com