Old 28th March 2011, 12:16   #1
stefski
Junior Member
 
Join Date: Mar 2011
Posts: 3
API "bug" in Nullsoft Database Engine (NDE)

Hi all,

this is my first post to the forum, so please bear with me, if this is not the correct place for this.

I am making a little command line tool for modifying the Winamp medial library database entries to point at my mp3 files after they have been moved to a new location.

In this process, while trying to utilize STL strings instead of raw char*s, I found that the Database::OpenTable() takes char* for TableName and IdxName arguments. The arguments are passed to the Table constructor, which in turn uses the arguments for calling strdup(), which does not require a writable char* - i.e. both the Table constructor and Database::OpenTable() could have used const char*, thus allowing me to use std::string:

code:

std::string dbDat = inputPath;
std::string dbIdx = inputPath;
dbDat += ".dat";
dbIdx += ".idx";

Database db;
Table *pTable = db.OpenTable( dbDat.c_str(), dbIdx.c_str(), false, false );
...
...



Generally, it is a good idea to use const char* instead of char* where possible.

Is this something that will be considered modified for future releases of the Winamp SDK?


--

Kind regards
Stefski
stefski is offline   Reply With Quote
Old 28th March 2011, 12:20   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
the current version of nde used in Winamp already does that (and probably has done for a few years). the main problem is that the version offered is quite old - i had thought benski put a newer version out a while back but i cannot find it at the moment.

-daz
DrO is offline   Reply With Quote
Old 28th March 2011, 13:38   #3
stefski
Junior Member
 
Join Date: Mar 2011
Posts: 3
Ah, that's good to hear - though, it would of course also be nice if new versions were made available regularly.

--

Kind regards
Stefski
stefski is offline   Reply With Quote
Old 28th March 2011, 13:54   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
http://forums.winamp.com/showthread.php?t=268928 is the newest version i can find mentioned though i'm not in a position to see what's in the last public sdk which ships to see what version is in there. whether or not it has the changes i don't know as i've not looked. and http://forums.winamp.com/showthread....67#post2321667 may or may not be off use (just including the links i was able to quickly find).

-daz
DrO is offline   Reply With Quote
Old 29th March 2011, 22:00   #5
stefski
Junior Member
 
Join Date: Mar 2011
Posts: 3
Thanks DrO,

the version of NDE, which I have, came with the Winamp 5.55 SDK, but I don't know how to retrieve the NDE version from the folder hierarchy. Kind of missing a readme.txt or version.txt file at the root or appropriate sub-folders of the SDK.

Just out of curiosity: how are the various APIs delivered to the public? From reading the posts in the forum, I kind of get the feeling that e.g. the NDE API is not released to the public "in sync" with the Winamp SDK (which, in my understanding, the NDE API is a part of). These "sub"-APIs seem to be hard to get hold of. Ideally, shouldn't these APIs either be up to date in the released Winamp SDK, or be more easily available for download separately?

--

Kind regards
Stefski
stefski is offline   Reply With Quote
Old 30th March 2011, 11:30   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
it's usually when someone remembers or pesters the dev team long enough to get something done (or someone with access doing it off their own back as time allows with their own work).

you have a good point, though any sdk's related to Winamp and the different parts made available have notoriously been either way behind where the client is or just not done until someone really pesters for it. ideal world would be to have a new one released for every new client release, everything to be fully documented and with nice examples to keep noobs happy (though as most is just SendMessage(..) based, once you know one you pretty much know them all).

-daz
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Tags
bugs, nde, nullsoft database engine

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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