Android: Bypass Low Power Audio Player (LPA Player) on Galaxy S3 - android

I've got a Music Playing app which is having trouble on some Galaxy S3's.
At the end of a track, the player switches audio output from the headphones to the speaker for a few seconds, or else the volume might jump up momentarily.
I've had some advice that it may be to do with the new gapless API's, and Samsung's LPA Player. At the end of a track, setNextMediaPlayer() is called, and I think this is where Android switches between the default Media Player and the LPA Player (provided the LPA Player is available). Because the LPA Player strips all the effects, I think it messes with the audio stream, and the phone gets confused.
I'd like to find a way to bypass the LPA Player. I had some advice to prepare a MediaPlayer with a >60s mp3 to consume the LPA Player, but it didn't seem to work for me (I don't have a test device for this bug myself), and it seems a pretty bad solution (I have to ship the app with an mp3, and presumably waste system resources holding a prepared MediaPlayer for the lifecycle of the app).
I'm open to suggestions, and also - who can I contact at Samsung or Google to have this issue formally addressed?
Thanks.

Related

Android use internal mic and bluetooth headset as speaker with high quality media protocol during calls

I have bluetooth earbuds with great sound quality and built-in microphones. In my android bluetooth device settings, I have to switches for media profiles: 'Call audio' and 'media audio'
Behavier with both activated:
when mic not needed: high quality sound protocol (1-directional, phone to headset)
when mic needed: switches to low quality sound protocol (2-directional, headset mic also streamed to phone)
Problem: I want better audio quality during calls, because I often am on long calls (mostly on discord) and I want to listen to music in the background with great quality.
Therefore I want to use the 1-directional great protocol and the internal built-in microphone
I did some testing using the audio recorder at first:
turned off 'Call audio' switch in bluetooth settings
earbuds not recognized as possible microphone
recording startet, music on earbuds paused, internal mic was being recorded, I could listen to music in great quality (had to hit play again) on my earbuds with great quality simultaneously -> perfect
So I thought I discoverd the solution, BUT:
On Discord (or any other call app) the earbuds did not show up as a possible speaker.
When listing to music on the earbuds and then joining a call, the audio output immediatly switched to the speaker/earpiece speaker (call audio and music). Probably because the call profile was disabled.
Does anyone have a solution/workaround?
sure, wired headphones would work
Maybe there is a way to redirect my call output from discord to a media stream and then into my earbuds (Then the voice quality on discord would not improve, but I could listen to music in high quality). I found an app (BTmono) doing basically the oppsite for headsets with a call profile only: It converts your media output into a mono stream and outputs it as call audio
maybe, I can somehow mark my earbud's media profile as a call profile too
or maybe anyone got some other workaround that did not come to my mind yet.
I would really appreciate a proper solution to my problem, thanks

Chromecast receiver - extremely poor framerates

We are experiencing severe issues with playback fidelity on Chromecast. Using the most basic implementation of CAF or v2 on the receiver, the video serves perhaps 2 frames per seconds, showing a lot of artifacts. We are using HLS (served via Akamai). After some research, here's what we know:
The same HLS streams play without issue on AVPlayer (iOS), EXOPlayer (Android) and Clapper (web).
When casting the underlying mp4 file (unsegmented), the chromecast handles it beautifully.
The issue is not with buffering itself (the playerState is not buffering, there is no buffering icon on the player, and the internet connection is solid)
When forcing the chromecast to use the lowest quality video from the m3u8 manifest (240p), the player performs better (but still not perfectly).
For now, it seems to us that the HLS segments are not being processed properly (while most players handle them well). Is there anything we can do to resolve this? Our product depends on a high-quality Chromecast experience.

Android Mediaplayer rewinding on setDisplay

Whenever I call setDisplay() on a MediaPlayer while it is playing (i.e. setDisplay(null) when backgrounding a video to play audio in the background) the media player stutters and rewinds for some small amount of time. Once I comment out these lines, essentially restricting the application to only play audio, these stutters and consequent rewinds no longer occur. Any ideas what the issue may be?
EDIT:
So I think the cause of the problem might be android media player choosing the closest keyframe to resume from on each display change because it can''t render inbetween keyframes. Any ideas?

how to play audio through speakers during a voice call

when a voice call is established, I want to play audio in an stream so that the one at the other end of the call can hear the audio, but as it is mentioned in documents it is not possible.
so I decided to play that audio through the speakers with maximum volume so that the microphone can hear it (in general this a really ugly workaround but as it is going to be done in a special situation in my app, no problem!!!).
now the problem is this that when the call is established the system reduces the volume of my audio. how to solve it ?

Android: when implementing a music player in my app, can i make sure there is no other media playing playing music right now?

I want my app to play music while it is running, but I don't want the music to overlap with the music currently being played from a different application (android music app or other external music app such as pandora, grooveshark or winamp).
My question is: is there a way to make sure that nothing else is playing right now regardless of the source?
Thanks!
As of android 2.2 you can use AudioManager.requestAudioFocus(), other audio players should listen for this focus change request and can stop/pause/lower volume of their audio according to what type of audio your focus requests. However not all audio playing apps have bothered to implement this yet.
To be nice you should also listen for audio focus change requests from other apps and pause your apps audio accordingly.
On earlier versions of android calling mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); will usually stop any other music from playing

Categories

Resources