Author Topic: ADD 3D SOUND  (Read 2630 times)

Awemeter

  • Newbie
  • *
  • Posts: 38
ADD 3D SOUND
« on: August 19, 2022, 04:04:21 am »
The sound for GSX is not coming from the sim but is coming from the app. This means that there is no 3d audio which just sounds really bad. The constant position/volume of the audio provides a very unrealistic experience using this addon.

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: ADD 3D SOUND
« Reply #1 on: August 19, 2022, 04:11:15 am »
GSX audio engine always supported positional audio. However, to do positional audio, you need two things

- The position of the objects emitting sound

- The position of the observer

The problem is, while we surely know the position of the object we created, opposite to P3D, it's not possible to get the actual position of the active camera, which would represent the observer "ears" in the audio engine. So, while vehicle sounds are positional, the observer position would always be as if you were in the cockpit, if you use any camera, the observer position won't change, because we don't have that data from the simulator.

Many developers suggested the need to have a proper camera API, because it will be useful to many other things, not just GSX. We'll surely use it as soon it will eventually arrive, so full positional audio will be back, as it always did.

Awemeter

  • Newbie
  • *
  • Posts: 38
Re: ADD 3D SOUND
« Reply #2 on: August 19, 2022, 04:13:09 am »
GSX audio engine always supported positional audio. However, to do positional audio, you need two things

- The position of the objects emitting sound

- The position of the observer

The problem is, while we surely know the position of the object we created, opposite to P3D, it's not possible to get the actual position of the active camera, which would represent the observer "ears" in the audio engine. So, while vehicle sounds are positional, the observer position would always be as if you were in the cockpit, if you use any camera, the observer position won't change, because we don't have that data from the simulator.

Many developers suggested the need to have a proper camera API, because it will be useful to many other things, not just GSX. We'll surely use it as soon it will eventually arrive, so full positional audio will be back, as it always did.

Thank you for the fast response. Is there a forum post we the gsx community can vote on?

Awemeter

  • Newbie
  • *
  • Posts: 38
Re: ADD 3D SOUND
« Reply #3 on: August 19, 2022, 04:15:30 am »
Why cant you just put the sound in the sim and not in the external application?

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: ADD 3D SOUND
« Reply #4 on: August 19, 2022, 04:29:42 am »
Why cant you just put the sound in the sim and not in the external application?

Because we have our own sound engine that works, and can do sounds programmatically from our code without being linked to the sim events and behaviors, because it's simulator-independent so we can still support P3D with the same code, and because running in an external app, audio processing won't cause any performance hit to the sim, which would otherwise have to process and act on lots of extra files, all the xml sound behaviors that link objects and sounds.

Awemeter

  • Newbie
  • *
  • Posts: 38
Re: ADD 3D SOUND
« Reply #5 on: November 14, 2022, 09:22:56 am »
I highly doubt that this will cause that much perf issues and I feel like having in sim sound will greatly improve the gsx experience. Even when you do get the camera API (in a long time) the sound won't mix with the sim. This means you can clearly hear that one sound is standing out which will be gsx.
« Last Edit: November 14, 2022, 09:49:51 am by virtuali »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: ADD 3D SOUND
« Reply #6 on: November 14, 2022, 09:51:04 am »
Even when you do get the camera API (in a long time) the sound won't mix with the sim. This means you can clearly hear that one sound is standing out which will be gsx.

What do you mean with "the sound won't mix with the sim" ? Surely it will, just like it does now, the only issue is that is not positional (IF you move the camera ) as it was in P3D, because we can't read the camera position, that's it.

Awemeter

  • Newbie
  • *
  • Posts: 38
Re: ADD 3D SOUND
« Reply #7 on: November 14, 2022, 03:54:59 pm »
The sound does not mix with the sim sounds because it’s like playing a YouTube video in the background. I don’t see why you can’t just put the sound inside the sim and not externally like every other addon.
« Last Edit: November 15, 2022, 11:42:16 am by virtuali »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: ADD 3D SOUND
« Reply #8 on: November 15, 2022, 11:56:26 am »
The sound does not mix with the sim sounds because it’s like playing a YouTube video in the background. I don’t see why you can’t just put the sound inside the sim and not externally like every other addon

The sound IS mixed with the sim, since it uses a special DirectSound Cooperative mode, that allows sharing audio resources with another app ( MSFS ), of course appears as a separate entry in the Windows Sound Mixer, because it's running in a separate .EXE, and that's how the Windows Sound Mixer works. It's called "mixer" for a reason...

Also, it's not true that "every other addon" has its sounds "inside" the sim, because every other addon that generate sound from within an .EXE app will present itself exactly the same to the Windows Sound Mixer.

