SecondaryBuffer.SecondaryBuffer(Stream,Int32,BufferDescription,Device) Constructor (Microsoft.DirectX.DirectSound)
Initializes a new instance of the SecondaryBuffer class.
Definition
Visual Basic Public Sub New( _
ByVal source As Stream, _
ByVal length As Integer, _
ByVal desc As BufferDescription, _
ByVal parent As Device _
)C# public SecondaryBuffer(
Streamsource,
int length,
BufferDescription desc,
Device parent
);C++ public:
SecondaryBuffer(
Stream^ source,
int length,
BufferDescription^ desc,
Device^ parent
);JScript public function SecondaryBuffer(
source : Stream,
length : int,
desc : BufferDescription,
parent : Device
);
Parameters
source System.IO.Stream
A Streamobject that contains the source data for the buffer.
length System.Int32
An integer that represents the size of the buffer to create.desc Microsoft.DirectX.DirectSound.BufferDescription
A BufferDescription object that describes the buffer to create.parent Microsoft.DirectX.DirectSound.Device
A Device object that represents the parent device to use with the buffer.
Remarks
**Note: **If the method succeeds, to determine whether a requested 3-D algorithm was available or not, and stereo panning was substituted, check the Buffer.NotVirtualized property.
Microsoft DirectSound does not initialize the contents of the buffer, and the application cannot assume that it contains silence.
If an attempt is made to create a buffer with LocateInHardware set to true in the BufferDescription on a system where hardware acceleration is not available, the method fails throwing either ControlUnavailableException or InvalidCallException, depending on the operating system.
If an attempt is made to create a buffer with Control3D set to true in the BufferDescription and you attempt to load the buffer with a stero sound, the method fails throwing a ArgumentException
.
.gif)