Commit Graph

2 Commits

Author SHA1 Message Date
Jonathan Thomas
ac3762923d Updating licensing for reuse compliance 2021-12-02 22:10:08 -06:00
FeRD (Frank Dana)
6aab6fd957 Audio: New device name lookup
- A new AudioDevices class replaces the AudioDeviceInfo struct.
  It has a single method, getNames(), which:
  * creates an AudioDeviceManager (NOT using the singleton)
  * scans for available devices
  * returns the results as a std::vector containing
    std::pair<std::string, std::string> objects

  (The AudioDevices device manager is never initialize()d, so
  no devices are opened; it should be safe to use even DURING
  playback, without disruption.)

  By using STL containers (rather than a custom struct) to return
  the results, Python is able to consume the output as a native
  list of tuples.

  AudioDeviceInfo is still present for compatibility, but deprecated.

- Eliminated some unnecessary conversions (like):
  * calls to std::string::c_str, when passing to juce::String.
    juce::String accepts std::string directly.
  * calls to juce::String::toRawUTF8, when creating std::string.
    There's a juce::String::ToStdString, which is better.
2021-08-24 13:11:00 -04:00