Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 5:12 am
All times are UTC + 0
Investigating the cause of the popping in game, and silence
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Oct 02, 2016 5:56 am    Post subject:  Investigating the cause of the popping in game, and silence Reply with quote  Mark this post and the followings unread

I've noticed random clicks and pops after various sounds play, which seems to happen early on in the game, and then either I stop noticing or they stop happening -- I believe they mostly stop happening, for some unknown reason, while a few cases they persist.

I always ignored it as some engine glitch or maybe an aberration in one of the RA2 patches, but I started looking into it because in SE I've noticed my Berkut (which uses a moveloop like every other aircraft) seems to go silent after some time/usage. Since it does not appear to happen with other aircraft as repeatably as the Berkut, my Halo did at some point but hasn't seemed to since, I don't know what to make of it. Now just to verify I'm not crazy, I repeatedly tested the Berkut, even using different audio filenames.

I've changed the order in the sound.ini definition list, moved the afterburner sound just to where WW's sounds stop, and to the end, neither made a difference. Likewise I changed the name structure to match WW convention, reduced characters to 8, to no effect -- works for a while then stops playing. The sound has one of each attack loop and decay files, which makes it uncommon in that most have several loop files.

Ideas?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Oct 02, 2016 6:17 am    Post subject: Reply with quote  Mark this post and the followings unread

I would check the audio format (22050Hz, 16 bit, mono).
In TS if a wrong format aud is played, the entire sound engine stops working.
RA2 is afaik a bit more robust, but maybe it causes sideeffects like you've described.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Oct 02, 2016 6:59 am    Post subject: Reply with quote  Mark this post and the followings unread

A fair number of my sounds are 44khz, and I've tested 48k works as well, though I've resampled the majority for size.

Like I say the post-sound-pop is present in the original game, unless for some reason I have bit errors in my ra2.mix causing that to be corrupted slightly, since naturally that was the source of my modified .bag as well. To be clear the pops happen with GenAllVehicleXxxx sounds too, and I verified the original samples (extracted) are free of anything of the sort.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Sun Oct 02, 2016 9:00 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
A fair number of my sounds are 44khz, and I've tested 48k works as well, though I've resampled the majority for size.

Until the audio buffer overflows and you hear digital screams from hell...

Yes there are some audio bugs, its not just you.
Another one is in the Audio out of focus code, if you minimize a windowed game while the cash tick sound is playing, half a second later you will hear the cash sound for a brief moment and it will be obnoxiously loud.

As for comparing issues with TS and RA2, every single one is a coincidence.
TS uses the same tiny audio engine RA does.
WW replaced it in RA2 with the go to engine at the time which is also present in Emperor, NoX and at the time Westwood's Generals (as the GUIEditI.exe in the leaked alpha show). That audio engine is massive, as in ~500 functions massive, it would be a nightmare to debug

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Oct 02, 2016 9:28 am    Post subject: Reply with quote  Mark this post and the followings unread

It's just odd that it keeps happening to 1 specific unit, after 3-5 airstrikes with small groups, the moveloop stops playing, the auxsounds and voices still play...

There's literally nothing special about the moveloop either, 3 waves @ 22khz, it's almost like it just won't release the resource and thinks the limit applies?

[AfterburnerMoveLoop]
Sounds=vjetbrn1 vjetbrn2 vjetbrn3
Control=loop decay attack
VShift=10
Volume=60
VShift=5
Limit=4

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sun Oct 02, 2016 10:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Looping sound events should not use uncompressed (PCM) wave files. In my experience this is the prime cause of those sound events stopping from playing entirely, for some reason. It could be related to the filesize or such, but I don't know for sure.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Oct 02, 2016 11:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Ok then, what's it supposed to be? I have codecs for pretty much everything...

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sun Oct 02, 2016 12:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

IMA ADPCM. 4-bit if there's an option to adjust it.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Oct 02, 2016 1:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

4-bit???

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Oct 02, 2016 3:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

So not quite accepting the 4-bit as a solution, I'm making a new .bag from a vanilla copy, it's possible I had stuff in there I didn't use anymore, or who knows if XCC mangled anything...

Taking the opportunity to resample over 30 voice/movestart sounds I had missed, and making audio for the new units I added. I will update after I test, though that'll be after I have a nap Smile

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Sun Oct 02, 2016 3:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

You're aware that 4-bit IMA equals to 16-bit PCM, aren't you? And that all unit voices are in 4-bit IMA already. And stuff like that.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Oct 02, 2016 4:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

I don't know where you got that, I just checked the GenAllVehicleMove and it is 22khz PCM 352kbps... and Generals audio is the same, C&C3/RA3 however uses 48khz.

*moe.wav converted to IMA ADPCM 4bit -> test.wav... clearly visible bitrate change.



moetest.jpg
 Description:
 Filesize:  349.67 KB
 Viewed:  2524 Time(s)

moetest.jpg



_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sun Oct 02, 2016 5:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

XCC Mixer always extracts the audio from idx/bag as uncompressed PCM waves regardless of their original encoding.

You can't really use bitrate as absolute measure of perceived audio quality between two different encodings. IMA ADPCM is a lossy encoding that has compression ratio of 4:1 compared to uncompressed PCM wave files - thus explaining why the bitrate of the converted file is more or less one fourth of the original.

You will notice some quality loss with IMA ADPCM but in most cases it's an acceptable price for taking only a quarter of the space and potentially not choking the game's audio buffer to death. You could continue using PCM if you so choose but it would be ill-advised with longer audio files.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Sun Oct 02, 2016 6:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Generals does use PCM for some reason but that engine can handle IMA as well. (Tested ages ago.)

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Oct 03, 2016 3:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Starkku wrote:
You will notice some quality loss with IMA ADPCM but in most cases it's an acceptable price for taking only a quarter of the space and potentially not choking the game's audio buffer to death. You could continue using PCM if you so choose but it would be ill-advised with longer audio files.

This is good to know, but that doesn't explain why my moveloop which is 3x 3sec files is affected...

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Mon Oct 03, 2016 2:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

3 seconds is long enough to suffer from the issues previously mentioned, so quite frankly it does explain it. It's a shoddily put-together game from around the turn of the millennium, can't really expect much from it.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2018s ][ Queries: 14 (0.0126s) ][ Debug on ]