Closed koschke closed 2 years ago
Thanks for the very detailed bug report - I'll investigate whether we can change that parameter from true
to false
.
Just so you know there is an integration package available for SALSA+Dissonance here (SalsaDissonanceLink), see the docs here: https://crazyminnowstudio.com/docs/salsa-lip-sync/addons/using-with-dissonance
Thanks. I am actually using SalsaDissonanceLink, but I still need to connect the audio sources in order to get it working. Or have I overlooked something and am doing something wrong?
It's a long time since I worked with SALSA on this, but as I understand it rather than linking the AudioSource
in to SALSA the SalsaDissonanceLink
component should read amplitude data from Dissonance and directly drive SALSA with that.
This parameter was changed to false in the previous release (8.0.4)
Context
I am creating a multi-player game with remote players communicating via Dissonance. The remote players are represented as UMA avatars. I am using SALSA's lip syncing to animate the face of a speaking player. The network connection is via Unity's NetCode. I am connecting the audio source of the Dissonance player representations (the game object which are children of DissonanceSetup) with the audio source slot in the Salsa component of the avatar programmatically at run-time.
I get the exception as described in detail in section "Actual behaviour" below.
Expected behaviour
This exception should not occur and my avatar's lips should be synced with the voice of a remote player.
Actual behaviour
The error is as follows (retrieved from the Unity console):
Cannot get data from streamed samples for audio clip "Flatline". If the audio clip was created via AudioClip.Create and no PCM read callback was provided, the 'stream' argument must be false. For a disk-based AudioClip changing the load type to DecompressOnLoad on the AudioClip will allow modification of the data.
Fix
Changing the parameter
stream
in the call toAudioClip.Create()
fromtrue
tofalse
fixes my problem. More precisely, line 179 inVoicePlayback.cs
is currently:AudioSource.clip = AudioClip.Create("Flatline", 4096, 1, AudioSettings.outputSampleRate, true, buf =>
and should rather be:
AudioSource.clip = AudioClip.Create("Flatline", 4096, 1, AudioSettings.outputSampleRate, false, buf =>
Steps to Reproduce
The section "Context" already describes the basic steps. If you need more detail, let me know. But since I have provided a fix already, that might not be necessary.
Your Environment
Dissonance version used: v8.0.3 (2021-10-27)
Unity version: 2020.3.23f1
Editor Operating System and version: Microsoft Windows 10 Pro 10.0.19044 (x64)
Build Settings: Windows, x86_64, Development Build