Getting sounds as byte[] from Bank C#

Hey,

I’m wondering if there’s a way to get the ogg audio sounds inside my bank as a byte[] in C#.

I know the wrapper exists and I’ve had a look at most of the functions, I just can’t work out how to get the actual sound file…?

I’ve tried the Sound.seekData but it throws an ‘unsupported’ error?
I’ve also tried readData with a pinned object and it fails too?

I want to do this so I can allow users to save the tracks from my app to their disk. I don’t want to double up on the amount of files or release a soundtrack as it’s only a small app.

Regards,
John

As a matter of policy, we don’t support any method of extracting audio files from sound banks.

We have learned from bitter experience that there are a surprisingly large number of would-be pirates and plagiarists in the world. Early in the development of FMOD Designer, we did support this - but we soon learned that the feature was being abused, and so stopped supporting it.

As such, if you want your game’s sound files to be available for use outside of your game project, you can either use FMOD Studio’s audio tables and programmer sounds, or you can do as you suggested and provide the files separately.

1 Like