Add a persistent storage to keep track of the devices know in the system. This should also allow for a faster discovery.
Proposed discovery sequence
- Read configrom from the node
- Detect node type
- find and create correct AvDevice? (= probe())
- Detect node configuration
- request some sort of ID from the device that is unique for every possible configuration
of the device. e.g. 1 => 44.1k, 2 => 48k, ... . I propose a 32 bit integer, and the
exact meaning/ calculation is up to the AvDevice? implementation. This restricts the
necessary operations in the AvDevice? to the minimal set necessary to identify a unique
configuration.
- Check if the GUID + config ID combination is present in the persistent storage
- if it is not:
- do device discovery as usual
- request config ID from AvDevice?
- serialize the AvDevice? and save it under the GUID + config ID combination
- proceed as before
- if it is:
- deserialize the config under the GUID + config ID combination into the AvDevice?
- proceed as before