OSDN Git Service

[MOVIE_SAVER][Qt] Audio: add using libmp3lame and libvorbis, to encode movie.
[csp-qt/common_source_project-fm7.git] / source / src / fifo.h
1 /*
2         Skelton for retropc emulator
3
4         Author : Takeda.Toshiya
5         Date   : 2006.09.17-
6
7         [ fifo buffer ]
8 */
9
10 #ifndef _FIFO_H_
11 #define _FIFO_H_
12
13 #include "common.h"
14
15 class FIFO
16 {
17 private:
18         int size;
19         int* buf;
20         int cnt, rpt, wpt;
21 public:
22         FIFO(int s);
23         void release();
24         void clear();
25         void write(int val);
26         int read();
27         int read_not_remove(int pt);
28         int count();
29         bool full();
30         bool empty();
31         void save_state(void *f);
32         bool load_state(void *f);
33 };
34
35 #endif
36