aboutsummaryrefslogtreecommitdiff
path: root/win32/soundout.h
blob: edfa501d478ca2dce6145e49b03236ecbddabf16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef MYON_SOUNDOUT_H_INCLUDED
#define MYON_SOUNDOUT_H_INCLUDED

#include <stdint.h>
#include <windows.h>

typedef void (*sound_callback)(void *userdata, int16_t *buf, unsigned frames);
struct sound_state {
  void *driver_state;
  void (*pause)(struct sound_state *state, int pause);
  void (*delete)(struct sound_state *state);
  void *userptr;
};

struct sound_state *sound_init(HWND hwnd, unsigned srate, unsigned sectlen,
                               sound_callback cbfunc, void *userptr);

#endif // MYON_SOUNDOUT_H_INCLUDED