Logo - Crazy Minnow Studio - game, asset, tool development

Welcome to Crazy Minnow Studio! We are a small indie software development team primarily focused on game development using the Unity engine. Our pipeline includes: games, game development tools and assets, and video tutorial production. Check out our Unity lip sync asset, SALSA Lip-Sync, available on the Unity Asset Store. Follow our blog for updates on our Unity asset and game development, as well as other happenings in indie game development.

Unity 5.2 - AudioSource.GetOutputData [no data when source is muted]

Unity 5.2 AudioSource.GetOutputData Behavior Work-Around:

[Update 2015-09-15 : 2053CST]
Re-reading the issue-tracker entry, this appears to be the new intended behavior and Unity does not intend to fix it. Exerpt from the issue-tracker page:

By Design:
- The behaviour of this has changed to fix the conceptually broken behaviour of GetOutputData.
- It doesn't make sense to have an AudioSource muted, effectively producing no signal, and have getOutputData return signal. This fix was put in place to bring the behaviour inline with what is conceptually happening with the signal path.
- To achieve the old behaviour, have the AudioSource route into an AudioGroup of an AudioMixer that is fully attenuated. That way the data can be read from the mic audioSource and not be played through the speakers.

AudioSource.GetOutputData functionality has changed in Unity 5.2. The component no longer produces data output when the AudioSource is muted. This is very different behavior and becomes problematic when using something like SALSA's addon product micInput that relies on a muted AudioSource when collecting microphone input data to prevent echo from your voice. Luckily, there is a fairly easy work-around. By the way, the documented bug report on the behavior change can be found here.

Again, this behavior is new to Unity 5.2+. NOTE: This change in Unity behavior does not affect SALSA LipSync Suite v2.

Work-Around Steps:
It's relatively easy to work around the new behavior. It will be necessary to complete 3 steps to pump muted micInput back into your SALSA lip-sync project:

  1. SALSA micInput work-around for Unity 5.2 bugCreate an AudioMixer with a new mixer Group (you can call the Mixer and the Group anything you like - in the image, the Mixer is called "micInputTest" and the Group is called "micInput").
  2. Turn the attenuation on the new mixer Group down as low as possible (-80dB).
  3. Link the new mixer Group to the micInput AudioSource Output slot.

At this point, you should leave the micInput script setting Mute Microphone disabled (un-checked). Play your scene as usual to get real-time micInput goodness piped into your SALSA awesome-lip-sync-ness!

NOTE: only link AudioSources that require muting and the ability for their audio data to be read to this new mixer Group. Any audio going to this mixer Group will be effectively muted.


Simple Automated Lip Sync Approximation
~ We look forward to seeing what you create! ~


Categories: SALSA, QUICK-TIP

Comments: No comments yet