It's mostly controlled through the "AmbientSounds.cpp" file but I can't find any mention of cockpit audio, that might be driven by Lua perhaps? I'm not sure right now.
Most of the sounds are hardcoded so adding new ones requires editing the code.
I've been meaning to change that but haven't gotten around too it yet.
Thanks for the explanation. I've started a new topic about it in dev forum - looking forward to hear your thoughts 🙂
Ambient comes through AmbientSounds.cpp. Various input event responses (button clicks) and warnings and such are all over the place, look for calls to Sound::PlaySfx and Sound::BodyMakeNoise. The sound system isn't exposed to Lua in any way.
@Rob N
Thanks Robert, I've posted some ideas (sound designer level) on dev forum, please tell me what you think.