Registered Member
|
Hi Folks,
here is some code for crossfading with phonon. The author (dwelch) said he had success! I've seen this on: http://stackoverflow.com/questions/2878521/crossfading-audio-with-pyqt4-and-phonon He said: "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:" and tries this 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() but without success. And the he answers later: "Seems I found the solution I was looking for. Although it's not supported by every phonon backend, setting the MediaObject's transitionTime with a negative number will crossfade." What do our developers think about it? Is it worth a trial? greetings mafal |
Manager
|
I don't know. Also I would suggest he actually asks on the phonon-backends mailing list, he might get more answers, Stackoverflow is not exactly the location to ask the Phonon developers
I will reassign this thread to Multimedia, as it is not Amarok specific but Phonon.
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ... |
Registered Member
|
Forgive me for insisting, but this is not backend-related as far as I understand the quote from stackoverflow. The user there has managed to crossfade with existing phonon and its backends!
If this is true amarok programmers can go that way too... I think this is surely worth a peek of an experienced amarok-programmer. I think this is perfectly amarok-related. Harvey |
Registered Member
|
Hi Harvey,
I affiliate with you and hope that an programmer would assume this code and think about a solution to programm it in amarok for crossfading songs. One big commendation for that woman/man... mafal |
Registered users: Bing [Bot], Evergrowing, Google [Bot], Sogou [Bot]