MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SoundLoadFile

Function SoundLoadFile

engine/Poseidon/Audio/Streaming/WaveStream.cpp:146–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144// Sound loading function - delegates to specific loaders based on extension
145
146WaveStream* SoundLoadFile(const char* name)
147{
148 const char* ext = strrchr(name, '.');
149 if (!ext)
150 {
151 return WSSLoadFile(name);
152 }
153 if (!stricmp(ext, ".wav"))
154 {
155 return WaveLoadFile(name);
156 }
157 if (!stricmp(ext, ".ogg"))
158 {
159 // OGGLoadFile is defined in WaveStreamOGG.cpp.
160 extern WaveStream* OGGLoadFile(const char* name);
161 return OGGLoadFile(name);
162 }
163 return WSSLoadFile(name);
164}
165
166static QIFStream MakeStreamFromMemory(const void* data, size_t size)
167{

Callers 7

ComputeLipRowsFromAudioFunction · 0.85
InspectSoundFunction · 0.85
GetWaveDurationMethod · 0.85
PreloadWaveMethod · 0.85
WaveOALMethod · 0.85
LoadFixtureToBufferFunction · 0.85

Calls 4

WSSLoadFileFunction · 0.85
WaveLoadFileFunction · 0.85
OGGLoadFileFunction · 0.85
stricmpFunction · 0.50

Tested by 1

LoadFixtureToBufferFunction · 0.68