New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use hsThread for SoundBuffer preloading. #52
Conversation
It appears you adjusted the file (or at least your additions) to use 2-space indentations... >.> |
Those are tabs actually... blame Visual Studio (and then blame github for On Tue, Jun 28, 2011 at 17:07, zrax <
|
if(buffer->GetData()) | ||
for (int i = templist.GetCount(); i > 0; i--) | ||
{ | ||
plSoundBuffer* buf = templist.Pop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you're tracking the list contents twice here (once with the decrementing index and once by actually popping an item)... Why not just throw away the for loop and use "while (templist.GetCount())" or something along those lines?
Use hsThread for SoundBuffer preloading.
Use hsThread for SoundBuffer preloading.
Use hsThread for SoundBuffer preloading.
Use hsThread for SoundBuffer preloading.
Fix Zandi Welcome
Rather than relying on non-portable CCritSect and pnUtils stuff, use existing hsThread classes for plSoundBuffer preloading.
As a side note, I don't know if this code ever worked, since the buffer was never removed from the original list when being added to the templist... I think that would be an infinite loop >.>