gl: clear w, h on reinit
[libpicofe.git] / sndout.h
CommitLineData
26d3ca0d
GI
1#ifndef LIBPICOFE_SNDOUT_H
2#define LIBPICOFE_SNDOUT_H
3
4struct sndout_driver {
5 const char *name;
6 int (*init)(void);
7 void (*exit)(void);
8 int (*start)(int rate, int stereo);
9 void (*stop)(void);
10 void (*wait)(void);
11 int (*write_nb)(const void *data, int bytes);
12};
13
14extern struct sndout_driver sndout_current;
15
16void sndout_init(void);
17
18static inline void sndout_exit(void)
19{
20 sndout_current.exit();
21}
22
23static inline int sndout_start(int rate, int stereo)
24{
25 return sndout_current.start(rate, stereo);
26}
27
28static inline void sndout_stop(void)
29{
30 sndout_current.stop();
31}
32
33static inline void sndout_wait(void)
34{
35 sndout_current.wait();
36}
37
38static inline int sndout_write_nb(const void *data, int bytes)
39{
40 return sndout_current.write_nb(data, bytes);
41}
42
43#endif // LIBPICOFE_SNDOUT_H