MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Help on Development » Improvement Suggestions


Improvement Suggestions You have an idea how MediaPortal could be improved? Post it in here.

Reply
 
LinkBack Thread Tools Display Modes
Old 2007-11-12, 19:05   #1 (permalink)
Portal Developer
 
Join Date: Aug 2007
Age: 40
Posts: 167
Thanks: 0
Thanked 15 Times in 13 Posts

Country:


Default Last.fm and external players

Started on: 2007-11-12
last update: 2007-11-12

Summary:
Code change to allow the use of last.fm radio with an external player like PureAudio.

Area:
Last.fm radio

Description:
A small change in code will allow the last.fm radio to be used in conjunction with any external player supporting webstreams. Currently the last.fm radio hooks directly into the BASS player:
Code:
BassMusicPlayer.Player.LastFMSync += new BassAudioEngine.LastFMSyncReceived(OnLastFMSyncReceived);
Now when moving this:
Code:
public delegate void LastFMSyncReceived(object sender, DateTime syncTime);

public event LastFMSyncReceived LastFMSync;
from the BassAudioEngine class to the IPlayer class, this call can be changed into:
Code:
g_Player.Player.LastFMSync += new IPlayer.LastFMSyncReceived(OnLastFMSyncReceived);
This will do the trick. The external player is then responsible for raising LastFMSync. No further changes are needed for the BASS player as far as i can see.

Regards,
Symphy

Last edited by Symphy; 2007-11-12 at 19:25.
Symphy is offline   Reply With Quote
Old 2007-11-12, 19:55   #2 (permalink)
rtv
Portal Developer
 
rtv's Avatar
 
Join Date: Apr 2005
Location: Osnabruck
Posts: 2,522
Thanks: 85
Thanked 96 Times in 70 Posts

Country:

My System

Default

Did you already try last.fm with PureAudio or another player?
__________________
rtv is online now   Reply With Quote
Old 2007-11-12, 20:41   #3 (permalink)
Portal Developer
 
Join Date: Aug 2007
Age: 40
Posts: 167
Thanks: 0
Thanked 15 Times in 13 Posts

Country:


Default

I did a quick test. The audioscrobbler plugin seems to work fine with PureAudio enabled. Also PureAudio is launched when starting last.fm radio. However, because the internal BASS player is not used in that case, the LastFMSync event never gets fired. I must admit i don't know yet how this event fits in the overal picture, but i assume it's required for proper operation. My proposal will allow me to implement this event in PureAudio similar to the internal BASS player.

Regards,
Symphy
Symphy is offline   Reply With Quote
Old 2007-11-12, 21:56   #4 (permalink)
rtv
Portal Developer
 
rtv's Avatar
 
Join Date: Apr 2005
Location: Osnabruck
Posts: 2,522
Thanks: 85
Thanked 96 Times in 70 Posts

Country:

My System

Default

Quote:
Originally Posted by Symphy View Post
My proposal will allow me to implement this event in PureAudio similar to the internal BASS player.
Just parse the stream until reaching a "SYNC", subtract the current buffer length and fire the event in time.

This is only needed for continous streams. The most recent preference of last.fm playback are XSPF playlists however. You'll enter that playmode after skipping once. I'd be rather interested in your results of skipping. With BASS sometimes the stream doesn't start correctly so the playlist player skips another track..
__________________
rtv is online now   Reply With Quote
Old 2007-11-12, 22:15   #5 (permalink)
Portal Developer
 
Join Date: Aug 2007
Age: 40
Posts: 167
Thanks: 0
Thanked 15 Times in 13 Posts

Country:


Default

Ok thanx for the info. Will look into it the coming weeks. Since i also use the BASS library, i'll most likely encounter the same skipping problems.

Regards,
Symphy
Symphy is offline   Reply With Quote
Reply

Bookmarks

Tags
external, lastfm, players

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VOB Playback from HDD using External Players fujidust Support 2 2008-07-25 07:56
associate different file extensions to different external players ? bugsbunny14 Codecs, External Players 6 2007-12-01 04:16
2 external players Catfish45 watch/edit Videos 0 2007-10-23 23:31
iTunes - External Players shareware81 General Support 0 2007-09-29 05:43
Better integration for external players Anonymous Improvement Suggestions 0 2004-09-14 00:43


All times are GMT +1. The time now is 13:10.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress