aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSoundfont.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-02-04 19:19:43 -0800
committerChris Robinson <[email protected]>2015-02-04 23:39:51 -0800
commit61743a3a0017c567ee62ab50c3da28a5ed2fed8d (patch)
tree8f928cd0b98695c43921a89efd38e2ca141be9a6 /OpenAL32/alSoundfont.c
parentefb7b11d7f60d7fe6b1c10c21b4790f5a1dcd728 (diff)
Avoid unnecessary uses of ExchangeInt/Ptr
Diffstat (limited to 'OpenAL32/alSoundfont.c')
-rw-r--r--OpenAL32/alSoundfont.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenAL32/alSoundfont.c b/OpenAL32/alSoundfont.c
index 44f5c35c..8ea4c750 100644
--- a/OpenAL32/alSoundfont.c
+++ b/OpenAL32/alSoundfont.c
@@ -360,26 +360,26 @@ ALsoundfont *ALsoundfont_getDefSoundfont(ALCcontext *context)
void ALsoundfont_deleteSoundfont(ALsoundfont *self, ALCdevice *device)
{
- ALsfpreset **presets;
- ALsizei num_presets;
+ ALsfpreset **presets = self->Presets;
+ ALsizei num_presets = self->NumPresets;
VECTOR(ALbuffer*) buffers;
ALsizei i;
VECTOR_INIT(buffers);
- presets = ExchangePtr((XchgPtr*)&self->Presets, NULL);
- num_presets = ExchangeInt(&self->NumPresets, 0);
+
+ self->Presets = NULL;
+ self->NumPresets = 0;
for(i = 0;i < num_presets;i++)
{
ALsfpreset *preset = presets[i];
- ALfontsound **sounds;
- ALsizei num_sounds;
+ ALfontsound **sounds = preset->Sounds;
+ ALsizei num_sounds = preset->NumSounds;
ALboolean deleting;
ALsizei j;
- sounds = ExchangePtr((XchgPtr*)&preset->Sounds, NULL);
- num_sounds = ExchangeInt(&preset->NumSounds, 0);
-
+ preset->Sounds = NULL;
+ preset->NumSounds = 0;
DeletePreset(device, preset);
preset = NULL;