But that's beside the point. The point is, what would be the value, for you, as an user, to have GSX using the internal sound system from MSFS, other than having all its vehicles taking more internal memory and hammering on the MSFS sound engine, instead of getting the advantage of not impacting MSFS processing in any way which was ALREADY a benefit of BEING a separate .EXE in the first place, in addition to the obvious advantage of being free to do anything required for sound with our own code, that runs separate to the sim, so it's not even slightly affected by *possible* bugs an limitations in it ?

CPU are getting more and more cores, while the main method to create executables in the sim ( WASM ) and the JS subsystem too, are NOT multi-threaded, everything runs in the same thread. In this scenario, the advantage of using an external .EXE for almost everything in GSX should be obvious and it will more and more obvious, the more core CPU will get. It even gets better: the more your GPU becomes more and powerful and used by the sim, the more the sim is limited by the Main Thread, the more valuable will be having most add-ons running externally to it.

Awemeter

  • Newbie
  • *
  • Posts: 38
Re: ADD 3D SOUND
« Reply #9 on: November 22, 2022, 10:14:00 am »
Multiple devs in the community have told me that adding sound to a couple of vehicles would not impact performance at all. The default vehicles have sounds that run inside the sim so why can't gsx. If you implement it and find that there are performance issues then you can remove it or add a config option to turn it off for people with bad perf. This is a much better solution then waiting multiple years for asobo to implement a camera api.

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: ADD 3D SOUND
« Reply #10 on: November 22, 2022, 02:39:28 pm »
Multiple devs in the community have told me that adding sound to a couple of vehicles would not impact performance at all.

Developers often see only one point of view, as if their add-on was the only one running. Users in the real world, instead, use multiple add-ons all at the same time, and each of them adds up. The way we do sound, we are *sure* we are not affecting performance at all, no matter how many vehicles using sounds are in use.

You think parsing and processing and handling all sounds events in the XML files is "free" ? There IS some performance cost, difficult to say how much but, you can be sure that, is surely increasing the more and more objects in the sim use the internal sound system.

While with an external app with its own sound engine, the performance hit on the simulator is always and invariably ZERO.

Quote
The default vehicles have sounds that run inside the sim so why can't gsx.

You keep referring to "running inside the sim" has being some kind of advantage but, other than not giving you the added flexibility to control the GSX sound level independently ( which you now have, thanks to the Windows sound Mixer ), and risking you a possible performance loss, what you really gain, other the currently missing positional audio IN SHOWCASE CAMERA ?

Quote
If you implement it and find that there are performance issues then you can remove it or add a config option to turn it off for people with bad perf. This is a much better solution then waiting multiple years for asobo to implement a camera api.

This is obviously a much worse solution, because you are asking us to spend valuable development time that should be obviously better spent elsewhere, for a feature that some users might need to turn off, which would become basically useless, once the currently MOST requested new SDK feature, the Camera API, will eventually arrive ?

Awemeter

  • Newbie
  • *
  • Posts: 38
Re: ADD 3D SOUND
« Reply #11 on: August 06, 2023, 06:06:56 pm »
Using the sims audio engine will not have a noticeable performance impact. I have confirmed it with sound developers and they have said that performance wouldn't be an issue even when they account for other add-ons that would be producing sound using the sims audio engine. Using the sims audio engine won't remove the possibility to turn off the sounds. You can include an in-sim setting or volume slider to adjust the sound. Flybywires a32nx includes sound settings in their efb. Having GSX sounds outside of the sim is like having a YouTube video of a catering truck playing in another tab. It doesn't sound good. The sounds from GSX don't mix with other sounds. GSX sounds don't get drowned out by louder sounds in sim and even when in the cockpit camera and not in showcase the sounds are very unrealistic. When I move the camera move around the cockpit the sounds don't get quieter or louder in one ear giving the effect of the sounds being static and having no real position in the sim world. Using the sims sound engine will fix all these problems.

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: ADD 3D SOUND
« Reply #12 on: August 14, 2023, 02:21:20 pm »
Using the sims audio engine will not have a noticeable performance impact. I have confirmed it with sound developers and they have said that performance wouldn't be an issue even when they account for other add-ons that would be producing sound using the sims audio engine.

The impact is there, regardless if you noticed or not. If you noticed it, it's already too late to do something. Our method solves the issue at the root, because you there isn't any change to affect performances, not even in a measurable way ( let alone noticeable )

Quote
Using the sims audio engine won't remove the possibility to turn off the sounds. You can include an in-sim setting or volume slider to adjust the sound.

We have our volume slider so, the end result would be the same.

