MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / setMaxActiveVoiceCount

Method setMaxActiveVoiceCount

extlibs/soloud/src/core/soloud_core_setters.cpp:67–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 result Soloud::setMaxActiveVoiceCount(unsigned int aVoiceCount)
68 {
69 if (aVoiceCount == 0 || aVoiceCount >= VOICE_COUNT)
70 return INVALID_PARAMETER;
71 lockAudioMutex();
72 mMaxActiveVoices = aVoiceCount;
73 delete[] mResampleData;
74 delete[] mResampleDataOwner;
75 mResampleData = new AlignedFloatBuffer[aVoiceCount * 2];
76 mResampleDataOwner = new AudioSourceInstance*[aVoiceCount];
77 unsigned int i;
78 for (i = 0; i < aVoiceCount * 2; i++)
79 mResampleData[i].init(SAMPLE_GRANULARITY * MAX_CHANNELS);
80 for (i = 0; i < aVoiceCount; i++)
81 mResampleDataOwner[i] = NULL;
82 mActiveVoiceDirty = true;
83 unlockAudioMutex();
84 return SO_NO_ERROR;
85 }
86
87 void Soloud::setPauseAll(bool aPause)
88 {

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected