[FMOD] Output WASAPI::mixer read : GetCurrent Padding returned 0x88890004. Device was unplugged!

I got this on my development built
[FMOD] Output WASAPI::mixer read : GetCurrent Padding returned 0x88890004. Device was unplugged!

this happened when I unplugged USB cable connector of my audio interface.
actually sound keep working by using internal soundcard. but there was an error notification.
How to fix this issue…?
Thanks…

What is the issue you want to fix? You are saying that you unplugged a device and you get a message about a device being unplugged.

May I ask just to double-check it? Is it an error, or just a warning/output? Because it’s show red, it looks like an error.
[edit]
Sorry, I mean, is it a problem that I should handle in any way? If yes, how? There’s docs or anything on that?

What version of FMOD are you using and what operating system is this occurring on?

Hi there!
FMOD 1.10.09, game running on a Windows 10 machine.

This message isn’t anything to worry about, you can ignore it.

i’m getting this regularly in my Unity editor. Once it starts happening, I can’t stop it, and if i try to close unity, it often hangs. Why doesn’t FMOD just recognize that a device has been unplugged, and stop poking it?

What version of FMOD are you using?

2.00.08

FMOD’s output should change output when the OS device list changes, are you able to provide the output log from when this occurs?

i think i can replicate it, haven’t checked, but i think just having unity run the project…then stop…then sleep the computer…then wake up the computer, and i get a bunch of those errors.

The real question is…is there anyway to not have the mixerThread running…or a button to restart/shut it down in editor mode. The problem is even trying to close the editor normally, it hangs because something in the fmod dll is not letting go. So i end up having to kill the process.

I don’t have any OS device change logs.

Here are FMOD related logs at and before this non stop error:

I wasn’t able to reproduce this issue as you have described- are you still using FMOD 2.00.08?
Usually this error is supposed to appear just once when a device is unplugged and then continue execution with the next available device, and if there are no more devices it should resort to no sound mode. Instead it sounds like you’ve somehow hit some inifinite recursion if it’s locking you out of the Editor.
Can you please set your Logging Level to “LOG” in the FMOD Unity Integration settings and send through the output when the issue occurs?

We are seeing this error in our build on Windows when hdmi is the output and I do Power → Sleep, and all audio stops playing, I click to resume, and the audio stays off. So I think this error does indicate a problem in fmod. It’s like our hdmi device drops off, the output list changes, and then fmod doesn’t reconnect when I bring Win 10 out of sleep by clicking on the lock screen.

Can you please set your logging level to “LOG”, enable API error logging, and send through the output when this issue occurs? How to configure logging depends on how you are using the FMOD API: Unity Integration | Unreal Integration | FMOD Engine.
What version of FMOD are you using?
Are you using the Unity or Unreal integration, or FMOD Engine?

We’ve started experiencing this on 2.02.14. It happens when disconnecting an audio device, but also when going to sleep and returning. The main issue is that it is being reported by Fmod as an error, stops any in game sounds and freezes the game when channelGroup->setPaused(true) gets called by the game code in the Error Handler.

Fmod_Device was unplugged.log (1.2 MB)
Fmod_Device was unplugged 2.log (1.8 MB)

Apologies for the delayed response- I have still not been able to reproduce this problem, and I am finding that I don’t get any disconnection errors when sleeping and waking my machine, which is a little suspicious. Can you please upload a DxDiag to your FMOD Profile so I can see if there are any particular hardware requirements to reproduce this issue?

I have a few followup questions if you could please clarify the following:

  • You are finding the game is freezing after returning from sleep, and it appears to be caused by FMOD?
  • You have an error handler setup to pause the channel group when an error occurs, and if this wasn’t an error that wouldn’t happen, so it would be better if this was a warning instead of an error?
  • Do you have any System::setCallback calls in your code that are registering a callback on FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED or FMOD_SYSTEM_CALLBACK_ALL?
1 Like

Hi Jeff,

Thanks to your questions, I managed to narrow down the issue pretty quickly!

  • We call a custom assert handler from the FmodLogCallback when it is called with FMOD_DEBUG_LEVEL_ERROR (initialized with: FMOD::Debug_Initialize( FMOD_DEBUG_LEVEL_WARNING, FMOD_DEBUG_MODE_CALLBACK, FmodLogCallback ) ).
  • FmodLogCallback gets called twice when a USB soundcard is removed (or a Bluetooth headset is disconnected when going to/returning from sleep).
  • Our internal assert handler makes the following Fmod calls:
    When it starts processing an assert:
mFmodSystem->getMasterChannelGroup(&channelGroup);
channelGroup->setPaused(true);

When it’s done processing an assert:

mFmodSystem->getMasterChannelGroup(&channelGroup);
channelGroup->setPaused(false);

Since there are two asserts, somewhere between these 4 calls, one of them starts hanging indefinitely, freezing the game. Probably because we are calling these functions from the FMOD mixer thread?

I’ve modified the api/core/examples/play_sound.cpp example to reproduce the issue play_sound.cpp.txt (6.1 KB). You should be able to test it out by replacing the original play_sound.cpp file, running the Debug x64 configuration from Visual Studio 2019 with Fmod 2.02.14 (not sure about other versions). While running and playing any sound in the example, unplug a USB sound output device (in my case, Creative Bluetooth Audio W2, but the original issue was reported to me by artists with wireless headphones connected directly via bluetooth to their computers).
On my computer, FmodLogCallback was called once successfully from the FMOD mixer thread (whole function was executed), and then it was immediately called the second time and the call to setPaused(true) caused a freeze by never finishing.

1 Like

That is interesting, I can reproduce this issue now, thanks for the repro!
Looks like a deadlock between the Channel::setPaused call and the System::update call, which definitely shouldn’t be happening. For your interest, I can reproduce this issue in previous versions of FMOD, and Winsonic/ASIO aren’t exhibiting the same behavior.
I have passed this onto the Dev team to investigate further. Thank you for bringing this to our attention!

1 Like