void OnStart( const std::string& RootPath ) { g_FrameBuffer = ( unsigned char* )malloc( ImageWidth * ImageHeight * 4 ); memset( g_FrameBuffer, 0xFF, ImageWidth * ImageHeight * 4 ); g_FS = new FileSystem(); g_FS->Mount( "." ); #if defined(ANDROID) g_FS->Mount( RootPath ); g_FS->AddAliasMountPoint( RootPath, "assets" ); #endif g_Audio.Start( iThread::Priority_Normal ); g_Sound.Start( iThread::Priority_Normal ); }
//----------------------------------------------------------------------------- // Tests sound device void TestSound() { SoundThread* thread; int ret; SetSignals(); // Process all of the signals we need thread = new SoundThread(); thread->Setup(); ret = thread->Start(); if(ret) { printf("Can't start SoundThread: %s\n", thread->_errorDescr); goto Exit; } // Wait for the exit while(!_exitMain) { // The exit indicator will be triggered by one of the signals Sleep(100); } Exit: // End all processing thread->Stop(); delete thread; }