Beispiel #1
0
// Loads a track and assumes that the metadata is available
static void load_and_play_track(sp_session *session, sp_track *track) {
	sp_session_player_load(session, track);
	if (s_play_after_loaded)
		play_track(session, track);
	(sp_track_is_starred(session, track)) ? on_starred() : on_unstarred();
	call_static_void_method("onPrepared");
}
Beispiel #2
0
static void on_unstarred() {
	log("Unstarred now");
	call_static_void_method("onTrackUnStarred");
}
Beispiel #3
0
static void on_starred() {
	call_static_void_method("onTrackStarred");
}
Beispiel #4
0
static void on_play() {
	call_static_void_method("onPlayerPlay");
}
Beispiel #5
0
static void on_pause() {
	call_static_void_method("onPlayerPause");
}
Beispiel #6
0
void on_player_end_of_track(list<int> int_params, list<string> string_params, sp_session *session, sp_track *track) {
	call_static_void_method("onPlayerEndOfTrack");
}
Beispiel #7
0
void on_logged_out(list<int> int_params, list<string> string_params, sp_session *session, sp_track *track) {
	call_static_void_method("onLogout");
}
Beispiel #8
0
void on_init(list<int> int_params, list<string> string_params, sp_session *session, sp_track *track) {
	call_static_void_method("onInit");
}