Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Couple of Android/FiiO issues (library, playback)

  1. #11
    Administrator
    Join Date
    Feb 2014
    Posts
    424

    Re: Couple of issues android issues (library, playback)

    Well,

    I spent good part of last week doing 'research' on FiiO X5 3gen behaviors trying to make foobar2000 robust against such issues.

    Problem no. 1: Audio stack customizations
    I'm not sure what exact improvements their custom audio stack provides, but it does add strange initialization delays, and a bunch of bugs for me to dodge. At least using OpenSL instead of Java AudioTrack (default) seems to work around most of it. For reference, I managed to fix default AudioTrack output by inserting silence past the end of playlist instead of letting it reach the end of sent audio data.

    Problem no. 2: SD card slot 2
    The slot is broken. The slot hardware is broken, I think. I experience all the same bugs as reported in this forum thread, so it's not just one faulty unit. It is possible to read music from the slot, but the hardware goes haywire when the device sleeps.
    - If your app keeps open file handles to files in /mnt/external_sd2 during a sleep cycle, your app crashes. This is actually easily mitigated on our side, we already have an internal switch to suspend all playback activity on user pause.
    - The slot goes haywire upon device wakeup and returns nonsensical data for approximately 3 seconds, either claims empty content or returns random error codes depending on air humidity and phase of the moon.
    - Attempts to access the SD slot 2 during the crazy mode period after wakeup often cause the device's audio subsystem to crash completely; it remains unable to play any audio until a reboot. Not even the FiiO player app works. This looks like a clear symptom of hardware being broken, not software, how can SD card access interrupt device's audio playback capabilities?

    We effectively trigger the broken behaviors by unpausing playback using the button while the device is asleep.
    There has to be a way around this obviously, by making sure we don't actually read our file for the first N seconds after unpausing, but such hack sounds too complex to implement at this time, considering it's just one device with extreme bugs.

    Problem no. 3: Unreliable Android debugging
    Add insult to injury. Frequently, APK-install-via-ADB fails one way or another, and Android Studio launches old version of my code instead of freshly compiled one. Takes a few tries to get updated code actually running on the device.

    Problem no. 4: Wifi vs Bluetooth interference
    This should have been the no. 1 because it was the first thing that exploded in my face upon unboxing and the initial setup.
    Pairing with my bluetooth headset (Sennheiser PXC 360 BT) made wifi unusably slow, verified with two different wifi networks. All goes back to normal once I turn bluetooth off on the X5.

    tl;dr
    Use OpenSL and don't use SD card slot 2, only slot 1.
    Turn bluetooth off if you require network connectivity.
    Last edited by Peter; June 26th, 2017 at 03:52 PM. Reason: Added wifi vs bluetooth rant

  2. #12
    Administrator
    Join Date
    Feb 2014
    Posts
    424

    Re: Couple of issues android issues (library, playback)

    Update

    Amended my code to: detect FiiO + /mnt/external_sd2/ combo and stall for 1 second before starting to hammer the filesystem with read requests after apparent device wakeup, seems to at least mitigate the instability; playback resumes correctly after several seconds of delay.

  3. #13

    Re: Couple of issues android issues (library, playback)

    Quote Originally Posted by Peter View Post
    depending on air humidity and phase of the moon
    Sounds like the best way of summing it up.

    I've not been using the bluetooth so I hadn't spotted that particular issue but I have noticed that the Wifi seems a little unreliable.

  4. #14
    Administrator
    Join Date
    Feb 2014
    Posts
    424

    Re: Couple of issues android issues (library, playback)

    An update with FiiO fixes is out, beta only for now.

    If you do not have beta access yet, please drop me a private message with your Google ID and I'll add you to the list.

  5. #15

    Re: Couple of issues android issues (library, playback)

    Hi,

    I have Fiio X7 with latest (3.3.0) firmware and Foobar mobile version 1.0.79. I really like it (way better than stock app), but I have one (small) problem.
    I can't get the play/pause and previous/next buttons to work.
    I've enabled OpenSL, but it didn't help.

    Any help would be appreciated.

  6. #16

    Re: Couple of issues android issues (library, playback)

    Quote Originally Posted by oesu View Post
    play/pause and previous/next buttons
    I meant physical buttons, on screen ones work fine.

  7. #17

    Re: Couple of issues android issues (library, playback)

    It seems reboot solved my problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •