6e39d565dc2ce5f5038ff523e34765a480e35139
[reactos.git] / reactos / base / applications / sndrec32 / audio_receiver.hpp
1 #ifndef _AUDIORECEIVER_DEF__H_
2 #define _AUDIORECEIVER_DEF__H_
3
4
5
6 #include "audio_def.hpp"
7
8
9
10
11 _AUDIO_NAMESPACE_START_
12
13
14
15
16 //TODO: differenziare audio_receiver da audio_sink?
17 //TODO: creare un audio_receiver Tee
18
19
20
21
22
23 class audio_receiver
24 {
25
26 //
27 // The `audio_wavein' class, while is
28 // recording audio, has to access to
29 // protected members of `audio_receiver'
30 // such as `bytes_received' protected
31 // variable.
32 //
33
34 friend class audio_wavein;
35
36
37
38
39
40
41 protected:
42
43
44 unsigned int bytes_received;
45 unsigned int status;
46
47
48
49 public:
50
51
52 //
53 // Ctors
54 //
55
56 audio_receiver( void )
57 : bytes_received( 0 )
58 { }
59
60
61
62
63
64 //
65 // Dtor
66 //
67
68 virtual ~audio_receiver( void )
69 { }
70
71
72
73
74 //
75 // Public Functions
76 //
77
78 virtual void audio_receive( unsigned char *, unsigned int ) = 0;
79
80 //virtual void start_rec( void ) = 0;
81 //virtual void stop_rec( void ) = 0;
82
83
84
85 void set_b_received( unsigned int r )
86 { bytes_received = r; }
87 };
88
89
90
91
92
93
94
95 _AUDIO_NAMESPACE_END_
96
97
98
99
100
101
102
103 #endif //ifdef _AUDIORECEIVER_DEF__H_