x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can I resume an out of range sound when the player comes back

Hi all, I have an AmbientSound actor in my scene, being attenuated and playing a 10 minutes sound. When the player comes in the sound zone, it starts as expected. When he leaves it stops, that's fine. But when the player comes back, the sound restart from the beginning !

I'd like to keep the sound "playing" (but silently), so that when the player is back, it sounds like it continued playing on his own (just like it would in real life).

How can I do that ?

Thanks Guillaume

Product Version: Not Selected
Tags:
more ▼

asked Oct 25 '14 at 04:19 PM in Using UE4

avatar image

monsieurgustav
51 2 4 11

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

It isn't ideal but I think that the only way to achieve this currently would be to set your sound to 'Always Play' via its Sound Class. This will ensure that the sound won't actually stop if it becomes inaudible. This does use up an extra channel for a sound that you won't be able to hear though.

We don't currently have a system that allows us to make sounds virtual, so that only their current time is advanced. You could perhaps set up a system to do that yourself, by getting the current time of the sound as you stop it and when you start the sound again set the Start Time to begin part way through the sound.

more ▼

answered Oct 27 '14 at 11:31 AM

avatar image monsieurgustav Oct 27 '14 at 12:07 PM

"Always Play" works fine, thanks a lot !

Is there a hard limit on the channels number ? Or is it just about overall performance ?

avatar image IdentityCrisisUK STAFF Oct 27 '14 at 12:12 PM

There is a MaxChannels value that can be set in your engine config ini, which defaults to 32. It should only ever really be a problem if you set a lot of sounds to always play at once, which would force other sounds you might expect to hear to not play.

avatar image fresheyeball Apr 05 '15 at 04:36 AM

For noobs like myself. Can you expound about how to do this? How do I access this setting?

avatar image IdentityCrisisUK STAFF Apr 07 '15 at 08:46 AM

Sound Classes are assets that you can set on any sound, there are some default ones that come with the engine but you will have to enable the 'Show Engine Content' switch in the Content Browser View Options for them to show up. For example if you wanted to ensure that sounds tagged with the default voice Sound Class always play, open the asset and change this value:

alt text

Then open your sound and change its Sound Class to Voice:

alt text

avatar image Donalf Nov 20 '15 at 05:58 PM

Is the maximum of 32 channels restricted across different levels? In other words - using this method, if there are a large amount of concurrent sounds playing in different streaming levels will all of them be included in the maximum 32 channels?

avatar image IdentityCrisisUK STAFF Nov 23 '15 at 09:20 AM

Yes, all playing sounds will contribute towards the maximum channel count, no matter which level is playing them.

(comments are locked)
10|2000 characters needed characters left

Theres a fix now apparently. Open the sound, go to the Sound tab and activate Virtualize when Silent Worked for me.

more ▼

answered Jul 10 '17 at 01:43 PM

avatar image

IgnacioFarias
41 2 2

avatar image chuckleplant Sep 01 '18 at 11:57 AM

I can't find this in version 4.20.2

(comments are locked)
10|2000 characters needed characters left

Instead of resuming just re-launch the sound once the player is at a certain distance. You can also possibly write a small functionality that save the time the sound stopped playing and the current play position, then when the player is near enough it will take the current time, subtract the saved time, and figure out at what position to play the sound again.

more ▼

answered Nov 13 '16 at 04:13 AM

avatar image

Night Watcher
1.7k 43 12 71

avatar image Megurine Nov 13 '16 at 03:01 PM

Ofc, we can do some bad techniques to do the same things, like use a very big FalloffDistance and use a custom curve for distanceAlgo.

But cj.allen321 gives the true answer here : https://answers.unrealengine.com/questions/486140/always-playing-property-of-sound-class-not-working.html?sort=oldest

avatar image Night Watcher Nov 13 '16 at 03:14 PM

his solution might be valid, but that does not men my technique is bad, it's a cheap workaround, you just stop and sound and play it again when in range

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question