From 35e8b1429a2cdcf6580f6d25890fed9865165d0b Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 21 Jun 2010 16:53:00 +0000 Subject: Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657 --- firmware/sound.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'firmware/sound.c') diff --git a/firmware/sound.c b/firmware/sound.c index dccca12264..76f1dd0df6 100644 --- a/firmware/sound.c +++ b/firmware/sound.c @@ -27,7 +27,7 @@ #include "system.h" #include "i2c.h" #include "mas.h" -#ifndef SIMULATOR +#if (CONFIG_PLATFORM & PLATFORM_NATIVE) #if CONFIG_CPU == PNX0101 #include "pnx0101.h" #endif @@ -257,7 +257,7 @@ static void set_prescaled_volume(void) dsp_callback(DSP_CALLBACK_SET_SW_VOLUME, 0); #endif -#ifndef SIMULATOR +#ifndef HAVE_SDL_AUDIO #if CONFIG_CODEC == MAS3507D dac_volume(tenthdb2reg(l), tenthdb2reg(r), false); #elif defined(HAVE_UDA1380) || defined(HAVE_WM8975) || defined(HAVE_WM8758) \ @@ -276,9 +276,9 @@ static void set_prescaled_volume(void) #elif defined(HAVE_JZ4740_CODEC) || defined(HAVE_SDL_AUDIO) audiohw_set_volume(current_volume); #endif -#else /* SIMULATOR */ +#else /* HAVE_SDL_AUDIO */ audiohw_set_volume(current_volume); -#endif /* !SIMULATOR */ +#endif /* !HAVE_SDL_AUDIO */ } #endif /* (CONFIG_CODEC == MAS3507D) || defined HAVE_UDA1380 */ @@ -714,7 +714,7 @@ void sound_set(int setting, int value) && !defined(HAVE_WM8758) && !defined(HAVE_TSC2100) \ && !defined (HAVE_WM8711) && !defined (HAVE_WM8721) \ && !defined (HAVE_WM8731) && !defined (HAVE_WM8978) \ - && !defined(HAVE_AK4537)) || defined(SIMULATOR) + && !defined(HAVE_AK4537)) || (CONFIG_PLATFORM & PLATFORM_HOSTED) int sound_val2phys(int setting, int value) { #if CONFIG_CODEC == MAS3587F @@ -820,7 +820,7 @@ int sound_val2phys(int setting, int value) return value; #endif } -#endif /* !defined(HAVE_AS3514) || defined(SIMULATOR) */ +#endif /* CONFIG_CODECs || PLATFORM_HOSTED */ #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) /* This function works by telling the decoder that we have another -- cgit v1.2.3