Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I get the play list ?
27-03-2014, 10:00 AM
Post: #2
RE: How can I get the play list ?
(27-03-2014 08:25 AM)pz003 Wrote:  In playlist proxy class, the "BeginReadList" function needs a space separated list of track Id's. but how can I get the track id list?

using the "BeginIdArray" function, I can get the Token's value, but Array == "".

Did I miss some steps when doing this job?

See the docs for the Playlist service, in and IdArray particular. You need to base64 decode the IdArray then treat each 4 bytes as a big-endian unsigned integer. You will probably be running on a little endian host so will want to swap the byte order of each element in the array. You can perform this conversion using code like

uint32_t bigEndianInt = decodedIdArray[index];
uint32_t littleEndianInt = (bigEndianInt&0xff)<<24 | (bigEndianInt&0xff00)<<8 |
                           (bigEndianInt&0xff0000)>>8 | bigEndianInt>>24

or, using an ohNet utility function:
#include <OpenHome/OsWrapper.h>
uint32_t littleEndianInt = SwapEndian32(decodedIdArray[index]);
Find all posts by this user

Messages In This Thread
How can I get the play list ? - pz003 - 27-03-2014, 08:25 AM
RE: How can I get the play list ? - simonc - 27-03-2014 10:00 AM

Forum Jump: