Public Member Functions | Public Attributes

FBAudioClip Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2013, FBApplication - File I/O and Application Utilities, File Input and Output, Audio / video.


Search for all occurrences

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.

Definition at line 134 of file fbaudio.h.

#include <fbaudio.h>

Inheritance diagram for FBAudioClip:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  FBAudioClip (const char *pFileName, bool pSetToDefaultDest=true, HIObject pObject=NULL)
  Constructor.
virtual void  FBDelete ()
  Virtual FBDelete function.
bool  Play (FBTriggerStyle pStyle=kFBTriggerStyleContinue, HFBAudioOut pDestination=NULL)
  Play audio clip now.
void  Stop (HFBAudioOut pDestination=NULL)
  Stop any playing triggered audio clip on a specified destination.
bool  IsMediaReady ()
  Check if the audio clip constructed properly.
bool  FileOpen (char 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.
FBPropertyInt  Format
  Read Only Property: Data format of media, including rate, bits and channels count.
FBPropertyInt  Channels
  Read Only Property: the number of channels in use.
FBPropertyInt  Rate
  Read Only Property: the rate of media.
FBPropertyInt  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.
FBPropertyDouble  ClipSpeed
  Read Write Property: The speed of the media when being played.
FBPropertyTime  SrcIn
  Read Only Property: The begin time of media.
FBPropertyTime  SrcDuration
  Read Only Property: The duration time of media.
FBPropertyTime  SrcEnd
  Read Only Property: The end time of media.
FBPropertyTime  InPoint
  [Deprecated]Read Write Property: Refer to DstIn.
FBPropertyTime  DstIn
  Read Write Property: When not used in the Story, this specify when the clips begin to play.
FBPropertyTime  Duration
  [Deprecated]Read Write Property: Refer to DstDuration.
FBPropertyTime  DstDuration
  Read Write Property: When not used in the Story, this specify when the clips stops playing.
FBPropertyTime  EndPoint
  [Deprecated]Read Write Property: Refer to DstEnd.
FBPropertyTime  DstEnd
  Read Write Property: Total duration of this audio clip.
FBPropertyBool  TakeSetsInPoint
  [Deprecated]Read Write Property: Indicates whether to lock the InPoint to the start of the take.
FBPropertyBool  ConstrainDstToTake
  Read Write Property: Indicates whether to constrain the EndPoint to the end of the take.
FBPropertyBool  Scrubbing
  Read Write Property: Control which clip (one at a time) can shuttle when playing a various speeds.
FBPropertyBool  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.

Constructor & Destructor Documentation

FBAudioClip ( const char *  pFileName,
bool  pSetToDefaultDest = true,
HIObject  pObject = NULL 
)

Constructor.

Parameters:
pFileName The complete file path of the media file to access.
pSetToDefaultDest If true and the media file open successfully, it will automatically be connected to an output device.
pObject For internal use only.

Member Function Documentation

virtual void FBDelete ( ) [virtual]

Virtual FBDelete function.

Reimplemented from FBComponent.

bool Play ( FBTriggerStyle  pStyle = kFBTriggerStyleContinue,
HFBAudioOut  pDestination = NULL 
)

Play audio clip now.

Parameters:
pStyle How the audio clip should be triggered.
pDestination Where 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.
void Stop ( HFBAudioOut  pDestination = NULL )

Stop any playing triggered audio clip on a specified destination.

Parameters:
pDestination Where 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 ( char const *  pPath )

Load an audio clip file.

Parameters:
pPath The 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.

Definition at line 175 of file fbaudio.h.

[Deprecated]Read Only Property: Refer to Path

Definition at line 176 of file fbaudio.h.

Read Only Property: Relative path of media.

Definition at line 177 of file fbaudio.h.

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

You can typecast it to a FBAudioFmt.

Definition at line 179 of file fbaudio.h.

Read Only Property: the number of channels in use.

Definition at line 180 of file fbaudio.h.

Read Only Property: the rate of media.

Definition at line 181 of file fbaudio.h.

Read Only Property: the bits of media.

Definition at line 182 of file fbaudio.h.

FBPropertyAccessMode AccessMode

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

Definition at line 183 of file fbaudio.h.

FBPropertyUseChnMode UseChannel

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

Definition at line 184 of file fbaudio.h.

FBPropertyUseChnMode UseChannelMode

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

Definition at line 185 of file fbaudio.h.

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

Definition at line 186 of file fbaudio.h.

Read Only Property: The begin time of media.

Definition at line 188 of file fbaudio.h.

Read Only Property: The duration time of media.

Definition at line 189 of file fbaudio.h.

Read Only Property: The end time of media.

Definition at line 190 of file fbaudio.h.

[Deprecated]Read Write Property: Refer to DstIn.

Definition at line 192 of file fbaudio.h.

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

Definition at line 193 of file fbaudio.h.

[Deprecated]Read Write Property: Refer to DstDuration.

Definition at line 194 of file fbaudio.h.

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

Definition at line 195 of file fbaudio.h.

[Deprecated]Read Write Property: Refer to DstEnd.

Definition at line 196 of file fbaudio.h.

Read Write Property: Total duration of this audio clip.

Definition at line 197 of file fbaudio.h.

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

Definition at line 199 of file fbaudio.h.

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

Definition at line 200 of file fbaudio.h.

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

Definition at line 201 of file fbaudio.h.

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

Definition at line 202 of file fbaudio.h.

FBPropertyTake CurrentTake

Read Write Property: The take this media belongs to.

Definition at line 204 of file fbaudio.h.

FBPropertyAudioOut Destination

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

Definition at line 205 of file fbaudio.h.


The documentation for this class was generated from the following file:

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