当前位置: 首页 > 工具软件 > Sound Board > 使用案例 >

DirectSound学习(三)--类、方法、属性翻译

艾令秋
2023-12-01

DirectSound.Device :Contains methods and properties used to create buffer objects, manage devices, and set up the environment.
包含用于创建缓冲区对象,管理设备的方法和属性,并设置环境。
方法:
Method Description
Compact This method has no effect.
没有解释
Device Initializes a new instance of the Device class.
初始化Device的新实例。
Dispose Immediately releases the unmanaged resources used by the Device object.
立即处理发布的设备对象使用非托管资源。
Equals Returns a value that indicates whether the current instance is equal to a specified object.
返回一个值,表示当前实例是否等于指定的对象。
Finalize Allows the Device object to free resources before it is destroyed by the garbage collector.
确定允许的设备对象免费资源之前,它是由垃圾回收器销毁。
GetHashCode Returns the hash code for the current instance.
返回HashCode的当前实例。
GetObjectByValue This member supports the infrastructure for Microsoft DirectX 9.0 for Managed Code and is not intended to be used directly from your code.
这个成员支持微软DirectX 9的基础设施托管代码,不应在代码中直接使用。
raise_Disposing Raises the Device.Disposing event when called from within a derived class.
提高装置处理事件。当调用派生类中。
SetCooperativeLevel Sets the cooperative level of the application for this sound device.
设置此声音装置应用的合作水平。
属性:
Property Description
Caps Retrieves the capabilities of the hardware device.
检索硬件设备的能力。
Certified Ascertains whether the device driver is certified for DirectX.
注册确认设备驱动注册DirectX。
Disposed Gets a value that indicates whether the object is disposed.
设置获取一个值,指示对象是否设置。
SpeakerConfig Retrieves or sets the speaker configuration of the device.
检索或设置设备的扬声器配置。

DirectSound.BufferPositionNotify :Contains properties that describe a notification position.
包含描述通知位置属性。
方法:
Method Description
BufferPositionNotify Initializes a new instance of the BufferPositionNotify structure.
初始化的bufferpositionnotify结构的一个新实例。
属性:
Property Description
EventNotifyHandle Retrieves and sets the handle to the event to be signaled when the offset has been reached.
检索和设置事件句柄来通知时,偏移量已达到。
Offset Retrieves and sets the offset from the beginning of the buffer where the notify event is to be triggered, or PositionNotifyFlag.OffsetStop.
检索和设置偏移的缓冲,通知事件被触发的开始或positionnotifyflag.offsetstop。

DirectSound.WaveFormat: Contains properties that define the format of waveform-audio data.
包含的属性定义了波形音频数据格式。
方法:
Method Description
ToString Obtains a string representation of the current instance.
获得当前实例的字符串形式
WaveFormat Initializes a new instance of the WaveFormat sturcture.
初始化WaveFormat的一个新实例。

属性:
Property Description
AverageBytesPerSecond Retrieves and sets the required average data-transfer rate, in bytes per second, for the format type.
音频数据传送速率(bit):采样率*每次采样大小
BitsPerSample Retrieves and sets the bits per sample for the format type.
每个声道的采样精度; 譬如 16bit 在这里的值就是16。
如果有多个声道,则每个声道的采样精度大小都一样的。
BlockAlign Retrieves and sets the minimum atomic unit of data, in bytes, for the format type.
检索和设置每次采样的大小 = 采样精度*声道数/8(单位是字节); 
这也是字节对齐的最小单位, 譬如 16bit 立体声在这里的值是 4 字节。播放软件需要
一次处理多个该值大小的字节数据,以便将其值用于缓冲区的调整。
Channels Retrieves and sets the number of channels in the waveform-audio data, for the format type.
检索和设置波形音频数据声道数,单声道为1,双声道为2
FormatTag Retrieves and sets the waveform-audio format type, for the format type.
检索和设置波形音频格式,音频数据的编码方式。1 表示是 PCM 编码。
SamplesPerSecond Retrieves and sets the sample rate, in samples per second (hertz), for the format type.
检索和设置采样率(每秒样本数), 比如 44100hz 等

