format
Formats this wave with the specified sample rate, sample size, and number of channels, which can be set to any positive integer values.
After calling this function, the wave will be modified to have the specified sample rate, sample size, and number of channels. The audio data of the wave will be resampled and reformatted accordingly to match the new format.
Parameters
sample Rate
The sample rate to format the wave with, which must be a positive integer.
sample Size
The sample size to format the wave with, which must be a positive integer.
channels
The number of channels to format the wave with, which must be a positive integer.
Throws
Illegal Argument Exception
if the sample rate, sample size, or channels are not positive integers.