From 1d3a40f8beb4b20a4d560479f6f8e75e3fa2f0c9 Mon Sep 17 00:00:00 2001 From: colajam93 Date: Tue, 20 Sep 2016 15:50:47 +0900 Subject: [PATCH] Fix warning (#16591) --- cocos/audio/linux/AudioEngine-linux.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos/audio/linux/AudioEngine-linux.cpp b/cocos/audio/linux/AudioEngine-linux.cpp index b53c63f8a8..40ed2f09cd 100644 --- a/cocos/audio/linux/AudioEngine-linux.cpp +++ b/cocos/audio/linux/AudioEngine-linux.cpp @@ -210,14 +210,16 @@ float AudioEngineImpl::getCurrentTime(int audioID) bool AudioEngineImpl::setCurrentTime(int audioID, float time) { + bool ret = false; try { unsigned int position = (unsigned int)(time * 1000.0f); FMOD_RESULT result = mapChannelInfo[audioID].channel->setPosition(position, FMOD_TIMEUNIT_MS); - ERRCHECK(result); + ret = !ERRCHECK(result); } catch (const std::out_of_range& oor) { printf("AudioEngineImpl::setCurrentTime: invalid audioID: %d\n", audioID); } + return ret; } void AudioEngineImpl::setFinishCallback(int audioID, const std::function &callback)