MCPcopy Create free account
hub / github.com/JACoders/OpenJK / S_DefaultSound

Function S_DefaultSound

code/client/snd_dma.cpp:883–895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

881*/
882#ifdef _DEBUG
883static void S_DefaultSound( sfx_t *sfx ) {
884
885 int i;
886
887 sfx->iSoundLengthInSamples = 512; // #samples, ie shorts
888 sfx->pSoundData = (short *) SND_malloc(512*2, sfx); // ... so *2 for alloc bytes
889 sfx->bInMemory = true;
890
891 for ( i=0 ; i < sfx->iSoundLengthInSamples ; i++ )
892 {
893 sfx->pSoundData[i] = i;
894 }
895}
896#endif
897
898/*

Callers 1

S_BeginRegistrationFunction · 0.70

Calls 1

SND_mallocFunction · 0.70

Tested by

no test coverage detected