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

bug 11 - Use const references when returning the map vector to ensure the device maps are not modified. I don't expect this to fix the bug behavior, but am committing because some testers see bad behavior that suggests the maps are modified between scans.

This commit is contained in:
mchinen
2011-03-20 22:20:41 +00:00
parent a3a3230347
commit c1cf9b4a76
5 changed files with 24 additions and 22 deletions

View File

@@ -32,7 +32,7 @@ typedef struct DeviceSourceMap {
wxString hostString;
} DeviceSourceMap;
wxString MakeDeviceSourceString(DeviceSourceMap *map);
wxString MakeDeviceSourceString(const DeviceSourceMap *map);
class DeviceManager
{
@@ -50,8 +50,8 @@ class DeviceManager
DeviceSourceMap* GetDefaultOutputDevice(int hostIndex);
DeviceSourceMap* GetDefaultInputDevice(int hostIndex);
std::vector<DeviceSourceMap> &GetInputDeviceMaps();
std::vector<DeviceSourceMap> &GetOutputDeviceMaps();
const std::vector<DeviceSourceMap> &GetInputDeviceMaps();
const std::vector<DeviceSourceMap> &GetOutputDeviceMaps();
protected:
//private constructor - Singleton.