ReactOS 0.4.15-dev-7942-gd23573b
audio_wavein Class Reference

#include <audio_wavein.hpp>

Collaboration diagram for audio_wavein:

Public Member Functions

 audio_wavein (const audio_format &a_info, audio_receiver &a_receiver)
 
 ~audio_wavein (void)
 
void open (void)
 
void close (void)
 
void start_recording (void)
 
void stop_recording (void)
 
audio_wavein_status current_status (void) const
 
float buffer_secs (void) const
 
void buffer_secs (float bsecs)
 
unsigned int total_buffers (void) const
 
void total_buffers (unsigned int tot_bufs)
 
audio_format format (void) const
 
BYTEbuf (void)
 
unsigned int bufsz (void)
 
unsigned int samplevalue_max (void)
 
unsigned tot_samples_buf (void)
 
unsigned int nsample (unsigned int nsamp)
 

Protected Member Functions

void init_ (void)
 
void alloc_buffers_mem_ (unsigned int, float)
 
void free_buffers_mem_ (void)
 
void init_headers_ (void)
 
void prep_headers_ (void)
 
void unprep_headers_ (void)
 
void add_buffers_to_driver_ (void)
 

Protected Attributes

WAVEFORMATEX wave_format
 
WAVEHDRwave_headers
 
HWAVEIN wavein_handle
 
audio_format aud_info
 
audio_receiveraudio_rcvd
 
DWORD recthread_id
 
audio_wavein_status status
 
float buf_secs
 
BYTEmain_buffer
 
unsigned int mb_size
 
unsigned int buffers
 

Static Private Member Functions

static DWORD WINAPI recording_procedure (LPVOID)
 

Private Attributes

HANDLE wakeup_recthread
 
HANDLE data_flushed_event
 

Detailed Description

Definition at line 26 of file audio_wavein.hpp.

Constructor & Destructor Documentation

◆ audio_wavein()

audio_wavein::audio_wavein ( const audio_format a_info,
audio_receiver a_receiver 
)
inline

Definition at line 81 of file audio_wavein.hpp.

82 : wave_headers(0),
83 aud_info(a_info),
84 audio_rcvd(a_receiver),
86 main_buffer(0),
87 mb_size(0),
89 {
90 /* Initializing internal wavein data */
91 init_();
92 aud_info = a_info;
93 }
#define _AUDIO_DEFAULT_WAVEINBUFFERS
Definition: audio_def.hpp:15
@ WAVEIN_NOTREADY
BYTE * main_buffer
void init_(void)
audio_wavein_status status
audio_format aud_info
WAVEHDR * wave_headers
audio_receiver & audio_rcvd
unsigned int buffers
unsigned int mb_size

◆ ~audio_wavein()

audio_wavein::~audio_wavein ( void  )
inline

Definition at line 96 of file audio_wavein.hpp.

97 {
98 //close(); TODO!
99 }

Member Function Documentation

◆ add_buffers_to_driver_()

void audio_wavein::add_buffers_to_driver_ ( void  )
protected

Definition at line 135 of file audio_wavein.cpp.

136{
138 bool error = false;
139
140 /* If there is no memory for memory or headers, throw error */
141 if ((!wave_headers) || (!main_buffer) || (!wavein_handle))
142 {
143 /* TODO: throw error! */
144 }
145
146 for (unsigned int i = 0; i < buffers; ++i)
147 {
149 if (err != MMSYSERR_NOERROR)
150 error = true;
151 }
152
153 if (error)
154 MessageBox(0, TEXT("waveInAddBuffer Error."), 0, 0);
155}
HWAVEIN wavein_handle
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TEXT(s)
Definition: k32.h:26
#define error(str)
Definition: mkdosfs.c:1605
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define err(...)
UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn, WAVEHDR *lpWaveInHdr, UINT uSize)
Definition: winmm.c:2717
#define MessageBox
Definition: winuser.h:5822

Referenced by start_recording().

◆ alloc_buffers_mem_()

void audio_wavein::alloc_buffers_mem_ ( unsigned int  buffs,
float  secs 
)
protected

Definition at line 27 of file audio_wavein.cpp.

28{
29 unsigned int onebuf_size = 0, tot_size = 0;
30
31 /* Release old memory */
32 if (main_buffer)
33 delete[] main_buffer;
34
35 if (wave_headers)
36 delete[] wave_headers;
37
38 /* Calcs size of the buffers */
39 onebuf_size = (unsigned int)((float)aud_info.byte_rate() * secs);
40 tot_size = onebuf_size * buffs;
41
42 /* Allocs memory for the audio buffers */
43 main_buffer = new BYTE[tot_size];
44 /* Allocs memory for the `WAVEHDR' structures */
45 wave_headers = (WAVEHDR *)new BYTE[sizeof(WAVEHDR) * buffs];
46 /* Zeros memory */
47 ZeroMemory(main_buffer, tot_size);
48 ZeroMemory(wave_headers, sizeof(WAVEHDR) * buffs);
49 /* Updates total size of the buffers */
50 mb_size = tot_size;
51}
unsigned int byte_rate(void) const
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define ZeroMemory
Definition: winbase.h:1712
unsigned char BYTE
Definition: xxhash.c:193

Referenced by open().

◆ buf()

BYTE * audio_wavein::buf ( void  )
inline

Definition at line 149 of file audio_wavein.hpp.

150 {
151 return main_buffer;
152 }

◆ buffer_secs() [1/2]

void audio_wavein::buffer_secs ( float  bsecs)
inline

Definition at line 119 of file audio_wavein.hpp.

120 {
121 /* Some checking */
122 if (bsecs <= 0)
123 return;
124
125 /* Set seconds length for each buffer */
126 buf_secs = bsecs;
127 }

◆ buffer_secs() [2/2]

float audio_wavein::buffer_secs ( void  ) const
inline

Definition at line 114 of file audio_wavein.hpp.

115 {
116 return buf_secs;
117 }

◆ bufsz()

unsigned int audio_wavein::bufsz ( void  )
inline

Definition at line 154 of file audio_wavein.hpp.

155 {
156 return mb_size;
157 }

◆ close()

void audio_wavein::close ( void  )

Definition at line 158 of file audio_wavein.cpp.

159{
160 /* If wavein object is already in the status NOTREADY, nothing to do */
161 if (status == WAVEIN_NOTREADY)
162 return;
163
164 /* If the wavein is recording, then stop recording and close it */
167
168 /* Updating status */
170
171 /* Waking up recording thread, so it can receive
172 the `MM_WIM_CLOSE' message then dies */
175
176 /* Closing wavein stream */
178 Sleep(1);
179
180 /* Release buffers memory */
182
183 /* Re-initialize variables to the initial state */
184 init_();
185}
@ WAVEIN_RECORDING
void stop_recording(void)
HANDLE wakeup_recthread
void free_buffers_mem_(void)
Definition: ps.c:97
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
UINT WINAPI waveInClose(HWAVEIN hWaveIn)
Definition: winmm.c:2634

◆ current_status()

audio_wavein_status audio_wavein::current_status ( void  ) const
inline

Definition at line 109 of file audio_wavein.hpp.

110 {
111 return status;
112 }

◆ format()

audio_format audio_wavein::format ( void  ) const
inline

Definition at line 144 of file audio_wavein.hpp.

145 {
146 return aud_info;
147 }

◆ free_buffers_mem_()

void audio_wavein::free_buffers_mem_ ( void  )
protected

Definition at line 54 of file audio_wavein.cpp.

55{
56 /* Frees memory */
57 if (main_buffer)
58 delete[] main_buffer;
59
60
61 if (wave_headers)
62 delete[] wave_headers;
63
64 main_buffer = 0;
65 wave_headers = 0;
66}

Referenced by close().

◆ init_()

_AUDIO_NAMESPACE_START_ void audio_wavein::init_ ( void  )
protected

Definition at line 14 of file audio_wavein.cpp.

Referenced by audio_wavein(), and close().

◆ init_headers_()

void audio_wavein::init_headers_ ( void  )
protected

Definition at line 69 of file audio_wavein.cpp.

70{
71 /* If there is no memory for memory or headers, simply return */
72 if ((!wave_headers) || (!main_buffer))
73 return;
74
75 /* This is the size for one buffer */
76 DWORD buf_sz = mb_size / buffers;
77 /* This is the base address for one buffer */
78 BYTE *buf_addr = main_buffer;
79 /* Initializes headers */
80 for (unsigned int i = 0; i < buffers; ++i)
81 {
83 wave_headers[i].lpData = (LPSTR)buf_addr;
84 buf_addr += buf_sz;
85 }
86}
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwBufferLength
Definition: mmsystem.h:1015
LPSTR lpData
Definition: mmsystem.h:1014
char * LPSTR
Definition: xmlstorage.h:182

Referenced by open().

◆ nsample()

unsigned int audio_wavein::nsample ( unsigned int  nsamp)
inline

Definition at line 176 of file audio_wavein.hpp.

177 {
178 unsigned int svalue;
179
180 if (aud_info.bits() == 16)
181 svalue = (unsigned int)abs(*((short *)(main_buffer + aud_info.bytes_in_samples(nsamp))));
182 else if (aud_info.bits() == 8)
183 svalue = (unsigned int)((ptrdiff_t) *(main_buffer + aud_info.bytes_in_samples(nsamp)));
184 else
185 svalue = 0;
186
187 return svalue;
188 }
unsigned short int bits(void) const
unsigned int bytes_in_samples(unsigned int samples) const
__kernel_ptrdiff_t ptrdiff_t
Definition: linux.h:247
#define abs(i)
Definition: fconv.c:206

◆ open()

void audio_wavein::open ( void  )

Definition at line 188 of file audio_wavein.cpp.

189{
191 HANDLE recthread_handle = 0;
192
193 /* Checkin the status of the object */
194 if (status != WAVEIN_NOTREADY)
195 {
196 /* TODO: throw error */
197 }
198
199 /* Creating the EVENT object that will be signaled
200 when the recording thread has to wake up */
202
204
206 {
208 MessageBox(0, TEXT("Thread Error."), 0, 0);
209 /* TODO: throw error */
210 }
211
212 /* Inialize buffers for recording audio data from the wavein audio line */
215
216 /* Sound format that will be captured by wavein */
223
224 /* Creating the recording thread */
225 recthread_handle = CreateThread(NULL,
226 0,
228 (PVOID)this,
229 0,
230 &recthread_id);
231 /* Checking thread handle */
232 if (!recthread_handle)
233 {
234 /* Updating status */
236 MessageBox(0, TEXT("Thread Error."), 0, 0);
237 /* TODO: throw error */
238 }
239
240 /* We don't need the thread handle anymore, so we can close it from now.
241 (We'll just need the thread ID for the `waveInOpen' API) */
242 CloseHandle(recthread_handle);
243
244 /* Opening audio line wavein */
246 0,
249 0,
251
252 if (err != MMSYSERR_NOERROR)
253 {
254 /* Updating status */
256
257 if (err == WAVERR_BADFORMAT)
258 MessageBox(0, TEXT("waveInOpen Error"), 0, 0);
259
260 /* TODO: throw error */
261 }
262
263 /* Update object status */
265
266 /* Now `audio_wavein' object is ready for audio recording! */
267}
@ WAVEIN_READY
@ WAVEIN_ERR
#define WAVE_FORMAT_PCM
Definition: constants.h:425
unsigned int sample_rate(void) const
unsigned short int channels(void) const
unsigned int block_align(void) const
void init_headers_(void)
void alloc_buffers_mem_(unsigned int, float)
static DWORD WINAPI recording_procedure(LPVOID)
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
const GLuint * buffers
Definition: glext.h:5916
#define CALLBACK_THREAD
Definition: mmsystem.h:151
#define WAVERR_BADFORMAT
Definition: mmsystem.h:176
DWORD nAvgBytesPerSec
Definition: audioclient.idl:43
WORD wBitsPerSample
Definition: audioclient.idl:45
DWORD nSamplesPerSec
Definition: audioclient.idl:42
#define CreateEvent
Definition: winbase.h:3748
MMRESULT WINAPI waveInOpen(HWAVEIN *lphWaveIn, UINT uDeviceID, LPCWAVEFORMATEX lpFormat, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD dwFlags)
Definition: winmm.c:2623

◆ prep_headers_()

void audio_wavein::prep_headers_ ( void  )
protected

Definition at line 89 of file audio_wavein.cpp.

90{
92 bool error = false;
93
94 /* If there is no memory for memory or headers, throw error */
95 if ((!wave_headers) || (!main_buffer) || (!wavein_handle))
96 {
97 /* TODO: throw error! */
98 }
99
100 for (unsigned int i = 0; i < buffers; ++i)
101 {
103 if (err != MMSYSERR_NOERROR)
104 error = true;
105 }
106
107 if (error)
108 MessageBox(0, TEXT("waveInPrepareHeader Error."), 0, 0);
109}
UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR *lpWaveInHdr, UINT uSize)
Definition: winmm.c:2653

Referenced by start_recording().

◆ recording_procedure()

DWORD WINAPI audio_wavein::recording_procedure ( LPVOID  arg)
staticprivate

Definition at line 344 of file audio_wavein.cpp.

345{
346 MSG msg;
347 WAVEHDR *phdr;
348 audio_wavein *_this = (audio_wavein *)arg;
349
350 /* Check the arg pointer */
351 if (_this == 0)
352 return 0;
353
354 /* The thread can go to sleep for now. It will be wake up only when
355 there is audio data to be recorded */
356 if (_this->wakeup_recthread)
358
359 /* If status of the `audio_wavein' object is not ready or recording the thread can exit */
360 if ((_this->status != WAVEIN_READY) && (_this->status != WAVEIN_RECORDING))
361 return 0;
362
363 /* Entering main polling loop */
364 while (GetMessage(&msg, 0, 0, 0))
365 {
366 switch (msg.message)
367 {
368 case MM_WIM_DATA:
369 phdr = (WAVEHDR *)msg.lParam;
370
371 if ((_this->status == WAVEIN_RECORDING) ||
372 (_this->status == WAVEIN_FLUSHING))
373 {
374 if (phdr->dwFlags & WHDR_DONE)
375 {
376 /* Flushes recorded audio data to the `audio_receiver' object */
377 _this->audio_rcvd.audio_receive((unsigned char *)phdr->lpData,
378 phdr->dwBytesRecorded);
379
380 /* Updating `audio_receiver' total bytes received
381 _AFTER_ calling `audio_receive' function */
383 }
384
385 /* If status is not flushing data, then we can re-add the buffer
386 for reusing it. Otherwise, if we are flushing pending data,
387 we cannot re-add buffer because we don't need it anymore */
388 if (_this->status != WAVEIN_FLUSHING)
389 {
390 /* Let the audio driver reuse the buffer */
391 waveInAddBuffer(_this->wavein_handle, phdr, sizeof(WAVEHDR));
392 } else {
393 /* If we are flushing pending data, we have to prepare
394 to stop recording. Set WAVEHDR flag to 0, and fires
395 the event `data_flushed_event', that will wake up
396 the main thread that is sleeping into wavein_in::stop_recording()
397 member function, waiting the last `MM_WIM_DATA' message
398 that contain pending data */
399
400 phdr->dwFlags = 0;
402
403 /* The recording is going to stop, so the recording thread can go to sleep! */
405 }
406 } /* if WAVEIN_RECORDING || WAVEIN_FLUSHING */
407 break;
408
409 case MM_WIM_CLOSE:
410 /* The thread can exit now */
411 return 0;
412 break;
413 } /* end switch(msg.message) */
414 } /* end while(GetMessage(...)) */
415
416 return 0;
417}
@ WAVEIN_FLUSHING
#define msg(x)
Definition: auth_time.c:54
virtual void audio_receive(unsigned char *, unsigned int)=0
unsigned int bytes_received
#define INFINITE
Definition: serial.h:102
if(dx< 0)
Definition: linetemp.h:194
#define MM_WIM_DATA
Definition: mmsystem.h:61
#define MM_WIM_CLOSE
Definition: mmsystem.h:60
#define WHDR_DONE
Definition: mmsystem.h:193
DWORD dwFlags
Definition: mmsystem.h:1018
DWORD dwBytesRecorded
Definition: mmsystem.h:1016
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define GetMessage
Definition: winuser.h:5790

Referenced by open().

◆ samplevalue_max()

unsigned int audio_wavein::samplevalue_max ( void  )
inline

Definition at line 159 of file audio_wavein.hpp.

160 {
161 if (aud_info.bits() == 16)
162 return (unsigned int)65535;
163
164 else if (aud_info.bits() == 8)
165 return (unsigned int)255;
166
167 else
168 return 0;
169 }

◆ start_recording()

void audio_wavein::start_recording ( void  )

Definition at line 270 of file audio_wavein.cpp.

271{
273 BOOL ev;
274
275 if ((status != WAVEIN_READY) && (status != WAVEIN_STOP))
276 {
277 /* TODO: throw error */
278 }
279
280 /* Updating to the recording status */
282
283 /* Let's prepare header of type WAVEHDR that we will pass to the driver
284 with our audio informations, and buffer informations */
286
287 /* The waveInAddBuffer function sends an input buffer to the given waveform-audio
288 input device. When the buffer is filled, the application is notified. */
290
291 /* Signaling event for waking up the recorder thread */
293 if (!ev)
294 MessageBox(0, TEXT("Event Error."), 0, 0);
295
296 /* Start recording */
298 if (err != MMSYSERR_NOERROR)
299 {
300 /* Updating status */
302 MessageBox(0, TEXT("waveInStart Error."), 0, 0);
303 /* TODO: throw error */
304 }
305}
@ WAVEIN_STOP
void prep_headers_(void)
void add_buffers_to_driver_(void)
unsigned int BOOL
Definition: ntddk_ex.h:94
UINT WINAPI waveInStart(HWAVEIN hWaveIn)
Definition: winmm.c:2749

◆ stop_recording()

void audio_wavein::stop_recording ( void  )

Definition at line 308 of file audio_wavein.cpp.

309{
311
313 return;
314
316
317 /* waveInReset will make all pending buffer as done */
319 if ( err != MMSYSERR_NOERROR )
320 {
321 /* TODO: throw error */
322 MessageBox(0, TEXT("waveInReset Error."), 0, 0);
323 }
324
327
328 /* Stop recording */
330 if (err != MMSYSERR_NOERROR)
331 {
332 /* TODO: throw error */
333 MessageBox(0, TEXT("waveInStop Error."), 0, 0);
334 }
335
336 /* The waveInUnprepareHeader function cleans up the preparation performed
337 by the waveInPrepareHeader function */
339
341}
void unprep_headers_(void)
UINT WINAPI waveInStop(HWAVEIN hWaveIn)
Definition: winmm.c:2764
UINT WINAPI waveInReset(HWAVEIN hWaveIn)
Definition: winmm.c:2734

Referenced by close().

◆ tot_samples_buf()

unsigned audio_wavein::tot_samples_buf ( void  )
inline

Definition at line 171 of file audio_wavein.hpp.

172 {
174 }
unsigned int samples_in_bytes(unsigned int bytes) const

◆ total_buffers() [1/2]

void audio_wavein::total_buffers ( unsigned int  tot_bufs)
inline

Definition at line 134 of file audio_wavein.hpp.

135 {
136 /* Some checking */
137 if (tot_bufs == 0)
138 return;
139
140 /* Sets the number of total buffers */
141 buffers = tot_bufs;
142 }

◆ total_buffers() [2/2]

unsigned int audio_wavein::total_buffers ( void  ) const
inline

Definition at line 129 of file audio_wavein.hpp.

130 {
131 return buffers;
132 }

◆ unprep_headers_()

void audio_wavein::unprep_headers_ ( void  )
protected

Definition at line 112 of file audio_wavein.cpp.

113{
115 bool error = false;
116
117 /* If there is no memory for memory or headers, throw error */
118 if ((!wave_headers) || (!main_buffer) || (!wavein_handle))
119 {
120 /* TODO: throw error! */
121 }
122
123 for (unsigned int i = 0; i < buffers; ++i)
124 {
126 if (err != MMSYSERR_NOERROR)
127 error = true;
128 }
129
130 if (error)
131 MessageBox(0, TEXT("waveInUnPrepareHeader Error."), 0, 0);
132}
UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, WAVEHDR *lpWaveInHdr, UINT uSize)
Definition: winmm.c:2684

Referenced by stop_recording().

Member Data Documentation

◆ aud_info

audio_format audio_wavein::aud_info
protected

◆ audio_rcvd

audio_receiver& audio_wavein::audio_rcvd
protected

Definition at line 48 of file audio_wavein.hpp.

Referenced by recording_procedure().

◆ buf_secs

float audio_wavein::buf_secs
protected

Definition at line 58 of file audio_wavein.hpp.

Referenced by buffer_secs(), init_(), and open().

◆ buffers

unsigned int audio_wavein::buffers
protected

◆ data_flushed_event

HANDLE audio_wavein::data_flushed_event
private

Definition at line 37 of file audio_wavein.hpp.

Referenced by init_(), open(), recording_procedure(), and stop_recording().

◆ main_buffer

BYTE* audio_wavein::main_buffer
protected

◆ mb_size

unsigned int audio_wavein::mb_size
protected

Definition at line 63 of file audio_wavein.hpp.

Referenced by alloc_buffers_mem_(), bufsz(), init_headers_(), and tot_samples_buf().

◆ recthread_id

DWORD audio_wavein::recthread_id
protected

Definition at line 51 of file audio_wavein.hpp.

Referenced by init_(), and open().

◆ status

audio_wavein_status audio_wavein::status
protected

Definition at line 54 of file audio_wavein.hpp.

Referenced by current_status(), and recording_procedure().

◆ wakeup_recthread

HANDLE audio_wavein::wakeup_recthread
private

Definition at line 36 of file audio_wavein.hpp.

Referenced by close(), init_(), open(), recording_procedure(), and start_recording().

◆ wave_format

WAVEFORMATEX audio_wavein::wave_format
protected

Definition at line 43 of file audio_wavein.hpp.

Referenced by init_(), and open().

◆ wave_headers

WAVEHDR* audio_wavein::wave_headers
protected

◆ wavein_handle

HWAVEIN audio_wavein::wavein_handle
protected

The documentation for this class was generated from the following files: