View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000117 | MMW v4 | Player | public | 2003-02-19 20:39 | 2010-10-25 14:30 |
Reporter | rusty | Assigned To | |||
Priority | urgent | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 3.0 | ||||
Summary | 0000117: Player: crossfade between songs | ||||
Description | It would be nice to either have crossfade/gap removal functionality build in, or to include a plug-in that provides this function. | ||||
Additional Information | From: http://members.tripod.com/files_saivert/files/dsoundipc.html Shows how to communicate directly with the directsound output plugin dsound_ipc directsound output plug-in ipc this is something i figured out from using spy++, and a little intelligence. no docs available at that moment. please read through all 5 (five) steps... 1st, locate the handle of the "dsound_ipc" window: /* in c/c++: */ hwnd hds_ipc=findwindowex(hwndwinamp, 0, "dsound_ipc", null); { in borland delphi: } var hds_ipc; begin hds_ipc := findwindowex(hwndwinamp, 0, 'dsound_ipc', nil); end; 2nd, to turn crossfade (fade at end) on or off: sendmessage(hds_ipc, wm_user, state, xfade_state); // where state is 0 = off, or 1 = on 3rd, to set the crossfade duration: sendmessage(hds_ipc, wm_user, duartioninms, xfade_duration); // where duartioninms = milliseconds 4th, to intercept changes in state and/or duration: // set up a subclass wndproc olddsoundproc; olddsoundproc = (wndproc) setwindowlong(hds_ipc, gwl_wndproc, (int) newdsoundproc); // the newdsoundproc subclass window procedure lresult newdsoundproc(hwnd hwnd, uint msg, wparam wparam, lparam lparam) { if (msg==wm_user && wparam==0 && lparam==0) { int duration, state; duration=sendmessage(hwnd, wm_user, 0, xfade_getduration); state=sendmessage(hwnd, wm_user, 0, xfade_getstate); } } // remeber to remove subclass in quit procedure of your plugin, like this: setwindowlong(hds_ipc, gwl_wndproc, (int) olddsoundproc); here is the delphi (pascal) version var olddsoundproc: tfnwndproc; { the subclass procedure } function newdsoundproc(wnd: hwnd; msg: uint; wparam: wparam; lparam: lparam): lresult; stdcall; var duration, state: integer; begin if (msg=wm_user) and (wparam=0) and (lparam=0) then begin duration := sendmessage(hwnd, wm_user, 0, xfade_getduration); state := sendmessage(hwnd, wm_user, 0, xfade_getstate); end; end; 5th, here is the constants: #define xfade_state 0x64 #define xfade_duration 0x66 #define xfade_getduration 0x67 #define xfade_getstate 0x65 // useful macro, use if you wish #define send_dsoundipc(wnd, msg, val) sendmessage(wnd, wm_user, val, msg) also got one for delphi (pascal) users: const xfade_state = $64; xfade_duration = $66; xfade_getduration = $67; xfade_getstate = $65; function senddsoundipc(wnd, msg, val): integer; begin result := sendmessage(wnd, wm_user, val, msg) end; that's it for now! | ||||
Tags | No tags attached. | ||||
Fixed in build | 1012 | ||||
|
There are several plug-ins at WinAmp's site for this purpose. I'm not sure if I have checked them, but they should work. Some good and tested plug-ins can be added to the recommended plug-ins on the Songs-DB web. |
|
I did a bit of investigation and found the following plug-ins to be highly rated by users and meet a need: -XFout http://classic.winamp.com/plugins/detail.jhtml?componentId=175 : Crossfading output plug-in works well in WA2, but doesn't work in SongsDB (end of song is cut rather than faded) (note: other cross fading plug-ins were for two instances of WA and/or weren't highly rated). DSP Plug-ins (Note: these plug-ins have nothing to do with cross-fading, however, I did the research at the same time, and figured it would be worth noting here). The following plugins worked well in WA2, but I couldn't figure out how to use them with Song--DB. -Dee2 http://classic.winamp.com/plugins/detail.jhtml?componentId=127352 or Wow Thing http://classic.winamp.com/plugins/detail.jhtml?componentId=1724 Either of this sound enhancing DSP plugins work well in WA2, but both cost and the shareware version isn't redistributable. -Defx http://classic.winamp.com/plugins/detail.jhtml?componentId=6295 : DSP plug-in cuts out voice for karaoke purposes. Works quite well in WA2. -Chronotron II http://classic.winamp.com/plugins/detail.jhtml?componentId=97797 : Changes song tempo without modifying pitch This pretty much leaves us with nothing that I'd want to bundle for now, aside from some of those that are already on your 'plug-ins' www page. Re-assigning to Jiri for feedback. edited on: 02-23 23:39 |
|
Output plug-ins: I will try to find out if anything can be corrected for XFout. DSP Plug-ins: They are currently not supported, but I think it shouldn't be too hard to implement it. I will review it. |
|
Re. XFout - quite strange, I wouldn't like to include to anyway (strange display, behaviour, ...). It will be probably best to try to implement some kind of crossfading internally, regardless of the output plug-in. I will do it later. It doesn't work in Songs-DB, because it uses messages I don't know. Songs-DB emulates WinAmp in order to use its plug-ins, but 100% compatibility is 1. improssible, 2. problematic because of some undocumented features. Most of plug-ins should work well, however few things could be still improved. DSP Plug-ins - I implement them now, it is quite easy, will be done soon. |
|
Ok, I have implemented DSP plug-ins (even more than one can run) - build 466. This bug is open for crossfading. |
|
I've been experimenting with the direct sound output plugin. It has crossfading built in, and it seems to work quite well. Would it make sense to use this plugin by default? Are there any downsides to it? |
|
No, the plug-in is good, it is supposed to be used for this purpose. I should also discuss with the developer if he could provide sources or some support, as he left the development and does WinAmp3 plug-ins only now. Maybe it will be necessary to create own plug-in in the future. |
|
Note: I tried another gapless playback plug-in called MP3-splice, and this one also failed to work in SDB... |
|
Re-assigned to Rusty since SQR-soft now works--it's now a question of getting permission to include a plug-in. |
|
Sent e-mails on June 18, 22 to: cecilia@sqrsoft.com.ar and mariano@sqrsoft.com.ar . Awaiting feedback. |
|
At this point it seems that our best bet would be to use the out_ds plugin, and preconfigure it as necessary. The only downside to this is that we would probably want to enable it selectively: i.e. use out_wave on W9x/ME and out_ds on NT/W2K/XP. We should use settings along the following lines for the out_ds plugin so that inobtrusive crossfading is enabled by default, along with gapless playback: -Buffering settings - Default -Fading --default fade length - 333ms (=default) --old style fade - disabled (=default) --don't abort fadeout when Winamp is shutting down - enabled (=default) --fading on start, on first start, on end - disabled (=default, I think) --fading on pause/stop - 1500ms --fading on seek - default (333ms) -Other: Remove Silence at beginning end of track: enabled (40db) Any settings not explicitly mentioned should be left at the plugins default. edited on: 07-05-04 14:57 |
|
Note: according to Nicolai, XFade plugin doesn't work because: (12:27:00) Nicolai: I'm actually working on XFade now, but not to improve compatibility with MM. I'm just making a new version which will turn off the XFade for songs shorter than x seconds. (12:27:32) Nicolai: I might then make it MM compatible. But the best thing would be if MM mimiced Winamp 5's EMbed Window IPC. (12:28:09) Nicolai: If MM wants to act like Winamp, it should support all of Winamp's different IPC messages. (12:28:25) Nicolai: Including the newer video api's and skinning interfaces. (12:31:02) Nicolai: Controlling Nullsoft's DirectSound ouput plug-in isn't actually hard at all. You just need to subclass a window with the class "DSound_IPC" and then send it some messages. This is what Winamp's modern skin does when you pop out the Equalizer drawer. There you can set the crossfade duration and turn crossfade on/off. |
|
Implemented as part of 0002545 in build 1008. |
|
Verified. Open issues tracked in 2545. |
|
There was one thing we hadn't implemented yet: Set exceptions for tracks that shouldn't crossfade at all. Technically I implemented it in build 1010 (out_MMDS.dll is needed). There are hardcoded genres that don't crossfade as: 'Book;Podcast'. (or anything containing these). We just need to decide where to give user option to configure this, something like: [x] Crossfade track Except tracks where genre contains: _Book;Podcast__________________________________ Assigning to Rusty to specify this. |
|
I'd suggest that it should appear in the output plugin as follows: <-----------------> [ ] Fade in new tracks [x] Do not crossfade tracks with genre containing: _book, podcast________ [x] Smooth x... |
|
If we don't want to have this in the output plugin, then a possible approach would be to have the following in the player config: Never crossfade tracks with genre containing: _book, podcast________ Obviously, this is a bit confusing, but there's no way around it if we're forced to have crossfading configuration split between 2 locations. |
|
2 Ludek: Please implement the configuration (for variable PlayerDontCrossfadeGenre from GlobVars.pas) as described - together with configuration of 0002678. |
|
Fixed in build 1012. The part of UI appears on Player | Auto-DJ / Now Playing option panel. |