Code Monkey home page Code Monkey logo

wwiseparser's Introduction

WwiseParser

WwiseParser is a library for parsing Wwise 2016 SoundBank object formats. It can be used to deserialize Wwise objects and rebuild hierarchies.

The library project, WwiseParserLib, is the core library for parsing in-memory and on-disk SoundBanks.

The CLI app, WwiseParser, is a frontend of WWiseParserLib that dumps SoundBank files to JSON exports. It can also be used to dump Wwise objects into separate JSON files in the "inspector mode".

Quickstart

The base class for SoundBank types is WwiseParserLib.Structures.SoundBanks.SoundBank. Currently there are two concrete implementations: FileSoundBank and InMemorySoundBank.

The FileSoundBank is designed for reading .bnk files. Initialize it with:

SoundBank fileSoundBank = new WwiseParserLib.Structures.SoundBanks.FileSoundBank("C:\\Path\\To\\Bank.bnk");

The InMemorySoundBank is designed for reading SoundBank data as byte arrays. Initialize it with:

byte[] soundBankData;
// Fill array with actual data...
SoundBank inMemSoundBank = new WwiseParserLib.Structures.SoundBanks.InMemorySoundBank(soundBankData);

From here, use the SoundBank.GetSection(SoundBankSectionName name) method to (attempt to) get a parsed section. SoundBankSectionName is an enum containing all possible SoundBank section names. Currently, only BKHD, HIRC, and STMG are supported.

The returned section will be of base type SoundBankSection.

Hierarchies

Currently, Master-Mixer and Actor-Mixer hierachies are supported. To rebuild a hierarchy:

  • Create a SoundBank object.
  • Call SoundBank.CreateMasterMixerHierarchy() or SoundBank.CreateActorMixerHierarchy() to rebuild respective hierarchies.

The WwiseParserLib.Structures.Hierarchies.MasterMixerHierarchy contains two AudioBuses, MasterMixerHierarchy.MasterAudioBus and MasterMixerHierarchy.MasterSecondaryBus. Hierarchy traversal can be done through their Children property.

The WwiseParserLib.Structures.Hierarchies.ActorMixerHierarchy contains a list of top-level "actor objects", Actors. "Top-level actors" contain actor objects without a parent ID (which are truly top-level objects), and actors with nonexistant parent IDs.

The second case can happen when an ActorMixerHierarchy is manually created and provided an incomplete list of actor objects so that the hierarchy cannot be fully rebuilt.

Another case may be that the unreachable parent object lives in another SoundBank, but this has yet to be proved.

wwiseparser's People

Contributors

dependabot[bot] avatar xyx0826 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.