[nama] Re: Singleton branch passes all tests

  • From: Joel Roth <joelz@xxxxxxxxx>
  • To: nama@xxxxxxxxxxxxx
  • Date: Mon, 12 Sep 2011 01:43:18 -1000

On Sun, Sep 11, 2011 at 11:22:46AM -1000, Joel Roth wrote:
> As usual, I tend to be optimistic about the time
> for various refactoring tasks.

Hi all,

I found tens of un- and mis-converted variables.
It's amazing that Nama behaved at all.

With that fixed by some involved search-and-replace scripts,
I seem to be correctly reading in an untitled test project
in the old format.

I'm now considering how to manage the change in storage 
format.

Due to the large change, I don't want to overwrite the old
State.yml files. 

One way is to default to writing State80.yml (for version 1.080)

Another would be to write a State.json file.  We would have
a prettified format that would resist white-space 
addition/deletion (due to manual editing) much better than YAML.

Here is a sample of what it looks like:

nama> eval json_out $config->{devices}
{
   "consumer" : {
      "ecasound_id" : "alsa,default",
      "input_format" : "s16_le,2,44100,i",
      "output_format" : "s16_le,2,44100,i"
   },
   "jack" : {
      "signal_format" : "f32_le,N,44100"
   },
   "multi" : {
      "ecasound_id" : "alsa,ice1712",
      "input_format" : "s32_le,12,44100",
      "output_format" : "s32_le,10,44100"
   },
   "null" : {
      "ecasound_id" : "null"
   }
}

JSON is superior to YAML. It is a simpler spec,
stable, and much more robust.

I am likely to keep YAML for .namarc and
for dumping internal data structures.

Cheers,
-- 
Joel Roth

Other related posts: