19#define gprintf _snprintf
21#define gprintf _snwprintf
94 s_info.cbSize =
sizeof( NONCLIENTMETRICS );
122 sizeof(NONCLIENTMETRICS),
127 s_info.lfMenuFont.lfHeight = 14;
145 snd::audio_membuffer AUD_buffer(snd::A44100_16BIT_STEREO);
146 snd::audio_waveout AUD_waveout(snd::A44100_16BIT_STEREO, AUD_buffer);
147 snd::audio_wavein AUD_wavein(snd::A44100_16BIT_STEREO, AUD_buffer);
220 return (
int)
msg.wParam;
308 TEXT(
"sndrec32_wave"),
347 unsigned int x, line_h;
360 if (
AUD_OUT->current_status() == snd::WAVEOUT_PLAYING)
379 else if (
AUD_IN->current_status() == snd::WAVEIN_RECORDING)
385 line_h = (
AUD_IN->nsample(
x) * max_h) /
AUD_IN->samplevalue_max();
433 long long slid_samp = 0;
454 for (
int i = 0;
i < 5; ++
i)
539 if (
AUD_IN->current_status() == snd::WAVEIN_RECORDING)
542 if ((
AUD_OUT->current_status() == snd::WAVEOUT_PLAYING) ||
543 (
AUD_OUT->current_status() == snd::WAVEOUT_PAUSED))
722 AUD_IN->start_recording();
775 if (
AUD_IN->current_status() == snd::WAVEIN_RECORDING)
780 (
float)((
float)
AUD_BUF->bytes_recorded() / (
float)
AUD_BUF->audinfo().byte_rate()));
783 else if (
AUD_OUT->current_status() == snd::WAVEOUT_PLAYING)
788 (
float)((
float)
AUD_BUF->bytes_played() / (
float)
AUD_BUF->audinfo().byte_rate()));
834 (
float)((
float)
AUD_BUF->mem_size() / 1024.0f));
848 (
float)((
float)
AUD_BUF->audinfo().sample_rate() / 1000.0f),
933 DWORD bytes_recorded_in_wav = 0;
946 TEXT(
"Cannot open file. CreateFile() error."),
957 TEXT(
"Cannot read RIFF header."),
969 TEXT(
"Cannot read WAVE header."),
981 TEXT(
"Cannot read WAVE subchunk."),
989 bytes_recorded_in_wav =
r.chunksize - 36;
990 if (bytes_recorded_in_wav == 0)
993 TEXT(
"Cannot read file. No audio data."),
1001 snd::audio_format openfmt(
w.SampleRate,
w.BitsPerSample,
w.NumChannels);
1004 AUD_BUF->alloc_bytes(bytes_recorded_in_wav);
1008 bytes_recorded_in_wav,
1012 AUD_BUF->set_b_received(bytes_recorded_in_wav);
1014 if ((!
b) || (is_read != bytes_recorded_in_wav))
1017 TEXT(
"Cannot read file. Error reading audio data."),
1057 TEXT(
"File already exist. Overwrite it?"),
1067 TEXT(
"File Error, CreateFile() failed."),
1078 r.magic = 0x46464952;
1079 r.format = 0x45564157;
1080 r.chunksize = 36 +
AUD_BUF->bytes_recorded();
1082 w.Subchunkid = 0x20746d66;
1083 w.Subchunk1Size = 16;
1085 w.NumChannels =
AUD_BUF->audinfo().channels();
1086 w.SampleRate =
AUD_BUF->audinfo().sample_rate();
1087 w.ByteRate =
AUD_BUF->audinfo().byte_rate();
1088 w.BlockAlign =
AUD_BUF->audinfo().block_align();
1089 w.BitsPerSample =
AUD_BUF->audinfo().bits();
1091 d.subc = 0x61746164;
1092 d.subc_size =
AUD_BUF->bytes_recorded();
1099 TEXT(
"File Error, WriteFile() failed."),
1111 TEXT(
"File Error, WriteFile() failed."),
1123 TEXT(
"File Error, WriteFile() failed."),
1139 TEXT(
"File Error, WriteFile() failed."),
FORCEINLINE VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
#define IDC_REACTOS_SNDREC32
#define IDI_REACTOS_SNDREC32
#define IDB_BITMAP2_END_DIS
#define IDB_BITMAP2_PLAY_DIS
#define IDB_BITMAP2_STOP_DIS
#define IDB_BITMAP2_START_DIS
#define IDB_BITMAP2_START
#define ID_EDIT_AUDIOPROPS
#define IDB_BITMAP2_REC_DIS
VOID WINAPI InitCommonControls(void)
#define OFN_OVERWRITEPROMPT
#define OFN_FILEMUSTEXIST
#define ReadFile(a, b, c, d, e)
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
LANGID WINAPI GetUserDefaultUILanguage(void)
GLint GLint GLint GLint GLint x
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLubyte GLubyte GLubyte GLubyte w
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
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define UNREFERENCED_PARAMETER(P)
#define TBS_ENABLESELRANGE
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
BOOL InitInstance_wave(HWND, HINSTANCE, int)
TCHAR szTitle[MAX_LOADSTRING]
snd::audio_waveout * AUD_OUT
TCHAR str_dur[MAX_LOADSTRING]
TCHAR str_fmt[MAX_LOADSTRING]
TCHAR str_buf[MAX_LOADSTRING]
BOOL InitInstance(HINSTANCE, int)
snd::audio_wavein * AUD_IN
VOID disable_but(DWORD id)
VOID enable_but(DWORD id)
snd::audio_membuffer * AUD_BUF
TCHAR str_pos[MAX_LOADSTRING]
TCHAR str_chan[MAX_LOADSTRING]
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM)
ATOM MyRegisterClass_wave(HINSTANCE hInstance)
ATOM MyRegisterClass(HINSTANCE hInstance)
TCHAR szWindowClass[MAX_LOADSTRING]
TCHAR file_path[MAX_PATH]
void l_buffer_resized(unsigned int new_size)
void l_play_finished(void)
void l_audio_arrival(unsigned int samples_arrival)
LRESULT CALLBACK WndProc_wave(HWND, UINT, WPARAM, LPARAM)
#define WAVEBAR_TIMERTIME
#define INITIAL_BUFREC_SECONDS
TW_UINT32 TW_UINT16 TW_UINT16 MSG
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define CreateFontIndirect
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UpdateWindow(_In_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SystemParametersInfo
#define TranslateAccelerator
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
HMENU WINAPI GetMenu(_In_ HWND)