aboutsummaryrefslogtreecommitdiff
path: root/win32/soundout.c
blob: 7f04e16b55b2a2d9b76f450e2e7e7cb0fbf1811a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "soundout.h"
#include "dsoundout.h"
#include "waveout.h"

struct sound_state *sound_init(HWND hwnd, unsigned srate, unsigned sectlen,
                               sound_callback cbfunc, void *userptr) {
  struct sound_state *state;
  state = dsound_init(hwnd, srate, sectlen, cbfunc, userptr);
  if (state) {
    return state;
  }
  state = waveout_init(hwnd, srate, sectlen, cbfunc, userptr);
  if (state) {
    return state;
  }
  return 0;
}