From 97acb41b90fcebd27c7549a7836a64ab7e87c76d Mon Sep 17 00:00:00 2001 From: ZhongAn Date: Sun, 27 Jan 2019 07:31:40 -0600 Subject: [PATCH] system/nxplayer/nxplayer.c: Fix build error when only enable CONFIG_AUDIO_EXCLUDE_VOLUME is enabled. --- system/nxplayer/nxplayer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c index d98b73939..5d6932552 100644 --- a/system/nxplayer/nxplayer.c +++ b/system/nxplayer/nxplayer.c @@ -969,11 +969,10 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) #ifndef CONFIG_AUDIO_EXCLUDE_VOLUME (void)nxplayer_setvolume(pPlayer, pPlayer->volume); -#endif - #ifndef CONFIG_AUDIO_EXCLUDE_BALANCE nxplayer_setbalance(pPlayer, pPlayer->balance); #endif +#endif #ifndef CONFIG_AUDIO_EXCLUDE_TONE nxplayer_setbass(pPlayer, pPlayer->bass); @@ -1411,6 +1410,7 @@ int nxplayer_settreble(FAR struct nxplayer_s *pPlayer, uint8_t level) * ****************************************************************************/ +#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME #ifndef CONFIG_AUDIO_EXCLUDE_BALANCE int nxplayer_setbalance(FAR struct nxplayer_s *pPlayer, uint16_t balance) { @@ -1450,6 +1450,7 @@ int nxplayer_setbalance(FAR struct nxplayer_s *pPlayer, uint16_t balance) return -ENOENT; } #endif +#endif /**************************************************************************** * Name: nxplayer_pause @@ -2155,12 +2156,11 @@ FAR struct nxplayer_s *nxplayer_create(void) pPlayer->treble = 50; #endif +#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME + pPlayer->volume = 400; #ifndef CONFIG_AUDIO_EXCLUDE_BALANCE pPlayer->balance = 500; #endif - -#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME - pPlayer->volume = 400; #endif #ifdef CONFIG_AUDIO_MULTI_SESSION