annotate 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 |
|
rev |
line source |
samer@0
|
1 % audio_format - make javax.sound.sampled.AudioFormat object
|
samer@0
|
2 %
|
samer@0
|
3 % audio_format ::
|
samer@0
|
4 % N:natural ~'number of channels',
|
samer@0
|
5 % R:nonneg ~'sampling rate in Hz'
|
samer@0
|
6 % -> javax.sound.sampled.AudioFormat.
|
samer@0
|
7
|
samer@0
|
8 function f=audio_format(channels,rate,bits,bigendian)
|
samer@0
|
9 if isnan(channels), channels=-1; end
|
samer@0
|
10 if isnan(rate), rate=-1; end
|
samer@0
|
11 if nargin<3, bits=16; end
|
samer@0
|
12 if nargin<4, bigendian=false; end
|
samer@0
|
13 f=javax.sound.sampled.AudioFormat(rate,bits,channels,true,bigendian);
|