Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Change ownership of a playing sound

+1 vote

We're using Unreal Engine, and we're using the Rooms and Portals feature. Each room has ambient sound running in it, and we've got an "AmbianceManager" that makes sure only a small number of ambiances can play at once, it won't allow two of the same ambiance, and priority is given to ambiances which are least occluded, closest, etc..

This works fine when traveling room to room with different ambiances, but when you travel from one room to another that has the same ambiance, it sounds odd, because you have the same ambiance suddenly stopping then restarting again. I tried using "Seek" after polling for the current position of the playing sound, so that the new sound that starts playing (using PostEvent) and can just continue where the old one left off, but this sounds wrong too. I think there might be a little bit of latency between calling GetSourcePlayPosition(), and the engine actually seeking to that position, or between

the call to PostEvent and the engine actually starting to play the sound.

 

But what if I could just let the sound keep playing, and just transfer ownership of the sound to a new room, for the purpose of attenuation, etc..?

To summarize: 

-A looping sound was played using PostEvent(), with the Room's AkObjectID passed in.

-When the looping sound starts playing from a new room, I want to 'transfer' the looping sound over to a new room, so that it keeps playing as though it was always playing with this new object's

AkObjectID passed into PostEvent()  

 

Is this possible? If so, how do I do this?

asked Aug 20, 2020 in General Discussion by Eric C. (160 points)

Please sign-in or register to answer this question.

...