diff --git a/apps/plugin.c b/apps/plugin.c index 63097a2589..e7758df51c 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -292,8 +292,10 @@ static const struct plugin_api rockbox_api = { pcm_set_frequency, pcm_is_playing, pcm_play_pause, - pcm_calculate_peaks, #endif +#endif +#if CONFIG_CODEC == SWCODEC + pcm_calculate_peaks, #endif /* playback control */ diff --git a/apps/plugin.h b/apps/plugin.h index ed4588d906..df23ed1c00 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -346,9 +346,11 @@ struct plugin_api { void (*pcm_set_frequency)(unsigned int frequency); bool (*pcm_is_playing)(void); void (*pcm_play_pause)(bool play); - void (*pcm_calculate_peaks)(int *left, int *right); #endif #endif /* !SIMULATOR */ +#if CONFIG_CODEC == SWCODEC + void (*pcm_calculate_peaks)(int *left, int *right); +#endif /* playback control */ void (*PREFIX(audio_play))(long offset);