拙网论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 186|回复: 0

DirectSound播放音乐Buffer.Play

[复制链接]

949

主题

1001

帖子

3736

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3736
发表于 2018-7-19 20:13:10 | 显示全部楼层 |阅读模式

private Microsoft.DirectX.DirectSound.Buffer        m_SoundBuffer;                        // Holds a DirectSound SecondaryBuffer.

m_SoundBuffer.Play(0, BufferPlayFlags.Looping);

Member
Value
Description

TerminateByPriority
32
If the hardware has no available voices, a currently playing buffer will be stopped to make room for the new buffer. The buffer prematurely terminated will be the one with the lowest priority as set by the [color=var(--blue)]priority parameter [color=var(--blue)]Play method for the buffer.

TerminateByDistance
16
If the hardware has no available voices, a currently playing buffer will be stopped to make room for the new buffer. The buffer prematurely terminated will be selected from buffers that have the buffer's [color=var(--blue)]BufferDescription.Mute3DAtMaximumDistance property set to true and are beyond their maximum distance. If there are no such buffers, the method fails.

TerminateByTime
8
If the hardware has no available voices, a currently playing nonlooping buffer will be stopped to make room for the new buffer. The buffer prematurely terminated is the one with the least time left to play.

LocateInSoftware
4
Play this voice in a software buffer only. This flag cannot be combined with LocateInHardware or any voice management flag.

LocateInHardware
2
Play this voice in a hardware buffer only. If the hardware has no available voices and no voice management flags are set, the [color=var(--blue)]Play method fails. This flag cannot be combined with LocateInSoftware.

Looping
1
After the end of the audio buffer is reached, play restarts at the beginning of the buffer. Play continues until explicitly stopped. This flag must be set when playing a primary buffer.

Default
0
Play this voice with the default settings.

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|抱朴守拙BBS

GMT+8, 2025-5-26 05:02 , Processed in 0.185689 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表