DirectSound.BufferDescription :Contains properties and methods that describe the characteristics of a new buffer object.
包含的属性和方法,描述了一个新的缓冲区对象的特点。
方法:
Method Description
BufferDescription Initializes a new instance of the BufferDescription class.
初始化一个新的BufferDescription实例.
Dispose Immediately releases the unmanaged resources used by the BufferDescription object.
立即释放由bufferdescription对象使用的非托管资源.
Finalize Allows the BufferDescription object to free resources before it is destroyed by the garbage collector.
让bufferdescription对象释放资源之前,由垃圾回收器销毁。
属性:
Property Description
BufferBytes Retrieves or sets the size of the new buffer.
检索或设置新的buffer.
CanGetCurrentPosition Determines whether the application can get a more accurate play cursor.
确定应用程序是否可以得到更准确的playCursor。
Control3D Determines whether the buffer has 3-D control capability.
检索buffer是否有Control3D的能力
ControlEffects Specifies whether the buffer supports effects processing.
指定buffer支持效果处理能力。
ControlFrequency Specifies whether the buffer has frequency control capability.
指定buffer具有频率控制能力。
ControlPan Specifies whether the buffer has pan control capability.
指定buffer具有云台控制能力。
ControlPositionNotify Specifies whether the buffer has position notification capability.
指定buffer位置通知的能力。
ControlVolume Specifies whether the buffer has volume control capability.
指定buffer有音量控制能力。
DeferLocation Specifies whether the buffer can be assigned to a hardware or software resource at play time.
指定的buffer可以被分配到在游戏时间的硬件或软件资源。
Flags Retrieves or sets the capabilities of the buffer.
检索或设置缓冲能力。
Format Retrieves or sets the the waveform format for the buffer.
检索或设置buffer的波形格式。
GlobalFocus Specifies whether the buffer is a global sound buffer.
指定buffer是一个全局的buffer
Guid3DAlgorithm Retrieves or sets the unique identifier of the two-speaker virtualization algorithm to be used by DirectSound3D hardware emulation.
检索或设置两个扬声器虚拟化算法的唯一标识符是由DirectSound3D硬件仿真应用。
LocateInHardware Specifies whether the buffer must use hardware mixing.
指定buffer必须使用硬件混合。
LocateInSoftware Specifies whether the buffer must use software memory and use software mixing, even if BufferDescription.StaticBuffer is specified and hardware resources are available.
指定buffer必须使用软件存储和使用软件的混合,即使bufferdescription.staticbuffer指定硬件资源可用。
Mute3DAtMaximumDistance Specifies whether the sound is reduced to silence at the maximum distance.
指定是否声音沉默下来的最大距离。
PrimaryBuffer Specifies whether the buffer is a primary sound buffer.
指定buffer是一个主缓冲区
StaticBuffer Specifies whether the buffer is placed in on-board hardware memory, if available.
指定buffer被放置在板上的硬件内存,如果可用的话。
StickyFocus Specifies whether the buffer has sticky focus.
指定buffer静态的焦点。

