MCPcopy Create free account
hub / github.com/beefytech/Beef / LoadSound

Method LoadSound

BeefySysLib/platform/win/DSoundManager.cpp:285–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285bool DSoundManager::LoadSound(unsigned int theSfxID, const StringImpl& theFilename)
286{
287 if ((theSfxID < 0) || (theSfxID >= MAX_SOURCE_SOUNDS))
288 return false;
289
290 ReleaseSound(theSfxID);
291
292 if (!mDirectSound)
293 return true; // sounds just won't play, but this is not treated as a failure condition
294
295 mSourceFileNames[theSfxID] = theFilename;
296
297 StringImpl aFilename = theFilename;
298
299 if (aFilename.EndsWith(".wav", StringImpl::CompareKind_OrdinalIgnoreCase))
300 {
301 if (LoadWAVSound(theSfxID, aFilename))
302 return true;
303 }
304
305 return false;
306}
307
308int DSoundManager::LoadSound(const StringImpl& theFilename)
309{

Callers 1

BFSoundManager_LoadSoundFunction · 0.80

Calls 1

EndsWithMethod · 0.45

Tested by

no test coverage detected