Skip to main content
GameDev.net gamedev.net
🔒 Locked

Corrupt(?) XACT3 Sound Bank when attaching RPC to streaming sound

Started by SBD Jul 26 at 3:02 AM 1 replies 300+ views
Original Post
SBD
SBD

I am presently (still) using the ancient XACT3 sound toolkit/API as my underlying audio layer in my own custom (Win64) C++ engine. This has been working fine for quite some time, but I have recently come across an issue that appears to be a bug in the content generation pipeline and/or XACT runtime that I'm hoping maybe someone has seen before (and hopefully has a workaround for).

I'll go ahead and state beforehand that I do realize this is an ancient and deprecated API, and that it's quite likely that I'll move myself off it and just use XAudio2 directly since I don't really use any particularly fancy RPCs. It's just been nice to have a GUI for the asset pipeline and a nice basic abstraction for sound cues, etc. Also am aware that the DirectKTK Audio component has a pseudo-replacement that reads XACT wave banks. But, for the time being, am trying to jostle this into compliance.

My issue is that when I add an RPC to a streaming sound (which is to say, add an RPC to a sound that is linked to a streaming wave), the sound bank that gets produced (the .xsb file) when the XACT project is built fails to load (IXACT3Engine::CreateSoundBank() returns XACTENGINE_E_INVALIDDATA).

This is a sound bank (and associated wave bank) that has already existed and worked fine for eons. I have used various RPCs on in-memory sounds with no issues. This is, however, the first time I have tried to add an RPC (distance attenuation) to a streaming sound. This issue occurs on all build configurations (Win32, Win64, for both MSVC and Clang-cl builds). There are no content build errors; the XACT authoring tool seems to believe its output is completely valid (and the size doesn't change in any significant way).

I have tried all manner of permutations to try and shake this loose (user variable in RPC instead of system Distance, added RPC to non-streaming sound in same sound bank, etc.). I've even entertained every manner of AI coding suggestion (and a fair bit of hallucinations) just to see if something gets shaken loose, but all to no avail. Have searched far and wide online for anyone having had a similar issue, but no dice.

Has anyone come across this particular issue? I'm all ears for any suggestions (aside from "just dump XACT" 😉). I can, obviously, just manually perform the distance attenuation myself, but that sort of is beside the point of using XACT.

SBD
SBD

Some more engagement with AI reinforces what seems to be the case; RPCs are not supported for streaming sounds. Given that some types of parameter control might alter playback speed or necessitate needing data that isn't streamed in yet, and it just generally adds more complication to support on streaming data, it would seem it's simply not permitted at all. The tool obviously seems to allow authoring and attempting to output something, but the runtime detects the invalid combination and barfs. It's implied that the data might actually be corrupt (RPC table on a streaming sound overwrites streaming sound structure elements). How much of that is hallucination/inference is hard to say...there is no specific source or post for that claim, but it seems the most plausible explanation.

So, it seems I'm out of luck, and just one more push towards dropping XACT if this becomes a critical need (or, perhaps, just doing my own attenuation on the side for streaming sounds).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.