openframeworks/openFrameworks — pull request #809 by gameoverhack (2011-11-11 05:12:58+00:00)
Title: Feature of sound stream

Added function and types to return sound devices as a vector of ofStreamDevices and to setDeviceID by name (handy when you have several audio devices in an installation and need to make sure you are using the right one). Also made setDeviceID return a bool where it was possible and issued ofLogWarnings where it is not.

Updated the examples as well.

For other installations I've done similar modifications to ofVideoGrabber, ofVideoPlayer etc

I'm wondering if it's worth abstracting this to have an ofBaseDevice type and then variously: ofStreamDevice, ofSerialDevice, ofVideoDevice etc? With all 'device' managing classes enforcing listDevices() return a vector of the appropriate type of device? And indeed all those classes having an ofBaseDeviceManager class that enforces a common syntax for devices: such as getDevices (instead of listDevices) etc -> perhaps I should put this up for discussion in the forum?