NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 55 56 57 58 59 … 93 Next »
Play Audio File in a plugin

 
  • 0 Vote(s) - 0 Average
Play Audio File in a plugin
cgmt
Offline

Member

Posts: 86
Threads: 14
Joined: Apr 2006
#1
2006-06-01, 02:14 AM
I am writing a plugin and in that pluggin I need to be able to play audio files in a directory. Everything works great if I manually loop throug the files in the directory and then call PluginHelperFactory.getPluginHelper.PlayAudioFile and pass it the name/string of the complete path to the file including the file name eg. c:\music\xxx.mp3

but what I want to use is the PluginHelperFactory.getPluginHelper.AddAudioFileToQueue and I thought I would pass the same item in but when I do that it gived me an error. Can anyone point me in the correct direction on how to do this as I really want to "queue" up the files. Thanks in advance.
Intel 3GH
MSI FSB 800 MHz
2GB2 DDR RAM
HD Sizes: 250GB, 500GB, 500GB
ATI Raedon 256 MB
2 Hauppauge PVR 150
Windows XP Pro SP2
Wireless 802.11g WEP
Wireless MVP
Wired MVP
GBPVR v1.2.9
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#2
2006-06-01, 02:24 AM
That should work. That's all that's happening here:
Code:
foreach (string mp3file in tracks)
{
    if (i > trackCount)
         PluginHelperFactory.getPluginHelper().AddAudioFileToQueue(mp3file);
    
    i++;
}
cgmt
Offline

Member

Posts: 86
Threads: 14
Joined: Apr 2006
#3
2006-06-01, 11:43 AM
Thats what I assumed I had to do. If I make this call
PluginHelperFactory.getPluginHelper.PlayAudioFile("C:\Music\xxx.mp3") it works fine

but if I make this call
PluginHelperFactory.getPluginHelper.AddAudioFileToQueue("C:\Music\xxx.mp3")
I get an error that says
"Method not found: 'System.String HundredMilesSoftware.UltraID3Lib.UltraID3.get_TrackNum()'."

Any ideas???
Intel 3GH
MSI FSB 800 MHz
2GB2 DDR RAM
HD Sizes: 250GB, 500GB, 500GB
ATI Raedon 256 MB
2 Hauppauge PVR 150
Windows XP Pro SP2
Wireless 802.11g WEP
Wireless MVP
Wired MVP
GBPVR v1.2.9
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#4
2006-06-01, 11:51 AM
If you look in the gbpvr.exe.log file you should see the whole error. Post this (as a zip) and I'll take a look.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
cgmt
Offline

Member

Posts: 86
Threads: 14
Joined: Apr 2006
#5
2006-06-01, 11:58 AM
I did it both ways so you can see. The way that works(PlayAudioFile) and the way that didn't work(AddAudioFileToQueue) Here is the log file. Thanks for your help.
Intel 3GH
MSI FSB 800 MHz
2GB2 DDR RAM
HD Sizes: 250GB, 500GB, 500GB
ATI Raedon 256 MB
2 Hauppauge PVR 150
Windows XP Pro SP2
Wireless 802.11g WEP
Wireless MVP
Wired MVP
GBPVR v1.2.9
cgmt
Offline

Member

Posts: 86
Threads: 14
Joined: Apr 2006
#6
2006-06-01, 12:08 PM
I think I jsut answered my own question. After I removed MusicPanel.dll and MusicVAPanelWidget.dll from the Plugins directory it worked fine. I had been expirementing with different Music pluggins and I guess I did not clean up the dll's properly. Not sure how those would affect what I am doing but none the less I am up and running now... Thanks
Intel 3GH
MSI FSB 800 MHz
2GB2 DDR RAM
HD Sizes: 250GB, 500GB, 500GB
ATI Raedon 256 MB
2 Hauppauge PVR 150
Windows XP Pro SP2
Wireless 802.11g WEP
Wireless MVP
Wired MVP
GBPVR v1.2.9
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#7
2006-06-01, 12:34 PM
cgmt Wrote:I get an error that says
"Method not found: 'System.String HundredMilesSoftware.UltraID3Lib.UltraID3.get_TrackNum()'."
I cant see this in the log you posted
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#8
2006-06-01, 04:39 PM
No neither can i but I'm guessing the musicpanel (since i saw mymusic in there) or Musiclibrary2 (which also uses ultraid3lib) was causing the problem. I'm guessing MusicPanel (no of course I'm not biased Big Grin ) since that will be trying to read the track information on the currently playing song to display it on the main menu....the song that you had just based to gbpvr for playing in your code.
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#9
2006-06-03, 05:07 AM
cgmt Wrote:I think I jsut answered my own question. After I removed MusicPanel.dll and MusicVAPanelWidget.dll from the Plugins directory it worked fine. I had been expirementing with different Music pluggins and I guess I did not clean up the dll's properly. Not sure how those would affect what I am doing but none the less I am up and running now... Thanks

It isn't the MusicVAPanelWidget.dll; it doesn't use UltraID3Lib.

Jeff
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#10
2006-06-03, 05:55 AM
yeah it would have been the music panel
it uses the ultraid3 tag library, and the author really enjoys renaming and moving methods so newer versions of the dll no longer work with things that were designed around older versions, its a pain in the arse.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,850 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,364 2020-11-14, 08:01 PM
Last Post: sub
  Switching Audio Channels spitefulgod 0 2,009 2016-12-15, 08:42 PM
Last Post: spitefulgod
  How Does "Use S01E01 File naming format if possible" work puck64 7 5,321 2015-08-25, 10:21 AM
Last Post: puck64
  VIdeo playback from plugin mvallevand 5 3,470 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,911 2014-11-14, 02:05 AM
Last Post: Benoire
  NEWA - using buffer file produced by /public/VLCService?Channel= bgowland 5 2,806 2014-01-02, 06:36 AM
Last Post: bgowland
  Touch and http audio url's mvallevand 0 1,413 2013-11-03, 07:05 PM
Last Post: mvallevand
  Is the input file for pvrx2.exe -import unique to NextPVR? spinnaker 1 1,770 2013-10-08, 02:25 AM
Last Post: sub
  API docs to help with plugin development? McBainUK 3 2,776 2013-06-08, 06:14 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