WaveFormat.BlockAlign Property (Microsoft.DirectX.DirectSound)

Retrieves and sets the minimum atomic unit of data, in bytes, for the format type.

Definition

Visual Basic Public Property BlockAlign As Short
C# public short BlockAlign { get; set; }
C++ public:
property short BlockAlign {
        short get();
        void set(short value);
}
JScript public function get BlockAlign() : short
public function set BlockAlign(short);

Property Value

System.Int16
The minimum atomic unit of data, in bytes, for the format type.

This property is read/write. 

Remarks

The value of the BlockAlign property must be equal to the product of Channels and BitsPerSample divided by 8 (bits per byte).

Software must process a multiple of BlockAlign bytes of data at a time. Data written to and read from a device must always start at the beginning of a block. For example, it is illegal to start playback of Pulse Code Modulation (PCM) data in the middle of a sample (that is, on a non-block-aligned boundary).