mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
[3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
This commit is contained in:
parent
0c4f89370d
commit
8cb555460f
207 changed files with 322 additions and 5594 deletions
|
@ -1331,39 +1331,11 @@ static byte chip8_keymap[16];
|
|||
static unsigned long starttimer; /* Timer value at the beginning */
|
||||
static unsigned long cycles; /* Number of update cycles (50Hz) */
|
||||
|
||||
#if (CONFIG_CODEC != SWCODEC) && !defined(SIMULATOR)
|
||||
static bool is_playing;
|
||||
|
||||
/* one frame of bitswapped mp3 data */
|
||||
static unsigned char beep[]={255,
|
||||
223, 28, 35, 0,192,210, 35,226, 72,188,242, 1,128,166, 16, 68,146,252,151, 19,
|
||||
10,180,245,127, 96,184, 3,184, 30, 0,118, 59,128,121,102, 6,212, 0, 97, 6,
|
||||
42, 65, 28,134,192,145, 57, 38,136, 73, 29, 38,132, 15, 21, 70, 91,185, 99,198,
|
||||
15,192, 83, 6, 33,129, 20, 6, 97, 33, 4, 6,245,128, 92, 6, 24, 0, 86, 6,
|
||||
56,129, 44, 24,224, 25, 13, 48, 50, 82,180, 11,251,106,249, 59, 24, 82,175,223,
|
||||
252,119, 76,134,120,236,149,250,247,115,254,145,173,174,168,180,255,107,195, 89,
|
||||
24, 25, 48,131,192, 61, 48, 64, 10,176, 49, 64, 1,152, 50, 32, 8,140, 48, 16,
|
||||
5,129, 51,196,187, 41,177, 23,138, 70, 50, 8, 10,242, 48,192, 3,248,226, 0,
|
||||
20,100, 18, 96, 41, 96, 78,102, 7,201,122, 76,119, 20,137, 37,177, 15,132,224,
|
||||
20, 17,191, 67,147,187,116,211, 41,169, 63,172,182,186,217,155,111,140,104,254,
|
||||
111,181,184,144, 17,148, 21,101,166,227,100, 86, 85, 85, 85};
|
||||
/* callback to request more mp3 data */
|
||||
static void callback(const void** start, size_t* size)
|
||||
{
|
||||
*start = beep; /* give it the same frame again */
|
||||
*size = sizeof(beep);
|
||||
}
|
||||
#endif /* PLATFORM_NATIVE */
|
||||
|
||||
/****************************************************************************/
|
||||
/* Turn sound on */
|
||||
/****************************************************************************/
|
||||
static void chip8_sound_on (void)
|
||||
{
|
||||
#if(CONFIG_CODEC != SWCODEC) && !defined(SIMULATOR)
|
||||
if (!is_playing)
|
||||
rb->mp3_play_pause(true); /* kickoff audio */
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
@ -1371,10 +1343,6 @@ static void chip8_sound_on (void)
|
|||
/****************************************************************************/
|
||||
static void chip8_sound_off (void)
|
||||
{
|
||||
#if (CONFIG_CODEC != SWCODEC) && !defined(SIMULATOR)
|
||||
if (!is_playing)
|
||||
rb->mp3_play_pause(false); /* pause audio */
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
@ -1576,27 +1544,12 @@ static bool chip8_run(const char* file)
|
|||
rb->lcd_drawrect(CHIP8_X-1,CHIP8_Y-1,CHIP8_LCDWIDTH+2,CHIP8_HEIGHT+2);
|
||||
#endif
|
||||
rb->lcd_update();
|
||||
#if (CONFIG_CODEC != SWCODEC) && !defined(SIMULATOR)
|
||||
/* init sound */
|
||||
is_playing = rb->mp3_is_playing(); /* would we disturb playback? */
|
||||
if (!is_playing) /* no? then we can make sound */
|
||||
{ /* prepare */
|
||||
rb->mp3_play_data(beep, sizeof(beep), callback);
|
||||
}
|
||||
#endif
|
||||
starttimer = *rb->current_tick;
|
||||
|
||||
chip8_iperiod=15;
|
||||
cycles = 0;
|
||||
chip8();
|
||||
|
||||
#if (CONFIG_CODEC != SWCODEC) && !defined(SIMULATOR)
|
||||
if (!is_playing)
|
||||
{ /* stop it if we used audio */
|
||||
rb->mp3_play_stop(); /* Stop audio playback */
|
||||
}
|
||||
#endif
|
||||
|
||||
if (chip8_running == 3) {
|
||||
/* unsupported instruction */
|
||||
rb->splash(HZ, "Error: Unsupported"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue