[Pkg-octave-devel] Re: Bug#408268: marked as done (octave2.9-forge:
wavwrite writes invalid WAV files)
Rafael Laboissiere
rafael at debian.org
Sun Feb 4 21:11:39 CET 2007
* Thomas Weber <thomas.weber.mail at gmail.com> [2007-02-04 20:44]:
> Hi,
>
> Am Sonntag, den 04.02.2007, 10:48 -0800 schrieb Debian Bug Tracking
> System:
> > > According to the documentation:
> > >
> > > octave2.9:1> help wavwrite
> > > -- Function File: wavwrite(FILENAME, Y)
> > > Write Y to the canonical RIFF/WAVE sound file FILENAME. A sample
> > > rate of 8000 Hz and 16-bit samples are assumed. Each column of the
> > > data represents a separate channel.
> > >
> > > your input matrix must be organized in columns. The following code should
> > > do what you want:
> > >
> > > x = randn(65536, 1);
> > > wavwrite('noise.wav', x)
> > >
> > > I am therefore closing this bug report.
>
> Eh, in that case a file with only one channel should be written,
> shouldn't it?
Indeed:
$ octave2.9 -q
octave2.9:1> wavwrite('noise.wav', randn(65536,1));
warning: wavwrite: sample rate set to 8000 Hz
warning: wavwrite: sample resolution set to 16-bit
octave2.9:2> exit
$ file noise.wav
noise.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
$ ls -l noise.wav
-rw-r--r-- 1 rafael rafael 131116 2007-02-04 21:10 noise.wav
--
Rafael
More information about the Pkg-octave-devel
mailing list