void MediaPlayerBridgeCapi::SetVolume(double volume) {
VLOG(1) << __FUNCTION__ << " : Player Id = " << GetPlayerId()
- << " : Volume : " << volume;
- if (GetPlayerState() > PLAYER_STATE_IDLE){
- if(volume == 0.0){
- if(player_set_mute(player_,true)
- != PLAYER_ERROR_NONE)
- LOG(ERROR) << "|player_set_mute(true)| failed in MediaPlayerBridgeCapi::"
- << __FUNCTION__;
+ << " : Volume : " << volume;
- return;
- }
-
- if(player_set_mute(player_,false)
- != PLAYER_ERROR_NONE)
- LOG(ERROR) << "|player_set_mute(false)| failed in MediaPlayerBridgeCapi::"
- << __FUNCTION__;
+ if (GetPlayerState() == PLAYER_STATE_NONE)
+ return;
- if (player_set_volume(player_, (float)volume, (float)volume)
- != PLAYER_ERROR_NONE)
- LOG(ERROR) << "|player_set_volume| failed in MediaPlayerBridgeCapi::"
- << __FUNCTION__;
- }
+ if (player_set_volume(player_, volume, volume) != PLAYER_ERROR_NONE)
+ LOG(ERROR) << "|player_set_volume| failed";
}
void MediaPlayerBridgeCapi::UpdateMediaType() {