void beginStream()
{
ALuint buffer;
- for (int i = mBufferObjects.size(); i < 4; ++i)
+ for (int i = mBufferObjects.size(); i < 8; ++i)
{
alGenBuffers(1, &buffer);
mBufferObjects.push_back(buffer);
}
- for (int i = 0; i < 4; ++i)
+ for (int i = 0; i < 8; ++i)
{
buffer = mBufferObjects[i];
mQueue.front()->stream(buffer);
Scalar Timer::gNextFire = std::numeric_limits<Scalar>::max();
-std::map<unsigned,Timer&> Timer::gTimers;
+std::map<unsigned,Timer*> Timer::gTimers;
unsigned Timer::getNewID()
}
mId = getNewID();
- gTimers.insert(std::pair<unsigned,Timer&>(mId, *this));
+ gTimers.insert(std::pair<unsigned,Timer*>(mId, this));
if (mAbsolute < gNextFire) gNextFire = mAbsolute;
}
Scalar Timer::findNextFire()
{
- std::map<unsigned,Timer&>::iterator it;
+ std::map<unsigned,Timer*>::iterator it;
Scalar nextFire = std::numeric_limits<Scalar>::max();
for (it = gTimers.begin(); it != gTimers.end(); ++it)
{
- Scalar absolute = (*it).second.mAbsolute;
+ Scalar absolute = (*it).second->mAbsolute;
if (absolute < nextFire) nextFire = absolute;
}
void Timer::fireIfExpired(Scalar t)
{
- std::map<unsigned,Timer&>::iterator it;
+ std::map<unsigned,Timer*>::iterator it;
if (gNextFire > t) return;
for (it = gTimers.begin(); it != gTimers.end(); ++it)
{
- Timer& timer = (*it).second;
- if (timer.isExpired()) timer.fire();
+ Timer* timer = (*it).second;
+ if (timer->isExpired()) timer->fire();
}
}