huhx0015 / HXAudioPlayer

HX Audio Player: A custom audio wrapper library for Android 2.3 and above. Originally designed as an audio library for games, HX Audio Player is an easy-to-use, alternative approach to implementing music and sound playback into Android applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sound Effects Sometimes Not Played on CyanogenMod 12.1-13.0 Devices

huhx0015 opened this issue · comments

On some CyanogenMod 12.1 devices, sound effects fail to be played, with the following logs reported in logcat:

W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client 03-01 16:16:06.665 27335-27335/com.ycorner.chronomaps E/AudioTrack: AudioTrack::set : Exit

This has been observed on Samsung Galaxy Note 8.0 CyanogenMod 12.1 nightly builds.

This problem seems to also affect CyanogenMod 13.0 devices as well.

This issue has been resolved by the following commit:

4749c49

The cause was setting the left and right channel volumes to dynamic values. Forcing a 1.0f value on both the left and right channel resolves the issue for AOSP-based devices.