1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-18 14:36:13 +01:00

re-add and update device preferences to match new device model.

also restores portaudio device defaults functionality when the device can't be found.
This commit is contained in:
mchinen
2011-02-19 21:53:22 +00:00
parent 77b1be7f3d
commit e68767cd04
6 changed files with 372 additions and 363 deletions

View File

@@ -32,6 +32,8 @@ typedef struct DeviceSourceMap {
wxString hostString;
} DeviceSourceMap;
wxString MakeDeviceSourceString(DeviceSourceMap *map);
class DeviceManager
{
public:
@@ -45,6 +47,9 @@ class DeviceManager
/// Assumes that DeviceManager is only used on the main thread.
void Rescan();
DeviceSourceMap* GetDefaultOutputDevice(int hostIndex);
DeviceSourceMap* GetDefaultInputDevice(int hostIndex);
std::vector<DeviceSourceMap> &GetInputDeviceMaps();
std::vector<DeviceSourceMap> &GetOutputDeviceMaps();
@@ -55,6 +60,8 @@ class DeviceManager
/// Does an initial scan.
/// Called by GetInputDeviceMaps and GetOutputDeviceMaps when needed.
void Init();
DeviceSourceMap* GetDefaultDevice(int hostIndex, int isInput);
bool m_inited;