diff options
Diffstat (limited to 'linden/indra/llaudio/audioengine_fmod.cpp')
-rw-r--r-- | linden/indra/llaudio/audioengine_fmod.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/linden/indra/llaudio/audioengine_fmod.cpp b/linden/indra/llaudio/audioengine_fmod.cpp index 0fb5146..271074e 100644 --- a/linden/indra/llaudio/audioengine_fmod.cpp +++ b/linden/indra/llaudio/audioengine_fmod.cpp | |||
@@ -117,16 +117,16 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata) | |||
117 | // Reserve one extra channel for the http stream. | 117 | // Reserve one extra channel for the http stream. |
118 | if (!FSOUND_SetMinHardwareChannels(num_channels + 1)) | 118 | if (!FSOUND_SetMinHardwareChannels(num_channels + 1)) |
119 | { | 119 | { |
120 | llwarns<< "FMOD::init[0](), error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl; | 120 | LL_WARNS("AppInit") << "FMOD::init[0](), error: " << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; |
121 | } | 121 | } |
122 | 122 | ||
123 | llinfos << "LLAudioEngine_FMOD::init() initializing FMOD" << llendl; | 123 | LL_DEBUGS("AppInit") << "LLAudioEngine_FMOD::init() initializing FMOD" << LL_ENDL; |
124 | 124 | ||
125 | F32 version = FSOUND_GetVersion(); | 125 | F32 version = FSOUND_GetVersion(); |
126 | if (version < FMOD_VERSION) | 126 | if (version < FMOD_VERSION) |
127 | { | 127 | { |
128 | llwarns << "Error : You are using the wrong FMOD version (" << version | 128 | LL_WARNS("AppInit") << "Error : You are using the wrong FMOD version (" << version |
129 | << ")! You should be using FMOD " << FMOD_VERSION << llendl; | 129 | << ")! You should be using FMOD " << FMOD_VERSION << LL_ENDL; |
130 | //return FALSE; | 130 | //return FALSE; |
131 | } | 131 | } |
132 | 132 | ||
@@ -140,8 +140,8 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata) | |||
140 | // between minimized and not-focused states. | 140 | // between minimized and not-focused states. |
141 | if (!FSOUND_SetHWND(userdata)) | 141 | if (!FSOUND_SetHWND(userdata)) |
142 | { | 142 | { |
143 | llwarns << "Error setting FMOD window: " | 143 | LL_WARNS("AppInit") << "Error setting FMOD window: " |
144 | << FMOD_ErrorString(FSOUND_GetError()) << llendl; | 144 | << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; |
145 | return FALSE; | 145 | return FALSE; |
146 | } | 146 | } |
147 | // Play audio when we don't have focus. | 147 | // Play audio when we don't have focus. |
@@ -159,7 +159,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata) | |||
159 | // otherwise valgrind will fall over on FMOD's MMX detection | 159 | // otherwise valgrind will fall over on FMOD's MMX detection |
160 | if (getenv("LL_VALGRIND")) /*Flawfinder: ignore*/ | 160 | if (getenv("LL_VALGRIND")) /*Flawfinder: ignore*/ |
161 | { | 161 | { |
162 | llinfos << "Pacifying valgrind in FMOD init." << llendl; | 162 | LL_INFOS("AppInit") << "Pacifying valgrind in FMOD init." << LL_ENDL; |
163 | FSOUND_SetMixer(FSOUND_MIXER_QUALITY_FPU); | 163 | FSOUND_SetMixer(FSOUND_MIXER_QUALITY_FPU); |
164 | } | 164 | } |
165 | 165 | ||
@@ -175,58 +175,58 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata) | |||
175 | if (!audio_ok) | 175 | if (!audio_ok) |
176 | if (NULL == getenv("LL_BAD_ESD")) /*Flawfinder: ignore*/ | 176 | if (NULL == getenv("LL_BAD_ESD")) /*Flawfinder: ignore*/ |
177 | { | 177 | { |
178 | llinfos << "Trying ESD audio output..." << llendl; | 178 | LL_DEBUGS("AppInit") << "Trying ESD audio output..." << LL_ENDL; |
179 | if(FSOUND_SetOutput(FSOUND_OUTPUT_ESD) && | 179 | if(FSOUND_SetOutput(FSOUND_OUTPUT_ESD) && |
180 | FSOUND_Init(44100, num_channels, fmod_flags)) | 180 | FSOUND_Init(44100, num_channels, fmod_flags)) |
181 | { | 181 | { |
182 | llinfos << "ESD audio output initialized OKAY" | 182 | LL_DEBUGS("AppInit") << "ESD audio output initialized OKAY" |
183 | << llendl; | 183 | << LL_ENDL; |
184 | audio_ok = TRUE; | 184 | audio_ok = TRUE; |
185 | } else { | 185 | } else { |
186 | llwarns << "ESD audio output FAILED to initialize: " | 186 | LL_WARNS("AppInit") << "ESD audio output FAILED to initialize: " |
187 | << FMOD_ErrorString(FSOUND_GetError()) << llendl; | 187 | << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; |
188 | } | 188 | } |
189 | } else { | 189 | } else { |
190 | llinfos << "ESD audio output SKIPPED" << llendl; | 190 | LL_DEBUGS("AppInit") << "ESD audio output SKIPPED" << LL_ENDL; |
191 | } | 191 | } |
192 | 192 | ||
193 | if (!audio_ok) | 193 | if (!audio_ok) |
194 | if (NULL == getenv("LL_BAD_OSS")) /*Flawfinder: ignore*/ | 194 | if (NULL == getenv("LL_BAD_OSS")) /*Flawfinder: ignore*/ |
195 | { | 195 | { |
196 | llinfos << "Trying OSS audio output..." << llendl; | 196 | LL_DEBUGS("AppInit") << "Trying OSS audio output..." << LL_ENDL; |
197 | if(FSOUND_SetOutput(FSOUND_OUTPUT_OSS) && | 197 | if(FSOUND_SetOutput(FSOUND_OUTPUT_OSS) && |
198 | FSOUND_Init(44100, num_channels, fmod_flags)) | 198 | FSOUND_Init(44100, num_channels, fmod_flags)) |
199 | { | 199 | { |
200 | llinfos << "OSS audio output initialized OKAY" << llendl; | 200 | LL_DEBUGS("AppInit") << "OSS audio output initialized OKAY" << LL_ENDL; |
201 | audio_ok = TRUE; | 201 | audio_ok = TRUE; |
202 | } else { | 202 | } else { |
203 | llwarns << "OSS audio output FAILED to initialize: " | 203 | LL_WARNS("AppInit") << "OSS audio output FAILED to initialize: " |
204 | << FMOD_ErrorString(FSOUND_GetError()) << llendl; | 204 | << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; |
205 | } | 205 | } |
206 | } else { | 206 | } else { |
207 | llinfos << "OSS audio output SKIPPED" << llendl; | 207 | LL_DEBUGS("AppInit") << "OSS audio output SKIPPED" << LL_ENDL; |
208 | } | 208 | } |
209 | 209 | ||
210 | if (!audio_ok) | 210 | if (!audio_ok) |
211 | if (NULL == getenv("LL_BAD_ALSA")) /*Flawfinder: ignore*/ | 211 | if (NULL == getenv("LL_BAD_ALSA")) /*Flawfinder: ignore*/ |
212 | { | 212 | { |
213 | llinfos << "Trying ALSA audio output..." << llendl; | 213 | LL_DEBUGS("AppInit") << "Trying ALSA audio output..." << LL_ENDL; |
214 | if(FSOUND_SetOutput(FSOUND_OUTPUT_ALSA) && | 214 | if(FSOUND_SetOutput(FSOUND_OUTPUT_ALSA) && |
215 | FSOUND_Init(44100, num_channels, fmod_flags)) | 215 | FSOUND_Init(44100, num_channels, fmod_flags)) |
216 | { | 216 | { |
217 | llinfos << "ALSA audio output initialized OKAY" << llendl; | 217 | LL_DEBUGS("AppInit") << "ALSA audio output initialized OKAY" << LL_ENDL; |
218 | audio_ok = TRUE; | 218 | audio_ok = TRUE; |
219 | } else { | 219 | } else { |
220 | llwarns << "ALSA audio output FAILED to initialize: " | 220 | LL_WARNS("AppInit") << "ALSA audio output FAILED to initialize: " |
221 | << FMOD_ErrorString(FSOUND_GetError()) << llendl; | 221 | << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; |
222 | } | 222 | } |
223 | } else { | 223 | } else { |
224 | llinfos << "OSS audio output SKIPPED" << llendl; | 224 | LL_DEBUGS("AppInit") << "OSS audio output SKIPPED" << LL_ENDL; |
225 | } | 225 | } |
226 | 226 | ||
227 | if (!audio_ok) | 227 | if (!audio_ok) |
228 | { | 228 | { |
229 | llwarns << "Overall audio init failure." << llendl; | 229 | LL_WARNS("AppInit") << "Overall audio init failure." << LL_ENDL; |
230 | return FALSE; | 230 | return FALSE; |
231 | } | 231 | } |
232 | 232 | ||
@@ -239,11 +239,11 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata) | |||
239 | // ended up with, for QA purposes. | 239 | // ended up with, for QA purposes. |
240 | switch (FSOUND_GetOutput()) | 240 | switch (FSOUND_GetOutput()) |
241 | { | 241 | { |
242 | case FSOUND_OUTPUT_NOSOUND: llinfos << "Audio output: NoSound" << llendl; break; | 242 | case FSOUND_OUTPUT_NOSOUND: LL_DEBUGS("AppInit") << "Audio output: NoSound" << LL_ENDL; break; |
243 | case FSOUND_OUTPUT_OSS: llinfos << "Audio output: OSS" << llendl; break; | 243 | case FSOUND_OUTPUT_OSS: LL_DEBUGS("AppInit") << "Audio output: OSS" << LL_ENDL; break; |
244 | case FSOUND_OUTPUT_ESD: llinfos << "Audio output: ESD" << llendl; break; | 244 | case FSOUND_OUTPUT_ESD: LL_DEBUGS("AppInit") << "Audio output: ESD" << LL_ENDL; break; |
245 | case FSOUND_OUTPUT_ALSA: llinfos << "Audio output: ALSA" << llendl; break; | 245 | case FSOUND_OUTPUT_ALSA: LL_DEBUGS("AppInit") << "Audio output: ALSA" << LL_ENDL; break; |
246 | default: llinfos << "Audio output: Unknown!" << llendl; break; | 246 | default: LL_INFOS("AppInit") << "Audio output: Unknown!" << LL_ENDL; break; |
247 | }; | 247 | }; |
248 | 248 | ||
249 | #else // LL_LINUX | 249 | #else // LL_LINUX |
@@ -251,8 +251,8 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata) | |||
251 | // initialize the FMOD engine | 251 | // initialize the FMOD engine |
252 | if (!FSOUND_Init(44100, num_channels, fmod_flags)) | 252 | if (!FSOUND_Init(44100, num_channels, fmod_flags)) |
253 | { | 253 | { |
254 | llwarns << "Error initializing FMOD: " | 254 | LL_WARNS("AppInit") << "Error initializing FMOD: " |
255 | << FMOD_ErrorString(FSOUND_GetError()) << llendl; | 255 | << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; |
256 | return FALSE; | 256 | return FALSE; |
257 | } | 257 | } |
258 | 258 | ||
@@ -260,7 +260,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata) | |||
260 | 260 | ||
261 | initInternetStream(); | 261 | initInternetStream(); |
262 | 262 | ||
263 | llinfos << "LLAudioEngine_FMOD::init() FMOD initialized correctly" << llendl; | 263 | LL_DEBUGS("AppInit") << "LLAudioEngine_FMOD::init() FMOD initialized correctly" << LL_ENDL; |
264 | 264 | ||
265 | mInited = TRUE; | 265 | mInited = TRUE; |
266 | 266 | ||
@@ -686,7 +686,7 @@ BOOL LLAudioBufferFMOD::loadWAV(const char *filename) | |||
686 | // MikeS. - Loading the sound file manually and then handing it over to FMOD, | 686 | // MikeS. - Loading the sound file manually and then handing it over to FMOD, |
687 | // since FMOD uses posix IO internally, | 687 | // since FMOD uses posix IO internally, |
688 | // which doesn't work with unicode file paths. | 688 | // which doesn't work with unicode file paths. |
689 | FILE* sound_file = LLFile::fopen(filename,"rb"); /* Flawfinder: ignore */ | 689 | LLFILE* sound_file = LLFile::fopen(filename,"rb"); /* Flawfinder: ignore */ |
690 | if (sound_file) | 690 | if (sound_file) |
691 | { | 691 | { |
692 | fseek(sound_file,0,SEEK_END); | 692 | fseek(sound_file,0,SEEK_END); |