diff options
author | Franklin Wei <frankhwei536@gmail.com> | 2014-08-22 18:23:37 -0400 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2014-08-23 00:25:12 +0200 |
commit | e1c09cd5bdb450de5410d52e80f4c4225c5332f1 (patch) | |
tree | 8bec6ab4a2dadcd64aa82871e794428cd03e92ed /apps/plugins | |
parent | 7e46440e4d949fae8049c07968d6766b3634e2c6 (diff) | |
download | rockbox-e1c09cd5bdb450de5410d52e80f4c4225c5332f1.tar.gz rockbox-e1c09cd5bdb450de5410d52e80f4c4225c5332f1.zip |
Hope this works...
Change-Id: I8a94f0be82f63ed1e81433beb41ff2d60a1e6eef
Reviewed-on: http://gerrit.rockbox.org/926
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/chip8.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index aebae6580c..43dd7f933e 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c | |||
@@ -1299,7 +1299,7 @@ static byte chip8_keymap[16]; | |||
1299 | static unsigned long starttimer; /* Timer value at the beginning */ | 1299 | static unsigned long starttimer; /* Timer value at the beginning */ |
1300 | static unsigned long cycles; /* Number of update cycles (50Hz) */ | 1300 | static unsigned long cycles; /* Number of update cycles (50Hz) */ |
1301 | 1301 | ||
1302 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 1302 | #if (CONFIG_CODEC != SWCODEC) && !defined(SIMULATOR) |
1303 | static bool is_playing; | 1303 | static bool is_playing; |
1304 | 1304 | ||
1305 | /* one frame of bitswapped mp3 data */ | 1305 | /* one frame of bitswapped mp3 data */ |
@@ -1315,14 +1315,12 @@ static unsigned char beep[]={255, | |||
1315 | 20,100, 18, 96, 41, 96, 78,102, 7,201,122, 76,119, 20,137, 37,177, 15,132,224, | 1315 | 20,100, 18, 96, 41, 96, 78,102, 7,201,122, 76,119, 20,137, 37,177, 15,132,224, |
1316 | 20, 17,191, 67,147,187,116,211, 41,169, 63,172,182,186,217,155,111,140,104,254, | 1316 | 20, 17,191, 67,147,187,116,211, 41,169, 63,172,182,186,217,155,111,140,104,254, |
1317 | 111,181,184,144, 17,148, 21,101,166,227,100, 86, 85, 85, 85}; | 1317 | 111,181,184,144, 17,148, 21,101,166,227,100, 86, 85, 85, 85}; |
1318 | #if (CONFIG_CODEC != SWCODEC) | ||
1319 | /* callback to request more mp3 data */ | 1318 | /* callback to request more mp3 data */ |
1320 | static void callback(const void** start, size_t* size) | 1319 | static void callback(const void** start, size_t* size) |
1321 | { | 1320 | { |
1322 | *start = beep; /* give it the same frame again */ | 1321 | *start = beep; /* give it the same frame again */ |
1323 | *size = sizeof(beep); | 1322 | *size = sizeof(beep); |
1324 | } | 1323 | } |
1325 | #endif /* CONFIG_CODEC == HWCODEC */ | ||
1326 | #endif /* PLATFORM_NATIVE */ | 1324 | #endif /* PLATFORM_NATIVE */ |
1327 | 1325 | ||
1328 | /****************************************************************************/ | 1326 | /****************************************************************************/ |
@@ -1330,7 +1328,7 @@ static void callback(const void** start, size_t* size) | |||
1330 | /****************************************************************************/ | 1328 | /****************************************************************************/ |
1331 | static void chip8_sound_on (void) | 1329 | static void chip8_sound_on (void) |
1332 | { | 1330 | { |
1333 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 1331 | #if(CONFIG_CODEC != SWCODEC) && !defined(SIMULATOR) |
1334 | if (!is_playing) | 1332 | if (!is_playing) |
1335 | rb->mp3_play_pause(true); /* kickoff audio */ | 1333 | rb->mp3_play_pause(true); /* kickoff audio */ |
1336 | #endif | 1334 | #endif |
@@ -1341,7 +1339,7 @@ static void chip8_sound_on (void) | |||
1341 | /****************************************************************************/ | 1339 | /****************************************************************************/ |
1342 | static void chip8_sound_off (void) | 1340 | static void chip8_sound_off (void) |
1343 | { | 1341 | { |
1344 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 1342 | #if (CONFIG_CODEC != SWCODEC) && !defined(SIMULATOR) |
1345 | if (!is_playing) | 1343 | if (!is_playing) |
1346 | rb->mp3_play_pause(false); /* pause audio */ | 1344 | rb->mp3_play_pause(false); /* pause audio */ |
1347 | #endif | 1345 | #endif |
@@ -1556,7 +1554,7 @@ static bool chip8_run(const char* file) | |||
1556 | cycles = 0; | 1554 | cycles = 0; |
1557 | chip8(); | 1555 | chip8(); |
1558 | 1556 | ||
1559 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 1557 | #if (CONFIG_CODEC != SWCODEC) && !defined(SIMULATOR) |
1560 | if (!is_playing) | 1558 | if (!is_playing) |
1561 | { /* stop it if we used audio */ | 1559 | { /* stop it if we used audio */ |
1562 | rb->mp3_play_stop(); /* Stop audio playback */ | 1560 | rb->mp3_play_stop(); /* Stop audio playback */ |