6 void *(*get_buffer)(int *size);
7 void (*start)(int rate, int nchan);
11 void (*volume)(int vol);
14 static struct audrv drv;
16 static audio_callback_func cbfunc;
22 drv.get_buffer = sb_buffer;
25 drv.cont = sb_continue;
27 drv.volume = sb_volume;
31 printf("No supported audio device detected\n");
34 void audio_set_callback(audio_callback_func func, void *cls)
40 int audio_callback(void *buf, int sz)
45 return cbfunc(buf, sz, cbcls);
48 void audio_play(int rate, int nchan)
50 drv.start(rate, nchan);
53 void audio_pause(void)
58 void audio_resume(void)
68 void audio_volume(int vol)