Winamp message IPC_JUMPTOTIME, XMPlay returns wrong code with "Modules"

Started by bauxite69,

bauxite69


ex: int i = SendMessage(xmpfmisc->GetWindow(), WM_WA_IPC, 3000, IPC_JUMPTOTIME);

Winamp SDK :
#define IPC_JUMPTOTIME 106
/* (requires Winamp 1.60+)
** SendMessage(hwnd_winamp,WM_WA_IPC,ms,IPC_JUMPTOTIME);
** This api sets the current position (in milliseconds) for the currently playing song.
** The resulting playback position may only be an approximate time since some playback
** formats do not provide exact seeking e.g. mp3
** This returns -1 if Winamp is not playing, 1 on end of file, or 0 if it was successful.
*/

It works as expected with all Decoders expect "Modules" ?

When a module is playing, it returns -1 instead of 0 ?

Thanks

Ian @ un4seen

Yeah, the IPC_JUMPTOTIME message doesn't currently work with the built-in "Modules" decoder because it doesn't support time-based seeking, only order-based seeking. I'll check if something can be done about that, perhaps by adding a time-based seeking option. If you need it right now, IPC_JUMPTOTIME should work when using a plugin to play modules.

bauxite69


Indeed, it works well with plugins.

Take your time. 8)
If you find a solution, that would be great.

I'm working on a plugin to loop a selected section of a song based on time.

Thanks !

Ian @ un4seen

Here's an update for you to try:

    www.un4seen.com/stuff/xmplay.exe

It adds proper time-based seeking support (no longer restricted to the start of an order) when the position display is in time mode (not orders/rows mode). The position display will automatically switch modes if necessary when an IPC_JUMPTOTIME message is received. It hasn't been tested much yet, so please report back how you get on with it.

bauxite69


I've done some testing and it works as expected.  :)

Thank you for your work and support !