Skip to content
Snippets Groups Projects
Commit adfa13de authored by jpbl's avatar jpbl
Browse files

we list devices now

parent 8d429f02
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,7 @@ AudioLayer::AudioLayer () ...@@ -38,6 +38,7 @@ AudioLayer::AudioLayer ()
, _stream(NULL) , _stream(NULL)
{ {
portaudio::System::initialize(); portaudio::System::initialize();
listDevices();
} }
// Destructor // Destructor
...@@ -57,6 +58,18 @@ AudioLayer::closeStream (void) ...@@ -57,6 +58,18 @@ AudioLayer::closeStream (void)
} }
} }
void
AudioLayer::listDevices()
{
ost::MutexLock guard(_mutex);
portaudio::System::DeviceIterator pos = portaudio::System::instance().devicesBegin();
while(pos != portaudio::System::instance().devicesEnd()) {
_debug("AudioLayer: Device (%d) %s\n", pos->index(), pos->name());
pos++;
}
}
void void
AudioLayer::openDevice (int index) AudioLayer::openDevice (int index)
{ {
......
...@@ -44,6 +44,7 @@ public: ...@@ -44,6 +44,7 @@ public:
AudioLayer(); AudioLayer();
~AudioLayer (void); ~AudioLayer (void);
void listDevices();
void openDevice (int); void openDevice (int);
void startStream (void); void startStream (void);
void stopStream (void); void stopStream (void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment