Example #1
0
bool AndroidAudio_Pause() {
	if (!state) {
		ELOG("Audio was shutdown, cannot pause!");
		return false;
	}
	if (state->playing) {
		ILOG("Calling OpenSLWrap_Shutdown_T...");
		OpenSLWrap_Shutdown();
		ILOG("Returned from OpenSLWrap_Shutdown_T ...");
		state->playing = false;
		return true;
	}
	return false;
}
Example #2
0
void Java_org_puder_trs80_XTRS_run(JNIEnv* env, jclass clazz) {
    clear_paste_string();
    if (!setjmp(ex_buf)) {
        screenUpdateRequired = 1;
        reset_required = 0;
        while (isRunning) {
            z80_run(0);
            if (screenUpdateRequired) {
                trigger_screen_update(isForcedScreenUpdateRequired);
            }
            if (reset_required) {
                reset_required = 0;
                clear_paste_string();
                trs_timer_init();
                trs_reset(0);
            }
        }
    } else {
        // Got not implemented exception
    }
    OpenSLWrap_Shutdown();
}