Quote
Flybywires a32nx includes sound settings in their efb.

We have our own sound settings on our own settings page.

Quote
Having GSX sounds outside of the sim is like having a YouTube video of a catering truck playing in another tab. It doesn't sound good.

It sounds identical and won't sound any different it it was made using the default sound engine.

Quote
The sounds from GSX don't mix with other sounds.

They surely do, thanks to the Windows sound mixer.

Quote
When I move the camera move around the cockpit the sounds don't get quieter or louder in one ear giving the effect of the sounds being static and having no real position in the sim world. Using the sims sound engine will fix all these problems.

This is the ONLY problem, we don't have the camera position as we do in P3D but, since this should be likely fixed if a Camera API will eventually come ( it's the most wanted feature on Asobo devs forum ), there's no reason to change our custom sound engine just to fix the one remaining problem which will be fixed by that.

Awemeter

  • Newbie
  • *
  • Posts: 38
Re: ADD 3D SOUND
« Reply #13 on: August 16, 2023, 01:02:06 pm »
It doesn't sound identical. The sounds aren't coming from an object in the sim. It sounds unrealistic. When passengers have to walk from the terminal to the plane the boarding sounds begin before you can even see the passengers. The sounds clearly don't mix because there is no way that a pushback tug is louder than two engines in the flight deck. You keep saying it does mix because of the Windows audio mixer but what even is Windows audio mixer? A quick search on the web says "The Windows audio mixer is a feature in Windows operating systems that allows you to control the volume of individual applications" If that's what it is then every app on your pc interacts with the Windows audio mixer meaning playing a youtube video of the same audio that gsx uses and using gsx to play that audio is the same thing. Windows audio mixer is what comes up if you right-click on the speaker icon on your taskbar.  There is a reason Fenix and the majority of devs don't have their sounds external from the sim. Waiting for the camera API is not a good idea because it most likely won't be released for a while. The WX and terrain API has been number one in the wishlist for multiple years yet it hasn't arrived but it has been confirmed by Asobo that they are working on it and have provided updates. Even when the camera API is released and you implement it the sounds will still sound weird because no matter what you do the audio isn't being simulated in a 3d environment.

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: ADD 3D SOUND
« Reply #14 on: August 30, 2023, 04:40:26 pm »
It doesn't sound identical.

It does. Minus the camera position, as I've said, multiple times.

Quote
The sounds aren't coming from an object in the sim

THEY DO!

Quote
It sounds unrealistic.

It's doesn't.

Quote
When passengers have to walk from the terminal to the plane the boarding sounds begin before you can even see the passengers.

This is COMPLETELY unrelated to the fact the sound engine is external. We might start the sound a bit later, because Walk-in gates has been added recently, so the sound should verify that but, if you were expecting very single passenger being a sound emitter, that would be too much for performance: the passenger ambience is just a single sound in loop, that's it. Even if we used  the default sound engine, we would never have each single passenger emitting a sound.

Quote
The sounds clearly don't mix because there is no way that a pushback tug is louder than two engines in the flight deck.

We might have to check this, because our sound engine obviously know if you are in the flight deck or not, so maybe there's just a bug here.

Quote
You keep saying it does mix because of the Windows audio mixer but what even is Windows audio mixer? A quick search on the web

Please don't try to argue on something you don't know or which your whole knowledge of it is only based on a web search. Our sound engine IS 3D and IS POSITIONAL and it DOES know the vehicles positions and your airplane positions as well so, it sounds IDENTICAL as if it would if it came from the simulator.

Quote
There is a reason Fenix and the majority of devs don't have their sounds external from the sim.

Yes, they didn't had an existing sound engine which did everything they need to do to support multiple simulator at once with zero code changes. We have it, so we use it.

Quote
Waiting for the camera API is not a good idea because it most likely won't be released for a while.

That's precisely what we are going to do, because it's the only thing missing for a perfect 3D sound effect. We are not obviously rewriting the whole audio engine which works perfectly fine, JUST because the Camera API is not there yet.

Quote
Even when the camera API is released and you implement it the sounds will still sound weird because no matter what you do the audio isn't being simulated in a 3d environment.

Just stop repeating this, it's not true.

As I've said, multiple times, our sound engine IS FULLY 3D and it KNOWS the position in the fligthsim world of EVERY GSX vehicle that emits sound, in realtime, at any time. It ONLY miss the camera ( which means ear position ) to make it identical as if it was using the default sound engine. But better, because it won't put any strain on the sim.

The topic is closed, because even the title was misleading other users we don't have 3D sounds, when we obviously do.
« Last Edit: August 30, 2023, 04:43:06 pm by virtuali »