portable sleep function

This commit is contained in:
badaix 2016-10-28 10:10:58 +02:00
parent 17879618c7
commit 951548f412
12 changed files with 35 additions and 19 deletions

View file

@ -16,7 +16,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include <unistd.h>
#include <assert.h>
#include <iostream>
@ -122,7 +121,7 @@ void OpenslPlayer::playerCallback(SLAndroidSimpleBufferQueueItf bq)
{
SLresult result = (*bq)->Enqueue(bq, buffer[curBuffer], buff_size);
if (result == SL_RESULT_BUFFER_INSUFFICIENT)
usleep(1000);
chronos::sleep(1);
else
break;
}