|
Lines 98-105
Link Here
|
| 98 |
ALsizei |
98 |
ALsizei |
| 99 |
format = AL_FORMAT_MONO16, |
99 |
format = AL_FORMAT_MONO16, |
| 100 |
size = 0, |
100 |
size = 0, |
| 101 |
bits = 0, |
|
|
| 102 |
freq = 44100; |
101 |
freq = 44100; |
|
|
102 |
ALboolean bits = 0; |
| 103 |
|
103 |
|
| 104 |
CString extension = realfile.mid(realfile.length() - 4); |
104 |
CString extension = realfile.mid(realfile.length() - 4); |
| 105 |
extension.toLower(); |
105 |
extension.toLower(); |
|
Lines 108-114
Link Here
|
| 108 |
{ |
108 |
{ |
| 109 |
//the loading proc |
109 |
//the loading proc |
| 110 |
ALboolean (*alutLoadVorbis)(ALuint, ALvoid *, ALint) = |
110 |
ALboolean (*alutLoadVorbis)(ALuint, ALvoid *, ALint) = |
| 111 |
(ALboolean (*)(ALuint, ALvoid *, ALint))alGetProcAddress((ALubyte *) VORBISFUNC); |
111 |
(ALboolean (*)(ALuint, ALvoid *, ALint))alGetProcAddress(VORBISFUNC); |
| 112 |
|
112 |
|
| 113 |
if(alutLoadVorbis == NULL) |
113 |
if(alutLoadVorbis == NULL) |
| 114 |
{ |
114 |
{ |
|
Lines 134-140
Link Here
|
| 134 |
{ |
134 |
{ |
| 135 |
//the loading proc |
135 |
//the loading proc |
| 136 |
ALboolean (*alutLoadMP3)(ALuint, ALvoid *, ALint) = |
136 |
ALboolean (*alutLoadMP3)(ALuint, ALvoid *, ALint) = |
| 137 |
(ALboolean (*)(ALuint, ALvoid *, ALint))alGetProcAddress((ALubyte *) MP3FUNC); |
137 |
(ALboolean (*)(ALuint, ALvoid *, ALint))alGetProcAddress(MP3FUNC); |
| 138 |
|
138 |
|
| 139 |
if(alutLoadMP3 == NULL) |
139 |
if(alutLoadMP3 == NULL) |
| 140 |
{ |
140 |
{ |
|
Lines 159-165
Link Here
|
| 159 |
else //default: load as wave file |
159 |
else //default: load as wave file |
| 160 |
{ |
160 |
{ |
| 161 |
alGenBuffers(1, &m_Buffer); |
161 |
alGenBuffers(1, &m_Buffer); |
| 162 |
alutLoadWAV(realfile.c_str(), &wave, &format, &size, &bits, &freq); |
162 |
alutLoadWAVFile((ALbyte *) realfile.c_str(), &format, &wave, &size, &freq, &bits); |
| 163 |
alBufferData(m_Buffer, format, wave, size, freq); |
163 |
alBufferData(m_Buffer, format, wave, size, freq); |
| 164 |
} |
164 |
} |
| 165 |
|
165 |
|