aboutsummaryrefslogtreecommitdiff
path: root/Source/Support.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Support.cpp')
-rw-r--r--Source/Support.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/Support.cpp b/Source/Support.cpp
index 3e47035..a05a0a4 100644
--- a/Source/Support.cpp
+++ b/Source/Support.cpp
@@ -67,3 +67,32 @@ void Files::EndLoad()
}
+void alutLoadWAVFile(char *filename, ALenum *format, void **wave,
+ unsigned int *size, ALsizei *freq)
+{
+ char filename1[256];
+ ALsizei format1, size1, bits1, freq1;
+ int i, len;
+
+ strncpy(filename1, filename, sizeof(filename1));
+ filename1[sizeof(filename1)-1] = 0;
+
+ len = strlen(filename1);
+ for (i = 0; i < len; i++) {
+ if (filename1[i] == ':') {
+ filename1[i] = '/';
+ }
+ }
+
+ alutLoadWAV(filename1, wave, &format1, &size1, &bits1, &freq1);
+
+ *format = format1;
+ *size = size1;
+ *freq = freq1;
+}
+
+void alutUnloadWAV(ALenum format, void *wave, unsigned int size,
+ ALsizei freq)
+{
+ free(wave);
+}