aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-01-03 19:18:06 -0800
committerChris Robinson <[email protected]>2014-01-03 19:18:06 -0800
commitd9846f321987230e16e09ac643f50dba893abd70 (patch)
tree501ee269df5f3ba7d4b0fc4cabba3704b8ef101b /OpenAL32
parente6e7e461c092bb2aa3211910a6eadf1472c07f1d (diff)
Move ALsoundfont methods to the right source file
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alSoundfont.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenAL32/alSoundfont.c b/OpenAL32/alSoundfont.c
index 8173526b..dde4b991 100644
--- a/OpenAL32/alSoundfont.c
+++ b/OpenAL32/alSoundfont.c
@@ -350,6 +350,44 @@ done:
}
+void ALsoundfont_Construct(ALsoundfont *self)
+{
+ self->ref = 0;
+
+ self->Presets = NULL;
+ self->NumPresets = 0;
+
+ self->Samples = NULL;
+ self->NumSamples = 0;
+
+ RWLockInit(&self->Lock);
+ self->Mapped = AL_FALSE;
+
+ self->id = 0;
+}
+
+void ALsoundfont_Destruct(ALsoundfont *self)
+{
+ ALsizei i;
+
+ FreeThunkEntry(self->id);
+ self->id = 0;
+
+ for(i = 0;i < self->NumPresets;i++)
+ {
+ DecrementRef(&self->Presets[i]->ref);
+ self->Presets[i] = NULL;
+ }
+ free(self->Presets);
+ self->Presets = NULL;
+ self->NumPresets = 0;
+
+ free(self->Samples);
+ self->Samples = NULL;
+ self->NumSamples = 0;
+}
+
+
/* ReleaseALSoundfonts
*
* Called to destroy any soundfonts that still exist on the device