NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 49 50 51 52 53 … 93 Next »
faking shuffle in music playback

 
  • 0 Vote(s) - 0 Average
faking shuffle in music playback
groover km
Offline

Senior Member

Posts: 731
Threads: 43
Joined: Mar 2005
#1
2006-09-30, 10:32 PM
Reven, I'm using Music 3 at the minute (it's great) and I would love a shuffle function. Just to give you a bit of encouragement Wink
Celeron D 2.53GHz, 1024MB
120GB, 160GB int, 80GB, 250GB ext, 40GB lan HDDs
PVR-150 retail, 1 wired MVP, 1 wireless MVP, OFA URC-8910 Remote
Look for me on XBox Live!
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#2
2006-10-01, 04:28 AM
im attempting to fake a auto shuffle in music playback by doing
Code:
IList playlist = PluginHelperFactory.getPluginHelper().GetAudioPlayList(out t, out d, out p);
int songIndex = random.Next(0, playlist.Count);
PluginHelperFactory.getPluginHelper().PlayPlaylistTrackNumber(songIndex);
during a music change event.

this is working fine, the shuffle works perfect, however when i try to display what song is playing, the method
Code:
IList playlist = PluginHelperFactory.getPluginHelper().GetAudioPlayList(out trackNumber, out duration, out playback);
keeps saying that the song that is playing is the original song (that fired the first musicchange event) and not the one i set using "PlayPlaylistTrackNumber(songindex)".


life would be easier if there was a api call
pluginHelper.ShuffleMusic = true;
Smile

anyone every try doing this before, if so any idea what might be going wrong?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#3
2006-10-01, 05:57 AM
Quote:im attempting to fake a auto shuffle in music playback by doing

Code:
IList playlist = PluginHelperFactory.getPluginHelper().GetAudioPlayList(out t, out d, out p);
int songIndex = random.Next(0, playlist.Count);
PluginHelperFactory.getPluginHelper().PlayPlaylistTrackNumber(songIndex);during a music change event.

this is working fine, the shuffle works perfect, however when i try to display what song is playing, the method

Code:
IList playlist = PluginHelperFactory.getPluginHelper().GetAudioPlayList(out trackNumber, out duration, out playback);keeps saying that the song that is playing is the original song (that fired the first musicchange event) and not the one i set using "PlayPlaylistTrackNumber(songindex)".
I'm not really sure why its not working, but I'll look into it for you.

Quote:life would be easier if there was a api call
pluginHelper.ShuffleMusic = true;
Sorry, I wont be adding a shuffle API (especially as a property!). Plugin developers can sort their music queue any way they want before passing it the GB-PVR music playback APIs.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#4
2006-10-01, 06:08 AM
its just if a user creates a playlist on the fly, as most of the time thats what you do, you then have to manually shuffle that playlist for it to be shuffled, that means having to stop it to begin with.

i dont really care if its a property or a method, its just a handy thing that would save you from having to manually shuffle it every time you appended to the current playlist.

and every single music player that i know of, has a "shuffle/random" option that just jumps around and doesnt require you to manually shuffle the list, its a nice way to do it is all.

eg a normal situation for me
- queue up "Queen Greatest Hits" (one button)
- queue up "Metallica Metallica" (one button)
- queue up "Billy Joel Greatest hits" (one button)
- queue up "Elton John (eveything)" (one button)
- queue up "Every Rock Song (by genre)" (one button)
then i have to manually shuffle that list, which stops the music.
i then want to add some johnny cash
- queue up "Johnny Cash - American Recordings V"
johnny cash songs will no play all one after another once all the other songs have finished.
so i have to manually shuffle again, stopping playback
10 minutes later someone else wants to
- queue up "Sex Pistols (everything)
now they have to once again manually shuffle it.

it gets to be annoying, and sure i can probably get my hack way to work, it just seems like its a feature worth putting into the core.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  How to tell when video playback has finished in web client? cncb 6 4,222 2015-09-29, 08:07 PM
Last Post: cncb
  VIdeo playback from plugin mvallevand 5 3,439 2015-08-06, 10:43 PM
Last Post: sub
  Accessing music file metadata in C# bgowland 6 3,270 2013-01-26, 05:14 AM
Last Post: bgowland
  Faking NPVR install for dev machine? reven 12 4,063 2012-10-30, 07:17 AM
Last Post: reven
  NMT Video Playback - does it receive start/stop events psycik 8 3,368 2012-07-15, 10:01 PM
Last Post: mvallevand
  visible="!@hasImage & folder.jpg in Music not working Jaggy 0 1,204 2012-02-10, 10:29 PM
Last Post: Jaggy
  Building a list of files in media folders (npvr Music and Videos) bgowland 2 1,859 2012-02-05, 10:29 AM
Last Post: bgowland
  What music player is used? cncb 1 1,550 2011-08-01, 08:02 PM
Last Post: sub
  Detecting when Music Playlist is stopped (Ctrl-S) ACTCMS 6 2,839 2011-06-19, 07:52 PM
Last Post: sub
  DVD Playback Plugin JBreits 8 3,171 2010-02-08, 04:35 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode