view audio/audio_format.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents 672052bd81f8
children
line wrap: on
line source
% 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);