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 );
}
Ejemplo n.º 2
0
//-----------------------------------------------------------------------------
// 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;
}
Ejemplo n.º 3
0
void Sound::play(const std::string & filename, const AudioDevice & device) {
	SoundThread * soundThread = new SoundThread(filename);
	soundThread->setWaveOutDevice(device);
	soundThread->play();
}