* Sync with recent trunk (r52637).
[reactos.git] / base / applications / sndrec32 / audio_receiver.hpp
1 /* PROJECT: ReactOS sndrec32
2 * LICENSE: GPL - See COPYING in the top level directory
3 * FILE: base/applications/sndrec32/audio_receiver.hpp
4 * PURPOSE: Audio receiver
5 * PROGRAMMERS: Marco Pagliaricci (irc: rendar)
6 */
7
8
9
10 #ifndef _AUDIORECEIVER_DEF__H_
11 #define _AUDIORECEIVER_DEF__H_
12
13
14
15 #include "audio_def.hpp"
16
17
18
19
20 _AUDIO_NAMESPACE_START_
21
22
23
24
25
26
27
28
29
30
31 class audio_receiver
32 {
33
34 //
35 // The `audio_wavein' class, while is
36 // recording audio, has to access to
37 // protected members of `audio_receiver'
38 // such as `bytes_received' protected
39 // variable.
40 //
41
42 friend class audio_wavein;
43
44
45
46
47
48
49 protected:
50
51
52 unsigned int bytes_received;
53
54
55
56 public:
57
58
59 //
60 // Ctors
61 //
62
63 audio_receiver( void )
64 : bytes_received( 0 )
65 { }
66
67
68
69
70
71 //
72 // Dtor
73 //
74
75 virtual ~audio_receiver( void )
76 { }
77
78
79
80
81 //
82 // Public Functions
83 //
84
85 virtual void audio_receive( unsigned char *, unsigned int ) = 0;
86
87
88
89
90 void set_b_received( unsigned int r )
91 { bytes_received = r; }
92 };
93
94
95
96
97
98
99
100 _AUDIO_NAMESPACE_END_
101
102
103
104
105
106
107
108 #endif //ifdef _AUDIORECEIVER_DEF__H_