CORE-13875 Added russian translation for timeout util
[reactos.git] / base / applications / sndrec32 / audio_resampler_acm.hpp
1 /* PROJECT: ReactOS sndrec32
2 * LICENSE: GPL - See COPYING in the top level directory
3 * FILE: base/applications/sndrec32/audio_resampler_acm.hpp
4 * PURPOSE: Windows ACM wrapper
5 * PROGRAMMERS: Marco Pagliaricci (irc: rendar)
6 */
7
8 #ifndef _AUDIORESAMPLERACM__H_
9 #define _AUDIORESAMPLERACM__H_
10
11 #include "audio_receiver.hpp"
12 #include "audio_format.hpp"
13
14 _AUDIO_NAMESPACE_START_
15
16 /* TODO: inherit from a base resampler? */
17 class audio_resampler_acm : public audio_receiver
18 {
19 private:
20 void init_(void);
21
22 protected:
23 HACMSTREAM acm_stream;
24 ACMSTREAMHEADER acm_header;
25 DWORD src_buflen;
26 DWORD dst_buflen;
27 bool stream_opened;
28
29 audio_format audfmt_in;
30 audio_format audfmt_out;
31
32 float buf_secs;
33
34 WAVEFORMATEX wformat_src;
35 WAVEFORMATEX wformat_dst;
36
37 public:
38 /* Ctors */
39 audio_resampler_acm(audio_format fmt_in,
40 audio_format fmt_out) : acm_stream(0),
41 src_buflen(0),
42 dst_buflen(0),
43 stream_opened(false),
44 audfmt_in(fmt_in),
45 audfmt_out(fmt_out),
46 buf_secs(_AUDIO_DEFAULT_BUFSECS)
47 {
48 init_();
49 }
50
51 /* Dtor */
52 ~audio_resampler_acm(void)
53 {
54 }
55
56 /* Public functions */
57 void open(void);
58 void close(void);
59 void audio_receive(unsigned char *, unsigned int);
60 };
61
62 _AUDIO_NAMESPACE_END_
63
64 #endif /* _AUDIORESAMPLERACM__H_ */