audio: Replace some SDL_memcpy calls with SDL_copyp.

This commit is contained in:
Ryan C. Gordon 2023-09-20 10:01:52 -04:00
parent 0dc0434a3e
commit 2a950f6ae6
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 2 additions and 2 deletions

View File

@ -277,8 +277,8 @@ static SDL_AudioDevice *CreatePhysicalAudioDevice(const char *name, SDL_bool isc
SDL_AtomicSet(&device->condemned, 0);
SDL_AtomicSet(&device->zombie, 0);
device->iscapture = iscapture;
SDL_memcpy(&device->spec, spec, sizeof (SDL_AudioSpec));
SDL_memcpy(&device->default_spec, spec, sizeof (SDL_AudioSpec));
SDL_copyp(&device->spec, spec);
SDL_copyp(&device->default_spec, spec);
device->sample_frames = GetDefaultSampleFramesFromFreq(device->spec.freq);
device->silence_value = SDL_GetSilenceValueForFormat(device->spec.format);
device->handle = handle;