How to use the libspotify api? -


this version of libspotify have download:libspotify-12.1.51-win32-release.there example named "spshell". when test track playing , sp_session_player_play(g_session, 1) called,i can not heard voice.

another question,what's relationship between notify_main_thread , sp_session_process_events.when sp_session_process_events (sp_session *session, int *next_timeout) called has been done , what's effect of second parameter.

i don't believe spshell demo streams music @ all.

sp_session_player_play instructs libspotify start providing audio data. not play you. must provide spotify music_delivery callback receive audio data, , must arrange play yourself. @ jukebox example.

notify_main_thread called when libspotify needs sp_session_process_events invoked on main thread. callback should perform whatever notification necessary wake main thread , return without waiting it. must not call sp_session_process_events callback, or deadlock program.

when sp_session_process_events called, libspotify perform necessary processing has on main thread, such updating user-visible data structures. second parameter output parameter. when sp_session_process_events returns, pointed-to value time in milliseconds until next need call sp_session_process_events. there 2 reasons might need call sp_session_process_events: after timeout has passed, or when notify_main_thread has been invoked.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -