mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-26 15:29:19 +00:00
Tests build and run on Desktop Linux and Android
This commit is contained in:
parent
236b8e358a
commit
d93a91cca8
@ -51,17 +51,21 @@ void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetSpeakerVolume(JNIEnv
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetAudioLatency(JNIEnv *env, jclass cls, jfloat latencySecs) {
|
||||
#if !TESTING
|
||||
LOG("audio latency : %fsecs", latencySecs);
|
||||
assert(cpu_isPaused());
|
||||
audio_setLatency(latencySecs);
|
||||
timing_reinitializeAudio();
|
||||
#endif
|
||||
}
|
||||
|
||||
jboolean Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetMockingboardEnabled(JNIEnv *env, jclass cls, jboolean enabled) {
|
||||
#if !TESTING
|
||||
LOG("mockingboard enabled : %d", enabled);
|
||||
assert(cpu_isPaused());
|
||||
MB_SetEnabled(enabled);
|
||||
timing_reinitializeAudio();
|
||||
#endif
|
||||
return enabled;
|
||||
}
|
||||
|
||||
|
@ -768,12 +768,11 @@ void test_disk(int argc, char **argv) {
|
||||
struct timespec ts = { .tv_sec=0, .tv_nsec=33333333 };
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
timing_startCPU();
|
||||
video_main_loop();
|
||||
emulator_start();
|
||||
//pthread_join(p, NULL);
|
||||
}
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
#if !defined(__APPLE__) && !defined(ANDROID)
|
||||
int main(int argc, char **argv) {
|
||||
test_disk(argc, argv);
|
||||
}
|
||||
|
@ -467,12 +467,11 @@ void test_display(int argc, char **argv) {
|
||||
struct timespec ts = { .tv_sec=0, .tv_nsec=33333333 };
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
timing_startCPU();
|
||||
video_main_loop();
|
||||
emulator_start();
|
||||
//pthread_join(p, NULL);
|
||||
}
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
#if !defined(__APPLE__) && !defined(ANDROID)
|
||||
int main(int argc, char **argv) {
|
||||
test_display(argc, argv);
|
||||
}
|
||||
|
@ -440,12 +440,11 @@ void test_trace(int argc, char **argv) {
|
||||
struct timespec ts = { .tv_sec=0, .tv_nsec=33333333 };
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
timing_startCPU();
|
||||
video_main_loop();
|
||||
emulator_start();
|
||||
//pthread_join(p, NULL);
|
||||
}
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
#if !defined(__APPLE__) && !defined(ANDROID)
|
||||
int main(int argc, char **argv) {
|
||||
test_trace(argc, argv);
|
||||
}
|
||||
|
@ -3484,12 +3484,11 @@ void test_vm(int argc, char **argv) {
|
||||
struct timespec ts = { .tv_sec=0, .tv_nsec=33333333 };
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
timing_startCPU();
|
||||
video_main_loop();
|
||||
emulator_start();
|
||||
//pthread_join(p, NULL);
|
||||
}
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
#if !defined(__APPLE__) && !defined(ANDROID)
|
||||
int main(int argc, char **argv) {
|
||||
test_vm(argc, argv);
|
||||
}
|
||||
|
@ -308,15 +308,19 @@ static void *cpu_thread(void *dummyptr) {
|
||||
|
||||
do {
|
||||
// -LOCK----------------------------------------------------------------------------------------- SAMPLE ti
|
||||
#ifdef AUDIO_ENABLED
|
||||
if (UNLIKELY(emul_pause_audio)) {
|
||||
emul_pause_audio = false;
|
||||
audio_pause();
|
||||
}
|
||||
#endif
|
||||
pthread_mutex_lock(&interface_mutex);
|
||||
#ifdef AUDIO_ENABLED
|
||||
if (UNLIKELY(emul_resume_audio)) {
|
||||
emul_resume_audio = false;
|
||||
audio_resume();
|
||||
}
|
||||
#endif
|
||||
clock_gettime(CLOCK_MONOTONIC, &ti);
|
||||
|
||||
deltat = timespec_diff(t0, ti, &negative);
|
||||
|
Loading…
Reference in New Issue
Block a user