ReactOS
0.4.16-dev-88-ga65b6ae
sndrec32.h
Go to the documentation of this file.
1
/* PROJECT: ReactOS sndrec32
2
* LICENSE: GPL - See COPYING in the top level directory
3
* FILE: base/applications/sndrec32/sndrec32.h
4
* PURPOSE: Sound recording
5
* PROGRAMMERS: Marco Pagliaricci (irc: rendar)
6
*/
7
8
#pragma once
9
10
#include "
resource.h
"
11
#include "
audio_api.hpp
"
12
13
#define MAX_LOADSTRING 100
14
15
#define MAINWINDOW_W 350
16
#define MAINWINDOW_H 190
17
18
#define CONTROLS_CX 10
19
20
#define INITIAL_BUFREC_SECONDS 30.0f
21
22
#define BUTSTART_ID 0
23
#define BUTEND_ID 1
24
#define BUTPLAY_ID 2
25
#define BUTSTOP_ID 3
26
#define BUTREC_ID 4
27
#define SLIDER_ID 5
28
#define WAVEBAR_ID 6
29
30
#define BUTTONS_H 30
31
#define BUTTONS_W 60
32
#define BUTTONS_CY 100
33
#define BUTTONS_CX (CONTROLS_CX)
34
#define BUTTONS_SPACE 5
35
36
#define SLIDER_CX CONTROLS_CX
37
#define SLIDER_CY 65
38
#define SLIDER_H 30
39
#define SLIDER_W 320
40
41
#define STRPOS_X 240
42
#define STRPOS_Y 5
43
44
#define STRDUR_X (STRPOS_X)
45
#define STRDUR_Y (STRPOS_Y + 13)
46
47
#define STRBUF_X (STRDUR_X)
48
#define STRBUF_Y (STRDUR_Y + 13)
49
50
#define STRFMT_X 10
51
#define STRFMT_Y (STRPOS_Y)
52
53
#define STRCHAN_X (STRFMT_X)
54
#define STRCHAN_Y (STRFMT_Y + 13)
55
56
#define WAVEBAR_X (CONTROLS_CX + 90)
57
#define WAVEBAR_Y (STRPOS_Y)
58
#define WAVEBAR_CX 130
59
#define WAVEBAR_CY 50
60
61
#define WAVEBAR_TIMERID 2
62
#define WAVEBAR_TIMERTIME 80
63
64
#define WAVEBAR_COLOR (RGB(0, 0, 255))
65
66
#define REFRESHA_X (STRPOS_X)
67
#define REFRESHA_Y (STRPOS_Y)
68
#define REFRESHA_CX (REFRESHA_X + 100)
69
#define REFRESHA_CY (REFRESHA_Y + 55)
70
71
#define REFRESHB_X (STRFMT_X)
72
#define REFRESHB_Y (STRFMT_Y)
73
#define REFRESHB_CX (REFRESHB_X + 85)
74
#define REFRESHB_CY (REFRESHB_Y + 55)
75
76
struct
riff_hdr
77
{
78
DWORD
magic
;
79
DWORD
chunksize
;
80
DWORD
format
;
81
};
82
83
struct
wave_hdr
84
{
85
DWORD
Subchunkid
;
86
DWORD
Subchunk1Size
;
87
WORD
AudioFormat
;
88
WORD
NumChannels
;
89
DWORD
SampleRate
;
90
DWORD
ByteRate
;
91
WORD
BlockAlign
;
92
WORD
BitsPerSample
;
93
};
94
95
struct
data_chunk
96
{
97
DWORD
subc
;
98
DWORD
subc_size
;
99
//unsigned char data[];
100
};
101
102
/* Functions prototypes */
103
104
LRESULT
CALLBACK
Buttons_proc
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
105
106
BOOL
write_wav
(
TCHAR
*);
107
BOOL
open_wav
(
TCHAR
*);
108
VOID
enable_but
(
DWORD
);
109
VOID
disable_but
(
DWORD
);
110
111
void
l_play_finished
(
void
);
112
void
l_audio_arrival
(
unsigned
int
);
113
void
l_buffer_resized
(
unsigned
int
);
audio_api.hpp
CALLBACK
#define CALLBACK
Definition:
compat.h:35
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
WORD
unsigned short WORD
Definition:
ntddk_ex.h:93
void
Definition:
nsiface.idl:2307
UINT
unsigned int UINT
Definition:
ndis.h:50
open_wav
BOOL open_wav(TCHAR *)
Definition:
sndrec32.cpp:923
write_wav
BOOL write_wav(TCHAR *)
Definition:
sndrec32.cpp:1043
Buttons_proc
LRESULT CALLBACK Buttons_proc(HWND, UINT, WPARAM, LPARAM)
disable_but
VOID disable_but(DWORD)
Definition:
sndrec32.cpp:917
enable_but
VOID enable_but(DWORD)
Definition:
sndrec32.cpp:911
l_buffer_resized
void l_buffer_resized(unsigned int)
Definition:
sndrec32.cpp:907
l_play_finished
void l_play_finished(void)
Definition:
sndrec32.cpp:890
l_audio_arrival
void l_audio_arrival(unsigned int)
Definition:
sndrec32.cpp:902
data_chunk
Definition:
sndrec32.h:96
data_chunk::subc_size
DWORD subc_size
Definition:
sndrec32.h:98
data_chunk::subc
DWORD subc
Definition:
sndrec32.h:97
riff_hdr
Definition:
sndrec32.h:77
riff_hdr::magic
DWORD magic
Definition:
sndrec32.h:78
riff_hdr::format
DWORD format
Definition:
sndrec32.h:80
riff_hdr::chunksize
DWORD chunksize
Definition:
sndrec32.h:79
wave_hdr
Definition:
sndrec32.h:84
wave_hdr::SampleRate
DWORD SampleRate
Definition:
sndrec32.h:89
wave_hdr::Subchunkid
DWORD Subchunkid
Definition:
sndrec32.h:85
wave_hdr::ByteRate
DWORD ByteRate
Definition:
sndrec32.h:90
wave_hdr::Subchunk1Size
DWORD Subchunk1Size
Definition:
sndrec32.h:86
wave_hdr::NumChannels
WORD NumChannels
Definition:
sndrec32.h:88
wave_hdr::BitsPerSample
WORD BitsPerSample
Definition:
sndrec32.h:92
wave_hdr::BlockAlign
WORD BlockAlign
Definition:
sndrec32.h:91
wave_hdr::AudioFormat
WORD AudioFormat
Definition:
sndrec32.h:87
resource.h
LPARAM
LONG_PTR LPARAM
Definition:
windef.h:208
LRESULT
LONG_PTR LRESULT
Definition:
windef.h:209
WPARAM
UINT_PTR WPARAM
Definition:
windef.h:207
TCHAR
char TCHAR
Definition:
xmlstorage.h:189
base
applications
sndrec32
sndrec32.h
Generated on Thu Oct 3 2024 06:02:22 for ReactOS by
1.9.6