[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gsoc2013 octave audio system
From: |
Mike Miller |
Subject: |
Re: gsoc2013 octave audio system |
Date: |
Thu, 18 Apr 2013 10:38:19 -0400 |
On Thu, Apr 18, 2013 at 8:39 AM, Vytautas Jancauskas wrote:
> Added an audiodevinfo.cc file. It provides the following functionality:
>
> devinfo = audiodevinfo;
> devinfo.('output');
>
> will return the list of structures for each output device, 'output'
> can be substituted for 'input'. I will implement full functionality of
> matlabs audiodevinfo
> (http://www.mathworks.se/help/matlab/ref/audiodevinfo.html) to include
> as part of the GSoC proposal and leave audioplayer, audiorecorder and
> fixing the legacy functionality for the program itself if the proposal
> gets accepted.
>
> In the code above if I try to simply type devinfo in to the command
> line octave I get the following output for some reason:
>
> devinfo =
>
> scalar structure containing the fields:
>
> input =
>
> error: octave_base_value::print (): wrong type argument `cs-list'
>
> output =
>
> error: octave_base_value::print (): wrong type argument `cs-list'
>
> Is the normal or am I using the wrong structure for an array of structures?
Yes, you are using the type that is mostly used for lists of function
arguments and return values. You should be using an array type
instead. You can convert the octave_value_list to an array like this:
diff --git a/src/audiodevinfo.cc b/src/audiodevinfo.cc
--- a/src/audiodevinfo.cc
+++ b/src/audiodevinfo.cc
@@ -32,8 +32,8 @@
output.append(dinfo);
}
}
- devinfo.assign("input", input);
- devinfo.assign("output", output);
+ devinfo.assign("input", input.array_value());
+ devinfo.assign("output", output.array_value());
return octave_value(devinfo);
error:
return octave_value();
--
mike
- Re: gsoc2013 octave audio system, (continued)
- Re: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/17
- Re: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/17
- Re: gsoc2013 octave audio system, pantxo diribarne, 2013/04/17
- Re: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/17
- Re: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/17
- Re: gsoc2013 octave audio system, pantxo diribarne, 2013/04/17
- Re: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/17
- Re: gsoc2013 octave audio system, Mike Miller, 2013/04/17
- Message not available
- Fwd: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/18
- Re: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/18
- Re: gsoc2013 octave audio system,
Mike Miller <=
- Re: gsoc2013 octave audio system, Jordi GutiƩrrez Hermoso, 2013/04/18
- Re: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/18
- Re: gsoc2013 octave audio system, John W. Eaton, 2013/04/18
- Message not available
- Message not available
- Re: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/20
- Re: gsoc2013 octave audio system, Mike Miller, 2013/04/20
- Re: gsoc2013 octave audio system, Vytautas Jancauskas, 2013/04/21
- Re: gsoc2013 octave audio system, Doug Stewart, 2013/04/21
- Re: gsoc2013 octave audio system, Mike Miller, 2013/04/22
- Re: Re: gsoc2013 octave audio system, Pantxo Diribarne, 2013/04/22
- Re: Re: gsoc2013 octave audio system, maiky76, 2013/04/22