getplaylist fails with iTunes v9 |
getplaylist fails with iTunes v9 |
jdh |
Feb 20 2010, 01:50 AM
Post
#1
|
Newbie Group: Members Posts: 7 Joined: 20-February 10 Member No.: 842 |
Hi,
I'm using AMIP SDK v1.4, but am unable to get a playlist when using iTunes v9. Even the supplied getplaylist example fails in: int code = ac_get_pl(); LeaveCriticalSection(&cs_list); if (code != AC_ERR_NOERROR) { printf("Failed to get playlist: %d\n", code); It reports: Failed to get playlist: 3 When using WinAmp or foobar2000 then getplaylist works just fine! Just wondering if I'm doing something wrong or if it simply does not work with iTunes v9. Thanks, Jdh |
Serge |
Mar 22 2010, 08:21 AM
Post
#2
|
AMIP Developer Group: Root Admin Posts: 935 Joined: 12-March 06 Member No.: 1 |
Does it work on small playlists?
|
jdh |
Mar 23 2010, 12:14 AM
Post
#3
|
Newbie Group: Members Posts: 7 Joined: 20-February 10 Member No.: 842 |
Does it work on small playlists? Yes, smaller playlists do work! So I did some testing:
Also, I would have expected that if this is a timeout issue that with the increase of the timeout the getplaylist program would wait longer before returning the error 3. However I see no noticable wait delay when using a 1800000 second timeout and using 3700+ songs or when using only 115 songs and a 5000 timeout. Thanks for taking the time and responding Serge! |
Serge |
Mar 23 2010, 08:49 AM
Post
#4
|
AMIP Developer Group: Root Admin Posts: 935 Joined: 12-March 06 Member No.: 1 |
Yes, smaller playlists do work! So I did some testing:
Also, I would have expected that if this is a timeout issue that with the increase of the timeout the getplaylist program would wait longer before returning the error 3. However I see no noticable wait delay when using a 1800000 second timeout and using 3700+ songs or when using only 115 songs and a 5000 timeout. Thanks for taking the time and responding Serge! I guess you are setting timeouts in the wrong place, you should set the bigger timeout in the following function: CODE // Adds listener to AMIP, AMIP will notify host:port about the events specified by flags // until listener is removed or fail_count limit is reached. If notification fails // fail_count times, AMIP automatically removes listener for the specified host:port. // AMIP keeps listeners even between restarts (in plugin.ini file) int WINAPI ac_add_event_listener(const char *host, int port, int timeout, UINT flags, UINT fail_count=1); |