# API Reference | IFMODStudioModule

# 6. 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.
- IFMODStudioModule::IsAvailable Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
- IFMODStudioModule::GetStudioSystem Get a pointer to the runtime studio system (only valid in-game or in PIE).
- IFMODStudioModule::SetSystemPaused Set system paused.
- IFMODStudioModule::SetInPIE Called when we enter or leave PIE mode.
- IFMODStudioModule::FindAssetByName Look up an asset given its name.
- IFMODStudioModule::FindEventByName Look up an event given its name.
- IFMODStudioModule::GetBankPath Get the disk path for a bank asset.
- IFMODStudioModule::GetAllBankPaths Get the disk paths for all Banks.
- 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.
- IFMODStudioModule::CreateAuditioningInstance Create a single auditioning instance using the auditioning system.
- IFMODStudioModule::StopAuditioningInstance Stop any auditioning instance.
- IFMODStudioModule::HasListenerMoved Return whether the listener(s) have moved.
- IFMODStudioModule::SetListenerPosition Used to update a listener's position.
- IFMODStudioModule::FinishSetListenerPosition Used to update the listener positions.
- IFMODStudioModule::GetNearestListener Return the audio settings for the listener nearest the given location.
- IFMODStudioModule::GetFailedBankLoads Return a list of banks that failed to load due to an error.
- IFMODStudioModule::GetRequiredPlugins Return a list of plugins that appear to be needed.
- IFMODStudioModule::AddRequiredPlugin Register a plugin that is required.
- IFMODStudioModule::UseSound Returns whether sound is enabled for the game.
- IFMODStudioModule::LoadPlugin Attempts to load a plugin by name.
- IFMODStudioModule::LogError Log an FMOD error.
- IFMODStudioModule::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.
- IFMODStudioModule::SetLocale Set active locale. Locale must be the locale name of one of the configured project locales.
- IFMODStudioModule::GetLocale Get current locale.
- IFMODStudioModule::GetDefaultLocale Get the current default locale.
- IFMODStudioModule::PreEndPIE A function called by FFMODStudioEditorModule as the PIE is ending so that the FMODStudioModule can clean up.
- IFMODStudioModule::PreEndPIEEvent Returns a delegate that gets triggered as the Play-In-Editor session is stopped but before the FMOD System is shutdown.
- IFMODStudioModule::ReloadBanks Called by the editor module when banks have been modified on disk.
- IFMODStudioModule::LoadEditorBanks Load banks using the Editor System Context.
- IFMODStudioModule::UnloadEditorBanks Unload banks using the Editor System Context.

## IFMODStudioModule::AddRequiredPlugin

Register a plugin that is required.

    void AddRequiredPlugin(
        const FString &Plugin
    );

Plugin
  The plugin to be registered.

## IFMODStudioModule::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();

## IFMODStudioModule::CreateAuditioningInstance

Create a single auditioning instance using the auditioning system.

    FMOD::Studio::EventInstance *CreateAuditioningInstance(
        const UFMODEvent *Event
    );

Event
  The event to audition.

## 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::FinishSetListenerPosition

Used to update the listener positions.

    void FinishSetListenerPosition(
        int NumListeners
    );

NumListeners
  The number of listeners to change the positions of.

## 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::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::GetBankPath

Get the disk path for a bank asset.

    FString GetBankPath(
        const UFMODBank &Bank
    );

Bank
  The bank to retrieve the disk path for.

## IFMODStudioModule::GetDefaultLocale

Get the current default locale.

    FString GetDefaultLocale();

## 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::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::GetLocale

Get current locale.

    FString GetLocale();

## IFMODStudioModule::GetNearestListener

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

    const FFMODListener &GetNearestListener(
        const FVector &Location
    );

Location
  Unreal Vector position.

## IFMODStudioModule::GetRequiredPlugins

Return a list of plugins that appear to be needed.

    TArray<FString> GetRequiredPlugins();

## 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::HasListenerMoved

Return whether the listener(s) have moved.

    bool HasListenerMoved();

## 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::LoadEditorBanks

Load banks using the Editor System Context.

    void LoadEditorBanks();

See Also: EFMODSystemContext.

## 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.

## IFMODStudioModule::PreEndPIE

A function called by FFMODStudioEditorModule as the PIE is ending so that the FMODStudioModule can clean up.

    void PreEndPIE()

## IFMODStudioModule::PreEndPIEEvent

Returns a delegate that gets triggered as the Play-In-Editor session is stopped but before the FMOD System is shutdown.

    FSimpleMulticastDelegate &PreEndPIEEvent()

## IFMODStudioModule::ReloadBanks

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

    void ReloadBanks();

## IFMODStudioModule::SetInPIE

Called when we enter or leave PIE mode.

    void SetInPIE(
        bool bInPIE,
        bool bSimulating
    );

bInPIE
  Currently in PIE.
bSimulating
  Currently simulating.

## 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::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::SetSystemPaused

Set system paused.

    void SetSystemPaused(
        bool paused
    );

paused
  Should the system be paused.

## IFMODStudioModule::StopAuditioningInstance

Stop any auditioning instance.

    void StopAuditioningInstance();

## IFMODStudioModule::UnloadEditorBanks

Unload banks using the Editor System Context.

    void UnloadEditorBanks();

See Also: EFMODSystemContext.

## IFMODStudioModule::UseSound

Returns whether sound is enabled for the game.

    bool UseSound();