English Amiga Board


Go Back   English Amiga Board > Main > Retrogaming General Discussion

 
 
Thread Tools
Old 15 June 2008, 23:25   #101
TCD
HOL/FTP busy bee

 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,812
Quote:
Originally Posted by StingRay View Post
No need to write a new replayer just to display the remaining time of a module. As he has to load the module anyway, he can parse it and calculate the length!
Okay, you are right. If he knows the length of the module he can check if a module is playing and calculate the remaining time. Do you know how the 'E6' effect can be calculated? I think this is the tricky part.
TCD is offline  
Old 15 June 2008, 23:44   #102
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by TheCyberDruid View Post
Okay, you are right. If he knows the length of the module he can check if a module is playing and calculate the remaining time. Do you know how the 'E6' effect can be calculated? I think this is the tricky part.
Shouldn't be too hard, just find out how many times the loop is performed (e.g. E63 -> 3 times) and add this to the time of the module. I assume that E6x is patternloop, it's been a while since I coded pt replayers so I might be wrong here.

Last edited by StingRay; 15 June 2008 at 23:54. Reason: fixed typo
StingRay is offline  
Old 15 June 2008, 23:49   #103
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
If you click the "accurate" in the settings, you get the module length. However, that slows down the loading of mp3 files. I'm aware of this though and should do something about this.
bLAZER is offline  
Old 15 June 2008, 23:51   #104
TCD
HOL/FTP busy bee

 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,812
Quote:
Originally Posted by StingRay View Post
Shouldn't be too hard, just find out how many times the loop is performed (i.e. E63 -> 3 times) and add this to the time of the module. I assume that E6x is patternloop, it's been a while since I coded pt replayers so I might be wrong here.
No you're right again . Like you said just read the whole pattern data, count the lines within the loop (E60 -> E6x) and add it x-1 time to the length of the song for each loop. Now that I read it, it seems not so hard anymore . Thanks for pointing that out StingRay

Quote:
Originally Posted by bLAZER View Post
If you click the "accurate" in the settings, you get the module length. However, that slows down the loading of mp3 files. I'm aware of this though and should do something about this.
That's because you don't use streaming when accurate is enabled right? In my little frontend I had the same problem. Might be worth to check the format of the song to load and then decide if you use streaming or not
TCD is offline  
Old 15 June 2008, 23:59   #105
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by bLAZER View Post
If you click the "accurate" in the settings, you get the module length. However, that slows down the loading of mp3 files. I'm aware of this though and should do something about this.
Ah nice, didn't know that, seems to work fine. As for slowing down loading of mp3 files, well, you only need to check the kind of file currently loaded and decide if it's required to do the length calculation f.e. Shouldn't be too hard to fix I think.
StingRay is offline  
Old 16 June 2008, 00:00   #106
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by TheCyberDruid View Post
No you're right again . Like you said just read the whole pattern data, count the lines within the loop (E60 -> E6x) and add it x-1 time to the length of the song for each loop. Now that I read it, it seems not so hard anymore . Thanks for pointing that out StingRay
You're welcome.
StingRay is offline  
Old 16 June 2008, 00:06   #107
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
accurate is a flag used so that (vbr)mp3-files can be searched in with ms.accuracy, and it also calculates length for mod files. I don't think it does anything else, so I could probably just check if it's a mod and the open it with accuracy if that's the case. In long term I need to use another library anyways since FMOD doesn't play ST15, Ultimate ST and some other old mods.
bLAZER is offline  
Old 16 June 2008, 00:14   #108
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Ah I see. I'm not well informed when it comes to Win32 modplayer libraries (I used ufmod for the few PC intros I coded but that's just for xm's) but quick googling revealed DUMB. Maybe worth to try?
StingRay is offline  
Old 16 June 2008, 01:18   #109
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
Haven't seen that lib before, looks interesting although I can't see anywhere if it handles all types of mod's.
bLAZER is offline  
Old 17 June 2008, 00:02   #110
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
I managed to compile it but it just crashes when I try to load a module, I debugged it a bit and don't understand why...

However it seems like it CAN play ST15 mods, but it states

