engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
Audio::IAudioMixerPlatformInterface类 参考abstract

Abstract interface for mixer platform. 更多...

#include <AudioMixer.h>

+ 类 Audio::IAudioMixerPlatformInterface 继承关系图:

Public 成员函数

virtual bool CheckAudioDeviceChange ()
 Check if audio device changed if applicable. 更多...
 
virtual bool CloseAudioStream ()=0
 Closes the audio stream (if it's open).
 
virtual ICompressedAudioInfo * CreateCompressedAudioInfo (USoundWave *SoundWave)=0
 Creates a Compressed audio info class suitable for decompressing this SoundWave.
 
virtual bool DisablePCMAudioCaching () const
 Whether or not the platform disables caching of decompressed PCM data (i.e. 更多...
 
virtual void FadeIn ()
 Reset the fade state (use if reusing audio platform interface, e.g. 更多...
 
virtual void FadeOut ()
 Start a fadeout. 更多...
 
virtual FString GetCurrentDeviceName ()
 Returns the name of the currently used audio device.
 
virtual FString GetDefaultDeviceName ()=0
 Return any optional device name defined in platform configuratio.
 
virtual bool GetDefaultOutputDeviceIndex (uint32 &OutDefaultDeviceIndex) const
 Returns the default device index.
 
virtual int32 GetIndexForDevice (const FString &InDeviceName)
 Can be used to look up the current index for a given device name. 更多...
 
FString GetLastError () const
 Returns the last error generated.
 
virtual int32 GetNumFrames (const int32 InNumReqestedFrames)
 Allows platforms to filter the requested number of frames to render. 更多...
 
virtual bool GetNumOutputDevices (uint32 &OutNumOutputDevices)
 Returns the number of output devices.
 
virtual bool GetOutputDeviceInfo (const uint32 InDeviceIndex, FAudioPlatformDeviceInfo &OutInfo)=0
 Gets the device information of the given device index.
 
virtual EAudioMixerPlatformApi::Type GetPlatformApi () const =0
 Returns the platform API enumeration.
 
virtual FAudioPlatformDeviceInfo GetPlatformDeviceInfo () const =0
 Returns the platform device info of the currently open audio stream.
 
virtual FAudioPlatformSettings GetPlatformSettings () const =0
 Gets the platform specific audio settings.
 
virtual FName GetRuntimeFormat (USoundWave *InSoundWave)=0
 Returns the name of the format of the input sound wave.
 
virtual class FSingleThreadRunnable * GetSingleThreadInterface () override
 FSingleThreadRunnable accessor for ticking this FRunnable when multi-threading is disabled. 更多...
 
virtual bool HasCompressedAudioInfoClass (USoundWave *InSoundWave)=0
 Checks if the platform has a compressed audio format for sound waves.
 
 IAudioMixerPlatformInterface ()
 Constructor.
 
virtual bool InitializeHardware ()=0
 Initialize the hardware.
 
virtual bool IsInitialized () const =0
 Is the hardware initialized.
 
virtual bool IsNonRealtime () const
 Whether this is an interface for a non-realtime renderer. 更多...
 
virtual bool MoveAudioStreamToNewAudioDevice (const FString &InNewDeviceId)
 Resets the audio stream to use a new audio device with the given device ID (empty string means default).
 
virtual bool OpenAudioStream (const FAudioMixerOpenStreamParams &Params)=0
 Opens up a new audio stream with the given parameters.
 
void PostInitializeHardware ()
 This is called after InitializeHardware() is called.
 
void ReadNextBuffer ()
 Retrieves the next generated buffer and feeds it to the platform mixer output stream.
 
virtual void ResumePlaybackOnNewDevice ()
 Resumes playback on new audio device after device change.
 
uint32 Run () override
 Runs the runnable object. 更多...
 
virtual bool StartAudioStream ()=0
 Starts the audio stream processing and generating audio.
 
virtual bool StopAudioStream ()=0
 Stops the audio stream (but keeps the audio stream open).
 
virtual void SubmitBuffer (const uint8 *Buffer)
 Submit the given buffer to the platform's output audio device.
 
virtual bool SupportsHardwareDecompression () const
 Whether or not this platform has hardware decompression.
 
virtual bool SupportsRealtimeDecompression () const
 Whether or not the platform supports realtime decompression.
 
virtual bool TeardownHardware ()=0
 Teardown the hardware.
 
virtual ~IAudioMixerPlatformInterface ()
 Virtual destructor.
 
- Public 成员函数 继承自 FRunnable
virtual void Exit ()
 Exits the runnable object. 更多...
 
virtual class FSingleThreadRunnable * GetSingleThreadInterface ()
 Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled. 更多...
 
virtual bool Init ()
 Initializes the runnable object. 更多...
 
virtual uint32 Run ()=0
 Runs the runnable object. 更多...
 
virtual void Stop ()
 Stops the runnable object. 更多...
 
virtual ~FRunnable ()
 Virtual destructor
 

Protected 成员函数

void ApplyMasterAttenuation (TArrayView< const uint8 > &InOutPoppedAudio)
 Performs buffer fades for shutdown/startup of audio mixer.
 
void BeginGeneratingAudio ()
 Start generating audio from our mixer.
 
void OnAudioMixerPlatformError (const FString &ErrorDetails, const FString &FileName, int32 LineNumber)
 Is called when an error is generated. 更多...
 
void StartRunningNullDevice ()
 When called, spins up a thread to start consuming output when no audio device is available.
 
void StopGeneratingAudio ()
 Stops the render thread from generating audio.
 
void StopRunningNullDevice ()
 When called, terminates the null device.
 

Protected 属性

FEvent * AudioFadeEvent
 Event allows you to block until fadeout is complete.
 
FEvent * AudioRenderEvent
 The render thread sync event.
 
FRunnableThread * AudioRenderThread
 The audio render thread.
 
FAudioOutputStreamInfo AudioStreamInfo
 The audio device stream info.
 
FThreadSafeBool bIsInDeviceSwap
 This is used if we are attempting to TryLock on DeviceSwapCriticalSection, but a buffer callback is being called in the current thread.
 
bool bWarnedBufferUnderrun
 Whether or not we warned of buffer underrun.
 
FString CurrentDeviceName
 This device name can be used to override the default device being used on platforms that use strings to identify audio devices.
 
FCriticalSection DeviceSwapCriticalSection
 Critical Section used for times when we need the render loop to halt for the device swap.
 
FParam FadeParam
 Source param used to fade in and out audio device.
 
float FadeVolume
 The fade value. 更多...
 
FString LastError
 String containing the last generated error.
 
int32 NumOutputBuffers
 The number of mixer buffers to queue on the output source voice.
 
Audio::FOutputBuffer OutputBuffer
 List of generated output buffers.
 

详细描述

Abstract interface for mixer platform.

成员函数说明

◆ CheckAudioDeviceChange()

virtual bool Audio::IAudioMixerPlatformInterface::CheckAudioDeviceChange ( )
inlinevirtual

Check if audio device changed if applicable.

Return true if audio device changed.

◆ DisablePCMAudioCaching()

virtual bool Audio::IAudioMixerPlatformInterface::DisablePCMAudioCaching ( ) const
inlinevirtual

Whether or not the platform disables caching of decompressed PCM data (i.e.

to save memory on fixed memory platforms)

◆ FadeIn()

virtual void Audio::IAudioMixerPlatformInterface::FadeIn ( )
virtual

Reset the fade state (use if reusing audio platform interface, e.g.

in main audio device.

◆ FadeOut()

virtual void Audio::IAudioMixerPlatformInterface::FadeOut ( )
virtual

Start a fadeout.

Prevents pops during shutdown.

◆ GetIndexForDevice()

virtual int32 Audio::IAudioMixerPlatformInterface::GetIndexForDevice ( const FString &  InDeviceName)
virtual

Can be used to look up the current index for a given device name.

On most platforms, this index may be invalidated if any devices are added or removed. Returns INDEX_NONE if no mapping is found

◆ GetNumFrames()

virtual int32 Audio::IAudioMixerPlatformInterface::GetNumFrames ( const int32  InNumReqestedFrames)
inlinevirtual

Allows platforms to filter the requested number of frames to render.

Some platforms only support specific frame counts.

◆ GetSingleThreadInterface()

virtual class FSingleThreadRunnable * Audio::IAudioMixerPlatformInterface::GetSingleThreadInterface ( )
inlineoverridevirtual

FSingleThreadRunnable accessor for ticking this FRunnable when multi-threading is disabled.

返回
FSingleThreadRunnable Interface for this FRunnable object.

重载 FRunnable .

◆ IsNonRealtime()

virtual bool Audio::IAudioMixerPlatformInterface::IsNonRealtime ( ) const
inlinevirtual

Whether this is an interface for a non-realtime renderer.

If true, synch events will behave differently to avoid deadlocks.

◆ OnAudioMixerPlatformError()

void Audio::IAudioMixerPlatformInterface::OnAudioMixerPlatformError ( const FString &  ErrorDetails,
const FString &  FileName,
int32  LineNumber 
)
inlineprotected

Is called when an error is generated.

NO_LOGGING

◆ Run()

uint32 Audio::IAudioMixerPlatformInterface::Run ( )
overridevirtual

Runs the runnable object.

This is where all per object thread work is done. This is only called if the initialization was successful.

返回
The exit code of the runnable object
参见
Init, Stop, Exit

实现了 FRunnable.

类成员变量说明

◆ FadeVolume

float Audio::IAudioMixerPlatformInterface::FadeVolume
protected

The fade value.

Used for fading in/out master audio.


该类的文档由以下文件生成: