octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GSoC audio callbacks


From: Mike Miller
Subject: Re: GSoC audio callbacks
Date: Mon, 2 Sep 2013 14:41:07 -0400

On Mon, Sep 2, 2013 at 16:58:16 +0300, Vytautas Jancauskas wrote:
> I only get this problem with ogg files. Can you send me wav or flac
> files that give bad results? I tried with several different ones and
> they seem to load fine, stereo or otherwise.

Sure, the following gives me exactly one second of good audio followed
by one second of corrupted audio in the matrix y.

Fs = 44100;
t = [0:2*Fs-1]'./Fs;
x = cos (2*pi*440*t);
audiowrite ("onechan.wav", x, Fs);
system ("sndfile-interleave onechan.wav onechan.wav -o combined.wav");
y = audioread ("combined.wav");
p = audioplayer (y, Fs);
play (p);
plot (y);
axis ([0 2*Fs -2 2]);

Stereo files written with audiowrite also contain only half the number
of samples that are in the original matrix.

-- 
mike


reply via email to

[Prev in Thread] Current Thread [Next in Thread]