本文整理汇总了C#中Microsoft.Xna.Framework.Audio.AudioEngine.GetRPC方法的典型用法代码示例。如果您正苦于以下问题:C# AudioEngine.GetRPC方法的具体用法?C# AudioEngine.GetRPC怎么用?C# AudioEngine.GetRPC使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Xna.Framework.Audio.AudioEngine
的用法示例。
在下文中一共展示了AudioEngine.GetRPC方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SoundHelper
public SoundHelper(AudioEngine audioengine, System.IO.BinaryReader reader)
{
_priority = reader.ReadInt32();
int volume = reader.ReadInt32();
double attenuation_in_db = volume / 100.0f;
GSGE.Debug.assert(attenuation_in_db <= 0);
gain = (float)Math.Pow(10, attenuation_in_db / 20.0);
GSGE.Debug.assert(gain <= 1.0f);
_pitch = (float)(reader.ReadInt32() / 100.0f);
int trackCount = reader.ReadInt32();
_tracks = new TrackHelper[trackCount];
for (int i = 0; i < trackCount; i++)
{
_tracks[i] = new TrackHelper(reader);
}
int strLen = reader.ReadInt16();
byte[] bytes = reader.ReadBytes((int)strLen);
string catname = Encoding.ASCII.GetString(bytes);
category = audioengine.GetCategory(catname);
int rpcCount = reader.ReadInt32();
rpcs = new RPCCurve[rpcCount];
for (int i = 0; i < rpcCount; i++)
{
strLen = reader.ReadInt16();
bytes = reader.ReadBytes((int)strLen);
string rpc = Encoding.ASCII.GetString(bytes);
rpcs[i] = audioengine.GetRPC(rpc);
}
strLen = reader.ReadInt16();
bytes = reader.ReadBytes((int)strLen);
effect = Encoding.ASCII.GetString(bytes);
}