Ways to reduce memory
Memory usage: Win2K, 2.1, RC1: Fresh install, no music: 7,448K 3500 tracks in catalog, 1 playlist with everything in it, I opened the playlist, and opened the "All Tracks" folder: 12,496K So, to look at all tracks and a playlist with all tracks used about 5Meg. ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
Improved stability
Hi guys, I just wanted to drop a note to thank whoever has been working on Linux stability. I built the latest CVS version on red hat 7 and it has been running for about 24 hours straight!! This is 5-10 times longer than it generally has done in the past. The only changes I had to make to get it to build on RH7 were: 1) created a macro for the (void*)(...) or (void*)() cast for menu items and such 2) change a local variable name from xor to foo_xor - it looks like the newer gcc defines xor somewhere Should I submit these? The menu item cast is not set up in configure, which it probably should be, but the xor change is quite simple. Thanks, Mark ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
Re: More searching musings...
On Wed, Oct 04, 2000 at 02:40:10PM -0500, David A. Walker wrote: After pondering the searching issue some more, I came up with a function prototype that will (hopefully) address everyone's needs: int FindSong(char *pattern, int type, int casematters) And the returned int is the index of the first or next matching song? As this would be a C++ method, what new or existing object would own it? Pattern is just the search pattern, type is what type of search to perform, and casematters indicates whether the search is case-sensitive. The types would work like this: the bool works for me Type 0 is a simple search. If the pattern occurs anywhere in the track name, it's a match. Type 1 is a wildcard search. The pattern must match the _entire_ track name, * matches anything (including nothing), and ? matches one character. \ makes the next character have its literal meaning. Type 2 would be a regex search. Anything goes. Use enums for better legibility, but yes this is fine. This could be done easily using the regex routines which are part of libc. Additionally, regex.c (from the sed package) could be included to link against for platforms that lack built-in regex support. Does this address everyone's searching desires? Also, after seeing the various searching suggestions that were posted (especially the one about returning search results as a playlist), it struck me that there are two fundamentally different types of searching support. Lets see how fundamentally differnt they are. The first is a very flexible, powerful search that could look at any (or all) of the metadata fields in the MusicCatalog and create a playlist based on the results. This is great for graphical players, which have a need for on-the-fly playlist modification and the ability to import/export from the catalog. Yes, that was my idea. However, it is nearly useless for text-based players which have a fixed playlist and no good way to import/export from a db. The other method is a fast-and-dirty search that would be quick and easy to use and only check a specific attribute of the song. (eg., the pathname) This method would only return one result, but it could be used multiple times to access different songs that matched the pattern. the API for that is larger than just FindSong. You need to start/stop a given search. This is very useful for the text-based players, which lack any method of jumping to a given song in the playlist, but it is virtually useless for graphical players, where the user can simply click on a song to play it. I believe that most people want the first kind of searching support, because most people like their GUIs. For backwards people like me who still live in the stone age, the latter type is an absolute necessity. Does this sound reasonable? I have never used Freeamp on the console. Perhaps I should. A playlist seems to just a structure like (from PlaylistManager) : vectorPlaylistItem* m_masterList So what you actually want is an API like this vectorPlaylistItem** PlaylistMananger::StartSearch(pattern,type,casematters) Then make a function PlayFirst that takes the returned pointer, pops the first PlaylistItem* off the vector, and jump to that song and starts playing it. Then passing the returned pointer PlayFirst over and over will move forward through the search results. This is the behavior you want. Bind that to the a key, and you are set. To let it loop from the last item to the first item again, move the front item to the end of the vector instead of popping it off (might want a deque instead of a vector). Then make a StopSeach function that cleans up the vector when you are done with the previous search and need a new one. Since you call StopSearch right before StartSearch, you could even combine them into the same function. If you focus on the need to go through each search result in turn, then having an internal view of the playlist like this (a sub-playlist) makes sense. Now all this assumes you want to start each new search at the top of the playlist. If you want to start it form the currently (or most recently played) song, then you could have a one function API: "Go to first song after m_lastindex that matches the pattern/type/casematters and play it" Or you could mimic this by cylicing through the vector of results in PlayFirst so the next song after m_lastindex is played. I like the design discussion that is going on. -- Chris ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
newby Win32 build problem
OK, I hope I'm just doing something obvious. Anyway, I got the source this morning using CVS, which worked like a charm. Went and got nasm and stl, fired up my MSFT VC6.0. Got the paths and include paths setup, read around and found that I needed to define NOMINMAX, life looks good. Start a full build. I build a whole bunch of sections (listed at end) with just a few compile warnings. Then, I fail in id3v2 with: Configuration: id3v2 - Win32 NASM Debug MS STL Compiling resources... Compiling... id3v2.cpp Linking... Creating library Debug/id3v2.lib and object Debug/id3v2.exp id3v2.obj : error LNK2001: unresolved external symbol "int const ID3LIB_MAJOR_VERSION" (?ID3LIB_MAJOR_VERSION@@3HB) id3v2.obj : error LNK2001: unresolved external symbol "int const ID3LIB_MINOR_VERSION" (?ID3LIB_MINOR_VERSION@@3HB) id3v2.obj : error LNK2001: unresolved external symbol "int const ID3LIB_PATCH_VERSION" (?ID3LIB_PATCH_VERSION@@3HB) id3v2.mdf : fatal error LNK1120: 3 unresolved externals Error executing link.exe. These variables are defined in freeamp\lib\id3\include\id3\globals.h. They are used in id3v2.cpp. Rummaging around in id3lib.dll and id3lib.lib, I can't find any mention of these variables. Where are they supposed to come from? Is the lib/dll somehow not matching the .h's? This must work for others, anyone have any suggestions? All the files in lib\id3 are dated May 22, 2000 (except one .h file), so it looks like it's all from the same distribution. I don't get it. These are the sections of the project that I built, in order. Build fails in the last section, id3v2. fabaselib gdbm download fileinput zlib unzip freeampui httpinput id3v1 m3u obsinput rmp soundcard update xing riolib pmp300 musicbrowser toolbar misc maketheme pls winamp cdlmc cdoutput cddb dde id3v2 ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
RE: newby Win32 build problem
Nope, was a bug.. update CVS and all will be fine, at least wrt this error. Isaac On 05-Oct-2000 Tim Williams wrote: OK, I hope I'm just doing something obvious. Anyway, I got the source this morning using CVS, which worked like a charm. Went and got nasm and stl, fired up my MSFT VC6.0. Got the paths and include paths setup, read around and found that I needed to define NOMINMAX, life looks good. Start a full build. I build a whole bunch of sections (listed at end) with just a few compile warnings. Then, I fail in id3v2 with: Configuration: id3v2 - Win32 NASM Debug MS STL Compiling resources... Compiling... id3v2.cpp Linking... Creating library Debug/id3v2.lib and object Debug/id3v2.exp id3v2.obj : error LNK2001: unresolved external symbol "int const ID3LIB_MAJOR_VERSION" (?ID3LIB_MAJOR_VERSION@@3HB) id3v2.obj : error LNK2001: unresolved external symbol "int const ID3LIB_MINOR_VERSION" (?ID3LIB_MINOR_VERSION@@3HB) id3v2.obj : error LNK2001: unresolved external symbol "int const ID3LIB_PATCH_VERSION" (?ID3LIB_PATCH_VERSION@@3HB) id3v2.mdf : fatal error LNK1120: 3 unresolved externals Error executing link.exe. These variables are defined in freeamp\lib\id3\include\id3\globals.h. They are used in id3v2.cpp. Rummaging around in id3lib.dll and id3lib.lib, I can't find any mention of these variables. Where are they supposed to come from? Is the lib/dll somehow not matching the .h's? This must work for others, anyone have any suggestions? All the files in lib\id3 are dated May 22, 2000 (except one .h file), so it looks like it's all from the same distribution. I don't get it. These are the sections of the project that I built, in order. Build fails in the last section, id3v2. fabaselib gdbm download fileinput zlib unzip freeampui httpinput id3v1 m3u obsinput rmp soundcard update xing riolib pmp300 musicbrowser toolbar misc maketheme pls winamp cdlmc cdoutput cddb dde id3v2 ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev