Microsoft SDK for Java

getFormat

The getFormat method of the DirectSoundBuffer Class contains the following signatures:

getFormat(byte[] format, int size)
getFormat()

getFormat(byte[] format, int size)

Retrieves a description of the format of the sound data in the buffer.

Syntax

public void getFormat(byte[] format, int size);

Parameters

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.

Remarks

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.

See Also

getFormatSize, setFormat

getFormat()

Retrieves a description of the format of the sound data in the buffer.

Syntax

public WaveFormatEx getFormat();

Return Value

Returns the WaveFormatEx object if successful; null otherwise.

See Also

setFormat

© 1999 Microsoft Corporation. All rights reserved. Terms of use.