FMOD Engine User Manual 2.03
Banks made in FMOD Studio contain the metadata and audio sample data required for runtime mixing and playback. Audio sample data may be packed into the same bank as the event metadata which references it, or it may be packed into separate banks.
Loading:
Buses:
Events:
String Table:
VCAs:
General:
See Also:
Retrieves the number of buses in the bank. This is only relevant for master banks, as other banks do not contain buses.
FMOD_RESULT Studio::Bank::getBusCount(
int *count
);
FMOD_RESULT FMOD_Studio_Bank_GetBusCount(
FMOD_STUDIO_BANK *bank,
int *count
);
RESULT Studio.Bank.getBusCount(
out int count
);
Bank.getBusCount(
count
);
May be used in conjunction with Studio::Bank::getBusList to enumerate the buses in the bank.
Retrieves a list of the buses in the bank. This is only relevant for master banks, as other banks do not contain buses.
FMOD_RESULT Studio::Bank::getBusList(
Studio::Bus **array,
int capacity,
int *count
);
FMOD_RESULT FMOD_Studio_Bank_GetBusList(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_BUS **array,
int capacity,
int *count
);
RESULT Studio.Bank.getBusList(
out Bus[] array
);
Bank.getBusList(
array,
capacity,
count
);
array
.array
.May be used in conjunction with Studio::Bank::getBusCount to enumerate the buses in the bank.
This function returns a maximum of capacity
buses from the bank. If the bank contains more than capacity
buses additional buses will be silently ignored.
Retrieves the number of event descriptions in the bank.
FMOD_RESULT Studio::Bank::getEventCount(
int *count
);
FMOD_RESULT FMOD_Studio_Bank_GetEventCount(
FMOD_STUDIO_BANK *bank,
int *count
);
RESULT Studio.Bank.getEventCount(
out int count
);
Bank.getEventCount(
count
);
May be used in conjunction with Studio::Bank::getEventList to enumerate the events in the bank.
This function counts the events which were added to the bank by the sound designer. The bank may contain additional events which are referenced by event instruments but were not added to the bank, and those referenced events are not counted.
Retrieves a list of the event descriptions in the bank.
FMOD_RESULT Studio::Bank::getEventList(
Studio::EventDescription **array,
int capacity,
int *count
);
FMOD_RESULT FMOD_Studio_Bank_GetEventList(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_EVENTDESCRIPTION **array,
int capacity,
int *count
);
RESULT Studio.Bank.getEventList(
out EventDescription[] array
);
Bank.getEventList(
array,
capacity,
count
);
array
.array
.This function returns a maximum of capacity
events from the bank. If the bank contains more than capacity
events then additional events will be silently ignored.
May be used in conjunction with Studio::Bank::getEventCount to enumerate the events in the bank.
This function retrieves the events which were added to the bank by the sound designer. The bank may contain additional events which are referenced by event instruments but were not added to the bank, and those referenced events are not retrieved.
FMOD_RESULT Studio::Bank::getID(
FMOD_GUID *id
);
FMOD_RESULT FMOD_Studio_Bank_GetID(
FMOD_STUDIO_BANK *bank,
FMOD_GUID *id
);
RESULT Studio.Bank.getID(
out Guid id
);
Bank.getID(
id
);
Retrieves the loading state.
FMOD_RESULT Studio::Bank::getLoadingState(
FMOD_STUDIO_LOADING_STATE *state
);
FMOD_RESULT FMOD_Studio_Bank_GetLoadingState(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_LOADING_STATE *state
);
RESULT Studio.Bank.getLoadingState(
out LOADING_STATE state
);
Bank.getLoadingState(
state
);
This function may be used to check the loading state of a bank which has been loaded asynchronously using the FMOD_STUDIO_LOAD_BANK_NONBLOCKING flag, or is pending unload following a call to Studio::Bank::unload.
If an asynchronous load failed due to a file error state
will contain FMOD_STUDIO_LOADING_STATE_ERROR and the return code from this function will be the error code of the bank load function.
See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory, Studio::System::loadBankCustom
Retrieves the path.
FMOD_RESULT Studio::Bank::getPath(
char *path,
int size,
int *retrieved
);
FMOD_RESULT FMOD_Studio_Bank_GetPath(
FMOD_STUDIO_BANK *bank,
char *path,
int size,
int *retrieved
);
RESULT Studio.Bank.getPath(
out string path
);
Bank.getPath(
path,
size,
retrieved
);
path
is null.The strings bank must be loaded prior to calling this function, otherwise FMOD_ERR_EVENT_NOTFOUND is returned.
If the path is longer than size
then it is truncated and this function returns FMOD_ERR_TRUNCATED.
The retrieved
parameter can be used to get the buffer size required to hold the full path
Retrieves the loading state of the samples in the bank.
FMOD_RESULT Studio::Bank::getSampleLoadingState(
FMOD_STUDIO_LOADING_STATE *state
);
FMOD_RESULT FMOD_Studio_Bank_GetSampleLoadingState(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_LOADING_STATE *state
);
RESULT Studio.Bank.getSampleLoadingState(
out LOADING_STATE state
);
Bank.getSampleLoadingState(
state
);
May be used for tracking the status of the Studio::Bank::loadSampleData operation.
If Studio::Bank::loadSampleData has not been called for the bank then this function will return FMOD_STUDIO_LOADING_STATE_UNLOADED even though sample data may have been loaded by other API calls.
See also: Studio::Bank::unloadSampleData, Sample Data Loading
Retrieves the number of string table entries in the bank. This is only relevant for studio string banks, as other banks do not contain string tables.
FMOD_RESULT Studio::Bank::getStringCount(
int *count
);
FMOD_RESULT FMOD_Studio_Bank_GetStringCount(
FMOD_STUDIO_BANK *bank,
int *count
);
RESULT Studio.Bank.getStringCount(
out int count
);
Bank.getStringCount(
count
);
May be used in conjunction with Studio::Bank::getStringInfo to enumerate the string table in a bank.
See Also: strings bank
Retrieves a string table entry. This is only relevant for studio string banks, as other banks do not contain string tables.
FMOD_RESULT Studio::Bank::getStringInfo(
int index,
FMOD_GUID *id,
char *path,
int size,
int *retrieved
);
FMOD_RESULT FMOD_Studio_Bank_GetStringInfo(
FMOD_STUDIO_BANK *bank,
int index,
FMOD_GUID *id,
char *path,
int size,
int *retrieved
);
RESULT Studio.Bank.getStringInfo(
int index,
out Guid id,
out string path
);
Bank.getStringInfo(
index,
id,
path,
size,
retrieved
);
path
is null.May be used in conjunction with Studio::Bank::getStringCount to enumerate the string table in a bank.
If the path is longer than size
then it is truncated and this function returns FMOD_ERR_TRUNCATED.
The retrieved
parameter can be used to get the buffer size required to hold the full path
See Also: Strings bank, Studio::System::lookupID, Studio::System::lookupPath
Retrieves the bank's user data.
FMOD_RESULT Studio::Bank::getUserData(
void **userdata
);
FMOD_RESULT FMOD_Studio_Bank_GetUserData(
FMOD_STUDIO_BANK *bank,
void **userdata
);
RESULT Studio.Bank.getUserData(
out IntPtr userdata
);
Bank.getUserData(
userdata
);
This function allows arbitrary user data to be retrieved from this object. For information about setting a bank's user data, see Studio::Bank::getUserData. For an example of how to get and set user data, see the User Data section of the glossary.
Retrieves the number of VCAs in the bank.
FMOD_RESULT Studio::Bank::getVCACount(
int *count
);
FMOD_RESULT FMOD_Studio_Bank_GetVCACount(
FMOD_STUDIO_BANK *bank,
int *count
);
RESULT Studio.Bank.getVCACount(
out int count
);
Bank.getVCACount(
count
);
May be used in conjunction with Studio::Bank::getVCAList to enumerate the VCAs in a bank.
Retrieves a list of the VCAs in the bank.
FMOD_RESULT Studio::Bank::getVCAList(
Studio::VCA **array,
int capacity,
int *count
);
FMOD_RESULT FMOD_Studio_Bank_GetVCAList(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_VCA **array,
int capacity,
int *count
);
RESULT Studio.Bank.getVCAList(
out VCA[] array
);
Bank.getVCAList(
array,
capacity,
count
);
array
.array
.May be used in conjunction with Studio::Bank::getVCACount to enumerate the VCAs in a bank.
This function returns a maximum of capacity
VCAs from the bank. If the bank contains more than capacity
VCAs additional VCAs will be silently ignored.
Checks that the bank reference is valid.
bool Studio::Bank::isValid()
bool FMOD_Studio_Bank_IsValid(FMOD_STUDIO_BANK *bank)
bool Studio.Bank.isValid()
Studio.Bank.isValid()
Loads non-streaming sample data for all events in the bank.
FMOD_RESULT Studio::Bank::loadSampleData();
FMOD_RESULT FMOD_Studio_Bank_LoadSampleData(FMOD_STUDIO_BANK *bank);
RESULT Studio.Bank.loadSampleData();
Bank.loadSampleData();
Use this function to preload sample data ahead of time so that the events in the bank can play immediately when started.
This function is equivalent to calling Studio::EventDescription::loadSampleData for all events in the bank, including referenced events.
See Also: Studio::Bank::getSampleLoadingState, Studio::Bank::unloadSampleData, Sample Data Loading
Sets the bank's user data.
FMOD_RESULT Studio::Bank::setUserData(
void *userdata
);
FMOD_RESULT FMOD_Studio_Bank_SetUserData(
FMOD_STUDIO_BANK *bank,
void *userdata
);
RESULT Studio.Bank.setUserData(
IntPtr userdata
);
Bank.setUserData(
userdata
);
This function allows arbitrary user data to be attached to this object. See the User Data section of the glossary for an example of how to get and set user data.
See Also: Studio::Bank::getUserData
Unloads the bank.
FMOD_RESULT Studio::Bank::unload();
FMOD_RESULT FMOD_Studio_Bank_Unload(FMOD_STUDIO_BANK *bank);
RESULT Studio.Bank.unload();
Bank.unload();
This will destroy all objects created from the bank, unload all sample data inside the bank, and invalidate all API handles referring to the bank.
If the bank was loaded from user-managed memory, e.g. by Studio::System::loadBankMemory with the FMOD_STUDIO_LOAD_MEMORY_POINT mode, then the memory must not be freed until the unload has completed. Poll the loading state using Studio::Bank::getLoadingState or use the FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD system callback to determine when it is safe to free the memory.
See Also: Studio::System::loadBankFile, Studio::System::loadBankCustom, Studio::System::setCallback
Unloads non-streaming sample data for all events in the bank.
FMOD_RESULT Studio::Bank::unloadSampleData();
FMOD_RESULT FMOD_Studio_Bank_UnloadSampleData(FMOD_STUDIO_BANK *bank);
RESULT Studio.Bank.unloadSampleData();
Bank.unloadSampleData();
Sample data loading is reference counted and the sample data will remain loaded until unload requests corresponding to all load requests are made, or until the bank is unloaded. For more details see Sample Data Loading.
See Also: Studio::Bank::loadSampleData