本文整理汇总了C#中IALSource类的典型用法代码示例。如果您正苦于以下问题:C# IALSource类的具体用法?C# IALSource怎么用?C# IALSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IALSource类属于命名空间,在下文中一共展示了IALSource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DequeueSourceBuffers
public void DequeueSourceBuffers(
IALSource source,
int buffersToDequeue,
Queue<IALBuffer> errorCheck
)
{
// No-op, duh.
}
示例2: PlaySource
public void PlaySource(IALSource source)
{
// No-op, duh.
}
示例3: SetSourceVolume
public void SetSourceVolume(IALSource source, float volume)
{
AL10.alSourcef(
(source as OpenALSource).Handle,
AL10.AL_GAIN,
volume * SoundEffect.MasterVolume
);
#if VERBOSE_AL_DEBUGGING
CheckALError();
#endif
}
示例4: SetSourcePosition
public void SetSourcePosition(IALSource source, Vector3 pos)
{
AL10.alSource3f(
(source as OpenALSource).Handle,
AL10.AL_POSITION,
pos.X,
pos.Y,
pos.Z
);
#if VERBOSE_AL_DEBUGGING
CheckALError();
#endif
}
示例5: SetSourcePan
public void SetSourcePan(IALSource source, float pan)
{
AL10.alSource3f(
(source as OpenALSource).Handle,
AL10.AL_POSITION,
pan,
0.0f,
(float) Math.Sqrt(1 - Math.Pow(pan, 2))
);
#if VERBOSE_AL_DEBUGGING
CheckALError();
#endif
}
示例6: SetSourceLooped
public void SetSourceLooped(IALSource source, bool looped)
{
AL10.alSourcei(
(source as OpenALSource).Handle,
AL10.AL_LOOPING,
looped ? 1 : 0
);
#if VERBOSE_AL_DEBUGGING
CheckALError();
#endif
}
示例7: QueueSourceBuffer
public void QueueSourceBuffer(IALSource source, IALBuffer buffer)
{
uint buf = (buffer as OpenALBuffer).Handle;
AL10.alSourceQueueBuffers(
(source as OpenALSource).Handle,
(IntPtr) 1,
ref buf
);
#if VERBOSE_AL_DEBUGGING
CheckALError();
#endif
}
示例8: DequeueSourceBuffers
public void DequeueSourceBuffers(
IALSource source,
int buffersToDequeue,
Queue<IALBuffer> errorCheck
)
{
uint[] bufs = new uint[buffersToDequeue];
AL10.alSourceUnqueueBuffers(
(source as OpenALSource).Handle,
(IntPtr) buffersToDequeue,
bufs
);
#if VERBOSE_AL_DEBUGGING
CheckALError();
#endif
#if DEBUG
// Error check our queuedBuffers list.
IALBuffer[] sync = errorCheck.ToArray();
for (int i = 0; i < buffersToDequeue; i += 1)
{
if (bufs[i] != (sync[i] as OpenALBuffer).Handle)
{
throw new Exception("Buffer desync!");
}
}
#endif
}
示例9: SetSourcePosition
public void SetSourcePosition(IALSource source, Vector3 pos)
{
// No-op, duh.
}
示例10: SetSourcePan
public void SetSourcePan(IALSource source, float pan)
{
// No-op, duh.
}
示例11: SetSourceLooped
public void SetSourceLooped(IALSource source, bool looped)
{
// No-op, duh.
}
示例12: SetSourceVolume
public void SetSourceVolume(IALSource source, float volume)
{
// No-op, duh.
}
示例13: GetSourceState
public SoundState GetSourceState(IALSource source)
{
/* FIXME: This return value is highly volatile!
* You can't necessarily do Stopped, because then stuff like Song
* explodes, but SoundState.Playing doesn't make a whole lot of
* sense either. This at least prevents annoyances like Song errors
* from happening and, for the most part, claims to be "playing"
* depending on how you ask for a source's state.
* -flibit
*/
return SoundState.Paused;
}
示例14: ResumeSource
public void ResumeSource(IALSource source)
{
// No-op, duh.
}
示例15: PauseSource
public void PauseSource(IALSource source)
{
// No-op, duh.
}