% audio_format - make javax.sound.sampled.AudioFormat object
%
% audio_format :: 
%    N:natural ~'number of channels',
%    R:nonneg  ~'sampling rate in Hz'
% -> javax.sound.sampled.AudioFormat.

function f=audio_format(channels,rate,bits,bigendian)
	if isnan(channels), channels=-1; end
	if isnan(rate), rate=-1; end
	if nargin<3, bits=16; end
	if nargin<4, bigendian=false; end
	f=javax.sound.sampled.AudioFormat(rate,bits,channels,true,bigendian);
