summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme')
-rw-r--r--apps/codecs/libgme/blargg_common.h15
-rw-r--r--apps/codecs/libgme/emu2413.c2
-rw-r--r--apps/codecs/libgme/emu2413.h2
3 files changed, 18 insertions, 1 deletions
diff --git a/apps/codecs/libgme/blargg_common.h b/apps/codecs/libgme/blargg_common.h
index 74125bb808..65ae76ae99 100644
--- a/apps/codecs/libgme/blargg_common.h
+++ b/apps/codecs/libgme/blargg_common.h
@@ -25,6 +25,21 @@
25#define FP_ONE_GAIN (1LL << 24) 25#define FP_ONE_GAIN (1LL << 24)
26#define FP_ONE_VOLUME FP_ONE_GAIN 26#define FP_ONE_VOLUME FP_ONE_GAIN
27 27
28// IRAM configuration
29#if (CONFIG_CPU == MCF5250)
30#define EMU2413_CALC_ICODE
31
32#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
33#define EMU2413_CALC_ICODE ICODE_ATTR
34
35#elif defined(CPU_S5L870X)
36#define EMU2413_CALC_ICODE
37
38#else
39#define EMU2413_CALC_ICODE
40
41#endif
42
28// BLARGG_RESTRICT: equivalent to C99's restrict, where supported 43// BLARGG_RESTRICT: equivalent to C99's restrict, where supported
29#if __GNUC__ >= 3 || _MSC_VER >= 1100 44#if __GNUC__ >= 3 || _MSC_VER >= 1100
30 #define BLARGG_RESTRICT __restrict 45 #define BLARGG_RESTRICT __restrict
diff --git a/apps/codecs/libgme/emu2413.c b/apps/codecs/libgme/emu2413.c
index 48f32d8e57..44782c3dc1 100644
--- a/apps/codecs/libgme/emu2413.c
+++ b/apps/codecs/libgme/emu2413.c
@@ -1423,6 +1423,8 @@ calc_slot_hat (OPLL_SLOT *slot, e_int32 pgout_cym, e_uint32 noise)
1423} 1423}
1424 1424
1425static e_int16 1425static e_int16
1426calc (OPLL * opll) EMU2413_CALC_ICODE;
1427static e_int16
1426calc (OPLL * opll) 1428calc (OPLL * opll)
1427{ 1429{
1428 e_int32 i; 1430 e_int32 i;
diff --git a/apps/codecs/libgme/emu2413.h b/apps/codecs/libgme/emu2413.h
index 89d6e4dbd5..6a19b102a1 100644
--- a/apps/codecs/libgme/emu2413.h
+++ b/apps/codecs/libgme/emu2413.h
@@ -137,7 +137,7 @@ EMU2413_API void OPLL_writeReg(OPLL *, e_uint32 reg, e_uint32 val);
137EMU2413_API e_uint32 OPLL_read(OPLL *, e_uint32 port); 137EMU2413_API e_uint32 OPLL_read(OPLL *, e_uint32 port);
138 138
139/* Synthsize */ 139/* Synthsize */
140EMU2413_API e_int16 OPLL_calc(OPLL *) ; 140EMU2413_API e_int16 OPLL_calc(OPLL *) EMU2413_CALC_ICODE;
141EMU2413_API void OPLL_calc_stereo(OPLL *, e_int32 out[2]) ; 141EMU2413_API void OPLL_calc_stereo(OPLL *, e_int32 out[2]) ;
142EMU2413_API e_int16 *OPLL_update_buffer(OPLL *, e_uint32 length) ; 142EMU2413_API e_int16 *OPLL_update_buffer(OPLL *, e_uint32 length) ;
143 143