Improves device selection via portaudio for MacOSX (hostapi coreaudio):

adds the possibility to get the device transport type (USB, bluetooth,
etc.) and an unique identifier. Corrects problems when: loading the same
device twice (for the moment only for the same hostapi), a new plugged
device is selected during a call or if the selected device is unchanged.
Vincent Lucas committed on Oct 29, 2012
26848f0 from https://github.com/jitsi/libsrc/commits/master/portaudio.zip
This commit is contained in:
Ross Bencina 2016-09-03 22:34:22 +10:00
commit e7a274942b
5 changed files with 367 additions and 3 deletions

View file

@ -46,7 +46,7 @@
#include "portaudio.h"
#include <AudioUnit/AudioUnit.h>
//#include <AudioToolbox/AudioToolbox.h>
#include <AudioToolbox/AudioToolbox.h>
#ifdef __cplusplus
extern "C" {

View file

@ -470,7 +470,7 @@ typedef unsigned long PaSampleFormat;
*/
typedef struct PaDeviceInfo
{
int structVersion; /* this is struct version 2 */
int structVersion; /* this is struct version 3 */
const char *name;
PaHostApiIndex hostApi; /* note this is a host API index, not a type id*/
@ -485,6 +485,11 @@ typedef struct PaDeviceInfo
PaTime defaultHighOutputLatency;
double defaultSampleRate;
/*The transport type used by this device: USB, BuiltIn, Bluetooth, etc.*/
const char *transportType;
/*The unique identifier of this device (persistent across boots).*/
const char *deviceUID;
} PaDeviceInfo;