Mercurial > forge
changeset 14:4cad27e73814 octave-forge
Don't rely on default for lin2mu
author | pkienzle |
---|---|
date | Mon, 29 Oct 2001 15:27:53 +0000 |
parents | c3f05dc96085 |
children | a6258505c1c5 |
files | main/audio/ausave.m |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/main/audio/ausave.m Wed Oct 24 01:26:13 2001 +0000 +++ b/main/audio/ausave.m Mon Oct 29 15:27:53 2001 +0000 @@ -21,6 +21,9 @@ ## .wav and .au layouts. Data is a matrix of audio samples, one row ## time step, one column per channel. Fs defaults to 8000 Hz. Format ## is one of ulaw, alaw, char, short, long, float, double + +## 2001-10-23 Paul Kienzle +## * force lin2mu to use [-1:1] regardless of its default function ausave(path, data, rate, sampleformat) if nargin < 2 || nargin>4 @@ -208,7 +211,7 @@ error("FIXME: ausave needs linear to alaw conversion\n"); precision = 'uchar'; elseif strcmp(sampleformat, 'ulaw') - data = lin2mu(data); + data = lin2mu(data, 0); precision = 'uchar' elseif strcmp(sampleformat, 'uchar') data = data*128 + 128;