Re: Fetch a track tag by id
Shaun Jackman <[email protected]> Tue, 20 Sep 2005 12:00:25 -0600
| Newsgroups | gmane.comp.multimedia.libnjb.user |
|---|---|
| Message-ID | <[email protected]> |
2005/9/20, Linus Walleij <[email protected]>: > tis 2005-09-20 klockan 10:25 -0600 skrev Shaun Jackman: > > > Is there an efficient function to fetch a njb_songid_t* for a given > > trackid? Fetching all the tags using NJB_Get_Track_Tag and searching > > for a given id is a lengthy process. > > Shortly: no. > > Reason: all Creative apps dump out the entire database and maintain > a cache internally. For the newer devices the dump is made every time > at startup. > > In Gnomad I use a hash list with the trackID as explicit hash value > since this is guaranteed to be unique. Thanks for the clarification, Linus. I'll do the same. While I'm here, can anyone recommend a most simple hashmap (dictionary) implementation for C? Something similar in style to bsearch/qsort would be ideal. Cheers, Shaun ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php