Minor adjustments, and fixes to streaming audio
This commit is contained in:
@@ -16,6 +16,9 @@
|
|||||||
#ifdef IPHONE
|
#ifdef IPHONE
|
||||||
//#define LOG_SOUND(args,...) printf(args, ##__VA_ARGS__)
|
//#define LOG_SOUND(args,...) printf(args, ##__VA_ARGS__)
|
||||||
#define LOG_SOUND(args...) { }
|
#define LOG_SOUND(args...) { }
|
||||||
|
#elif defined(TIZEN)
|
||||||
|
#include <FBase.h>
|
||||||
|
#define LOG_SOUND(args,...) AppLog(args, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define LOG_SOUND(args,...) printf(args, ##__VA_ARGS__)
|
#define LOG_SOUND(args,...) printf(args, ##__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -237,9 +237,6 @@ namespace lime {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Event poll (etPoll);
|
|
||||||
sgTizenFrame->HandleEvent (poll);
|
|
||||||
|
|
||||||
double next = sgTizenFrame->GetStage ()->GetNextWake () - GetTimeStamp ();
|
double next = sgTizenFrame->GetStage ()->GetNextWake () - GetTimeStamp ();
|
||||||
|
|
||||||
if (next > 0.001) {
|
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 (mSuspend) return true;
|
||||||
if (!mIsValid) return false;
|
if (!mIsValid) return false;
|
||||||
|
|
||||||
int processed;
|
int processed = 0;
|
||||||
bool active = true;
|
bool active = true;
|
||||||
|
|
||||||
alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
|
alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
|
||||||
@@ -985,22 +985,16 @@ namespace lime
|
|||||||
while(processed--) {
|
while(processed--) {
|
||||||
|
|
||||||
ALuint buffer;
|
ALuint buffer;
|
||||||
|
|
||||||
alSourceUnqueueBuffers(source, 1, &buffer);
|
alSourceUnqueueBuffers(source, 1, &buffer);
|
||||||
check();
|
alGetError();
|
||||||
|
|
||||||
if (mIsValid)
|
if (buffer)
|
||||||
{
|
{
|
||||||
active = stream(buffer);
|
active = stream(buffer);
|
||||||
|
|
||||||
alSourceQueueBuffers(source, 1, &buffer);
|
alSourceQueueBuffers(source, 1, &buffer);
|
||||||
check();
|
check();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
active = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (active && !playing())
|
if (active && !playing())
|
||||||
|
|||||||
Reference in New Issue
Block a user