#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "audio.h"
static int au_callback(void *buffer, int size, void *cls);
/* snd_click_size is < 65536 so we can just throw it all at once in there */
static int au_callback(void *buffer, int size, void *cls)
{
- int i;
- signed char *ptr = buffer;
- signed char *src = snd_click;
- /*
- for(i=0; i<size; i++) {
- if((i / 32) & 1) {
- *ptr++ = -64;
- } else {
- *ptr++ = 64;
- }
- }
- */
- /*memcpy(buffer, snd_click, snd_click_size);*/
-
- for(i=0; i<snd_click_size; i++) {
- *ptr++ = *src++;
- }
-
+ memcpy(buffer, snd_click, snd_click_size);
return snd_click_size;
}