DirectSound.SecondaryBuffer : 包含用于管理缓存,可以支持声音效果的方法和属性。
方法:
Method Description
AcquireResources Allocates resources for a SecondaryBuffer object that was created with the DeferLocation flag set in the BufferDescription.
配置secondarybuffer对象,设置bufferdescription并创建deferlocation标示
Clone Duplicates the SecondaryBuffer object.
复制SecondaryBuffer对象
Clone Duplicates the buffer object. Inherited from Buffer.
复制buffer对象,继承于buffer
Dispose Immediately releases the unmanaged resources used by the SecondaryBuffer object.
立即释放由secondarybuffer对象使用的非托管资源。
Equals Returns a value that indicates whether the current instance is equal to a specified object.
返回一个值,表示当前实例是否等于指定的对象。
Finalize Allows the SecondaryBuffer object to free resources before it is destroyed by the garbage collector.
让secondarybuffer对象释放资源之前,由垃圾回收器销毁。
GetCurrentPosition Retrieves the position of the play and write cursors in the sound buffer. Inherited from Buffer.
检索播放位置和声音缓冲区的writeCursors(写游标)的位置。继承于buffer。
GetEffects Retrieves a Microsoft DirectSound effect object or objects from a SecondaryBuffer object.
从secondarybuffer对象中检索一个Microsoft.DirectSound对象的效果。
GetHashCode Returns the hash code for the current instance.
返回当前实例的HashCode
GetObjectByValue This member supports the infrastructure for Microsoft DirectX 9.0 for Managed Code and is not intended to be used directly from your code.
这个成员支持微软DirectX 9的基础设施托管代码,不应在代码中直接使用。
GetObjectInPath Retrieves a DirectSound effect object at a particular index from a SecondaryBuffer object.
通过DirectSound对象的索引获取SecondaryBuffer对象的位置
Play Begin playing the sound buffer, starting at the play cursor. Inherited from Buffer.
开始播放sound buffer,开启play cursor。继承于Buffer。
raise_Disposing Raises the SecondaryBuffer.Disposing event when called from within a derived class.
提高secondarybuffer。处理事件时调用派生类中。
Read Reads the current data in the buffer. Inherited from Buffer.
在buffer中读取current位置,继承于Buffer
Restore Restores the memory allocation for a lost sound buffer. Inherited from Buffer.
恢复sound buffer的最后内存分配。继承于Buffer。
SecondaryBuffer Initializes a new instance of the SecondaryBuffer class.
初始化一个新的SecondaryBuffer实例
SetCurrentPosition Sets the position of the play cursor, which is the point at which the next byte of data is read from the buffer. Inherited from Buffer.
获取play cursor的位置,下一个字节仍在buffer中读取,继承于Buffer
SetEffects Enables effects on a SecondaryBuffer object.
获取SecondaryBuffer对象中effects的状态
Stop Causes the sound buffer to stop playing. Inherited from Buffer.
停止播放。继承于Buffer
Write Writes data to the buffer. Inherited from Buffer.
将数据写入buffer中。继承于Buffer
属性:
Property Description
Caps Retrieves the capabilities of the buffer object. Inherited from Buffer.
在buffer对象中检索capbilities,继承于Buffer
Disposed Gets a value that indicates whether the object is disposed.
获取一个值,指示对象是否可以设置
Format Retrieves or sets a description of the sound data format in the buffer. Inherited from Buffer.
检索或设置描述buffer中的音频数据格式。继承于Buffer。
Frequency Retrieves or sets the frequency, in samples per second, at which the buffer is playing. Inherited from Buffer.
检索或设置frequency(频率),在每秒采样,在缓冲播放。继承于Buffer。
NotVirtualized Retrieves a value that indicates whether the buffer is virtualized. Inherited from Buffer.
返回一个值,指示是否是虚拟缓冲区。继承于Buffer
Pan Retrieves or sets the relative volume of the left and right audio channels. Inherited from Buffer.
检索或设置左、右声道的相对量。
PlayPosition Retrieves the position of the play cursor in the sound buffer. Inherited from Buffer.
检索或设置play cursor(play游标)的的位置在sound buffer中
Status Retrieves the status of the sound buffer. Inherited from Buffer.
检索或设置的声音缓冲区的状态
Volume Retrieves or sets the attenuation of the sound. Inherited from Buffer.
检索或设置声音的衰减。
WritePosition Retrieves the position of the write cursor in the sound buffer. Inherited from Buffer.
检索或设置write cursor的位置在sound buffer中

 类似资料: