Python Reference Guide
 
Loading...
Searching...
No Matches
FBAudioClip Class Reference

Used to play audio clips and access their properties. More...

#include <pyfbsdk_generated.h>

Inheritance diagram for FBAudioClip:

Public Member Functions

 FBAudioClip (str pFileName, bool pSetToDefaultDest=True)
 Constructor.
 
 FBDelete ()
 Virtual FBDelete function.
 
bool FileOpen (str pPath)
 Load an audio clip file.
 
bool IsMediaReady ()
 Check if the audio clip constructed properly.
 
bool Play (FBTriggerStyle pStyle=kFBTriggerStyleContinue, FBAudioOut pDestination=None)
 Play audio clip now.
 
 Stop (FBAudioOut pDestination=None)
 Stop any playing triggered audio clip on a specified destination.
 
- Public Member Functions inherited from FBComponent
 FBComponent ()
 Constructor.
 
str ClassName ()
 Get the class name.
 
 DisableObjectFlags (FBObjectFlag pFlags)
 Disable a specific Object Flags.
 
 EnableObjectFlags (FBObjectFlag pFlags)
 Enable a specific Object Flags.
 
bool FBCreate ()
 Open Reality Creation function.
 
 FBDelete ()
 Open Reality deletion function.
 
 FBDestroy ()
 Open Reality destruction function.
 
FBObjectFlag GetObjectFlags ()
 Get all Object Flags (concatenated).
 
bool GetObjectStatus (FBObjectStatus pStatus)
 Check to see if an object status is enabled.
 
FBFileReference GetOwnerFileReference (p0)
 Get the owner FileReference object.
 
 HardSelect ()
 HardSelect.
 
bool HasObjectFlags (FBObjectFlag pFlags)
 Check whether a specific object flag is enabled.
 
bool Is (int pTypeId)
 Returns true if object is of type TypeId.
 
bool ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessNamespaceHierarchy.
 
bool ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessObjectNamespace.
 
int PropertyAdd (FBProperty pProperty)
 Add a property to the component's property manager.
 
bool PropertyAddReferenceProperty (FBProperty pReferenceProperty)
 Add a reference property to the component's property manager.
 
FBProperty PropertyCreate (str pName, FBType pType, str pDataType, bool pAnimatable, bool pIsUser=False, FBProperty pReferenceSource=None)
 Create user or dynamic property.
 
 PropertyGetModifiedList (FBArrayTemplate< FB > pPropList, FBPlugModificationFlag pModificationFlags)
 Get list of properties which have been modified since last loading.
 
 PropertyRemove (FBProperty pProperty)
 Remove a Property from the component's Property manager.
 
 SetObjectFlags (FBObjectFlag pFlags)
 SetObjectFlags.
 
 SetObjectStatus (FBObjectStatus pStatus, bool pValue)
 Enable/Disable a specific Object Status.
 

Public Attributes

FBAccessMode AccessMode
 Read Write Property: Specify the media data access mode between disk or memory.

 
int Bits
 Read Only Property: the bits of media.

 
int Channels
 Read Only Property: the number of channels in use.

 
float ClipSpeed
 Read Write Property: The speed of the media when being played.

 
bool ConstrainDstToTake
 Read Write Property: Indicates whether to constrain the EndPoint to the end of the take.

 
FBTake CurrentTake
 Read Write Property: The take this media belongs to.

 
FBAudioOut Destination
 Read Write Property: The audio output destination where the clip will be played.

 
FBTime DstDuration
 Read Write Property: When not used in the Story, this specify when the clips stops playing.

 
FBTime DstEnd
 Read Write Property: Total duration of this audio clip.

 
FBTime DstIn
 Read Write Property: When not used in the Story, this specify when the clips begin to play.

 
int Format
 Read Only Property: Data format of media, including rate, bits and channels count. You can typecast it to a FBAudioFmt.

 
bool LockClipSpeed
 Read Write Property: Indicates whether to lock the current playing speed.

 
bool LockPitchToSpeed
 Read Write Property: Time stretch enabled factor.

 
str Path
 Read Only Property: Full Path of the media.

 
float Pitch
 Read Write Property: The audio clip pitch value. To write to this property, you must first set LockPitchToSpeed property to false.

 
int Rate
 Read Only Property: the rate of media.

 
str RelativePath
 Read Only Property: Relative path of media.

 
bool Scrubbing
 Read Write Property: Control which clip (one at a time) can shuttle when playing a various speeds.

 
FBTime SrcDuration
 Read Only Property: The duration time of media.

 
FBTime SrcEnd
 Read Only Property: The end time of media.

 
FBTime SrcIn
 Read Only Property: The begin time of media.

 
