- Where Developers Learn, Share, & Build Careers


I'm trying to make a simple player after the guidance in Android, using it I can play with the track Ubuntu Spitative but I can not work on Android. So far I'm able to query for track from Spreadchap but when I tried to add playback capabilities using ALSA, there was a nightmare. What have I tried to use openAl and still a very easy way to run streaming audio in Jni stuck?

My & amp; At the end of the on_search_complete callback, I call a function 'play' which looks like this:

  zero play (sp_session * session, sp_track * track) {if (DEBUG_MODE) __android_log_print (ANDROID_LOG_INFO, Explanation "," attempt to play the track ... "); Sp_error error = sp_session_player_load (session, track); If (error! = SP_ERROR_OK) {if (DEBUG_MODE) __android_log_print (ANDROID_LOG_INFO, "explanation", "error:% s \ n", sp_error_message (error)); Exit (1); } If (DEBUG_MODE) __android_log_print (ANDROID_LOG_INFO, "explanation", "playing ..."); Sp_session_player_play (session, 1); }   

On this & amp; On_music_delivery leads to execution of callback, I believe I need to add my playback code

  static integer on_music_delivery (sp_session * session, constant sp_audioformat * format, static zero * frame, num_frames Int) {if (DEBUG_MODE) __android_log_print (ANDROID_LOG_INFO, "Spotify", "on_music_delivery"); }   

I have had many success in making my code with ALSA, can someone tell me in the right direction, it is frustrating and I do not want to leave the last obstacle. NB: I am starting a language in C language

Disclaimer: I work for Spotify

First of all, I would like to say that the Android documents sent with Libepotify are not nearly as great as it can be. We are working to improve it. Until then, I can advise you that the use of OpenSL is probably the easiest way to accomplish this task to play audio from the original code. I would recommend checking out

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -