FBAudioClip Class Reference


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.

Examples
ComplexTools/AudioTrackSetupTool.py
Inheritance diagram for FBAudioClip:

List of all members.

Public Member Functions

 __init__ (str pFileName, bool pSetToDefaultDest=True, object pObject=None)
 Constructor.
 FBDelete ()
 Virtual FBDelete function.
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.
bool IsMediaReady ()
 Check if the audio clip constructed properly.
bool FileOpen (const pPath)
 Load an audio clip file.

Public Attributes

FBPropertyString Path
 Read Only Property: Full Path of the media.
FBPropertyString Filename
 [Deprecated]Read Only Property: Refer to Path.
FBPropertyString RelativePath
 Read Only Property: Relative path of media.
FBPropertyBase Format
 Read Only Property: Data format of media, including rate, bits and channels count.
FBPropertyBase Channels
 Read Only Property: the number of channels in use.
FBPropertyBase Rate
 Read Only Property: the rate of media.
FBPropertyBase Bits
 Read Only Property: the bits of media.
FBPropertyAccessMode AccessMode
 Read Write Property: Specify the media data access mode between disk or memory.
FBPropertyUseChnMode UseChannel
 Read Write Property: Enables you to control which track are used with stereo clips.
FBPropertyUseChnMode UseChannelMode
 [Deprecated]Read Write Property: Enables you to control which track are used with stereo clips.
FBPropertyBase ClipSpeed
 Read Write Property: The speed of the media when being played.
FBPropertyBase SrcIn
 Read Only Property: The begin time of media.
FBPropertyBase SrcDuration
 Read Only Property: The duration time of media.
FBPropertyBase SrcEnd
 Read Only Property: The end time of media.
FBPropertyBase InPoint
 [Deprecated]Read Write Property: Refer to DstIn.
FBPropertyBase DstIn
 Read Write Property: When not used in the Story, this specify when the clips begin to play.
FBPropertyBase Duration
 [Deprecated]Read Write Property: Refer to DstDuration.
FBPropertyBase DstDuration
 Read Write Property: When not used in the Story, this specify when the clips stops playing.
FBPropertyBase EndPoint
 [Deprecated]Read Write Property: Refer to DstEnd.
FBPropertyBase DstEnd
 Read Write Property: Total duration of this audio clip.
FBPropertyBase TakeSetsInPoint
 [Deprecated]Read Write Property: Indicates whether to lock the InPoint to the start of the take.
FBPropertyBase ConstrainDstToTake
 Read Write Property: Indicates whether to constrain the EndPoint to the end of the take.
FBPropertyBase Scrubbing
 Read Write Property: Control which clip (one at a time) can shuttle when playing a various speeds.
FBPropertyBase LockClipSpeed
 Read Write Property: Indicates whether to lock the current playing speed.
FBPropertyTake CurrentTake
 Read Write Property: The take this media belongs to.
FBPropertyAudioOut Destination
 Read Write Property: The audio output destination where the clip will be played.

Member Function Documentation

__init__ ( str  pFileName,
bool  pSetToDefaultDest = True,
object  pObject = None 
)

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.
pObjectFor internal use only.
Examples
ComplexTools/AudioTrackSetupTool.py
FBDelete ( )

Virtual FBDelete function.

Examples
Tasks/DeleteHierarchy.py

Reimplemented from FBComponent.

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 ( 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.
bool IsMediaReady ( )

Check if the audio clip constructed properly.

Returns:
true if the audio clip was constructed properly.
bool FileOpen ( const 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.

Member Data Documentation

Read Only Property: Full Path of the media.

[Deprecated]Read Only Property: Refer to Path.

Read Only Property: Relative path of media.

FBPropertyBase Format

Read Only Property: Data format of media, including rate, bits and channels count.

You can typecast it to a FBAudioFmt.

FBPropertyBase Channels

Read Only Property: the number of channels in use.

FBPropertyBase Rate

Read Only Property: the rate of media.

FBPropertyBase Bits

Read Only Property: the bits of media.

FBPropertyAccessMode AccessMode

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

FBPropertyUseChnMode UseChannel

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

FBPropertyUseChnMode UseChannelMode

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

FBPropertyBase ClipSpeed

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

FBPropertyBase SrcIn

Read Only Property: The begin time of media.

FBPropertyBase SrcDuration

Read Only Property: The duration time of media.

FBPropertyBase SrcEnd

Read Only Property: The end time of media.

FBPropertyBase InPoint

[Deprecated]Read Write Property: Refer to DstIn.

FBPropertyBase DstIn

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

FBPropertyBase Duration

[Deprecated]Read Write Property: Refer to DstDuration.

FBPropertyBase DstDuration

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

FBPropertyBase EndPoint

[Deprecated]Read Write Property: Refer to DstEnd.

FBPropertyBase DstEnd

Read Write Property: Total duration of this audio clip.

FBPropertyBase TakeSetsInPoint

[Deprecated]Read Write Property: Indicates whether to lock the InPoint to the start of the take.

FBPropertyBase ConstrainDstToTake

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

FBPropertyBase Scrubbing

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

FBPropertyBase LockClipSpeed

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

FBPropertyTake CurrentTake

Read Write Property: The take this media belongs to.

FBPropertyAudioOut Destination

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


FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip
FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip FBAudioClip