![]() |
#241 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
It keeps the bitrate, but there is no sample rate data AFAIK. There is no samplerate column in the ML so this has no effect on your browsing speed in the ML as it is never shown.
There may be a way to get the samplerate data, as the 'view file info' manages to do it for songs that aren't playing. Perhaps the get extended info API call has a sample rate meta field for mp3s. In ActiveWinamp, whatever tag you pass to the ATFString method first gets tried in the ML, then through the IPC_GET_EXTENDED_FILE_INFO_HOOKABLE call. Although srate is intercepted and uses the above call, which is only useful for the currently playing item. Which is actually a bit of a bug, as it should apply to the current Media Item instead, but its not really a big deal. If there is a way to get the sample rate of non-playing items, I will use that instead. |
![]() |
![]() |
![]() |
#242 |
Member
Join Date: Aug 2003
Posts: 81
|
I've some questions.
How can I set a selection? ActiveWinamp doesn't have playlist.selselect(number). How can I enqueue a playlist without using media library? playlist(number).enqueue doesn't work. |
![]() |
![]() |
![]() |
#243 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
ActiveWinamp doesnt provide a means to set the selection. Winamp provides no such API so this isnt possible. If you can provide the code to set the selection, I can add it to aw. However I will not add mouse/keyboard emulated hacks.
You can enqueue a playlist file like so: http://activewinamp.sourceforge.net/..._playlist_file If you mean just set the position of the playlist, use: playlist.position = x play |
![]() |
![]() |
![]() |
#244 |
Member
Join Date: Aug 2003
Posts: 81
|
I should a more clear about my question.
I want to enqueue a entry of current playlist. e.g. I want to enqueue No. 30 then I can use playlist(30).enqueue to enqueue it. |
![]() |
![]() |
![]() |
#245 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
I am still unclear what you mean. playlist(30).enqueue works as expected for me.
The playlist item number 30 is enqueued to the end of the playlist. Maybe you are referring to 'enqueuing' in jtfe or something? That is not how winamp works normally. The playlist... is your playlist. Enqueing an item enqueues it to the playlist. What do you want to happen when you call: playlist(30).enqueue? Do you want the item to play? Do you want the item to be enqueued to the end of the playlist? If you want the item to be the next item to play, that is not how winamp works. To handle that, handle the song change event and set the playlist position manually. Or use the JTFE API to set the next item, if it has one that does that. |
![]() |
![]() |
![]() |
#246 |
Junior Member
Join Date: Mar 2005
Posts: 3
|
Thanks for the info shaneh.
|
![]() |
![]() |
![]() |
#247 |
Junior Member
Join Date: Mar 2005
Posts: 3
|
If I understand you clearly, all the info is gathered from ML. What if a person have ML removed or not installed? So we can't get any info rite?
|
![]() |
![]() |
![]() |
#248 |
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
I really don't understand why JTFE was born at all. The way I see it, enqueue means to put things at the end of the playlist. The playlist is essentially a queue to me.
But people like it to be a song list instead so then JTFE was invented to step in inbetween. DrO said he was going to implement a JTFE API which would offer his own Playlist selection API too I guess. |
![]() |
![]() |
![]() |
#249 | |
Join Date: Sep 2003
Posts: 27,873
|
Quote:
-daz |
|
![]() |
![]() |
![]() |
#250 |
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
Exactly!
Well. I really pointed out that in my post too, if you read more closely. And I do know it was a Winamp3 feature.
@ShaneH: How long have you come in the development process for AW? Do you write a log? What's the next step? |
![]() |
![]() |
![]() |
#251 |
Join Date: Sep 2003
Posts: 27,873
|
saivert: i missed that bit of your post (was skim reading whilst at work)
-daz |
![]() |
![]() |
![]() |
#252 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
@antu^jamban: If the file isnt found in the ML, it tries the extended_info call instead. Obiously calls to get rating and playcount etc will not return anything useful. Take a look at the code in mediaitem.cpp to see how it goes.
@saivert: I dont keep a log as such, but you can follow the trackers in soureforge and see the cvs logs etc. Im tempted to do another release soon, as Ive fixed quite a few important bugs. Though I would lke to work on internal scripting support a bit more first, and support for some more stuff such as video and equalizer things etc. |
![]() |
![]() |
![]() |
#253 |
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
I see you are goig for a Wiki style page for ActiveWinamp.sf.net. Nice. Then people can post their own examples there for others to see.
|
![]() |
![]() |
![]() |
#254 |
Junior Member
Join Date: Apr 2005
Location: Ontario, Canada
Posts: 8
|
Developing a program using your excellent plugin and went to install it on a windows98 machine. Winamp does not show it listed in the general purpose plugin section. Is there any extra steps I need to use it on Windows 98. I ran the active winamp install and did not show any errors. The plugin and help file are in the plugin directory. I am also running gen_scripting.dll as there was a couple of things that I in my ignorance could not figure out how to do in Active Winamp.
Thanks for all the hard work. |
![]() |
![]() |
![]() |
#255 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
Thats very strange that its not shown in the list of plugins. I don't program with compatilibty with '98 etc anymore (just as I dont program for compatability with DOS), but it should at least be shown in that list I would think. I'm guessing Winamp is failing when trying to load the .dll and silently not doing aynthing about it. Possibly because of a missing dependency, use dependency walker to check if this is the case (you can ignore the mpr.dll missing import):
http://www.dependencywalker.com/ What is it you could not do with ActiveWinamp? Most likely there is a way. Also, make sure you copy over the latest version of gen_activewa.dll from the CVS after you install it. Theres a fair few updates, but nothing that would increase compatability with 98 I wouldnt think. |
![]() |
![]() |
![]() |
#256 |
Junior Member
Join Date: Apr 2005
Location: Ontario, Canada
Posts: 8
|
Really appreciated the quick reply shane. I will try the dependency walker as soon as I get access to that machine again. As for what I couldn't figure out I've got to go through the code and will let you know. Could it possibly be a conflict between active WA and gen_scripting.dll. Works great on XP.
Does the release version on sf.net contain the support for multiple instances of winamp, or is that still being worked on. Little background. I've been a karaoke/disc jockey for twenty years and recently had major surgery and cannot work right now so decided to have a go at creating the ulitmate software (IMHO) benefiting from my years of experience. Thanks for the excellent software/support. |
![]() |
![]() |
![]() |
#257 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
I don't think it is a conflict problem. At the very least you should be seeing it in the list, so I suspect it is a failure to load the .dll problem.
The multiple instance support is kind of difficult, its currently not supported in the cvs version, and the version posted in here that has the support has a variety of other problems. Im not sure whether I will support it, there are various technical reasons why not. will see. You might be interested in taking a look at MediaMonkey for your purposes, it has some nice inbuilt scripting support and is in active development unlike Winamp. It also supports a lot of winamp plugins. Not sure about the multiple instance support though. |
![]() |
![]() |
![]() |
#258 |
Junior Member
Join Date: Apr 2005
Location: Ontario, Canada
Posts: 8
|
Thanks Shane I'll check it out.
|
![]() |
![]() |
![]() |
#259 |
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
Re: About the multiple instancing problem
When someone call the ActiveWinamp object when Winamp is not running, is it launching Winamp with the /class parameter then? Maybe it could do this to make sure it know which Winamp it is controlling. And you could call a method on the ActiveWinamp root object called SetWinampClass(string) that tells the object which Winamp to use. Just an idea. And can you use the Window Station/Desktop API to obtain the handle of a running Winamp when the ActiveWinamp object is called from ASP script? Maybe it requires the "Allow interaction with logged on user" privilege or something similar. Or maybe the only way for a process that is started under a non-logged on user (i.e. SYSTEM, or IADM_USR, whatever) to communicate with a program running under the logged on user is by using named pipes. |
![]() |
![]() |
![]() |
#260 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
The problem is quite tough. I havent actually seen an app which handles it too well. Being a single document interface app, with the possiblity of being launched in either single instance or multiple instance mode makes it even trickier.
Coupled with the fact the COM server is handled in a .DLL which is part of an EXE which actually itself isn't a COM server doesn't help. Ive been thinking about making the COM server another .exe which actually launches winamp.exe (possible with a /class param), or just have the /class included as a param for the com server. Knowing which instance of winamp AW is controlling isn't really much of an issue, as it can just control the in-process instance. The trouble is the way AW grabs this instance is by registering, then getting, the active object. Its the 'active object' problem that is causing issues, and seems to cause issues for many com servers. Feel free to checkout the source and have a go at implementing it. You will want to look into monikers too probably. And make sure it works with 'createobject' and 'getobject', in both single instance and multiple instance mode. And when winamp isn't and is already running. Anyway, its complicated... |
![]() |
![]() |
![]() |
#261 |
Junior Member
Join Date: Apr 2005
Location: Ontario, Canada
Posts: 8
|
Once again I need a little help shane. How can I get the length of the currently playing song from your plugin. This is so I can figure the percentage played and near the end (94%) load the next song.
I did try Media Monkey but I found it not as stable as Winamp. To get around my previous problem I am using Winamp 2.95 with gen_scripting.dll and Active_WA on winamp 5.08. This gives me the multiple instances I needed. Thanks for any help. ![]() |
![]() |
![]() |
![]() |
#262 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
You can just use the .length property of a media item. ie, playlist(3).length
or set mi = loaditem("C:\song.mp3") mi.length or wherever else you obtain a media item. Im not sure if works perfectly if the item isn't in your ML, but hopefully it will. Be warned that the length is often wrong. This will be the case regardless of whether you are using this plugin or not. Even winamp displays the wrong time sometimes and the 'time remaining' display just works in over time as it tries to catch up. I have no idea why this error occurs, something to do with the .mp3 format and difficulty in getting an accurate time I suppose. The other way is to poll winamp for the length and time elapsed etc, it tends to get more accurate the longer the item is played. You probaly wont find an elegant solution to what you are trying to do, no-one else has. Use this with SendMsg. ie: #define IPC_GETOUTPUTTIME 105 /* int res = SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETOUTPUTTIME); ** returns the position in milliseconds of the current track (mode = 0), ** or the track length, in seconds (mode = 1). Returns -1 if not playing or error. */ length = SendMsg(1024, 1, 105) |
![]() |
![]() |
![]() |
#263 |
Junior Member
Join Date: Nov 2004
Posts: 19
|
Maynard Script Collection 0505
Attached is a zip file containing some scripts I've created. Hope they are useful...
Change Copy/Move operations to use configurable ATF for folder destination (ex. <Artist>\<Album>\<File>) Cheers Maynard |
![]() |
![]() |
![]() |
#264 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
Nice contribution maynardkrebs, you can also add scripts to the ActiveWinamp wiki to easily update/share/have others edit etc.
http://activewinamp.sourceforge.net/...=examples:root I hope to have a new release of AW out sometime soon, as there are quite a few bugs already fixed in the CVS version. You should definetely use the version available in the CVS at the sourceforge site, as some bugs that have been fixed are a bit problematic. |
![]() |
![]() |
![]() |
#265 |
Junior Member
Join Date: Nov 2004
Posts: 19
|
hey shane.
Glad you found a home for AW. Thanks for tip on latest versions at sourceforge. maynard |
![]() |
![]() |
![]() |
#266 |
Member
Join Date: Aug 2003
Posts: 81
|
Attached is a zip file containing a script I've created. Hope it is useful...
startup_randsong.vbs - Random play of current playlist, needs regsvr32 MersenneTwister.dll to use. and MersenneTwister.dll is a fast random number generator in ActiveX DLL form. |
![]() |
![]() |
![]() |
#267 |
Member
|
Here's is a "iTunes party suffle"-like i wrote.
Use it in combination with a playlist containing PHP Code:
PHP Code:
|
![]() |
![]() |
![]() |
#268 |
Junior Member
Join Date: Apr 2005
Location: Ontario, Canada
Posts: 8
|
Another dumb question
Shane I got another dumb question for you. The song that is currently playing in Winamp when there is a blank playlist. Is there a way to get artist tile for the currently playing song.
i.e. Someone uses the loadfile dialog from the winamp interface. Calls to the playlist.item.whatever show up as member item does not evalueate to object. Thanks |
![]() |
![]() |
![]() |
#269 |
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
My big rant which will tick DrO off: Flaws in API
Using Load file dialog (or as I like to call it Open Song) will add the song to the playlist. Winamp always does this. It first clears the playlist, then adds the song to it and starts playing. If someone clears the playlist while the song plays, no info about song can be retrieved as the playlist is empty.
Winamp has major flaws in it's API and currently no one at Nullsoft is caring shit about it. I wished Peter Pawlowski did something to the API the short time he spent at Nullsoft, but nooo. Instead he got fed up and started on his own player (Foobar2000) which has an extensive C++ class based API more powerful than Winamp can ever dream of with it's simple window message/struct system. I'm also wondering if I should quit Winamp development and focus on one of the more up to date players. Maybe give fb2k/MediaMonkey a try. Implement free form skinning for fb2k based on code from the Wasabi project (which was a good start but lacked a dedicated dev team). Just my 2 cents... |
![]() |
![]() |
![]() |
#270 |
Forum King, M.D.
|
hey shane, ive learned to make a few scripts from all of your examples, but have yet to understand how to do 2 things in one script.
I (and others asking in tech support) would really like it if you could provide a 'sort by album and then track' script. many thanks |
![]() |
![]() |
![]() |
#271 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
Ive added this example to:
http://activewinamp.sourceforge.net/...bum_then_track |
![]() |
![]() |
![]() |
#272 |
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
This is more an informal post:
I just love the wiki you set up. Now I never ever have to watch these forum pages with some posts messing up the layout with those very long code lines. People can now posts their examples on the wiki and have them fixed (if any errors are present). |
![]() |
![]() |
![]() |
#273 |
Junior Member
Join Date: May 2005
Posts: 2
|
seek
Hello,
I've just discovered ActiveWinamp and it seems like the perfect solution to a problem I'm having. I'm creating a HTA based media centre (aka HTPC) that uses freeware software to do all the playback. Obviously all of the software has to be controlable without it's interface showing so ActiveWinamp is a great solution. The one thing that seems to be missing from ActiveWinamp is the ability to seek in a file. Is this feature possible? Is it currently impliment and I'm being very stupid? Cheers Benedict |
![]() |
![]() |
![]() |
#274 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
Get the latest gen_activewa.dll from the CVS and use the application.position = x property.
|
![]() |
![]() |
![]() |
#275 |
Junior Member
Join Date: Jun 2005
Posts: 1
|
I have a query about ActiveWinamp.
It seems it triggers the Application_ChangedStatus twice if you are already playing a file and then press play in Winamp (starts playing from the beginning). Is this the wanted behaviour (feature) or not (bug)? And both times the PlayState is reported as being '1'. |
![]() |
![]() |
![]() |
#276 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
Yes thats probably buggy, but then so is the song notification event system from Winamp (actually there isn't really one). Its also buggy in that it doesn't trigger when a http stream title changes. Its a difficult problem with many hacks involved to do well. For example Toaster goes to great lengths to just detect these track change events without these problems, most other plugins which do track change event stuff just poll the winamp window title every few ms and look for changes, which is a bloody terrible way of doing it.
Youre welcome to look at the code and submit changes, the necessary code is in PLWndProc of ScriptManager.cpp: http://cvs.sourceforge.net/viewcvs.p...=1.7&view=auto |
![]() |
![]() |
![]() |
#277 |
Junior Member
Join Date: Nov 2004
Posts: 7
|
Insert Into Playlist
I'm a big fan of ActiveWinamp. Quick question: is there any way to insert an item into the playlist at position x? I'd like to find the currently playing index and insert an item immediately after it.
TIA - Jeff |
![]() |
![]() |
![]() |
#278 |
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
Yeah! I think it's a long time ago since ActiveWinamp only was a proof of concept. Now the code has grown and everyone is free to contribute if they want.
I'm going to get the latest revision from CVS, and have s serious look at the code. |
![]() |
![]() |
![]() |
#279 |
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
@jsonnabend:
You first create the item as a MediaItem, then call its insert method. See: http://activewinamp.sourceforge.net/...enqueue_a_file @saivert: The code is a bit of a mess because its been hacked up over time, it really needs to be cleaned up. But it'd be great to have others looking into it. The current cvs version already fixes a number of bugs, and Id like to get a bunch of interface improvements done soon so I can get out another release rather than have people using the buggy version. |
![]() |
![]() |
![]() |
#280 |
Banned
Join Date: Jan 2001
Location: Norway
Posts: 927
|
I am working on a module called wa_getplselitems that should make it easier to get the selected items in the playlist. All you have to do is to include the wa_getplselitems.h file and link with wa_getplselitems.c. Then read comments in wa_getplselitems.h for example usage. I'm using the code from the AW project, but I'm using a real C array instead (using malloc, realloc and free).
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|