help-octave
[Top][All Lists]
Advanced

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

Re: Octave 4.0 crashing on audiowrite


From: RT
Subject: Re: Octave 4.0 crashing on audiowrite
Date: Sun, 8 May 2016 05:43:38 -0400

Ok bug report and work around submitted
https://savannah.gnu.org/bugs/index.php?47875

On Sat, May 7, 2016 at 3:17 PM, Mike Miller <address@hidden> wrote:
On Sat, May 07, 2016 at 11:04:34 -0400, RT wrote:
> Here's the link to the post I made not sure if they do Octave 4.0 help yet
> http://stackoverflow.com/questions/37090057/octave-4-0-crashing-on-audiowrite
>
> I'm trying to split up the long line of audiowrite but when I do Octave 4.0
> crashes I'm using Octave 4.0 on Ubuntu 16.04 64bit.
>
> audio_prop='BitsPerSample',16,'Artist','artist rt','Title','title
> section rt','Comment','Comments section rt';
> audiowrite('/tmp/test.wav',[sig_full_L(:) -1*sig_full_R(:)],44100,audio_prop)
>
> Can I not split it up this way if not how can I split it up?

Well, the syntax you've used here is assigning "BitsPerSample" to the
variable audio_prop, and then just evaluating some other values but not
assigning them to anything. Your sample code is equivalent to this:

  audio_prop = "BitsPerSample"
  ## some values that are not assigned to anything
  audiowrite("/tmp/test.wav", data, 44100, "BitsPerSample")

You probably want something like

  props = {name1, value1, name2, value2, …};
  audiowrite (filename, data, sample_rate, props{:})

Look through the Octave manual for usage of cell arrays and
variable-length argument lists.

But yes, the crash is a bug, please help and file a bug report if you
can.

--
mike


reply via email to

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