samc
Topic Author
Posts: 11
Joined: 21 Aug 2019, 19:22

Noesis / wwise integration?

25 Sep 2020, 00:36

Has anyone done a Noesis / Wwise integration?

I was attempting to do this and reached a solution which I didn't feel great about, so I thought I'd ask.

Currently, I'm following the setup advice here to trigger sounds: https://www.noesisengine.com/docs/App.I ... ction.html

TLDR, it looks like this in XAML;
<Button Content="Close">
    <i:Interaction.Triggers>
      <i:EventTrigger EventName="Click">
        <ei:PlaySoundAction Source="Sounds/ExitButton.wav"/>
      </i:EventTrigger>
    </i:Interaction.Triggers>
  </Button>
The problem is that with wwise you never refer to sounds directly, just "events", which are an indirection that allows you to do all sorts of cool things in the sound engine..

I wasn't ready to tackle the "lets' get a wwise event picker in XAML" chore, so instead, for UI sounds, we just make event names match the corresponding ".wav" file names.

I hook into the "play audio" callback in Noesis like this:
                Noesis.GUI.SetPlayAudioCallback(MyCustomPlayAudioCallback);
And then my custom play audio callback looks like this:
        private void MyCustomPlayAudioCallback(string name, float volume)
        {
            name = System.IO.Path.GetFileNameWithoutExtension(name);

            AkSoundEngine.PostEvent(name, camera.gameObject);
        }
This seems to work ok for our current uses. I imagine I may need to pass more data through at some point.. Would the suggestion be to just implement our own custom "sound action" at that point?

thanks,
sam

Tags:
 
User avatar
sfernandez
Site Admin
Posts: 1935
Joined: 22 Dec 2011, 19:20

Re: Noesis / wwise integration?

25 Sep 2020, 10:38

I think in this case it makes more sense to implement your own WwiseSoundAction with all the properties you need, I'm sure Wwise will allow you to configure a lot more things than just the source sound file.

We provide PlaySoundAction becuase it is defined by Blend SDK, but that action is very limited when trying to do more complex things with sounds.

Who is online

Users browsing this forum: frochet38 and 4 guests