I am integrating libspotify with an android app using ndk and I am able to create session, login and successfully load a track. However after the track is loaded (I have te track name and duration) and I call sp_session_player_play with result of SP_ERROR_OK, the music_delivery callback is not getting triggered and no music is audible on the device.
As I understand it I am supposed to use music_delivery callback to actually output the music on the device.
I am handling notify_main_thread callback and dispatching it the android app main thread for calling sp_process_events()
I don't either get get_audio_buffer_stats either. Here is some of the debug output (I have limited the timeout to 5sec otherwise I would have to wait 5 minutes to process events after login):
04-17 16:05:18.692: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:18.692: I/DRPSpotify(9765): processEventsProc; next timeout: 5000
04-17 16:05:25.332: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:25.332: I/DRPSpotify(9765): processEventsProc; next timeout: 5000
04-17 16:05:25.512: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:25.512: I/DRPSpotifyListener(9765): 20:05:25.518 I [ap:1752] Connecting to AP ap.spotify.com:4070
04-17 16:05:25.732: I/DRPSpotifyListener(9765): 20:05:25.734 I [network.cpp:438] Connecting to 193.182.8.48:4070
04-17 16:05:25.732: I/DRPSpotifyListener(9765): 20:05:25.742 E [ap:1694] AP Socket Error: Connection refused (111)
04-17 16:05:25.732: I/DRPSpotifyListener(9765): 20:05:25.742 E [ap:3915] Connection error: 101
04-17 16:05:25.732: I/DRPSpotifyListener(9765): 20:05:25.742 I [ap:1752] Connecting to AP ap.spotify.com:443
04-17 16:05:25.732: I/DRPSpotifyListener(9765): 20:05:25.742 I [network.cpp:438] Connecting to 193.182.8.48:443
04-17 16:05:25.752: I/DRPSpotifyListener(9765): 20:05:25.761 I [ap:1226] Connected to AP: 193.182.8.48:443
04-17 16:05:30.342: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:30.352: I/DRPSpotify(9765): processEventsProc; next timeout: 5000
04-17 16:05:30.352: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:30.492: I/DRPSpotify(9765): processEventsProc; next timeout: 145
04-17 16:05:30.502: I/DRP DropSpotify(9765): Login Success
04-17 16:05:33.512: I/DRP DropSpotify(9765): Load track: spotify:track:0iEtarjbAWn1SrxEcgy8fd
04-17 16:05:33.512: I/DRP DropSpotify(9765): Resource not loaded yet
04-17 16:05:35.342: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:35.352: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:35.352: I/DRPSpotify(9765): processEventsProc; next timeout: 144
04-17 16:05:35.352: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:35.362: I/DRPSpotify(9765): processEventsProc; next timeout: 4
04-17 16:05:35.362: I/DRPSpotify(9765): processEventsProc; next timeout: 4
04-17 16:05:35.492: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:35.492: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:35.492: I/DRPSpotify(9765): processEventsProc; next timeout: 853
04-17 16:05:35.492: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:35.492: I/DRPSpotify(9765): processEventsProc; next timeout: 853
04-17 16:05:35.492: I/DRPSpotify(9765): processEventsProc; next timeout: 854
04-17 16:05:36.352: I/DRPSpotify(9765): onNotifyMainThread main thread
04-17 16:05:36.352: I/DRPSpotify(9765): processEventsProc; next timeout: 8
04-17 16:05:36.352: I/DRPSpotify(9765): processEventsProc; next timeout: 6
04-17 16:05:36.352: I/DRP DropSpotify(9765): Loaded Track: Angel - Guitar Version
<called sp_session_player_play but no callbacks are invoked>