Giter Club home page Giter Club logo

Comments (6)

carlosrafaelgn avatar carlosrafaelgn commented on June 11, 2024

Indeed! The problem is I do not own one of those dongles, so there is no way I could test it...

Moreover, the only references I could find regarding USB Audio were these (that work only on Android 23+ - Marshmallow+):
https://developer.android.com/reference/android/media/AudioDeviceInfo.html
https://developer.android.com/reference/android/media/AudioManager.html#getDevices(int)

Do you own one of those devices? If so, would you consider writing a code to detect usb audio, please? Then, I would merge your code into FPlay's code :)

from fplayandroid.

dalb8 avatar dalb8 commented on June 11, 2024

from fplayandroid.

james34602 avatar james34602 commented on June 11, 2024

Android USB audio sometimes quite buggy, I have a highly modified DSP Manager in my repository, my experience show some device may have conflict when using USB audio output, the system always mix up with analog output. So USB DAC can be output as analog output.
Whatever @carlosrafaelgn may experiment on USB audio :D

from fplayandroid.

dalb8 avatar dalb8 commented on June 11, 2024

from fplayandroid.

carlosrafaelgn avatar carlosrafaelgn commented on June 11, 2024

Precise detection of audio output is kinda buggy on Android... Check out methods Player._checkAudioSinkViaRoute() and Player._checkAudioSink() (lines 3318 and 3369).

They are a massive workaround, sadly, because different devices behave differently :(

Reading through the code in AudioSystem.java, I came across two constants:
public static final String DEVICE_OUT_USB_ACCESSORY_NAME = "usb_accessory";
public static final String DEVICE_OUT_USB_DEVICE_NAME = "usb_device";

Perhaps they could be used to try and detect whenever audio output is being done by the speaker or by an USB device???

from fplayandroid.

james34602 avatar james34602 commented on June 11, 2024

I don't even know is it work or not, have to do experiment on that. Carlos is right, different vendor may code audio framework differently...

from fplayandroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.