"Note that 15-sample mods have no identifying features, so dumb_load_mod() may succeed on files that aren't mods at all. We therefore try that one last."

that was why I disabled libmod, because it tried to play files it didn't handle and crashed as a result. I don't think I used that last though, so I might give libmod a shot again.
bLAZER is offline  
Old 17 June 2008, 01:33   #111
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
Well, it works better if libmod is the last plugin that tries to load a file, however it tries to play a LOT of files, exe's, dll's etc. which often result in a crash. It also doesn't play Ultimate Sountracker and such very good, some sounds are wrong. Mikmod is probably better - I think that is what winamp uses and old mods sounds a lot better. It seems like a bit of work to get it to work with fmod though.
bLAZER is offline  
Old 17 June 2008, 09:53   #112
OddbOd
Registered User
 
Join Date: Jul 2005
Location: Australia
Age: 47
Posts: 666
In that case what I suggest you do is stick with modplug or DUMB but use the format checking from UADE (it's in src\frontends\common\amifilemagic.c) to reject all invalid mod files. It is possible that this method will reject some playable files like this one which plays using DUMB/mikmod, fails under FMOD and must be forced to the correct type under UADE, but on balance that's probably better than a crash.
OddbOd is offline  
Old 17 June 2008, 13:27   #113
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
Yes, sounds like a good idea.
bLAZER is offline  
Old 17 June 2008, 15:06   #114
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
Yes, it certainly works better now, although as you said it fails to recognize a few mods.
bLAZER is offline  
Old 17 June 2008, 15:16   #115
TCD
HOL/FTP busy bee

 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,812
Quote:
Originally Posted by bLAZER View Post
Yes, it certainly works better now, although as you said it fails to recognize a few mods.
Hi bLAZER,

are there many of them? Could you upload some example mods that weren't recognised to the zone? Would like to have a look at them Maybe there is something in common that could be made into a second level check (after UADE's format check).
TCD is offline  
Old 17 June 2008, 15:36   #116
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
Sure, take a look in the zone. It's two mods that are recognized as Ultimate Soundtracker by Deliplayer but fails using the mod15check function in UADE
bLAZER is offline  
Old 17 June 2008, 15:49   #117
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
I added another two Ultimate ST mods and also three ST15 mods that doesn't get recognized.
bLAZER is offline  
Old 17 June 2008, 15:58   #118
TCD
HOL/FTP busy bee

 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,812
Okay, I think I found something. Both of your modules aswell as one I tested (all recognized in Deliplayer as Ultimate Soundtracker) have the same 'trailer' i.e. the last bytes are the same. There are some null bytes in two of the songs which need to be skipped. Then follows a sequence of more than 512 bytes (haven't looked further) that are exactly the same when reading from the end upwards. You could check if this sequence is at the end. I think 512 bytes are pretty safe to use for a check
TCD is offline  
Old 17 June 2008, 16:07   #119
TCD
HOL/FTP busy bee

 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,812
Damn, these two 'nor' mods don't have this trailer . There is nothing in common at the end. That also goes for the Soundtracker 15 modules. Deliplayer must really check the structure of the mod (I dont' know how). Is there any way that you could 'catch' the crash and just skip the files that aren't played (guess you tried that already ).
TCD is offline  
Old 17 June 2008, 18:12   #120
bLAZER
Awesome to the max
 
bLAZER's Avatar
 
Join Date: Mar 2007
Location: Gothenburg / Sweden
Age: 48
Posts: 1,006
When the plugin crashes, only the dll crashes and not the program actually, but if you try to play another song, I think it crashes. I think I'll stick to the current solution though for now. I could also have a look at mikmod and see if there are any useful functions there.
bLAZER is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga music player on PC moriez Amiga scene 38 07 September 2020 16:23
Music player with Batman glr Looking for a game name ? 2 04 January 2012 14:02
Best music player quantum112 support.Apps 9 06 January 2010 09:59
FAT Player MikMod v5 (amiga mod player for Nintendo DS) spajdr Amiga scene 0 14 August 2008 21:55
New Amiga Music Player Ian Amiga scene 1 08 October 2001 20:19

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:57.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11530 seconds with 13 queries