Permalink
Browse files

[AE/Pulseaudio] set sample(skin menu) playback volume to the current …

…XBMC system volume level
  • Loading branch information...
1 parent e9346f2 commit 44eda770b5587c476f9bff5b1a4dd05f58ac2d94 @s7mx1 committed Dec 1, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 xbmc/cores/AudioEngine/Engines/PulseAE/PulseAESound.cpp
@@ -136,7 +136,9 @@ void CPulseAESound::Play()
/* we only keep the most recent operation as it is the only one needed for IsPlaying to function */
if (m_op)
pa_operation_unref(m_op);
- m_op = pa_context_play_sample(m_context, m_pulseName.c_str(), NULL, PA_VOLUME_INVALID, NULL, NULL);
+ m_maxVolume = CAEFactory::GetEngine()->GetVolume();
+ pa_volume_t paVolume = CAEUtil::PercentToPulseVolume((double)(m_volume * m_maxVolume));
+ m_op = pa_context_play_sample(m_context, m_pulseName.c_str(), NULL, paVolume, NULL, NULL);
pa_threaded_mainloop_unlock(m_mainLoop);
}

0 comments on commit 44eda77

Please sign in to comment.