diff options
| author | relnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-08 05:04:41 +0000 |
|---|---|---|
| committer | relnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-08 05:04:41 +0000 |
| commit | 41fdd962e4fc79f4a77769d95b63f8c1057e4a86 (patch) | |
| tree | 380a2ef201832164dd711d7cf4b507201ebc5796 /Source/Support.cpp | |
| parent | 22b7b35a97f9db73d2f14d1f692a6f8880bcae52 (diff) | |
| download | blackshades-41fdd962e4fc79f4a77769d95b63f8c1057e4a86.tar.gz | |
the final mile
git-svn-id: svn://svn.icculus.org/blackshades/trunk@37 5198baeb-e213-0410-be47-fc2ff85ca46f
Diffstat (limited to 'Source/Support.cpp')
| -rw-r--r-- | Source/Support.cpp | 29 |
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); +} |
