I'm trying to get audio files to crossfade with phonon. I'm using PyQT4. I have tracks queuing properly, but I'm stuck with the fade effect. I think I need to be using the KVolumeFader effect. Here's my current code:
def music_play(self):
self.delayedInit()
self.m_media.setCurrentSource(Phonon.MediaSource(self.playlist[self.playlist_pos]))
self.m_media.play()
def music_stop(self):
self.m_media.stop()
def delayedInit(self):
if not self.m_media:
self.m_media = Phonon.MediaObject(self)
audioOutput = Phonon.AudioOutput(Phonon.MusicCategory, self)
Phonon.createPath(self.m_media, audioOutput)
def enqueueNextSource(self):
if len(self.playlist) >= self.playlist_pos+1:
self.playlist_pos += 1
self.m_media.enqueue(Phonon.MediaSource(self.playlist[self.playlist_pos]))
else:
self.m_media.stop()
Can anyone give me some advice on implementing the effect?