Audacity  2.2.0
DeviceManager Class Referencefinal

A singleton that manages the audio devices known to Audacity. More...

#include <DeviceManager.h>

Public Member Functions

void Rescan ()
 
DeviceSourceMapGetDefaultOutputDevice (int hostIndex)
 
DeviceSourceMapGetDefaultInputDevice (int hostIndex)
 
const std::vector
< DeviceSourceMap > & 
GetInputDeviceMaps ()
 
const std::vector
< DeviceSourceMap > & 
GetOutputDeviceMaps ()
 

Static Public Member Functions

static DeviceManagerInstance ()
 Gets the singleton instance. More...
 

Protected Member Functions

 DeviceManager ()
 
 ~DeviceManager ()
 
void Init ()
 
DeviceSourceMapGetDefaultDevice (int hostIndex, int isInput)
 

Protected Attributes

bool m_inited
 
std::vector< DeviceSourceMapmInputDeviceSourceMaps
 
std::vector< DeviceSourceMapmOutputDeviceSourceMaps
 

Static Protected Attributes

static DeviceManager dm
 

Detailed Description

A singleton that manages the audio devices known to Audacity.

Constructor & Destructor Documentation

DeviceManager::DeviceManager ( )
protected
DeviceManager::~DeviceManager ( )
protected

Member Function Documentation

DeviceSourceMap * DeviceManager::GetDefaultDevice ( int  hostIndex,
int  isInput 
)
protected
DeviceSourceMap * DeviceManager::GetDefaultInputDevice ( int  hostIndex)
DeviceSourceMap * DeviceManager::GetDefaultOutputDevice ( int  hostIndex)
void DeviceManager::Init ( )
protected

Does an initial scan. Called by GetInputDeviceMaps and GetOutputDeviceMaps when needed.

References Rescan().

Referenced by GetInputDeviceMaps(), and GetOutputDeviceMaps().

void DeviceManager::Rescan ( )

Gets a NEW list of devices by terminating and restarting portaudio Assumes that DeviceManager is only used on the main thread.

References AddSources(), gAudacityProjects, gAudioIO, AudioIO::IsBusy(), AudioIO::IsMonitoring(), m_inited, mInputDeviceSourceMaps, mOutputDeviceSourceMaps, DeviceToolBar::RefillCombos(), and AudioIO::StopStream().

Referenced by Init(), and AudacityProject::OnRescanDevices().

Member Data Documentation

DeviceManager DeviceManager::dm
staticprotected

Referenced by Instance().

bool DeviceManager::m_inited
protected
std::vector<DeviceSourceMap> DeviceManager::mInputDeviceSourceMaps
protected
std::vector<DeviceSourceMap> DeviceManager::mOutputDeviceSourceMaps
protected

The documentation for this class was generated from the following files: