forked from len0rd/rockbox
[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
|
|
@ -46,17 +46,12 @@ remote_control.c
|
|||
lamp.c
|
||||
#endif /* HAVE_BACKLIGHT */
|
||||
|
||||
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#if defined(HAVE_RECORDING) && (defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN))
|
||||
pitch_detector.c
|
||||
#endif
|
||||
|
||||
mp3_encoder.c
|
||||
wav2wv.c
|
||||
#endif /* CONFIG_CODEC */
|
||||
|
||||
|
||||
#if CONFIG_RTC
|
||||
alarmclock.c
|
||||
|
|
@ -99,15 +94,6 @@ pictureflow.c
|
|||
|
||||
#endif /* PLUGIN_BUFFER_SIZE <= 0x20000 && HAVE_LCD_BITMAP */
|
||||
|
||||
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
|
||||
#if defined(HAVE_LCD_BITMAP)
|
||||
splitedit.c
|
||||
#endif
|
||||
|
||||
#endif /* HWCODEC */
|
||||
|
||||
#if defined(IRIVER_H100_SERIES)
|
||||
iriver_flash.c
|
||||
#endif
|
||||
|
|
@ -207,9 +193,7 @@ superdom.c
|
|||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
test_boost.c
|
||||
#endif
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
test_codec.c
|
||||
#endif
|
||||
#ifdef HAVE_JPEG
|
||||
test_core_jpeg.c
|
||||
#endif
|
||||
|
|
@ -232,9 +216,7 @@ test_mem_jpeg.c
|
|||
#ifdef HAVE_LCD_COLOR
|
||||
test_resize.c
|
||||
#endif
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
test_sampr.c
|
||||
#endif
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
test_touchscreen.c
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@ test_fps.c
|
|||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
test_boost.c
|
||||
#endif
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
test_codec.c
|
||||
#endif
|
||||
#ifdef HAVE_JPEG
|
||||
test_core_jpeg.c
|
||||
#endif
|
||||
|
|
@ -46,9 +44,7 @@ test_mem_jpeg.c
|
|||
#ifdef HAVE_LCD_COLOR
|
||||
test_resize.c
|
||||
#endif
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
test_sampr.c
|
||||
#endif
|
||||
test_viewports.c
|
||||
#endif /* HAVE_TEST_PLUGINS */
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ rockboy
|
|||
pictureflow
|
||||
#endif
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC && PLUGIN_BUFFER_SIZE > 0x20000
|
||||
#if PLUGIN_BUFFER_SIZE > 0x20000
|
||||
fft
|
||||
#endif
|
||||
|
||||
|
|
@ -70,9 +70,6 @@ pacbox
|
|||
doom
|
||||
#endif
|
||||
|
||||
/* For all the swcodec targets */
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
|
||||
#if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */
|
||||
midi
|
||||
mikmod
|
||||
|
|
@ -91,8 +88,6 @@ pdbox
|
|||
mpegplayer
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
|
||||
/* Lua needs at least 160 KB to work in */
|
||||
#if PLUGIN_BUFFER_SIZE >= 0x80000
|
||||
lua
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ lua
|
|||
lua_scripts
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC && PLUGIN_BUFFER_SIZE > 0x20000
|
||||
#if PLUGIN_BUFFER_SIZE > 0x20000
|
||||
fft
|
||||
#endif
|
||||
|
||||
|
|
@ -23,11 +23,8 @@ pictureflow
|
|||
#endif /* HAVE_LCD_BITMAP */
|
||||
|
||||
/* For all the swcodec targets */
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
|
||||
#if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */
|
||||
mikmod
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
#endif /* HAVE_TOUCHSCREEN */
|
||||
|
|
|
|||
|
|
@ -50,12 +50,10 @@ invadrox_fire.6x6x1.bmp
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
/* MPEGplayer */
|
||||
mpegplayer_status_icons_8x8x1.bmp
|
||||
mpegplayer_status_icons_12x12x1.bmp
|
||||
mpegplayer_status_icons_16x16x1.bmp
|
||||
#endif
|
||||
|
||||
#if LCD_WIDTH == 160 && LCD_HEIGHT == 128 && LCD_DEPTH < 16
|
||||
superdom_boarditems.160x128x1.bmp
|
||||
|
|
|
|||
|
|
@ -957,7 +957,7 @@ rockboxlogo.91x32x1.bmp
|
|||
/* Pitch detector */
|
||||
/* The following preprocessor condition must match the condition */
|
||||
/* for pitch detector from plugins/SOURCES */
|
||||
#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && \
|
||||
#if defined(HAVE_RECORDING) && \
|
||||
(defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN))
|
||||
#if (LCD_WIDTH >= 320) && (LCD_HEIGHT >= 240) && (LCD_DEPTH >= 16)
|
||||
pitch_notes.320x240x16.bmp
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ RB_WRAP(sound)
|
|||
lua_pushstring (L, rb->sound_unit(setting));
|
||||
return 1;
|
||||
break;
|
||||
#if ((CONFIG_CODEC == SWCODEC) && defined (HAVE_PITCHCONTROL))
|
||||
#if defined (HAVE_PITCHCONTROL)
|
||||
case SOUND_SET_PITCH:
|
||||
rb->sound_set_pitch(setting);
|
||||
return 1;/*nil*/
|
||||
|
|
@ -507,7 +507,6 @@ RB_WRAP(sound)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
RB_WRAP(pcm)
|
||||
{
|
||||
enum e_pcm {PCM_APPLYSETTINGS = 0, PCM_ISPLAYING, PCM_ISPAUSED,
|
||||
|
|
@ -579,7 +578,6 @@ RB_WRAP(mixer_frequency)
|
|||
lua_pushinteger(L, result);
|
||||
return 1;
|
||||
}
|
||||
#endif /*CONFIG_CODEC == SWCODEC*/
|
||||
|
||||
/* DEVICE LIGHTING CONTROL */
|
||||
RB_WRAP(backlight_onoff)
|
||||
|
|
@ -953,10 +951,8 @@ static const luaL_Reg rocklib[] =
|
|||
RB_FUNC(audio),
|
||||
RB_FUNC(playlist),
|
||||
RB_FUNC(sound),
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
RB_FUNC(pcm),
|
||||
RB_FUNC(mixer_frequency),
|
||||
#endif
|
||||
|
||||
/* DEVICE LIGHTING CONTROL */
|
||||
RB_FUNC(backlight_onoff),
|
||||
|
|
|
|||
|
|
@ -123,143 +123,6 @@ const struct button_mapping *plugin_contexts[] =
|
|||
};
|
||||
#define PLA_ARRAY_COUNT sizeof(plugin_contexts)/sizeof(plugin_contexts[0])
|
||||
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
#ifndef SIMULATOR
|
||||
/* MP3 tick sounds */
|
||||
static unsigned char tick_sound[] =
|
||||
{
|
||||
255,251,112,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 73,110,102,111, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 4,229, 0, 85, 85
|
||||
, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
|
||||
, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,170,170,170,170,170,170,170,170,170
|
||||
,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170
|
||||
,170,170,170,170,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
|
||||
,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0
|
||||
, 57, 76, 65, 77, 69, 51, 46, 57, 57,114, 1,205, 0, 0, 0, 0, 46,102, 0, 0
|
||||
, 20, 96, 36, 3, 64, 66, 0, 0, 96, 0, 0, 4,229,101,175,184,232, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,251,112,196, 0, 0, 13
|
||||
, 92,189,103, 52,194,128, 2,165,176,176,247, 51, 16, 2, 0, 0, 24, 32, 0, 12
|
||||
,204,204,204,204,207,215,221,121,229, 74,224,152, 1,128, 24, 19, 17,207,217,246
|
||||
,252,132,212,226,225,192, 16, 0, 0, 0, 0, 32,163,100,111,255, 66, 7, 0, 48
|
||||
, 12, 14, 31, 59,255,255,234,112,248,112, 56, 40,223,193, 0, 64, 16, 4, 1, 51
|
||||
,229, 29,234, 4,193,240,124, 31, 62, 15,135,255, 7,193, 0, 64, 16, 12, 9, 1
|
||||
, 15,168, 16, 1,131,224,254,254,146,224,254, 8, 28, 88,127,255,148, 4, 32,128
|
||||
, 32,196,182,166,245,242,214,222,214, 73, 45,110, 52,137, 81, 39,107,255, 44, 76
|
||||
,148,140, 8,250, 66,148,195, 43, 3, 41, 15, 18,163, 80, 5, 20,248,174,140,138
|
||||
,115, 1,146, 50, 49, 32, 44,201,152,157, 53, 32, 33,157, 8, 34, 85,135, 88,105
|
||||
,186,131,252, 48,143,168,162, 44,209,142, 16, 88,221, 10,214, 94, 51, 52, 46,148
|
||||
,133, 36, 38,129,165, 36,164,139, 64,211, 11,115,101, 49, 5,136, 33,157, 18,241
|
||||
,137, 50, 53,194,213,173, 78,241,108, 1, 24,172,129,146,141,136, 24,119, 73, 51
|
||||
, 85,162,138,146, 51, 20,101,163,242,129, 56,212, 84,233, 44, 94, 11, 97,117, 74
|
||||
, 73, 37,162, 58, 20,146, 95,203, 31,246, 50, 55,111,214,223,205,213,230, 31,232
|
||||
,122,143,183, 14, 39, 91, 57, 15,251,186, 21,185,149, 48, 1,100, 64,200, 16,121
|
||||
,155, 72,110, 24,130, 98,255,251,114,196, 7,128, 17,169,247, 95,221,152,128, 10
|
||||
, 80, 62,233,185,150,170,113,174,203,251, 59, 12,190,170, 98, 4,156,122,140, 97
|
||||
,155, 60, 39, 8,145,195,116, 22,164, 82,118,116, 42,116,157, 68, 88, 70, 64, 93
|
||||
, 17, 35, 39,163,118,118, 77, 75, 82,187,215, 89,140, 46,100,112,151, 75, 73,169
|
||||
,107,181,157,170,251, 45,140, 75, 34,122, 28,228,146,111,255,235,210, 81,124,114
|
||||
,199, 52,180,138,174,207,255,235, 82,210, 64,123, 34,197,101, 47,255,254,234, 91
|
||||
, 14, 74, 68,234,219,255,254,206,131,143,162,120,234,210,191,255,245, 93, 18,200
|
||||
,225, 42, 29,171,255,254,165,164,196, 24,137, 32,223, 90, 93, 96, 64,217, 78, 35
|
||||
, 32, 53,185,107,237, 43,113, 98, 80,107,161, 3,206, 60,192, 10, 78,226,219,199
|
||||
,158,146,158, 47, 59, 90,253,154,221,198,138,147,100,150,206,233, 32, 39,192, 73
|
||||
, 23, 76,150,201, 41,209,186,217, 37,250,233, 38,198, 34, 24, 18, 33,130, 38,158
|
||||
, 73, 54, 69,146, 91, 36,182, 75,235, 64,216,196,138, 9,201, 69,174,138,157,244
|
||||
,154,150,208,246, 57, 72, 71, 2,148, 23, 76,115, 83,255,210,218,161, 56, 3, 68
|
||||
, 81, 49,190,139,253,125, 81,205, 25, 13,202,146,156,173,255,250,234,194, 8, 69
|
||||
, 13,142,255,255,209, 88,136, 73, 6,145,235, 26,142,191,255, 85,100,154,104,178
|
||||
,131,213, 0, 34, 0, 17,132, 0, 7,227, 82,135, 11,113, 70,110,105, 94,118, 22
|
||||
,255,251,112,196, 9, 0, 17, 61,249, 41,128,101,163, 73,217,178,153, 88,147, 21
|
||||
, 48,158,206,220,162,156,221, 7,209, 69, 20,117,163, 69,146, 68,145, 26,131,150
|
||||
, 0, 4,132, 41, 8,214,202,209, 69, 30,191,116, 76,156,240, 41,194,118, 23,147
|
||||
, 67,173, 87,255,233, 29, 64,216, 73,129, 10, 28,227,197,217, 43,255,254,203, 40
|
||||
,140, 48,129, 5,201, 21, 58, 95,255,232,180,168, 70,136,131,201,146,255,254,182
|
||||
,169,206, 5,216,101, 36,146,217,109,255,250,169, 38, 96, 35, 69, 51,167,157,191
|
||||
,255, 82,158,152,225, 46, 14, 99,235,100,159,255,253, 22, 29,162, 98, 84,108,210
|
||||
,202,128, 74, 16, 23,220, 23, 96,152, 17, 5,129,242, 49,137, 75, 60, 81, 16, 80
|
||||
, 34,106, 74, 91,255,222, 53, 18, 64,160, 70, 1,195, 5,139,230, 84,118,254,236
|
||||
, 44, 29, 1,130,196,195,130,236,237,255,253,156, 84, 60, 17, 10, 10, 19, 35,179
|
||||
,255,254,206,198, 14,132,130,194,196, 14, 67,179,255,254,198, 40,144,136, 80, 80
|
||||
, 76, 64,228, 57, 29,191,251, 57, 76, 34, 18, 8,132, 66,132,200,114, 59, 63,255
|
||||
,220,166, 17, 18, 18, 26, 32,112,201,159,240,144,184,169, 23,127,197,133, 69, 85
|
||||
, 76, 65, 77, 69, 51, 46, 57, 57, 46, 53, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
|
||||
, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
|
||||
, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
|
||||
};
|
||||
static unsigned char tock_sound[] =
|
||||
{
|
||||
255,251,112,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 73,110,102,111, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 4,229, 0, 85, 85
|
||||
, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
|
||||
, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,170,170,170,170,170,170,170,170,170
|
||||
,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170
|
||||
,170,170,170,170,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
|
||||
,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0
|
||||
, 57, 76, 65, 77, 69, 51, 46, 57, 57,114, 1,205, 0, 0, 0, 0, 46,100, 0, 0
|
||||
, 20, 96, 36, 3, 64, 66, 0, 0, 96, 0, 0, 4,229,187,155,119, 17, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,251,112,196, 0, 0, 13
|
||||
,105, 19,104,212,146,128, 10,164, 41,175,119, 51, 32, 0, 2, 32, 41, 84, 9,130
|
||||
, 96,152,109,228, 0, 16, 0, 6, 9,209,163,111,127,154, 48, 0, 0, 0, 0,129
|
||||
,194, 19,212,226, 97,240,248,187,255, 65, 0,248,124, 92,255,144,130, 1,192,225
|
||||
, 9,249,206,115,138, 16,158,132, 57,206,115,191,242, 16,132,111,212,231, 14, 7
|
||||
, 8, 70,243,156,231, 57,206,121,207,200, 66, 16, 92,231,255,134, 0, 0, 0,127
|
||||
,244, 60, 60, 51,255,192, 3,195,207,252, 0, 0, 0, 29, 39,244, 60, 48, 3,255
|
||||
,195,219,177,171,179,181, 8,157,251,239,155,104,162, 80, 5,194, 16,165,199, 42
|
||||
,104,133, 19,109, 88, 96, 61,104,242,117,118, 94,135, 29, 53, 72, 67, 85, 11, 54
|
||||
, 59, 64,154,155,128,195, 23,148, 98, 43,186, 43,139, 64,218, 82, 68,160,197,168
|
||||
,125, 10, 50, 41, 16,240, 30, 6,228, 52,117, 0, 51,130,146,122,152,109,162,201
|
||||
, 45,154, 30, 11, 66, 30, 76, 73,145,224, 52,149, 17, 55,138,112,105, 51, 36,147
|
||||
, 22,130, 89, 20,138, 36,114,212,145, 3,199,107,101,213, 25, 21,222,196,209,162
|
||||
, 40,168,168,165,162,100,142,163,220,186,250, 72,106, 54, 75, 48,243, 79,153, 54
|
||||
,163, 93,179,171,204,144,232,190,115, 19,208, 90,172,244, 40, 98,126, 35,161,234
|
||||
,122,143,221, 39,250,159, 61, 35,111,250,213,216, 6,252, 9,138, 17, 64, 1, 13
|
||||
, 56, 80, 58,104,184, 37,255,251,114,196, 7,128, 17,250, 1, 97,189,152, 0, 10
|
||||
, 44,192, 41,253,151,169,185,237, 56, 3,131,220, 24,180,204,165,221,129,107,210
|
||||
,192, 50,130, 26, 22, 26,180, 77, 81, 85,221,146, 33,197,224,198,197,228,146, 89
|
||||
,162,210, 69,100,233, 13, 25,145, 61, 19,206,151,232,172,212, 58,162,149, 53, 70
|
||||
,234,234, 81,176,186, 28, 39,145,253, 87, 33,130,150, 43, 36,187,245,169,141,200
|
||||
, 41,178,191,230, 68,233,170,255,230, 37,227,101,183,237, 49, 56,109,255,115,134
|
||||
,232,223,247,156, 62,191,250, 43, 42,169,127,245, 26,160,255,234,151,157,191,215
|
||||
, 46,164,223,235, 98,137,118,223,238,112,189,111,247, 56, 94,106, 16, 1, 77, 8
|
||||
, 25, 4,204, 0, 0,134, 96, 41,151,170, 74,147,135, 11,136, 28,220, 96,102,179
|
||||
, 16,145, 89,202, 11,197,114, 72, 0,241, 77, 88,211, 70,174,171, 10, 11, 84,163
|
||||
, 5, 53,191,241,191,106,245,209,114, 21,240,208, 75,172,190,150,103,205,178,252
|
||||
, 78, 36,166,139,132,106,231, 86,253,130, 80,178,201,254,193, 68, 20,207,254,206
|
||||
, 49, 19, 78,127,253,159,255, 33, 37, 37, 95,238,112,188, 89, 37, 79,238,165, 5
|
||||
,163,151,249,168,130,215,255,169,223,249,231, 15,149,191,161,227,209,235, 63,232
|
||||
,166, 10,198,183,232,150, 34,119,255,213, 17,255,231, 17, 44, 8, 2, 96, 1,101
|
||||
,184,243,226,216, 18, 60,216,132,105,150,250,101,165, 64,237,172,186, 35,114,126
|
||||
,255,251,112,196, 12,128,144,142, 3, 44,140,180,241, 1,207, 47,217, 72,244, 10
|
||||
, 48, 29, 88, 20, 21,128, 36,231,157,173,100,202, 35,136,119,133,228,209, 55,186
|
||||
,218,198,197,208,217, 11,233,178,254,186,137,128, 8,110, 71,253,212,136,138, 45
|
||||
,118,253,216, 34, 7, 74, 99,255, 60, 22,144,101,111,209, 72,136,196,175,254, 58
|
||||
, 15, 76, 71,249,184,138, 45, 30,127,234,199, 21, 35,191,245, 17, 75, 63,252,120
|
||||
,108, 58,223,209,199, 74,141, 91,254,131, 98, 70,255,212, 69, 42, 71,254,172, 54
|
||||
,127,252,116,107,255,168,212,194, 64, 61,126, 46,224,170, 52, 71,208,229, 19,209
|
||||
,148, 64,203,225,206,126, 29,230, 1,134,123,159,138,246, 67,199, 93,127,253, 50
|
||||
,148, 81, 37, 13, 40,145, 8, 37, 12, 6, 4, 49, 67,204,186,186,255,255,213,149
|
||||
,149,137, 16,132,162, 8,128, 90, 58, 93, 95,255,121,138, 96,161,131, 3, 33,200
|
||||
,118,127,255,238, 83, 5, 10, 8,228, 58, 47,255,252,197, 48, 96,104,116, 84, 84
|
||||
, 69,255,251, 24, 40, 80, 74, 69, 69, 64, 96,193, 7,141, 1, 89,203, 5,113, 81
|
||||
, 70,255,245,139, 85, 76, 65, 77, 69, 51, 46, 57, 57, 46, 53, 85, 85, 85, 85, 85
|
||||
, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
|
||||
, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
|
||||
, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85
|
||||
};
|
||||
#endif /* SIMULATOR */
|
||||
#else
|
||||
/* raw PCM */
|
||||
static signed short tick_sound[] =
|
||||
{
|
||||
|
|
@ -641,7 +504,6 @@ static signed short tock_sound[] =
|
|||
,-3,2,-1,0,1,-1,0,0,1,-1,1
|
||||
,-2,3
|
||||
};
|
||||
#endif
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
Utilities from pdbox plugin (Copyright (C) 2009 Wincent Balin) --- am I
|
||||
|
|
@ -941,51 +803,6 @@ static int bpm_step_counter = 0;
|
|||
|
||||
static bool sound_trigger = false;
|
||||
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
|
||||
#ifdef SIMULATOR
|
||||
|
||||
/* No audio in HWCODEC simulator build. */
|
||||
#define MET_IS_PLAYING 0
|
||||
#define MET_PLAY_STOP do {} while(0)
|
||||
static void play_tick(void){ printf("tick\n"); }
|
||||
static void play_tock(void){ printf("tock\n"); }
|
||||
|
||||
#else
|
||||
|
||||
#define MET_IS_PLAYING rb->mp3_is_playing()
|
||||
#define MET_PLAY_STOP rb->mp3_play_stop()
|
||||
|
||||
static void callback(const void** start, size_t* size)
|
||||
{
|
||||
(void)start; /* unused parameter, avoid warning */
|
||||
*size = 0; /* end of data */
|
||||
sound_active = false;
|
||||
rb->led(0);
|
||||
}
|
||||
|
||||
/* Wondering: Should one prevent playing again while sound_active == true? */
|
||||
|
||||
static void play_tick(void)
|
||||
{
|
||||
sound_active = true;
|
||||
rb->led(1);
|
||||
rb->mp3_play_data(tick_sound, sizeof(tick_sound), callback);
|
||||
rb->mp3_play_pause(true); /* kickoff audio */
|
||||
}
|
||||
|
||||
static void play_tock(void)
|
||||
{
|
||||
sound_active = true;
|
||||
rb->led(1);
|
||||
rb->mp3_play_data(tock_sound, sizeof(tock_sound), callback);
|
||||
rb->mp3_play_pause(true); /* kickoff audio */
|
||||
}
|
||||
|
||||
#endif /* SIMULATOR */
|
||||
|
||||
#else /* CONFIG_CODEC == SWCODEC */
|
||||
|
||||
#define MET_IS_PLAYING rb->pcm_is_playing()
|
||||
#define MET_PLAY_STOP rb->audio_stop()
|
||||
|
||||
|
|
@ -1014,8 +831,6 @@ static void play_tock(void)
|
|||
rb->pcm_play_data(NULL, NULL, tock_buf, sizeof(tock_buf));
|
||||
}
|
||||
|
||||
#endif /* CONFIG_CODEC != SWCODEC */
|
||||
|
||||
/* State: 0: blank/title, 1: tick, 2: tock 3: silent klick */
|
||||
/* TODO: Could use more smart placement, using
|
||||
lcd_getstringsize() and such. */
|
||||
|
|
@ -1446,9 +1261,7 @@ static void cleanup(void)
|
|||
MET_PLAY_STOP; /* stop audio ISR */
|
||||
tweak_volume(0);
|
||||
rb->led(0);
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
rb->pcm_set_frequency(HW_SAMPR_DEFAULT);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1786,12 +1599,6 @@ enum plugin_status plugin_start(const void* file)
|
|||
|
||||
if(MET_IS_PLAYING) MET_PLAY_STOP; /* stop audio IS */
|
||||
|
||||
#if (CONFIG_CODEC != SWCODEC)
|
||||
#ifndef SIMULATOR
|
||||
rb->bitswap(tick_sound, sizeof(tick_sound));
|
||||
rb->bitswap(tock_sound, sizeof(tock_sound));
|
||||
#endif
|
||||
#else
|
||||
prepare_buffers();
|
||||
#if INPUT_SRC_CAPS != 0
|
||||
/* Select playback */
|
||||
|
|
@ -1799,7 +1606,6 @@ enum plugin_status plugin_start(const void* file)
|
|||
rb->audio_set_output_source(AUDIO_SRC_PLAYBACK);
|
||||
#endif
|
||||
rb->pcm_set_frequency(SAMPR_44);
|
||||
#endif /* CONFIG_CODEC != SWCODEC */
|
||||
|
||||
if(file)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1245,7 +1245,6 @@ static void display_options(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
static void audio_options(void)
|
||||
{
|
||||
int selected = 0;
|
||||
|
|
@ -1307,7 +1306,6 @@ static void audio_options(void)
|
|||
menu_quit = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void resume_options(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -902,19 +902,11 @@ static int last_right;
|
|||
|
||||
static void get_peaks(int *left, int *right)
|
||||
{
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
static struct pcm_peaks peaks;
|
||||
rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
|
||||
&peaks);
|
||||
*left = peaks.left;
|
||||
*right = peaks.right;
|
||||
#elif defined (SIMULATOR)
|
||||
*left = rand() % 0x8000;
|
||||
*right = rand() % 0x8000;
|
||||
#else
|
||||
*left = 0;
|
||||
*right = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static long get_next_delay(void)
|
||||
|
|
|
|||
|
|
@ -112,13 +112,9 @@ static bool file_properties(const char* selected_file)
|
|||
|
||||
num_properties = 5;
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
int fd = rb->open(selected_file, O_RDONLY);
|
||||
if (fd >= 0 &&
|
||||
rb->get_metadata(&id3, fd, selected_file))
|
||||
#else
|
||||
if (!rb->mp3info(&id3, selected_file))
|
||||
#endif
|
||||
{
|
||||
long dur = id3.length / 1000; /* seconds */
|
||||
rb->snprintf(str_artist, sizeof str_artist,
|
||||
|
|
@ -145,9 +141,7 @@ static bool file_properties(const char* selected_file)
|
|||
num_properties++;
|
||||
}
|
||||
}
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
rb->close(fd);
|
||||
#endif
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ struct pcm pcm IBSS_ATTR;
|
|||
#define N_BUFS 2
|
||||
#define BUF_SIZE 2048
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
|
||||
bool doneplay=1;
|
||||
bool bufnum=0;
|
||||
|
||||
|
|
@ -88,27 +86,3 @@ int rockboy_pcm_submit(void)
|
|||
pcm.pos = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void rockboy_pcm_init(void)
|
||||
{
|
||||
pcm.hz = 44100;
|
||||
pcm.stereo = 1;
|
||||
pcm.buf = NULL;
|
||||
pcm.len = 0;
|
||||
pcm.pos = 0;
|
||||
}
|
||||
|
||||
void rockboy_pcm_close(void)
|
||||
{
|
||||
memset(&pcm, 0, sizeof pcm);
|
||||
}
|
||||
|
||||
int rockboy_pcm_submit(void)
|
||||
{
|
||||
pcm.pos =0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -220,7 +220,6 @@ static int plugin_main(void)
|
|||
rb->sleep(1);
|
||||
rb->lcd_clear_display();
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
/* This will make the stars pulse to the music */
|
||||
if(pulse){
|
||||
|
||||
|
|
@ -255,7 +254,7 @@ static int plugin_main(void)
|
|||
starfield.z_move = avg_peak;
|
||||
|
||||
} /* if pulse */
|
||||
#endif
|
||||
|
||||
starfield_move_and_draw(&starfield);
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
|
|
|
|||
|
|
@ -469,10 +469,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
#define mas_codec_readreg(x) rand()%MAX_PEAK
|
||||
#endif
|
||||
|
||||
/* Defines x positions on a logarithmic (dBfs) scale. */
|
||||
unsigned char analog_db_scale[LCD_WIDTH/2];
|
||||
|
||||
|
|
@ -780,13 +776,11 @@ static void draw_digital_minimeters(void) {
|
|||
|
||||
static void analog_meter(void) {
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
static struct pcm_peaks peaks;
|
||||
rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
|
||||
&peaks);
|
||||
#define left_peak peaks.left
|
||||
#define right_peak peaks.right
|
||||
#endif
|
||||
|
||||
if(vumeter_settings.analog_use_db_scale) {
|
||||
left_needle_top_x = analog_db_scale[left_peak * half_width / MAX_PEAK];
|
||||
|
|
@ -837,13 +831,11 @@ static void analog_meter(void) {
|
|||
}
|
||||
|
||||
static void digital_meter(void) {
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
static struct pcm_peaks peaks;
|
||||
rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
|
||||
&peaks);
|
||||
#define left_peak peaks.left
|
||||
#define right_peak peaks.right
|
||||
#endif
|
||||
|
||||
if(vumeter_settings.digital_use_db_scale) {
|
||||
num_left_leds = digital_db_scale[left_peak * 44 / MAX_PEAK];
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ static void options_menu(void){
|
|||
no_yes, 2, NULL);
|
||||
if (new_setting != settings.sound )
|
||||
settings.sound=new_setting;
|
||||
#if CONFIG_CODEC == SWCODEC && !defined SIMULATOR
|
||||
#if !defined SIMULATOR
|
||||
rb->pcm_play_stop();
|
||||
#endif
|
||||
break;
|
||||
|
|
@ -318,7 +318,7 @@ static void options_menu(void){
|
|||
/* menu */
|
||||
static bool zxbox_menu(void)
|
||||
{
|
||||
#if CONFIG_CODEC == SWCODEC && !defined SIMULATOR
|
||||
#if !defined SIMULATOR
|
||||
rb->pcm_play_stop();
|
||||
#endif
|
||||
int selected=0;
|
||||
|
|
|
|||
|
|
@ -102,9 +102,9 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
#ifdef USE_GREY
|
||||
grey_show(false);
|
||||
grey_release();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC && !defined SIMULATOR
|
||||
#if !defined SIMULATOR
|
||||
rb->pcm_play_stop();
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ extern int intkeys[5];
|
|||
#define SPECT_MEM 1
|
||||
|
||||
/* Define if sound driver is available. */
|
||||
#if CONFIG_CODEC == SWCODEC && !defined SIMULATOR
|
||||
#if !defined SIMULATOR
|
||||
#define HAVE_SOUND
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue