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

Android N - audio does not play correctly #20

Closed
bfranks opened this Issue Jun 17, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@bfranks

bfranks commented Jun 17, 2016

When playing any audio file or recording on Android-N developer preview 4 (Nexus 6P) the audio plays but the sound is just static noise.

@sbcaudle

This comment has been minimized.

Show comment
Hide comment
@sbcaudle

sbcaudle Sep 15, 2016

Issue is the same on commercial release, September security patch Nougat (Nexus 6p). Mp3 plays as static and ogg files are severely distorted.

sbcaudle commented Sep 15, 2016

Issue is the same on commercial release, September security patch Nougat (Nexus 6p). Mp3 plays as static and ogg files are severely distorted.

@niekvse

This comment has been minimized.

Show comment
Hide comment
@niekvse

niekvse Sep 27, 2016

I investigated this issue, and came up with this issue: https://code.google.com/p/android/issues/detail?id=223824

A workaround is to change the following method, like so (commented-out is the old code):

public ShortBuffer getSamples() {
        if (mDecodedSamples != null) {
            return mDecodedSamples;
//            return mDecodedSamples.asReadOnlyBuffer();
        } else {
            return null;
        }
    }

niekvse commented Sep 27, 2016

I investigated this issue, and came up with this issue: https://code.google.com/p/android/issues/detail?id=223824

A workaround is to change the following method, like so (commented-out is the old code):

public ShortBuffer getSamples() {
        if (mDecodedSamples != null) {
            return mDecodedSamples;
//            return mDecodedSamples.asReadOnlyBuffer();
        } else {
            return null;
        }
    }
@bfranks

This comment has been minimized.

Show comment
Hide comment
@bfranks

bfranks Oct 3, 2016

Thanks @niekvse that fixes the issue for me. I'm not sure if there is a more elegant fix which should be made into a pull request at least until there is a more definitive answer for proper behaviour from upstream.

bfranks commented Oct 3, 2016

Thanks @niekvse that fixes the issue for me. I'm not sure if there is a more elegant fix which should be made into a pull request at least until there is a more definitive answer for proper behaviour from upstream.

nfaralli added a commit that referenced this issue Dec 3, 2016

Fix for bug #20. New version number 2.7.4
Thanks to niekvse who suggested a workaround to a bug
in Nougat.

@bfranks bfranks closed this May 10, 2018

@sajaderagon

This comment has been minimized.

Show comment
Hide comment
@sajaderagon

sajaderagon Jul 5, 2018

if music have 320 kb , Can't show wave

sajaderagon commented Jul 5, 2018

if music have 320 kb , Can't show wave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment