17 #define WIN32_LEAN_AND_MEAN 25 #define DEFAULT_N_INPUT_BUFS 32 35 struct IMMDeviceEnumerator;
36 struct IMMNotificationClient;
83 unsigned samplesPerSec,
163 static bool nameIsSame(
const UtlString& a,
const UtlString& b);
168 static void registerDeviceEnumerator(IMMDeviceEnumerator* deviceEnumeratorPtr, IMMNotificationClient* winAudioDeviceChangeCallback);
169 static void unregisterDeviceEnumerator(IMMDeviceEnumerator* deviceEnumeratorPtr, IMMNotificationClient* winAudioDeviceChangeCallback);
170 static void getWinNameForDevice(IMMDeviceEnumerator* deviceEnumeratorPtr,
const LPCWSTR winDeviceId, UtlString& deviceName);
206 #endif // _MpidWinMM_h_ unsigned mNumInBuffers
Definition: MpidWinMM.h:178
static void registerDeviceEnumerator(IMMDeviceEnumerator *deviceEnumeratorPtr, IMMNotificationClient *winAudioDeviceChangeCallback)
Definition: MpidWinMM.cpp:806
HWAVEIN mDevHandle
The Microsoft handle for this audio input device.
Definition: MpidWinMM.h:177
virtual ~MpidWinMM()
Destructor.
Definition: MpidWinMM.cpp:367
void processAudioInput(HWAVEIN hwi, UINT uMsg, void *dwParam1)
Processes incoming audio data.
Definition: MpidWinMM.cpp:667
static UtlString getDefaultDeviceName()
get the windows name of the default wave input device.
Definition: MpidWinMM.cpp:606
unsigned mWaveBufSize
Definition: MpidWinMM.h:180
UtlBoolean isDeviceValid()
Inquire if the windows device is valid.
Definition: MpidWinMM.h:200
uint32_t MpFrameTime
Definition: MpTypes.h:53
static IMMDeviceEnumerator * getWinDeviceEnumerator()
Definition: MpidWinMM.cpp:778
UtlBoolean mIsOpen
Boolean indicating waveInOpen() completed.
Definition: MpidWinMM.h:184
LPSTR * mpWaveBuffers
Array of nNumInBuffers wave buffers.
Definition: MpidWinMM.h:183
static void getWinNameForDevice(IMMDeviceEnumerator *deviceEnumeratorPtr, const LPCWSTR winDeviceId, UtlString &deviceName)
Definition: MpidWinMM.cpp:864
IMMDeviceEnumerator * mDeviceEnumeratorPtr
Definition: MpidWinMM.h:189
IMMNotificationClient * mWinAudioDeviceChangeCallback
device state changes.
Definition: MpidWinMM.h:187
Container for the Microsoft Windows Multimedia specific input driver.
Definition: MpidWinMM.h:46
MpidWinMM & operator=(const MpInputDeviceDriver &rhs)
Assignment operator (not implemented for this class)
WAVEHDR * mpWaveHeaders
Array of nNumInBuffers wave headers.
Definition: MpidWinMM.h:182
int mWinMMDeviceId
Definition: MpidWinMM.h:175
WAVEHDR * initWaveHeader(int n)
Zero out a wave header, so it is ready to be filled in by windows.
Definition: MpidWinMM.cpp:645
OsStatus enableDevice(unsigned samplesPerFrame, unsigned samplesPerSec, MpFrameTime currentFrameTime)
Initialize device driver and state.
Definition: MpidWinMM.cpp:404
Container for Microsoft Windows device specific output driver.
Definition: MpodWinMM.h:69
static bool nameIsSame(const UtlString &a, const UtlString &b)
Definition: MpidWinMM.cpp:921
static void unregisterDeviceEnumerator(IMMDeviceEnumerator *deviceEnumeratorPtr, IMMNotificationClient *winAudioDeviceChangeCallback)
Definition: MpidWinMM.cpp:831
static void CALLBACK waveInCallbackStatic(HWAVEIN hwi, UINT uMsg, void *dwInstance, void *dwParam1, void *dwParam2)
Callback function for receiving data from windows audio.
Definition: MpidWinMM.cpp:764
OsStatus disableDevice()
Uninitialize device driver.
Definition: MpidWinMM.cpp:532
MpidWinMM(const UtlString &name, MpInputDeviceManager &deviceManager, unsigned nInputBuffers=DEFAULT_N_INPUT_BUFS)
Default constructor.
Definition: MpidWinMM.cpp:240
unsigned mnAddBufferFailures
within the callback has failed since last enabled.
Definition: MpidWinMM.h:185
#define DEFAULT_N_INPUT_BUFS
Definition: MpidWinMM.h:25