sipxmedialib  Version 3.3
Macros | Functions | Variables
MicThreadWnt.cpp File Reference
#include <windows.h>
#include <process.h>
#include <mmsystem.h>
#include <assert.h>
#include "mp/dmaTask.h"
#include "mp/MpBufferMsg.h"
#include "mp/MpBuf.h"
#include "mp/MprToSpkr.h"
#include "mp/MpMediaTask.h"
#include "os/OsMsgPool.h"
#include "os/OsDefs.h"
#include "os/OsIntPtrMsg.h"
Include dependency graph for MicThreadWnt.cpp:

Macros

#define WIN32_LEAN_AND_MEAN
 

Functions

void showWaveError (char *syscall, int e, int N, int line)
 
void CALLBACK micOutCallBackProc (HANDLE h, UINT wMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam, DWORD_PTR unused)
 
OsStatus detectInputMixerId (HWAVEIN *pAudioInH)
 
int openAudioIn (HWAVEIN *pAudioInH, int nChannels, int nSamplesPerSec, int nBitsPerSample)
 
WAVEHDR * inPrePrep (int n, DWORD bufLen)
 
bool inPostUnprep (int n, int discard, DWORD bufLen, bool bFree)
 
int openMicDevice (bool &bRunning, WAVEHDR *&pWH)
 
void closeMicDevice ()
 
unsigned int __stdcall MicThread (LPVOID Unused)
 

Variables

HANDLE hMicThread
 
HANDLE hSpkrThread
 
OsMsgPool * gMicStatusPool = NULL
 
OsMsgQ * gMicStatusQueue = NULL
 

Macro Definition Documentation

#define WIN32_LEAN_AND_MEAN

Function Documentation

void showWaveError ( char *  syscall,
int  e,
int  N,
int  line 
)
void CALLBACK micOutCallBackProc ( HANDLE  h,
UINT  wMsg,
DWORD_PTR  dwInstance,
DWORD_PTR  dwParam,
DWORD_PTR  unused 
)
OsStatus detectInputMixerId ( HWAVEIN *  pAudioInH)

Detects ID of a mixer that can set gain on the wave input device identified by supplied handle. A sound card can have separate mixer for output devices and input devices. If we have multiple sound cards then we will have multiple wave input and wave output devices with several mixers possibly separate input and output mixers. Thus we need to detect the right mixer ID in order to set gain of the right microphone later.

Parameters
pAudioInHhandle of the open wave input device
Returns
result of detection of mixer ID
See also
detectInputMixerId
openAudioIn
int openAudioIn ( HWAVEIN *  pAudioInH,
int  nChannels,
int  nSamplesPerSec,
int  nBitsPerSample 
)
WAVEHDR* inPrePrep ( int  n,
DWORD  bufLen 
)
bool inPostUnprep ( int  n,
int  discard,
DWORD  bufLen,
bool  bFree 
)
int openMicDevice ( bool &  bRunning,
WAVEHDR *&  pWH 
)
void closeMicDevice ( )
unsigned int __stdcall MicThread ( LPVOID  Unused)

Variable Documentation

HANDLE hMicThread
HANDLE hSpkrThread
OsMsgPool* gMicStatusPool = NULL
OsMsgQ* gMicStatusQueue = NULL