Minor adjustments, and fixes to streaming audio
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user