mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Fixed: Update audio mixer during buffer streaming in streaming sample
--HG-- branch : sound_dev
This commit is contained in:
parent
5c1d3cc6c4
commit
b2971ffc0c
1 changed files with 3 additions and 0 deletions
|
@ -367,6 +367,7 @@ static void initSample()
|
|||
string sample = SAMPLE_OGG;
|
||||
s_AudioDecoder = IAudioDecoder::createAudioDecoder(sample, false, false);
|
||||
s_StreamSource->setFormat(s_AudioDecoder->getChannels(), s_AudioDecoder->getBitsPerSample(), (uint32)s_AudioDecoder->getSamplesPerSec());
|
||||
s_StreamSource->setPitch(2.0f);
|
||||
}
|
||||
|
||||
//CMutex *s_Mutex = NULL;
|
||||
|
@ -413,6 +414,7 @@ static void runSample()
|
|||
return;
|
||||
}
|
||||
bufferMore(bytes);
|
||||
s_AudioMixer->update();
|
||||
//if (!s_StreamSource->asUSource()->isst)
|
||||
//{
|
||||
// printf("*!playing!*");
|
||||
|
@ -424,6 +426,7 @@ static void runSample()
|
|||
while (s_StreamSource->hasFilledBuffersAvailable())
|
||||
{
|
||||
nlSleep(40);
|
||||
s_AudioMixer->update();
|
||||
}
|
||||
|
||||
s_StreamSource->stop();
|
||||
|
|
Loading…
Reference in a new issue