From 41fdd962e4fc79f4a77769d95b63f8c1057e4a86 Mon Sep 17 00:00:00 2001 From: relnev Date: Wed, 8 Jan 2003 05:04:41 +0000 Subject: the final mile git-svn-id: svn://svn.icculus.org/blackshades/trunk@37 5198baeb-e213-0410-be47-fc2ff85ca46f --- Source/Support.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'Source/Support.cpp') 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); +} -- cgit v1.2.3