1
1
/************************************************************************
2
2
DSPatch - Cross-Platform, Object-Oriented, Flow-Based Programming Library
3
Copyright (c) 2012-2013 Marcus Tomlinson
3
Copyright (c) 2012-2014 Marcus Tomlinson
5
5
This file is part of DSPatch.
34
34
class DspAudioDevice : public DspComponent
37
static std::string const pDeviceList; // List
38
static std::string const pIsStreaming; // Bool
39
static std::string const pBufferSize; // Int
40
static std::string const pSampleRate; // Int
40
45
bool SetDevice( short deviceIndex );
42
std::string GetDeviceName( short deviceIndex );
43
unsigned short GetDeviceInputCount( short deviceIndex );
44
unsigned short GetDeviceOutputCount( short deviceIndex );
45
unsigned short GetCurrentDevice();
46
unsigned short GetDeviceCount();
50
void SetBufferSize( unsigned long bufferSize );
51
void SetSampleRate( unsigned long sampleRate );
52
unsigned long GetSampleRate();
47
std::string GetDeviceName( short deviceIndex ) const;
48
unsigned short GetDeviceInputCount( short deviceIndex ) const;
49
unsigned short GetDeviceOutputCount( short deviceIndex ) const;
50
unsigned short GetCurrentDevice() const;
51
unsigned short GetDeviceCount() const;
53
void SetBufferSize( int bufferSize );
54
void SetSampleRate( int sampleRate );
56
bool IsStreaming() const;
57
int GetBufferSize() const;
58
int GetSampleRate() const;
55
61
virtual void Process_( DspSignalBus& inputs, DspSignalBus& outputs );
62
virtual bool ParameterUpdating_( std::string const& name, DspParameter const& param );
58
65
std::vector< std::vector< float > > _outputChannels;
61
68
RtAudioMembers* _rtAudio;
63
unsigned long _bufferSize;
64
unsigned long _sampleRate;
66
unsigned short _deviceCount;
68
70
DspMutex _buffersMutex;
69
71
DspMutex _syncMutex;
70
72
DspWaitCondition _waitCondt;