Unreal Integration 2.02

5. API Reference | IFMODStudioModule

This class inherits from IModuleInterface.

Methods:

IFMODStudioModule::Get

Singleton-like access to this module's interface. Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.

C++

IFMODStudioModule &Get()
return
Returns singleton instance, loading the module on demand if needed.

IFMODStudioModule::IsAvailable

Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.

bool IsAvailable()
return
Returns true if the module is loaded and ready to use.

IFMODStudioModule::GetStudioSystem

Get a pointer to the runtime studio system (only valid in-game or in PIE).

FMOD::Studio::System *GetStudioSystem(
    EFMODSystemContext::Type Context
);
Context
System context to use.

See Also: EFMODSystemContext.

IFMODStudioModule::SetSystemPaused

Set system paused.

void SetSystemPaused(
    bool paused
);
paused
Should the system be paused.

IFMODStudioModule::RefreshSettings

Called when user changes any studio settings.

void RefreshSettings();

IFMODStudioModule::SetInPIE

Called when we enter or leave PIE mode.

void SetInPIE(
    bool bInPIE,
    bool bSimulating
);
bInPIE
Currently in PIE.
bSimulating
Currently simulating.

IFMODStudioModule::FindAssetByName

Look up an asset given its name.

UFMODAsset *FindAssetByName(
    const FString &Name
);
Name
The asset name.

IFMODStudioModule::FindEventByName

Look up an event given its name.

UFMODEvent *FindEventByName(
    const FString &Name
);
Name
The name of the event.

IFMODStudioModule::GetBankPath

Get the disk path for a bank asset.

FString GetBankPath(
    const UFMODBank &Bank
);
Bank
The bank to retrieve the disk path for.

IFMODStudioModule::GetAllBankPaths

Get the disk paths for all Banks.

void GetAllBankPaths(
    TArray<FString> &Paths,
    bool IncludeMasterBank
);
Paths
An array of strings for the paths to be assigned to.
IncludeMasterBank
Should the Master Bank path be included.

IFMODStudioModule::ReloadBanks

Called by the editor module when banks have been modified on disk.

void ReloadBanks();

IFMODStudioModule::SetLocale

Set active locale. Locale must be the locale name of one of the configured project locales.

bool SetLocale(
    const FString& Locale
);
Locale
The language to use.

IFMODStudioModule::GetLocale

Get current locale.

FString GetLocale();

IFMODStudioModule::GetEventDescription

Get an event description. The system type can control which Studio system to use, or leave it as System_Max for it to choose automatically.

FMOD::Studio::EventDescription *GetEventDescription(
    const UFMODEvent *Event,
    FMODSystemContext::Type Context = EFMODSystemContext::Max
);
Event
The event to retrieve the description of.
Context
System context to use.

See Also: EFMODSystemContext.

IFMODStudioModule::CreateAuditioningInstance

Create a single auditioning instance using the auditioning system.

FMOD::Studio::EventInstance *CreateAuditioningInstance(
    const UFMODEvent *Event
);
Event
The event to audition.

IFMODStudioModule::StopAuditioningInstance

Stop any auditioning instance.

void StopAuditioningInstance();

IFMODStudioModule::HasListenerMoved

Return whether the listener(s) have moved.

bool HasListenerMoved();

IFMODStudioModule::SetListenerPosition

Used to update a listener's position.

void SetListenerPosition(
    int ListenerIndex,
    UWorld *World,
    FTransform &ListenerTransform,
    float DeltaSeconds
);
ListenerIndex
Which listener position to change.
World
The current map.
ListenerTransform
New transform of the listener.
DeltaSeconds
How many seconds it should take to get there.

IFMODStudioModule::FinishSetListenerPosition

Used to update the listener positions.

void FinishSetListenerPosition(
    int NumListeners
);
NumListeners
The number of listeners to change the positions of.

IFMODStudioModule::GetNearestListener

Return the audio settings for the listener nearest the given location.

const FFMODListener &GetNearestListener(
    const FVector &Location
);
Location
Unreal Vector position.

IFMODStudioModule::GetFailedBankLoads

Return a list of banks that failed to load due to an error.

TArray<FString> GetFailedBankLoads(
    EFMODSystemContext::Type Context
);
Context
System context to use.

See Also: EFMODSystemContext.

IFMODStudioModule::BanksReloadedEvent

This event is fired after all banks were reloaded.

FSimpleMulticastDelegate &BanksReloadedEvent();

IFMODStudioModule::GetRequiredPlugins

Return a list of plugins that appear to be needed.

TArray<FString> GetRequiredPlugins();

IFMODStudioModule::AddRequiredPlugin

Register a plugin that is required.

void AddRequiredPlugin(
    const FString &Plugin
);
Plugin
The plugin to be registered.

IFMODStudioModule::UseSound

Returns whether sound is enabled for the game.

bool UseSound();

IFMODStudioModule::LoadPlugin

Attempts to load a plugin by name.

bool LoadPlugin(
    EFMODSystemContext::Type Context,
    const TCHAR *ShortName
);
Context
System context to use.
ShortName
Name of the plugin.

See Also: EFMODSystemContext.

IFMODStudioModule::LogError

Log an FMOD error.

void LogError(
    int result,
    const char *function
);
result
Result of FMOD function call.
function
The name of the function.

IFMODStudioEditorModule::AreBanksLoaded

This returns true if the plugin has loaded all required banks on startup. Depending if bLoadAllBanks is checked, this could be all banks or just the Master and Strings Bank.

bool AreBanksLoaded();