113 |
pVoiceStealingQueue = new RTList<Event>(pEventPool); |
pVoiceStealingQueue = new RTList<Event>(pEventPool); |
114 |
pGlobalEvents = new RTList<Event>(pEventPool); |
pGlobalEvents = new RTList<Event>(pEventPool); |
115 |
iMaxDiskStreams = GLOBAL_MAX_STREAMS; |
iMaxDiskStreams = GLOBAL_MAX_STREAMS; |
116 |
|
FrameTime = 0; |
117 |
|
|
118 |
for (RTList<Voice>::Iterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) { |
for (RTList<Voice>::Iterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) { |
119 |
iterVoice->SetEngine(this); |
iterVoice->SetEngine(this); |
154 |
|
|
155 |
void Engine::Enable() { |
void Engine::Enable() { |
156 |
dmsg(3,("gig::Engine: enabling\n")); |
dmsg(3,("gig::Engine: enabling\n")); |
157 |
EngineDisabled.PushAndUnlock(false, 2); // set condition object 'EngineDisabled' to false (wait max. 2s) |
EngineDisabled.PushAndUnlock(false, 2, 0, true); // set condition object 'EngineDisabled' to false (wait max. 2s) |
158 |
dmsg(3,("gig::Engine: enabled (val=%d)\n", EngineDisabled.GetUnsafe())); |
dmsg(3,("gig::Engine: enabled (val=%d)\n", EngineDisabled.GetUnsafe())); |
159 |
} |
} |
160 |
|
|
213 |
if (hStream != Stream::INVALID_HANDLE) { // voice actually used a stream |
if (hStream != Stream::INVALID_HANDLE) { // voice actually used a stream |
214 |
iPendingStreamDeletions++; |
iPendingStreamDeletions++; |
215 |
} |
} |
216 |
|
// free the voice to the voice pool and update key info |
217 |
|
FreeVoice(pEngineChannel, itVoice); |
218 |
} |
} |
219 |
} |
} |
220 |
} |
} |
446 |
if (hStream != Stream::INVALID_HANDLE) { // voice actually used a stream |
if (hStream != Stream::INVALID_HANDLE) { // voice actually used a stream |
447 |
iPendingStreamDeletions++; |
iPendingStreamDeletions++; |
448 |
} |
} |
449 |
|
//NOTE: maybe we should call FreeVoice() here, shouldn't cause a harm though I think, since the voices should be freed by RenderActiveVoices() in the render loop, they are probably just freed a bit later than they could/should be |
450 |
} |
} |
451 |
} |
} |
452 |
} |
} |
2223 |
} |
} |
2224 |
|
|
2225 |
String Engine::Version() { |
String Engine::Version() { |
2226 |
String s = "$Revision: 1.101 $"; |
String s = "$Revision: 1.104 $"; |
2227 |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
2228 |
} |
} |
2229 |
|
|