ReactOS 0.4.15-dev-7931-gfd331f1
audio_producer.hpp
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/audio_producer.hpp
4 * PURPOSE: Audio producer
5 * PROGRAMMERS: Marco Pagliaricci (irc: rendar)
6 */
7
8#ifndef _AUDIOAUDBUF__H_
9#define _AUDIOAUDBUF__H_
10
11#include "audio_def.hpp"
12
14
16{
17 protected:
18 unsigned int bytes_played_;
19
20 public:
21 /* Ctors */
23 {
24 }
25
26 /* Dtor */
27 virtual ~audio_producer(void)
28 {
29 }
30
31 /* Public Functions */
32
33 /* reads N bytes from the buffer */
34 virtual unsigned int read(BYTE *, unsigned int) = 0;
35
36 virtual bool finished(void) = 0;
37
38 unsigned int bytes_played(void) const
39 {
40 return bytes_played_;
41 }
42
43 void set_position(unsigned int pos)
44 {
46 }
47
49 {
50 bytes_played_ = 0;
51 }
52
53 void forward(unsigned int bytes)
54 {
56 }
57
58 void backward(unsigned int bytes)
59 {
61 }
62
64};
65
67
68#endif /* _AUDIOAUDBUF__H_ */
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
#define _AUDIO_NAMESPACE_START_
Definition: audio_def.hpp:24
#define _AUDIO_NAMESPACE_END_
Definition: audio_def.hpp:25
void backward(unsigned int bytes)
virtual unsigned int read(BYTE *, unsigned int)=0
unsigned int bytes_played_
void(* play_finished)(void)
void set_position_start(void)
void forward(unsigned int bytes)
unsigned int bytes_played(void) const
virtual bool finished(void)=0
void set_position(unsigned int pos)
virtual ~audio_producer(void)
unsigned char BYTE
Definition: xxhash.c:193