Hello,<br><br>I've done so already, and used ->sender() for this.Quite a strange behaviour of JuK though.<br><br>I think the "main problem" is that JuK does not make use of the queue at all. It does not add it to the queue, it fades out the mediaobject which is running out (setting volume values), and sets a newly created mediaobject with setMediaObject which JuK fades in the same time (setting the volume).<br>
<br>This shows the behaviour, that stateChanged mit Phonon::StoppedState is emitted for the "new" file, so for the MediaObject added with setMediaObject (I think that's not clean code anyway, but i'm not sure why it was done like this in JuK, and if it was intended to be like this).<br>
<br>In the receiver function (slotStateChanged), it creates it's own bug (deleting the m_file - setting it to FileHandle::null()).<br><br>I have two questions about Phonon:<br>1.) Can I expect that aboutToFinish should really emit right before it stops (topic: working as intended, should it be right before or some seconds before the track stops)? So crossfading there makes really no sense, and JuK needs some different trigger when just a a few seconds of a song are left (or not, see 2.)<br>
2.) Can I crossfade between MediaObjects in the Queue (as an example)? Like having 1 file playing, at aboutToFinish i set another file (mediasource) in the queue, and set the transition time to -5 (or any other value which seems to fit nicely). Wouldn't this mean, that I'd always need to have two mediafiles in the queue, since aboutToFinish is too short before the end of the track to make sense for crossfading (at the current behaviour I experience), and that the transition time would be a "global" value.<br>
<br>How would the crossfade in Phonon work anyway? JuK currently fades out one track, and fades in the other one at the same time. I don't like that, but I think it's as the JuK developer and maintainer intended it to be like this.<br>
<br>Kind regards,<br>Georg<br><br><div class="gmail_quote">On Thu, Jan 8, 2009 at 5:15 PM, Matthias Kretz <span dir="ltr"><<a href="mailto:kretz@kde.org">kretz@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<div class="Ih2E3d"><br>
On Thursday 08 January 2009 10:53:40 Georg Grabler wrote:<br>
> I've problems finding any API Documentation of Phonon. It seems as if<br>
> <a href="http://api.kde.org" target="_blank">api.kde.org</a> has several broken links and other strange behaviour:<br>
> 1.) <a href="http://phonon.kde.org" target="_blank">phonon.kde.org</a> seems to have just a mainpage, no documentation<br>
<br>
</div>It has other pages, too. But it's broken. And I have no power over it...<br>
<div class="Ih2E3d"><br>
> 2.) on <a href="http://api.kde.org" target="_blank">api.kde.org</a>, when I want to view the phonon documentation, I just<br>
> get the kdelibs main documentation page. There, I can't find anything else<br>
> than a lot of broken links<br>
> 3.) On the components page, pressing "Classes" at Phonon -> broken link.<br>
<br>
</div>Yes, one of the moves broke all of the docs. :( You can still find the<br>
documentation in the header files, though.<br>
<br>
One of these days I'll look into it again. For now you can use the docs<br>
Trolltech provides - which is why it's not such a pressing issue to fix.<br>
<div class="Ih2E3d"><br>
> Is there any reasonable documentaiton for phonon, for "users", means a API<br>
> reference? I wanted to look up a few problems I have with JuK<br>
> (crossfadeToFile is triggered by phonons aboutToFinish as it seems, and<br>
> Phonon::State changes to stopped while playing).<br>
<br>
</div>Docs for aboutToFinish:<br>
Emitted before the playback of the whole queue stops. When this signal is<br>
emitted you still have time to provide the next MediaSource (using \ref<br>
enqueue) so that playback continues.<br>
This signal can be used to provide the next MediaSource just in time for the<br>
transition still to work.<br>
<br>
You probably want to use MediaObject::setTransitionTime(<something negative>).<br>
<div class="Ih2E3d"><br>
> Also I'm not sure about if i get the phonon state stopped by the right<br>
> Phonon::MediaObject. In JuK, there's a line disconnecting the current<br>
> mediaobject (using mo->disconnect(this)), creating a new one afterwards.<br>
> I'm still receiving the stopped signal (Phonon::StoppedState triggered by<br>
> stateChanged), and would like to know which phonon object triggered that,<br>
> and why it was triggered.<br>
<br>
</div>You can debug it by looking at sender() in the receiving slot.<br>
<div class="Ih2E3d"><br>
> Furthermore, aboutToFinish is emitted short before stopped, means both are<br>
> emited in less than a second.<br>
<br>
</div>Yes, that's how it's supposed to be.<br>
<div class="Ih2E3d"><br>
> Therefore, using this as  a trigger for<br>
> crossfadeToFile isn't quite the best choice<br>
<br>
</div>yes - if crossfadeToFile does what I think it does.<br>
<div class="Ih2E3d"><br>
> - the question is if that's as<br>
> intended in this case.<br>
><br>
> Any hints?<br>
<br>
</div>Look at setTransitionTime (doesn't work with phonon-xine though :( for<br>
crossfades) or prefinishMark<br>
<font color="#888888"><br>
<br>
--<br>
________________________________________________________<br>
Matthias Kretz (Germany)                            <><<br>
<a href="http://Vir.homelinux.org/" target="_blank">http://Vir.homelinux.org/</a><br>
</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
kde-multimedia mailing list<br>
<a href="mailto:kde-multimedia@kde.org">kde-multimedia@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-multimedia" target="_blank">https://mail.kde.org/mailman/listinfo/kde-multimedia</a><br>
</div></div></blockquote></div><br>