yixia / VitamioBundle

Vitamio for Android
http://www.vitamio.org/en/
Other
5.27k stars 2.07k forks source link

API methods missing on Adnroid! #128

Open ssuukk opened 10 years ago

ssuukk commented 10 years ago

Many thanks for Vitamino! Are you planning to add missing MediaPlayer methods?

1) getAudioSessionId (used to apply DSP effects like Equalizer, Virtualizer etc.) 2) setNextMediaPlayer(MediaPlayer) (used for gapless playback)

anopid commented 10 years ago

Hi ssuukk, you can reach SessionId on following way:

open MediaPlayer.java and add: public AudioTrack getMediaAudioTrack() { return mAudioTrack; }

in you code access sessionid: mMediaPlayer.getMediaAudioTrack().getAudioSessionId();

I hope that this will help you

ssuukk commented 10 years ago

Great to know, thanks for quick response.

One more thing, probably easily fixable. I was trying to use Vitamio just for audio playback, but it seems some parts assume there's video surface available and crash randomly (complaining about missing surface). On first playback out runs without problems, next attempt causes FC, though.

Thanks for great work! I will try to compile your Ffmpeg without video components later to see if it will work just as audio library!

Hi ssuukk, you can reach SessionId on following way:

open MediaPlayer.java and add: public AudioTrack getMediaAudioTrack() { return mAudioTrack; }

in you code access sessionid: mMediaPlayer.getMediaAudioTrack().getAudioSessionId();

I hope that this will help you

Reply to this email directly or view it on GitHubhttps://github.com/yixia/VitamioBundle/issues/128#issuecomment-40113913 .

anopid commented 10 years ago

Hi, I'm not a part of Vitamio team, I also will start to develop music player next week and will make this test and if reproduce same error will let you know how I fixed them. (type me if you find solution before me ) Cheers

crossle commented 10 years ago
  1. Playback audio, you dont need invoke setDisplay or setSurface.
  2. send your audio url.
ssuukk commented 10 years ago

I know I don't need to invoke them, and it works for first played track, but Vitamio crashes after first playback (or when trying next set media source) with "missing surface" in exception description. I might create a logcat for you if you want to check it.

crossle commented 10 years ago

Send the detail log on here

master255 commented 10 years ago

@crossle i test it! Code work perfect. merge: open MediaPlayer.java and add: public AudioTrack getMediaAudioTrack() { return mAudioTrack; } or write your own alternative getAudioSessionId! Quick! without this not work MANY functions!!