octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #50315] audioplayer.play stops playback before


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #50315] audioplayer.play stops playback before end of input array
Date: Wed, 15 Feb 2017 17:02:52 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

Update of bug #50315 (project octave):

                  Status:                    None => Confirmed              
                 Summary: sound() function stops playback too early =>
audioplayer.play stops playback before end of input array

    _______________________________________________________

Follow-up Comment #2:

I can confirm something similar on Debian. Using your examples of tones at a
sample rate of 8 kHz, the second tone is not played at all if it is about 150
ms or less in duration.

Since sound() is just a wrapper around the audioplayer class, here is an
example that shows the same behavior for me using audioplayer.play directly:


fs = 8000;
y = [cos(2 * pi * 440 * (0:0.2 * fs) / fs), cos(2 * pi * 880 * (0:0.125 * fs)
/ fs)];
p = audioplayer (y, fs, 8);
play (p)


The truncation may be in the way Octave is feeding data to portaudio or it may
be in the portaudio library or in a lower layer. It should be possible to
debug the portaudio interaction in audiodevinfo.cc to see what conditions
cause the audio stream to stop, and whether Octave needs to make an additional
call to flush remaining data for example.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50315>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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