| 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 | { |