Allow dma sound targets to specify an xfer function.

This commit is contained in:
Bill Currie 2011-09-07 17:00:18 +09:00
parent 9ffa1f410a
commit a8ea3aaad9
2 changed files with 5 additions and 1 deletions

View file

@ -81,6 +81,9 @@ struct dma_s {
\param endtime sample end time (count = endtime - snd_paintedtime)
*/
void (*xfer) (int endtime);
/** Optional data for the xfer function.
*/
void *xfer_data;
};
/** Describes the sound data.

View file

@ -289,7 +289,8 @@ s_startup (void)
sound_started = 0;
return;
}
snd_shm->xfer = s_xfer_paint_buffer;
if (!snd_shm->xfer)
snd_shm->xfer = s_xfer_paint_buffer;
sound_started = 1;
}