mirror of https://github.com/AxioDL/boo.git
Submix hierarchy deallocation fixes
This commit is contained in:
parent
80026d7fe6
commit
eea45ebcbe
|
@ -15,6 +15,10 @@ AudioSubmix::AudioSubmix(BaseAudioVoiceEngine& root, IAudioMix& parent, IAudioSu
|
|||
|
||||
AudioSubmix::~AudioSubmix()
|
||||
{
|
||||
while (m_activeVoices.size())
|
||||
m_activeVoices.front()->unbindVoice();
|
||||
while (m_activeSubmixes.size())
|
||||
m_activeSubmixes.front()->unbindSubmix();
|
||||
unbindSubmix();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,14 @@
|
|||
namespace boo
|
||||
{
|
||||
|
||||
BaseAudioVoiceEngine::~BaseAudioVoiceEngine()
|
||||
{
|
||||
while (m_activeVoices.size())
|
||||
m_activeVoices.front()->unbindVoice();
|
||||
while (m_activeSubmixes.size())
|
||||
m_activeSubmixes.front()->unbindSubmix();
|
||||
}
|
||||
|
||||
void BaseAudioVoiceEngine::_pumpAndMixVoices(size_t frames, int16_t* dataOut)
|
||||
{
|
||||
memset(dataOut, 0, sizeof(int16_t) * frames * m_mixInfo.m_channelMap.m_channelCount);
|
||||
|
|
|
@ -46,6 +46,7 @@ protected:
|
|||
void _unbindFrom(std::list<AudioSubmix*>::iterator it);
|
||||
|
||||
public:
|
||||
~BaseAudioVoiceEngine();
|
||||
std::unique_ptr<IAudioVoice> allocateNewMonoVoice(double sampleRate,
|
||||
IAudioVoiceCallback* cb,
|
||||
bool dynamicPitch=false);
|
||||
|
|
Loading…
Reference in New Issue