The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: xPLRioNet Random Play


  • Subject: Re: xPLRioNet Random Play
  • From: "Mal Lansell" <mlansell@xxxxxxxxxxxxxx>
  • Date: Mon, 6 Sep 2004 10:08:37 +0100
  • References: <FRNT7611BFEF70@frontier.co.uk>

Rather than marking an item as played or not, you could just move played
tracks to the end of the array, so giving you all the tracks that have been
played in the order that they were listened to.  That would allow the skip
back to occur (start at the end and move towards the front).  You then just
pick the next track from the first "num unplayed" tracks in the
array - you
will never randomly choose one that has already been played.  Once
"num
unplayed" gets to zero, you can reset it and start again.  That
effectively
gives you a and b combined - tracks do not repeat until they've all been
played once.

Using a linked list instead of the array would avoid shifting the data
around the array when moving a track to the end, but then it would take
longer to find the randomly selected track - swings and roundabouts really!
In any case, there won't be more than a few K of data to move - hardly a
big
deal and even less so considering it only needs to be done once every few
minutes!

BTW, I can't wait for the MVP stuff - I hate Haupauge's software!

Mal


----- Original Message -----
From: "Tony Tofts" <tony@xxxxxxx>
To: <ukha_xpl@xxxxxxx>
Sent: Friday, September 03, 2004 7:17 PM
Subject: [ukha_xpl] xPLRioNet Random Play


> Hi all,
>
> MVP is coming along nicely (including pictures and movies), but have
decided
> it's time to sort the random play order issue once and for all for all
the
> devices.
>
> Currently it holds a playlist of all tracks queued, and a list of
whether
or
> not the track has been played. Then when queueing the next song, if in
> random mode, it randomly chooses an item and if it's not marked as
played
it
> queues it to play next. But if someone queues up 100's or 1000's of
songs
> it's going to struggle to find the next random unplayed track when
it's
near
> the end of the list. Also you can't skip back a track.
>
> Trying to work out the best way to rewrite this, i realised i don't
really
> know how people want random mode to work.
>
> Should it:
>
> a) play randomly, but each track only once
>
> b) play random for ever, so tracks will repeat when randomly selected
>
> c) something else (but not both of the above!)
>
> Any thoughts please?
>
> Many thanks
> Tony
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> xPL Links: http://www.xplproject.org.uk http://www.xplhal.com
http://www.xpl.myby.co.uk
> To Post a Message: ukha_xpl@xxxxxxx
> To Subscribe:  ukha_xpl-subscribe@xxxxxxx
> To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx
> Yahoo! Groups Links
>
>
>
>
>




xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.