Version: (using KDE KDE 3.2.1) Installed from: Gentoo Packages Amarok can fade between tracks, controlled from "transition behavior" in the settings. This is a great feature when I click random tracks in Konqueror. But not so great when listening to a playlist of tracks from a cd, when those tracks are not meant to be faded into each other. An obvious solution is to disable to crossfading completely, but it's nice to have in some situations. I suggest a new setting: "crossfade single files, but not playlist entries".
I thought of this sometime ago also. I'll see what I can do at some point.
I'd like to add some comments for this wish: something that would be really nice is not only not to use cross-fade for albums, but to have seamless transitions between tracks. It's pretty common for songs to run into the next song when playing a CD. I can see how this would be kinda hard to implement in a player that uses files, though. Also, I've been fiddling with the settings to try to achieve something similar to this, and I've found some annoyances: - It seems that amarok cuts the 1st second of the song when I tell it to start playing. Juk (on the same machine) does not show this behavior, nor any other player I've tried. - When using cross-fade, the cross-fading works, but a noticeable pause is added when the cross-fade period is over. Let's say I've set it to cross-fade 2 seconds to the next song; between seconds 2 and 3 of the new song there's a noticeable pause in the playing. - When changing the cross-fade / no cross fade settings, amarok changes the volume of my sound card... Well, not all of them are related to this buglist entry, but... :-)
*** Bug 84085 has been marked as a duplicate of this bug. ***
Wouldn't it be cool to have some features of the xmms crossfade plugin? It has the possibility to detect if two songs are already mixed and can disable automatically fading (and I think it does it by actually analyzing the output stream). It also has a gap-killer which kills silence at the beginning or end of a track and it even avoids clicks when changing songs by doing the change when both tracks have a zero sample value. It's quite advanced. But it has two major drawbacks: I can't get it to work with arts (so I would have to use alsa directly which sucks) and I don't like the xmms UI. But this plugin is definitely great. Please try it and see for yourself. http://www.mynetcologne.de/~nc-eisenlpe2/xmms-crossfade/index.htm Perhaps its code for detecting consecutive tracks could be interesting to have a look at.
CVS commit by muesli: * Fix: Don't crossfade, if we're playing the very next tack of the same album. CCMAIL: 77766-done@bugs.kde.org M +7 -3 enginecontroller.cpp 1.64 --- kdeextragear-1/amarok/src/enginecontroller.cpp #1.63:1.64 @@ -259,4 +259,7 @@ void EngineController::play( const MetaB if( m_engine->load( url ) ) { + //disable crossfading if we're going to play the next track of the same album + bool dontCrossfade = ( bundle.track().toInt() == m_bundle.track().toInt() + 1 ) && ( bundle.album() == m_bundle.album() ); + //assign bundle now so that it is available when the engine //emits stateChanged( Playing ) @@ -266,4 +269,5 @@ void EngineController::play( const MetaB { m_xFadeThisTrack = AmarokConfig::crossfade() && + !dontCrossfade && m_engine->hasXFade() && !m_engine->isStream() &&
Does that mean that two tracks play perfectly gapless? I tried two flac files with no cross-fading and there was a gap. No gap would be great (like the plugin for XMMS mentioned above does). Thanks for the work!
*** Bug 93568 has been marked as a duplicate of this bug. ***
Is this really fixed? For me Amarok does crossfading between tracks in the playlist, especially between tracks from the same album.
No, to the say truth, it's not fixed. This code was removed again. But as I have explained to you in private mail, Sven, this function does not make much sense without the availability of true gapless play.
Ok, that confused me... My search for "gapless" found that feature request for gapless play bugs are duped against this one. So could someone please reopen this as a request for gapless play and playing without crossfading of following songs from the same album? Thanks :)
It seems that tracks mesh well under xine-lib but not gstreamer. I think this ought to be reopened, I have CVS as of December sometime.
Yeah, please reopen the bug - it's not fixed yet! (And I prefer a small gap over a crossfade which doesn't belong there!)
As requested.
Gap killing and different behavior for playlist playing and single files may be difficult to implement. I'd like to have different crossfading behavior between automatic and manual songchange. These are the cases which are independently configurable in the xmms-crossfade plugin: "Start of playback", "automatic songchange", "manual songchange", "manual stop", "end of playlist", "seeking", "pause". This would satisfy everybody's needs.
Ah, look, that's just exactly what I wanted to post a bug for. So I vote for implementing the above proposition! (#14) My idea was two different settings: crossfade ordinary playing / crossfade on selecting next. But that one is even nicer!
I would also like to see true gapless playback in amaroK, it's the one major feature that's missing. amaroK is very nice otherwise, but without gapless playback I can't use it without going crazy. I'd be happy to hack on this feature if someone pointed me in the right direction.
On Tuesday 10 May 2005 16:39, Neil Skrypuch wrote: > ------- Additional Comments From ns03ja brocku ca 2005-05-10 16:39 ------- > I would also like to see true gapless playback in amaroK, it's the one > major feature that's missing. amaroK is very nice otherwise, but without > gapless playback I can't use it without going crazy. I'd be happy to hack > on this feature if someone pointed me in the right direction. Help is more than welcome, but I'm afraid this will require a very deep understanding of the underlying multimedia backend, for example GStreamer. You're invited to look at the engine, it's fairly well documented.
here's a mail I sent to the xine-devel mailing list and the reply concerning gapless. I suppose the situation in the same with GStreamer. It's a shame the two major engines do not support gapless (yet), this is a rather important feature. XMMS2 and lamip support gapless for gapless friendly formats (ie not mp3). They use their own engine/plugins to talk to codec libs > What would be needed for a music player using the xine engine to > implement true gapless playback of ogg files (in the case of a CD > gapless album like a mixed CD). When I mean true gapless, this has > nothing to do with crossfading.ogg format support gapless while mp3 > does not but it can be somewhat done with hacks. > > My question is if it must be implemented by xine-lib or at the > application level ? My guess is application level but I'd like your > opinion. This definitely needs support from xine-lib to work. But this support is not there yet.
It appears that xine-lib now has support for gapless playback, see the release notes here: https://sourceforge.net/project/shownotes.php?release_id=371103 Of particular interest is this part: "Another often requested feature is the gapless playback, that is, switching streams without adding a gap/pause between then. The 'gap' can be very annoying when listening mp3s copied from the same CD. The new gapless playback feature, however, requires support from UI (cvs versions of kaffeine, gxine and xine-ui are known to have implemented it)."
Thanks for the pointer Neil. Looking at the xine.h file, the only thing about gapless is one #define of a parameter: #define XINE_PARAM_GAPLESS_SWITCH 32 /* next stream only gapless swi*/ Maybe you just have to set that switch and it will start being gapless? I'll look into this tonight or tomorrow. If it works, it would be worth it to backport to 1.3.
http://websvn.kde.org/trunk/extragear/multimedia/kaffeine/src/player-parts/kaffeine-part/kxinewidget.cpp?rev=476119&view=rev It isn't a simple switch :), but it doesn't look too bad to implement. Still trying to see if there isn't any actual documentation on how to use it.
SVN commit 490917 by ianmonroe: For xine-lib 1.1.1 and greater, xine engine has gapless play. amaroK is now "The Wall" compatible. *Should still compile for older xines. *Wondering how gapless this is for people with older hardware. Uses some Kaffeine code. CCMAIL: hftom@free.fr CCMAIL: amarok-devel@lists.sf.net BUGS: 77766 M +2 -0 ChangeLog M +22 -5 src/engine/xine/xine-engine.cpp --- trunk/extragear/multimedia/amarok/ChangeLog #490916:490917 @@ -5,6 +5,8 @@ VERSION 1.4: FEATURES: + * For xine-lib 1.1.1 and greater, xine engine has gapless play. amaroK is now "The Wall" + compatible. (BR 77766) * Option for selecting external web browser in amaroK. No longer requires KDE-Base. (BR 106015) * Switchable Wikipedia locale. (BR 104383) --- trunk/extragear/multimedia/amarok/src/engine/xine/xine-engine.cpp #490916:490917 @@ -1,5 +1,7 @@ /*************************************************************************** - * Copyright (C) 2004,5 Max Howell <max.howell@methylblue.com> * + * Copyright (C) 2005 Christophe Thommeret <hftom@free.fr> * + * (C) 2005 Ian Monroe <ian@monroe.nu> * + * (C) 2004,5 Max Howell <max.howell@methylblue.com> * * (C) 2003,4 J. Kofler <kaffeine@gmx.net> * * * * This program is free software; you can redistribute it and/or modify * @@ -193,7 +195,13 @@ xine_set_param( m_stream, XINE_PARAM_METRONOM_PREBUFFER, 6000 ); xine_set_param( m_stream, XINE_PARAM_IGNORE_VIDEO, 1 ); #endif - +#ifdef XINE_PARAM_EARLY_FINISHED_EVENT + if ( xine_check_version(1,1,1) ) { + // enable gapless playback + debug() << "gapless playback enabled." << endl; + xine_set_param(m_stream, XINE_PARAM_EARLY_FINISHED_EVENT, 1 ); + } +#endif return true; } @@ -225,7 +233,13 @@ return true; } - + else + { + #ifdef XINE_PARAM_GAPLESS_SWITCH + if ( xine_check_version(1,1,1) ) + xine_set_param( m_stream, XINE_PARAM_GAPLESS_SWITCH, 0); + #endif + } //s_fader will delete itself return false; @@ -552,7 +566,7 @@ switch( e->type() ) { - case 3000: + case 3000: //XINE_EVENT_UI_PLAYBACK_FINISHED emit trackEnded(); break; @@ -644,7 +658,10 @@ break; case XINE_EVENT_UI_PLAYBACK_FINISHED: - + #ifdef XINE_PARAM_GAPLESS_SWITCH + if ( xine_check_version(1,1,1) ) + xine_set_param( xe->m_stream, XINE_PARAM_GAPLESS_SWITCH, 1); + #endif //emit signal from GUI thread QApplication::postEvent( xe, new QCustomEvent(3000) ); break;
For me a playing back is not gapless: next track begins when a seek slider is still at the end of prev track, after a couple of seconds (at the moment the slider changes positions to 0:0) a gap takes place. I use ~x86 synced Gentoo. xine has 1.1.1 version. Must I supply some additional info?
On Wednesday 28 December 2005 17:54, Andrew Gaydenko wrote: > I use ~x86 synced Gentoo. xine has 1.1.1 version. Gapless playback has been implemented in 1.4-SVN.
I mean current SVN version.
Probably I must to add I use FLAC files.
OK, I don't know how to prove the bug still exists :-) The only way I have found is here: http://gaydenko.com/mix/amarok/gapless/ There is four parts of splitted musical fragment and a file which was recorded with microphone during these fragments playing back. Of course, it is for current SVN. The problem isn't FLAC-related: I have tried wav-files too. With hope to resolve the issue, Andrew Gaydenko
Hm... It is interesting :-), during a week nobody looked at supplied the bug illustration (I mean microphone-recording of splitted fragments playing back).
There is something weird going on. In your mic-recording and when I listened to the FLACs myself, I heard pops between tracks, which is something I never hear. There very well could be an issue in regards to FLAC. Which it would be a xine-lib problem really.
Ian, In msg #27 I have reported, wav files were tested too with the same effect :-)
So, lets get back to the original wish list.. That is, songs in the playlist are ussually ment ot be played in succession. Thus gapless helps here. But on manual intervention (Next, Previous Track, double click on another song in the playlist) it would be nice to crossfade the songs to 'ease' the transition. Is this in 1.4?
Yes, it is. We have an option "Fade on manual track change only" in 1.4.
I repeat myself: I'd like to have different crossfading behavior between automatic and manual songchange. These are the cases which are independently configurable in the xmms-crossfade plugin: - "start of playback" - "automatic songchange" - "manual songchange" - "manual stop" - "end of playlist" - "seeking" - "pause" amarok is still behind XMMS without these... Can we reopen this bug or should I file a new one?
I'm not C/CPP developer, nevertheless I have tried to scan current SVN tree to find all 'XINE_PARAM_EARLY_FINISHED_EVENT' and 'XINE_PARAM_GAPLESS_SWITCH' occurences. They are found in xine-engine.cpp file only, and in '#ifdef's only. So, the question is: where must these params be defined to make xine work really gapless?
I have tried xine CVS short 20060328 with the same result as before (see #27).
I propose to add a Checkbox in the "Edit metadata"-Dialog when you are editing an album, which is called "Gapless Album" or something like that. That would be very similar to iTunes, but it would be a great feature when listening to albums which are already mixed. If this box is checked, the behaviour should be the following: Gapless Album, some track (e.g. track 1) → Gapless Album, follow-up-track (e.g. track 2) ----→ No crossfading, but gapless play Gapless Album, some track → Gapless Album, but not follow-up-track ----→ Crossfading, because the album is not properly mixed anymore Gapless Album, Track 1 → Non-Gapless Album, some track ----→ Crossfading Non-Gapless Album, some track → Non-Gapless Album, some other track ----→ Crossfading