Minor adjustments, and fixes to streaming audio

This commit is contained in:
Joshua Granick
2013-12-02 02:17:21 -08:00
parent aa6e1c6923
commit 665f72edf1
3 changed files with 9 additions and 12 deletions

View File

@@ -16,6 +16,9 @@
#ifdef IPHONE
//#define LOG_SOUND(args,...) printf(args, ##__VA_ARGS__)
#define LOG_SOUND(args...) { }
#elif defined(TIZEN)
#include <FBase.h>
#define LOG_SOUND(args,...) AppLog(args, ##__VA_ARGS__)
#else
#define LOG_SOUND(args,...) printf(args, ##__VA_ARGS__)
#endif

View File

@@ -237,9 +237,6 @@ namespace lime {
}
Event poll (etPoll);
sgTizenFrame->HandleEvent (poll);
double next = sgTizenFrame->GetStage ()->GetNextWake () - GetTimeStamp ();
if (next > 0.001) {
@@ -252,6 +249,9 @@ namespace lime {
}
Event poll (etPoll);
sgTizenFrame->HandleEvent (poll);
}

View File

@@ -977,7 +977,7 @@ namespace lime
if (mSuspend) return true;
if (!mIsValid) return false;
int processed;
int processed = 0;
bool active = true;
alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
@@ -985,22 +985,16 @@ namespace lime
while(processed--) {
ALuint buffer;
alSourceUnqueueBuffers(source, 1, &buffer);
check();
alGetError();
if (mIsValid)
if (buffer)
{
active = stream(buffer);
alSourceQueueBuffers(source, 1, &buffer);
check();
}
else
{
active = false;
break;
}
}
if (active && !playing())