Re: SetProperty/GetProperty
Re: SetProperty/GetProperty
- Subject: Re: SetProperty/GetProperty
- From: William Stewart <email@hidden>
- Date: Thu, 16 Nov 2006 12:53:42 -0800
In terms of general handling of files in AU Presets, we have this
capability - I'm not sure we have this in any official documentation,
so we will make sure we include it
>>>
This document describes a proposed extension to the Audio Unit preset
format in order to make it possible for host applications to collect
all external file assets used in a project. This allows a user to
archive a project with confidence that all of the external files it
uses (e.g. samples, sample banks, etc.) are also archived.
It also permits Audio Unit developers to create smaller presets by
storing only references to large external files, rather than
embedding the contents of a large file in the preset -- an Audio Unit
should not do this.
For example, the DLS synth does not store the contents of its current
sound bank, just a reference to it (though not in this new proposed
way). When loading a preset, it attempts to find the bank by name in
certain known search directories.
1. Audio Unit behavior
Audio Units whose presets contain references to files should store a
new key/value in their preset dictionaries:
key "file-references" ($$$ need a symbolic name) --> dictionary
dictionary contents:
AU-defined key (string) --> full path (string)
...
Thus, a preset may refer to any number of files, identifying each
file's role in the preset with a key of the AU's choosing.
When an Audio Unit receives a preset from a host, it should be
prepared to search for any missing files.
2. Host behavior
Hosts may present the user with a command to consolidate the external
files referenced by a collection of Audio Units, by copying the files
into a single directory or even by archiving them into a single file
(a zip or tar archive, for example).
The details of this are up to the host's implementation.
When the host restores an archived project, extracting presets and
their referenced files, each preset's file-references dictionary must
be modified as necessary to reference a valid file.
If, for whatever reason, a referenced file cannot be located, the
host should pass the last known valid full path for the referenced
file, and in particular, that path MUST end with the same file name
that the Audio Unit had stored. This makes it possible for the Audio
Unit to display the name of the missing file.
>>>
Bill
On 16/11/2006, at 6:37 AM, Sebastien Beaulieu wrote:
Hi all,
William Stewart wrote:
At some point the host would have to marshall this... So the care
that needs to be taken is this - don't embed pointers in these
structs, but rather have the memory you pass in to the Get/Set
calls be flat and complete. So, in your example above how you have
this is fine (presuming of course that retval is a value not an
address!).
While we are on the subject, here's one I don't remember being
discussed before:
How would the AU / View residing on different machines work with
files?
The file dialog would be showing up on the "View" machine and would
select file(s) the "AU" machine can't access. While for small files
it would be possible to either have the View know what to do or
send/receive a blob to/from the AU, there are cases where this makes
no sense. As a concrete example, audio files being streamed from or to
disk.
--
Plogue Art et Technologie Inc.
Montreal. http://www.plogue.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden