本文整理汇总了C#中FMOD.Sound.setRaw方法的典型用法代码示例。如果您正苦于以下问题:C# Sound.setRaw方法的具体用法?C# Sound.setRaw怎么用?C# Sound.setRaw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FMOD.Sound
的用法示例。
在下文中一共展示了Sound.setRaw方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createStream
public RESULT createStream(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, ref Sound sound)
{
RESULT result = RESULT.OK;
IntPtr soundraw = new IntPtr();
Sound soundnew = null;
try
{
result = FMOD_System_CreateStream(systemraw, data, mode, ref exinfo, ref soundraw);
}
catch
{
result = RESULT.ERR_INVALID_PARAM;
}
if (result != RESULT.OK)
{
return result;
}
if (sound == null)
{
soundnew = new Sound();
soundnew.setRaw(soundraw);
sound = soundnew;
}
else
{
sound.setRaw(soundraw);
}
return result;
}
示例2: getSound
public RESULT getSound(int index, ref Sound sound)
{
RESULT result = RESULT.OK;
IntPtr soundraw = new IntPtr();
Sound soundnew = null;
try
{
result = FMOD_SoundGroup_GetSound(soundgroupraw, index, ref soundraw);
}
catch
{
result = RESULT.ERR_INVALID_PARAM;
}
if (result != RESULT.OK)
{
return result;
}
if (sound == null)
{
soundnew = new Sound();
soundnew.setRaw(soundraw);
sound = soundnew;
}
else
{
sound.setRaw(soundraw);
}
return result;
}
示例3: getCurrentSound
public RESULT getCurrentSound(ref Sound sound)
{
RESULT result = RESULT.OK;
IntPtr soundraw = new IntPtr();
Sound soundnew = null;
try
{
result = FMOD_Channel_GetCurrentSound(channelraw, ref soundraw);
}
catch
{
result = RESULT.ERR_INVALID_PARAM;
}
if (result != RESULT.OK)
{
return result;
}
if (sound == null)
{
soundnew = new Sound();
soundnew.setRaw(soundraw);
sound = soundnew;
}
else
{
sound.setRaw(soundraw);
}
return result;
}
示例4: createSound
// Sound/DSP/Channel creation and retrieval.
public RESULT createSound(string name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, ref Sound sound)
{
var result = RESULT.OK;
var soundraw = new IntPtr();
Sound soundnew = null;
mode = mode | MODE.UNICODE;
try
{
result = FMOD_System_CreateSound(systemraw, name_or_data, mode, ref exinfo, ref soundraw);
}
catch
{
result = RESULT.ERR_INVALID_PARAM;
}
if (result != RESULT.OK)
{
return result;
}
if (sound == null)
{
soundnew = new Sound();
soundnew.setRaw(soundraw);
sound = soundnew;
}
else
{
sound.setRaw(soundraw);
}
return result;
}
示例5: getSubSound
public RESULT getSubSound(int index, ref Sound subsound)
{
var result = RESULT.OK;
var subsoundraw = new IntPtr();
Sound subsoundnew = null;
try
{
result = FMOD_Sound_GetSubSound(soundraw, index, ref subsoundraw);
}
catch
{
result = RESULT.ERR_INVALID_PARAM;
}
if (result != RESULT.OK)
{
return result;
}
if (subsound == null)
{
subsoundnew = new Sound();
subsoundnew.setRaw(subsoundraw);
subsound = subsoundnew;
}
else
{
subsound.setRaw(subsoundraw);
}
return result;
}
示例6: IntPtr
public RESULT createStream (string name, MODE mode, ref Sound sound)
{
RESULT result = RESULT.OK;
IntPtr soundraw = new IntPtr();
Sound soundnew = null;
byte[] stringData;
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
stringData = Encoding.Unicode.GetBytes(name + Char.MinValue);
mode = mode | FMOD.MODE.UNICODE;
}
else
{
stringData = Encoding.UTF8.GetBytes(name + Char.MinValue);
}
try
{
result = FMOD_System_CreateStream(systemraw, stringData, mode, 0, ref soundraw);
}
catch
{
result = RESULT.ERR_INVALID_PARAM;
}
if (result != RESULT.OK)
{
return result;
}
if (sound == null)
{
soundnew = new Sound();
soundnew.setRaw(soundraw);
sound = soundnew;
}
else
{
sound.setRaw(soundraw);
}
return result;
}