+
+void audio_set_callback(audio_callback_func func, void *cls)
+{
+ cbfunc = func;
+ cbcls = cls;
+}
+
+int audio_callback(void *buf, int sz)
+{
+ if(!cbfunc) {
+ return 0;
+ }
+ return cbfunc(buf, sz, cbcls);
+}
+
+void audio_play(int rate, int nchan)
+{
+ drv.start(rate, nchan);
+}
+
+void audio_pause(void)
+{
+ drv.pause();
+}
+
+void audio_resume(void)
+{
+ drv.cont();
+}
+
+void audio_stop(void)
+{
+ drv.stop();
+}
+
+void audio_volume(int vol)
+{
+ drv.volume(vol);
+}