Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Replaced a few memset/memcpy calls with SDL_memset/SDL_memcpy.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 5, 2007
1 parent 229f53e commit 4ea0b12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/testmultiaudio.c
Expand Up @@ -21,12 +21,12 @@ play_through_once(void *arg, Uint8 * stream, int len)
if (cpy > waveleft)
cpy = waveleft;

memcpy(stream, waveptr, cpy);
SDL_memcpy(stream, waveptr, cpy);
len -= cpy;
cbd->soundpos += cpy;
if (len > 0) {
stream += cpy;
memset(stream, spec.silence, len);
SDL_memset(stream, spec.silence, len);
cbd->done++;
}
}
Expand All @@ -51,7 +51,7 @@ test_multi_audio(int devcount)
printf("playing on device #%d: ('%s')...", i, devname);
fflush(stdout);

memset(&cbd[0], '\0', sizeof(callback_data));
SDL_memset(&cbd[0], '\0', sizeof(callback_data));
spec.userdata = &cbd[0];
cbd[0].dev = SDL_OpenAudioDevice(devname, 0, &spec, NULL);
if (cbd[0].dev == 0) {
Expand All @@ -66,7 +66,7 @@ test_multi_audio(int devcount)
}
}

memset(cbd, '\0', sizeof(cbd));
SDL_memset(cbd, '\0', sizeof(cbd));

printf("playing on all devices...\n");
for (i = 0; i < devcount; i++) {
Expand Down

0 comments on commit 4ea0b12

Please sign in to comment.