The getFormat method of the DirectSoundBuffer Class contains the following signatures:
getFormat(byte[] format, int size)
getFormat()
Retrieves a description of the format of the sound data in the buffer.
public void getFormat(byte[] format, int size);
format | Array variable that receives a description of the sound data in the buffer. |
size | Length of the array assigned to v1. DirectSound writes, at most, insz bytes to that array. |
Before retrieving the format description, always use the getFormatSize method to query the DirectSoundBuffer object for the size of the format. Use this size to create an array of sufficient length to receive the format description.
Retrieves a description of the format of the sound data in the buffer.
public WaveFormatEx getFormat();
Returns the WaveFormatEx object if successful; null otherwise.