FBUseChnMode UseChannel
 Read Write Property: Enables you to control which track are used with stereo clips.

 
- Public Attributes inherited from FBComponent
FBListComponent Components
 List: List of components.

 
str LongName
 Read Write Property: Name and namespace for object.

 
str Name
 Read Write Property: Unique name of object. See sample: RemoveSuffixFromNameOfSceneElements.py.
 
FBListComponent Parents
 List: Parents.

 
FBManager PropertyList
 Read Only Property: Manages all of the properties for the component.

 
bool Selected
 Read Write Property: Selected property.

 
int TypeInfo
 Contains the Type information of the object.

 
- Public Attributes inherited from FBPlug
str ClassGroupName
 ClassGroupName of the object.

 
int TypeInfo
 TypeInfo.

 

Detailed Description

Used to play audio clips and access their properties.


This class permits you to access audio clip's properties to read or change them.

See sample: AudioTrackSetupTool.py.

Constructor & Destructor Documentation

◆ FBAudioClip()

FBAudioClip ( str  pFileName,
bool  pSetToDefaultDest = True 
)

Constructor.

Parameters
pFileNameThe complete file path of the media file to access.
pSetToDefaultDestIf true and the media file open successfully, it will automatically be connected to an output device.

Member Function Documentation

◆ FBDelete()

FBDelete ( )

Virtual FBDelete function.

See sample: DeleteHierarchy.py.

◆ FileOpen()

bool FileOpen ( str  pPath)

Load an audio clip file.

Parameters
pPathThe filesystem path of the audio clip file to load.
Returns
true if the audio clip loaded successfully.

◆ IsMediaReady()

bool IsMediaReady ( )

Check if the audio clip constructed properly.

Returns
true if the audio clip was constructed properly.

◆ Play()

bool Play ( FBTriggerStyle  pStyle = kFBTriggerStyleContinue,
FBAudioOut  pDestination = None 
)

Play audio clip now.

Parameters
pStyleHow the audio clip should be triggered.
pDestinationWhere the audio clip should be played. If NULL, it will play on the default destination.
Returns
Return true if the buffer for the audio clip was successfully allocated so that you can hear the sound.

◆ Stop()

Stop ( FBAudioOut  pDestination = None)

Stop any playing triggered audio clip on a specified destination.

Parameters
pDestinationWhere the audio clip is playing. If NULL, the default destination will be used.

Member Data Documentation

◆ AccessMode

FBAccessMode AccessMode

Read Write Property: Specify the media data access mode between disk or memory.

◆ Bits

int Bits

Read Only Property: the bits of media.

◆ Channels

int Channels

Read Only Property: the number of channels in use.

◆ ClipSpeed

float ClipSpeed

Read Write Property: The speed of the media when being played.

◆ ConstrainDstToTake

bool ConstrainDstToTake

Read Write Property: Indicates whether to constrain the EndPoint to the end of the take.

◆ CurrentTake

FBTake CurrentTake

Read Write Property: The take this media belongs to.

◆ Destination

FBAudioOut Destination

Read Write Property: The audio output destination where the clip will be played.

◆ DstDuration

FBTime DstDuration

Read Write Property: When not used in the Story, this specify when the clips stops playing.

◆ DstEnd

FBTime DstEnd

Read Write Property: Total duration of this audio clip.

◆ DstIn

FBTime DstIn

Read Write Property: When not used in the Story, this specify when the clips begin to play.

◆ Format

int Format

Read Only Property: Data format of media, including rate, bits and channels count. You can typecast it to a FBAudioFmt.

◆ LockClipSpeed

bool LockClipSpeed

Read Write Property: Indicates whether to lock the current playing speed.

◆ LockPitchToSpeed

bool LockPitchToSpeed

Read Write Property: Time stretch enabled factor.

◆ Path

str Path

Read Only Property: Full Path of the media.

◆ Pitch

float Pitch

Read Write Property: The audio clip pitch value. To write to this property, you must first set LockPitchToSpeed property to false.

◆ Rate

int Rate

Read Only Property: the rate of media.

◆ RelativePath

str RelativePath

Read Only Property: Relative path of media.

◆ Scrubbing

bool Scrubbing

Read Write Property: Control which clip (one at a time) can shuttle when playing a various speeds.

◆ SrcDuration

FBTime SrcDuration

Read Only Property: The duration time of media.

◆ SrcEnd

FBTime SrcEnd

Read Only Property: The end time of media.

◆ SrcIn

FBTime SrcIn

Read Only Property: The begin time of media.

◆ UseChannel

FBUseChnMode UseChannel

Read Write Property: Enables you to control which track are used with stereo clips.