Console commands for audio broken ?

I was wondering why some of the console commands useful for audio don’t appear to be working.

ListSoundClasses and ListWaves information is displayed in the Stat Sounds command anyway so we don’t really need these, but ListSounds gives you the currently loaded sounds memory footprint - which is pretty useful / vital for tracking this.

Not sure how useful ListSoundDurations is - but again this doesn’t appear to work.
ListAudioComponents says it “Dumps a detailed list of all AudioComponent objects” but either it doesn’t or I’m looking in the wrong place (Documents\Unreal Projects\GAMTutorialLevel_V001\Saved\Logs) ?

Thanks,
R.

The output from ListSounds and ListWaves are shown in the console output, which can be seen in the Output Log in the Editor (Window->Developer Tools->Output Log). They can also be found in the log files that are written to your ‘GameName’/Saved/Logs folder.

ListSoundDurations however seems to use our internal logging system, which only appears in the Output Log if the severity of the log message is high enough. In the case of Audio only warnings are shown by default, to display log messages you need to change the following line in Audio.h:

ENGINE_API DECLARE_LOG_CATEGORY_EXTERN(LogAudio, Warning, All); // Change Warning to Log

I can add a ticket about changing this to always write to the console, as I don’t see any point in potentially hiding log messages that you explicitly requested.

Aha ! Thanks for that Matthew - appreciate the quick response,
Cheers, R.

Hi again,
I wondered if you could clarify a couple of things.I’m trying to track the audio memory budget for my level so I don’t go over my allocation.

Stat sounds - this gives me a list of the currently active sounds and their size
Stat Audio / Audio memory used - this keeps a running total of audio memory used
Listsounds - again gives me a running list of all sounds that have played, and their total size

Given that many soundcues pick from a random selection of sounds this will not give me my potential total memory budget for the level, just a summary of the memory used for sound on that particular play through. So if I’m going to establish an accurate sense of what my total memory actually is for the level I need to track each wave file that has the potential to play separately in a spreadsheet.

Can you confirm my understanding, and let me know why the totals from Stat Audio, and Listsounds are different (with Stat Audio memory used always being larger ?

Cheers,
R.

A Soundcue with multiple random sounds will actually load in all of the sounds it could potentially play. The ‘Preselect At Level Load’ setting in Random nodes will allow you to cut down the amount of sounds loaded if necessary. Setting this to a number greater than 0 will mean that when the Random SoundNode is loaded, it will discard some of its inputs so that they are never loaded.

I believe Stat Audio displays the full total of all audio memory currently being used, including buffers for sounds decompressed on the fly or streamed. The difference between it and Listsounds is that the latter is only displaying the memory of sounds that have been fully loaded as PCM data, which is usually only once they have been played. Long and short of that is that Stat Audio should be the most accurate, I think there are still some tasks to improve the memory tracking in future.

Hi Matthew,
yes I noted that functionality in the random node - very useful for scalability.

I’m not sure that the Stat Audio Memory does work quite in the way I think you described, since it appears to increment each time a new sound plays, implying that it’s acting more like the list sounds.
Agreed there’s some things to develop here + a bit more documentation on audio memory management would be good r.e. from a designer point of view how you determine whether things are loaded into RAM, decompressed on the fly, or streamed.
I guess for the moment the safest bet is to track the potential memory budget by hand.
Cheers,
R.

Hmm, yes I see you’re right. What’s happening behind the scenes is that the compressed data for your audio will always be loaded, as doing that on the fly would be too slow. But it’s not until you actually play a sound that it’s decompressed to PCM data - either the whole sound or piece by piece as it’s played back (depending on its length and Sound Group setting).

It’s an approach that lowers your memory usage in the general case but doesn’t make it very easy to profile your worst case memory usage if every random sound happens to be played. I suppose it might be a bug that the compressed data size isn’t included in the memory stats but it may also be deliberate, so that audio memory stats are only focused on decompressed PCM data, which could be stored in a specific area of memory on consoles etc. It’s something we can probably discuss internally in the new year.

OK - thanks for the info Matthew,
Cheers,
R.

Hi Again,
just come across listsounddurations which does seem to give a list of all sounds that might potentially play, just not their filesize. So if this could be extended to include this it would be a useful addition for now.
Yours,
R.