Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEXUS issue (low latency playback) #26

Open
AppWerft opened this issue Apr 28, 2016 · 1 comment
Open

NEXUS issue (low latency playback) #26

AppWerft opened this issue Apr 28, 2016 · 1 comment

Comments

@AppWerft
Copy link

AppWerft commented Apr 28, 2016

Hi Felix,
on NEXUS5 and NEXUS6p the visualizer only works if headphone is plug in or bluetooth is connected.

If I plug out the headphone:

V WiredAccessoryManager: notifyWiredAccessoryChanged: when=107798440914000 bits= mask=84
V WiredAccessoryManager: newName=h2w newState=0 headsetState=0 prev headsetState=2
I WiredAccessoryManager: MSG_NEW_DEVICE_STATE
V WiredAccessoryManager: headsetName:  disconnected

and after I see:

D audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=8
D audio_hw_primary: adev_set_parameters: enter: disconnect=8
W AudioTrack: dead IAudioTrack, PCM, creating a new one from obtainBuffer()
D audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D audio_hw_primary: disable_audio_route: reset and update mixer path: low-latency-playback
D audio_hw_primary: disable_snd_device: snd_device(5: headphones)
I soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x5 of type 0 for Event 0
D msm8974_platform: platform_send_audio_calibration: sending audio calibration for snd_device(2) acdb_id(15)
I soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x2 of type 0 for Event 1
D audio_hw_primary: enable_snd_device: snd_device(2: speaker)
D audio_hw_primary: enable_audio_route: apply and update mixer path: low-latency-playback speaker
D AudioFlinger: mixer(0xf4680000) throttle end: throttle time(12)

Edit: it works as aspected with AudioPlayer. The issue come only by using od Mediaplayer and this https://github.com/vbartacek/aacdecoder-android/blob/master/decoder/src/com/spoledge/aacdecoder/MultiPlayer.java player.

@AppWerft
Copy link
Author

OK I have deeper tested. It only happens if I use a streaming client like https://github.com/vbartacek/aacdecoder-android. This streamer pump the decoded PCM into an AudioTracker.

If I use the standard MediaPlayer, the the visualizer works without problems. In attachment the test code.
app.js.zip

Maybe I can modify the AudioTarcker params, but currently I don't know how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant