NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 57 58 59 60 61 … 93 Next »
How do I determine if and what audio track is being played

 
  • 0 Vote(s) - 0 Average
How do I determine if and what audio track is being played
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#1
2006-04-07, 06:11 PM
When I play an audio file using PluginHelperFactory.getPluginHelper().PlayAudioFile(fileName)

And then check the audio queue to see what is playing using

System.Collections.IList PlayList = PluginHelperFactory.getPluginHelper().GetAudioPlayList(out currentIndex, out trackDuration, out playbackPosition);

Nothing is returned. Is there a method that can be used to retrieve the currently playing audio track?

Thanks

Jeff
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2006-04-07, 06:19 PM
Unfortunately there isnt an API that does this currently. The GetAudioPlayList() method only returns a result if you're playing a playlist, not an individual audio track. I could add something for you, or if you need it quicker, you can use the event notification callback stuff.
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#3
2006-04-07, 06:26 PM
I am using the event notification now. The event tells me the name of the track, but not the full path to the file. What I am trying to do is to call the playlist to get the full path so that I can then look in the folder where the file came from to see if there is album art. If you could add a method to get the path for the currently playing audio track that would be great. If the currently playing file is coming from an FM station or streamed staion that would also be great to know.

Jeff
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#4
2006-04-07, 11:05 PM
doesnt getAudioPlaylist() return the playlist and one of the out variables is the position.

so use
list = pluginhelper.getAudioPlaylist(out position, out whatever, out whatever)
string currentFile = list[position];

i think thats what i use.
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#5
2006-04-08, 02:49 AM
But if you just play the file (rather than queuing it) it is not on the playlist.

Jeff
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#6
2006-04-08, 03:06 AM
easy answer then, just always add songs to the playlist, even if its only playing once Smile
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#7
2006-04-08, 03:27 AM
Yes, that's what I've updated my Music Player plug-in to do, but I don;t know if all music plug-ins do this.

Jeff
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#8
2006-04-08, 03:49 AM
well i can tell you my music does (well version 3 does, cant remember if version 2 does)
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Determine Server Tuner/Recorder Status from Console App 27InchSony 13 8,164 2016-12-21, 05:03 AM
Last Post: mvallevand
  Switching Audio Channels spitefulgod 0 1,975 2016-12-15, 08:42 PM
Last Post: spitefulgod
  Touch and http audio url's mvallevand 0 1,392 2013-11-03, 07:05 PM
Last Post: mvallevand
  Audio Renderers imilne 3 2,193 2011-09-29, 09:08 PM
Last Post: imilne
  MVP accessuble audio idkpmiller 3 2,134 2009-09-25, 11:59 PM
Last Post: idkpmiller
  BASS - Getting Audio Data for Spectrum Analysis/Display ralphy 3 4,548 2009-02-15, 08:00 AM
Last Post: whurlston
  Controlling an Audio Receiver with the GBPVR remote erik 7 2,649 2008-06-01, 08:31 PM
Last Post: erik
  Which audio filetypes are supported? idkpmiller 0 1,186 2008-04-12, 03:36 AM
Last Post: idkpmiller
  audio files sjbirk 3 1,788 2007-10-16, 03:02 AM
Last Post: sub
  How to keep track of show information from db Carlito 5 2,006 2006-10-30, 08:17 PM
Last Post: pBS

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

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

Linear Mode
Threaded Mode