resolve volume settings problem in phononapi

This commit is contained in:
rimach crichter@web.de 2011-07-28 22:49:43 +02:00
parent 0c4ae8d3c8
commit f1d7284e8d

View File

@ -157,7 +157,6 @@ class PhononAPI(MediaAPI):
def play(self, display): def play(self, display):
controller = display.controller controller = display.controller
start_time = 0 start_time = 0
vol = float(controller.media_info.volume) / float(10)
if display.mediaObject.state() != Phonon.PausedState and \ if display.mediaObject.state() != Phonon.PausedState and \
controller.media_info.start_time > 0: controller.media_info.start_time > 0:
start_time = controller.media_info.start_time start_time = controller.media_info.start_time
@ -165,7 +164,7 @@ class PhononAPI(MediaAPI):
if self.mediaStateWait(display, Phonon.PlayingState): if self.mediaStateWait(display, Phonon.PlayingState):
if start_time > 0: if start_time > 0:
self.seek(display, controller.media_info.start_time*1000) self.seek(display, controller.media_info.start_time*1000)
display.audio.setVolume(vol) self.volume(display, controller.media_info.volume)
controller.media_info.length = \ controller.media_info.length = \
int(display.mediaObject.totalTime()/1000) int(display.mediaObject.totalTime()/1000)
controller.seekSlider.setMaximum(controller.media_info.length*1000) controller.seekSlider.setMaximum(controller.media_info.length*1000)