AudioSetPitch

格式

AudioSetPitch(soundId, pitch)

简介

设置声音仰角弧度。

参数

名称 类型 描述
soundId int 声音对应ID
pitch float 仰角弧度

实例

运行开始时设置声音仰角弧度为1

import fg
import wx

asset = fg.AssetCreate()
asset.name = 'Main Scene'
asset.state = fg.STATE.VOXMODEL
asset.vmFile = 'mainScene'
asset.icon='icon.png'

fg.AssetRegister(asset)

def onStart(self):
    sound=wx.AudioCreate("BGM.mp3",True)
    wx.AudioSetPitch(sound, 1)

fg.AssetSetStartCBFunc(asset, onStart)