Audio length problem

Hi.

To sum up the issue, sounds longer than 5 seconds have a bizarre delay before you can hear the audio
So if the sound is 5 seconds long or less, it will play from 0.0 - 5.0.
If the sound was, for example 15 seconds long, it would play from 4.0-15.0, missing out on the first 4 seconds of the audio cue.
Even if the sound was 5.01 sec long, it would play from 4.0-5.01.
If the sound is looping, the first loop has the problem, but after that, the sound loops like normal, from 0.0 onwards.

I only just noticed a very bizarre issue where I have a flame-thrower, it uses 2 sound waves.
The first is the initial squirt of the flame-thrower which is 0.25 sec long, the 2nd is the flame-thrower looping sound which is 14 sec long.

There is a concatenator node in the audio cue so that the squirt sound plays first, then the normal firey looping sound (which is set to looping) afterwards.

This has been working since I put this into the engine many engine versions ago, but now has suddenly decided to start being strange.

What it is doing (in game at least) is the player clicks and holds as if they are firing the flamethrower, the initial squirt sound fires, and then the looping sound almost seemingly doesn’t have any audio for the first 3-4 seconds out of the 14 second sound wave file.

So instead of a nice clean:
PFF-RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
sound.

It sounds like:
PFF…RRRRRRRRRRRRRRRR (then loops normally)

After a bunch of trial and error and testing, I decided to cut the original audio loop down in it’s length so it is 5 seconds, and now it loops, although, it’s a 5 sec loop now (which is probably all I need, but it does make me wonder about other audio loops in future that I may implement that would go for long, such as ambient background noises etc).
I figured out that if the loop was 5.01 sec, the problem would occur. So my guess is that there is now some weird problem if a loop is over 5 seconds in length.

I thought it might be to do with the file size, but seemingly has nothing to do with that, so I dunno, I’ve tried making new audio cue’s, using different .wav files with different sounds, but the same problem is occuring unless the audio is 5sec or less.

Could anybody else maybe test this with 4.13.1 and try to replicate it. It was all working ok in 4.12.5, and I THINK even 4.13.0 (I honestly can’t remember if it was ok in 4.13.0 though).

Thanks and I hope this helps some folks who may be having the same issues.

Hello Otreum,

Can you reproduce this in a new blank project within 4.13.1, or is this project specific?

I ran a quick test on my end with a 6 second sound and the sound looped completely normal as expected.

Perhaps you can share with me your a simple test project where the issue occurs so I can investigate further on my end.

Thanks,

I tried to replicate the problem, but it does not occur.
I created a new 4.12.5 first person template.
I imported the 14 second flamethrower audio loop sound wave file in question.
I added audio component to first person character, and triggered audio to play when ‘fire’ is pressed, and stopped when ‘fire’ is released.
And disabled auto activate just for good measure.

Everything works fine.

I then opened 4.13.1 and converted the project, tested to try and replicate the problem. The problem does not occur.

I could not replicate the issue in a blank project :\

I then went back to a 4.11 version of my main project to see if the problem still existed, but there’s no problems.
I then converted the project to 4.13.1 and the problem returns again. :frowning:
Re-importing the audio doesn’t fix the problem.
I also tried to migrate the audio from the 4.11 project across to 4.13.1 version, and still, the problem persists.

I also just placed the sound cue into the level itself, using various lengthy sound waves, and the same problem occurred. (I thought maybe it was the audio cue and concatenator causing a problem.)

I should also point out, the audio files are in 44100khz, and the original files are .wav files when I import them if that helps.

I’m a little bit stumped by this to say the least :\

This is consistent with a range of issues when converting my project which I couldn’t possibly summarize.
In fact I think I spend more time fixing conversion problems (such as conversion deleting event nodes, corrupting blueprints entirely, resetting variables to default values etc) than actually working on my game content :frowning:
Is there a better way of converting to a new version other than opening the new engine version and selecting my older project to convert, because it’s really hindering my development massively to the point where I’m considering just throwing in the towel after almost 2 years of work :frowning:

So a big part of development when working with any project or game, is deciding on an engine version and staying on that version as well as using source control to manage changes made in code. This is done for a number of reasons, but the main reason is to avoid losing crucial amounts of work and integrating code fixes for issues that could be blocking your development.

I highly suggest never converting a project, and always opening a copy systematically and in a linear fashion (i.e. 4.11 > 4.12 > 4.13). The general rule of thumb is to stay on your engine version and ONLY upgrade if that new version has a number of features and fixes not worth the time taking to individually integrate yourself within code. This is done to avoid corruption issues when upgrading to through multiple engine versions, and so you are not surprised when you get externally referenced errors or other similar issues.

Obviously we want users to try out the new features and fixes for any newly released engine version, but choose how you do this carefully. Converting a project instead of making a copy basically gives you no outlet in case the new version is broken for any number of reasons.

With all of this said, if you can get the issue to occur by importing the sound files in question into 4.13, and then provide me with either some steps and/or the files, then I am happy to try and reproduce the issue on my end.

I am sorry you have been experiencing the conversion issues, as I had to learn from experience during in my own projects that making sure you have backups and your reasons for upgrading to a engine version are out of necessity, and not curiosity. You can always create a new blank project and check out the new features that way, instead of upgrading a pre-existing project.

Let me know if you have further questions or need additional assistance.

Cheers,

Thanks Andrew,

You are right.
The upgrades are a little out of curiosity more than necessity, at least in the latest upgrade.
There were a few things that I think would help immensely, but I’m not far enough into production to really utilize the features just yet.
I might have to try and move my changes that I’ve made in 4.13 back to 4.12 or 4.11, especially with 3D widget interaction being more catored to VR now, that pretty much removed over 6 months of work and hinders development in a big way unless I incorporate the old 3d widget interaction system, haha.

I forget that games development is not a straight forward process sometimes, and I guess I needed a reminder that it’s not always necessary to update to a new engine version.

I could send the entire 4.11 game project to you, if it might help in some way. It’s roughly 2.7gb compressed, 8gb decompressed.

Thank you for your response Andrew, and sorry to write it up as a bug report, it’s almost a bit of a false positive, specifically isolated to my project…still a very odd one.

Thank you for your time and patience, please let me know if you wish me to send the project your way :slight_smile:

It isn’t easy to resist the urge to upgrade your project, especially with how we add a large number of optimizations and features to almost every release. Albeit, this is a great thing, but for those who are developing on an earlier version can sometimes feel like they are now outdated and their project won’t be as great as it could be.

Don’t let the features overcome your dedication to your own development cycle, as you can tell, it can sometimes break things. Hopefully you can return to a solid working point in a previous engine version where things are working more as you expect.

With that said, I don’t think sharing your entire project is going to be super helpful at the moment (especially given the size). Just use this as a game development lesson and continue on with your progress as best you can. I wish you the best of luck and let us know if we can help you with any bugs or crashes. Also, don’t worry about calling this a bug, because at first read and from your troubleshooting that is what you determined.

Cheers,