|
From: | RT |
Subject: | Re: Octave 4.0 crashing on audiowrite |
Date: | Sun, 8 May 2016 05:43:38 -0400 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |