SecondaryBuffer.SecondaryBuffer Constructor ()

Initializes a new instance of the SecondaryBuffer class.

Overload List

public SecondaryBuffer(BufferDescription, Device);
public SecondaryBuffer(Stream, BufferDescription, Device);
public SecondaryBuffer(Stream, Device);
public SecondaryBuffer(Stream, int, BufferDescription, Device);
public SecondaryBuffer(Stream, int, Device);
public SecondaryBuffer(string, BufferDescription, Device);
public SecondaryBuffer(string, Device);

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 ArgumentExceptionLeave Site.

Exceptions

AllocatedException The request failed because resources, such as a priority level, were already in use by another caller.
ArgumentExceptionLeave Site An invalid parameter was passed to the called method.
ArgumentNullExceptionLeave Site One or more of the parameters is null.
BadFormatException The specified wave format is not supported.
BufferTooSmallException The buffer size is not large enough to enable effects processing.
ControlUnavailableException The buffer control (volume, pan, and so on) requested by the caller is not available. Controls must be specified when the buffer is created.
InvalidCallException The method call is invalid for the current state of this object.
NoAggregationException The object does not support aggregation.
OutOfMemoryExceptionLeave Site DirectSound could not allocate sufficient memory to complete the call.
UnsupportedException The function called is not supported at this time.