当前位置: 首页>>代码示例>>C#>>正文


C# IALSource类代码示例

本文整理汇总了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.
        }
开发者ID:markmnl,项目名称:FNA-1,代码行数:8,代码来源:NullDevice.cs

示例2: PlaySource

		public void PlaySource(IALSource source)
		{
			// No-op, duh.
		}
开发者ID:BlueLineGames,项目名称:FNA,代码行数:4,代码来源:NullDevice.cs

示例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
 }
开发者ID:SaviorXTanren,项目名称:FNA,代码行数:11,代码来源:OpenALDevice.cs

示例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
 }
开发者ID:SaviorXTanren,项目名称:FNA,代码行数:13,代码来源:OpenALDevice.cs

示例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
 }
开发者ID:SaviorXTanren,项目名称:FNA,代码行数:13,代码来源:OpenALDevice.cs

示例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
 }
开发者ID:SaviorXTanren,项目名称:FNA,代码行数:11,代码来源:OpenALDevice.cs

示例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
 }
开发者ID:SaviorXTanren,项目名称:FNA,代码行数:12,代码来源:OpenALDevice.cs

示例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
        }
开发者ID:SaviorXTanren,项目名称:FNA,代码行数:27,代码来源:OpenALDevice.cs

示例9: SetSourcePosition

		public void SetSourcePosition(IALSource source, Vector3 pos)
		{
			// No-op, duh.
		}
开发者ID:BlueLineGames,项目名称:FNA,代码行数:4,代码来源:NullDevice.cs

示例10: SetSourcePan

		public void SetSourcePan(IALSource source, float pan)
		{
			// No-op, duh.
		}
开发者ID:BlueLineGames,项目名称:FNA,代码行数:4,代码来源:NullDevice.cs

示例11: SetSourceLooped

		public void SetSourceLooped(IALSource source, bool looped)
		{
			// No-op, duh.
		}
开发者ID:BlueLineGames,项目名称:FNA,代码行数:4,代码来源:NullDevice.cs

示例12: SetSourceVolume

		public void SetSourceVolume(IALSource source, float volume)
		{
			// No-op, duh.
		}
开发者ID:BlueLineGames,项目名称:FNA,代码行数:4,代码来源:NullDevice.cs

示例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;
		}
开发者ID:BlueLineGames,项目名称:FNA,代码行数:12,代码来源:NullDevice.cs

示例14: ResumeSource

		public void ResumeSource(IALSource source)
		{
			// No-op, duh.
		}
开发者ID:BlueLineGames,项目名称:FNA,代码行数:4,代码来源:NullDevice.cs

示例15: PauseSource

		public void PauseSource(IALSource source)
		{
			// No-op, duh.
		}
开发者ID:BlueLineGames,项目名称:FNA,代码行数:4,代码来源:NullDevice.cs


注:本文中的IALSource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。