fbsdk/fbaudio.h Source File

fbaudio.h
Go to the documentation of this file.
1 #ifndef __FBAUDIO_H__
2 #define __FBAUDIO_H__
3 /**************************************************************************
4  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5  All Rights Reserved.
6 
7  The coded instructions, statements, computer programs, and/or related
8  material (collectively the "Data") in these files contain unpublished
9  information proprietary to Autodesk, Inc. and/or its licensors, which is
10  protected by Canada and United States of America federal copyright law
11  and by international treaties.
12 
13  The Data may not be disclosed or distributed to third parties, in whole
14  or in part, without the prior written consent of Autodesk, Inc.
15  ("Autodesk").
16 
17  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24  FREE.
25 
26  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
43 #include <kaydaradef.h>
44 #ifndef FBSDK_DLL
45 
48  #define FBSDK_DLL K_DLLIMPORT
49 #endif
50 
51 #include <fbsdk/fbcomponent.h>
52 #include <fbsdk/fbaudiofmt.h>
53 
54 #ifdef FBSDKUseNamespace
55  namespace FBSDKNamespace {
56 #endif
57 
58 __FB_FORWARD( FBAudioIn );
59 __FB_FORWARD( FBAudioOut );
60 __FB_FORWARD( FBAudioClip );
64 
69 };
70 
76 };
77 
83 };
84 
90 };
91 
98 };
99 
102 FB_DEFINE_ENUM(FBSDK_DLL, TriggerStyle);
103 FB_DEFINE_ENUM(FBSDK_DLL, ExistingClipAction);
104 FB_DEFINE_ENUM(FBSDK_DLL, ExistingFileAction);
105 
107 // FBAudioIn
109 
190 {
191  //--- Open Reality declaration.
193 public:
194 
198  FBAudioIn(HIObject pObject=NULL);
199 
200 
205  bool SetOnline( bool pOnline );
206 
210  bool IsOnline() const;
211 
212 
221  bool PrepareToRecord( const char* pRecordingPath,
222  FBExistingClipAction pExistingClipAction = kFBExistingClipAskUser,
223  FBExistingFileAction pExistingFileAction = kFBExistingFileAskUser );
224 
228  bool TurnOffRecording();
229 
233  bool IsReadyToRecord() const;
234 
235 
239  FBAudioFmt GetSupportedFormats() const;
240 
245  bool SetRecordingFormat( FBAudioFmt pAudioFormat );
246 
250  FBAudioFmt GetRecordingFormat() const;
251 
252 
257  bool SetDelay( FBTime& pDelay );
258 
262  FBTime GetDelay() const;
263 
264 
269  bool SetDestination( FBAudioOut* pAudioOut );
270 
274  FBAudioOut* GetDestination() const;
275 };
276 
278 // FBAudioOut
280 
284 {
285  //--- Open Reality declaration.
287 public:
288 
292  FBAudioOut(HIObject pObject=NULL);
293 };
294 
297 
299 // FBAudioClip
301 
305 {
306  //--- Open Reality declaration.
308 public:
309 
315  FBAudioClip(const char* pFileName, bool pSetToDefaultDest=true, HIObject pObject=NULL);
316 
319  virtual void FBDelete();
320 
326  bool Play(FBTriggerStyle pStyle=kFBTriggerStyleContinue, FBAudioOut* pDestination=NULL);
327 
331  void Stop(FBAudioOut* pDestination=NULL);
332 
336  bool IsMediaReady();
337 
342  bool FileOpen(char const * pPath);
343 
344 
348 
357 
361 
368 
373 
376 
379 };
380 
384 {
385 public:
391  FBAudioIn* operator[](int pIndex);
392 };
393 
396 {
397 public:
403  FBAudioOut* operator[](int pIndex);
404 };
405 
408 {
409 public:
415  FBAudioClip* operator[](int pIndex);
416 };
417 
418 #ifdef FBSDKUseNamespace
419  }
420 #endif
421 #endif /* this must be the last line of this file */
FBPropertyInt Bits
Read Only Property: the bits of media.
Definition: fbaudio.h:352
FBPropertyString Filename
[Deprecated]Read Only Property: Refer to Path
Definition: fbaudio.h:346
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbaudio.h:48
FBTriggerStyle
Audio clips' trigger styles.
Definition: fbaudio.h:79
Access data directly to disk using a cache system.
Definition: fbaudio.h:67
class FBPropertyBaseEnum< enum FBAccessMode > FBPropertyAccessMode
Definition: fbaudio.h:100
Right channel will be played in both speakers.
Definition: fbaudio.h:74
FBPropertyDouble ClipSpeed
Read Write Property: The speed of the media when being played.
Definition: fbaudio.h:356
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
Left channel will be played in both speakers.
Definition: fbaudio.h:73
Access data from memory, which means that it will copyed entirely into it.
Definition: fbaudio.h:68
FBPropertyTime SrcDuration
Read Only Property: The duration time of media.
Definition: fbaudio.h:359
FBPropertyString RelativePath
Read Only Property: Relative path of media.
Definition: fbaudio.h:347
FBPropertyTime DstIn
Read Write Property: When not used in the Story, this specify when the clips begin to play...
Definition: fbaudio.h:363
FBPropertyInt Channels
Read Only Property: the number of channels in use.
Definition: fbaudio.h:350
class FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
class FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
FBAudioOut * FBAudioOutGetDefault()
Get default audio output.
FBPropertyTime SrcIn
Read Only Property: The begin time of media.
Definition: fbaudio.h:358
FBPropertyTime DstEnd
Read Write Property: Total duration of this audio clip.
Definition: fbaudio.h:367
Audio Out class.
Definition: fbaudio.h:283
int FBAudioFmt
A type definition for FBAudioFmt.
Definition: fbaudiofmt.h:56
#define NULL
Definition: kaydara.h:169
FBPropertyBool ConstrainDstToTake
Read Write Property: Indicates whether to constrain the EndPoint to the end of the take...
Definition: fbaudio.h:370
FBPropertyInt Rate
Read Only Property: the rate of media.
Definition: fbaudio.h:351
FBPropertyDouble Pitch
Read Write Property: The audio clip pitch value.
Definition: fbaudio.h:377
Ask the user for desired operation via a dialog.
Definition: fbaudio.h:94
Property class: const char * (String).
FBPropertyBool Scrubbing
Read Write Property: Control which clip (one at a time) can shuttle when playing a various speeds...
Definition: fbaudio.h:371
FBPropertyTime DstDuration
Read Write Property: When not used in the Story, this specify when the clips stops playing...
Definition: fbaudio.h:365
FBPropertyTime Duration
[Deprecated]Read Write Property: Refer to DstDuration.
Definition: fbaudio.h:364
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
Cancel preparing the audio in to record.
Definition: fbaudio.h:97
MotionBuilder SDK base class.
Definition: fbcomponent.h:668
FBPropertyTime EndPoint
[Deprecated]Read Write Property: Refer to DstEnd.
Definition: fbaudio.h:366
class FBPropertyBaseComponent< FBTake * > FBPropertyTake
Definition: fbdata.h:1239
Previously triggered clips that are still playing will be stopped.
Definition: fbaudio.h:81
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
Audio In class.
Definition: fbaudio.h:189
FBPropertyAccessMode AccessMode
Read Write Property: Specify the media data access mode between disk or memory.
Definition: fbaudio.h:353
FBPropertyTime SrcEnd
Read Only Property: The end time of media.
Definition: fbaudio.h:360
FBPropertyString Path
Read Only Property: Full Path of the media.
Definition: fbaudio.h:345
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:553
Remove the action clip from the scene.
Definition: fbaudio.h:88
Ask the user for desired operation via a dialog.
Definition: fbaudio.h:87
FBAccessMode
Data access modes.
Definition: fbaudio.h:66
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBPropertyBool TakeSetsInPoint
[Deprecated]Read Write Property: Indicates whether to lock the InPoint to the start of the take...
Definition: fbaudio.h:369
Default mode, where each channel play in its respective speaker.
Definition: fbaudio.h:75
Previously triggered clips that are still playing won't be stopped and mixing will occur...
Definition: fbaudio.h:80
FBExistingClipAction
Action to perform, when preparing an Audio In object to record, when the action clip associated to th...
Definition: fbaudio.h:86
Overwrite the existing file on disk.
Definition: fbaudio.h:95
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Audio formats definition.
Basic class definitions.
Time data structure.
Definition: fbtime.h:86
class FBPropertyBaseComponent< FBAudioOut * > FBPropertyAudioOut
Definition: fbaudio.h:62
If a previously triggered clip is playing, it will only be stopped, otherwise a new starts playing...
Definition: fbaudio.h:82
FBUseChnMode
Use Channel modes.
Definition: fbaudio.h:72
FBPropertyAudioOut Destination
Read Write Property: The audio output destination where the clip will be played.
Definition: fbaudio.h:375
FBPropertyTake CurrentTake
Read Write Property: The take this media belongs to.
Definition: fbaudio.h:374
FBPropertyInt Format
Read Only Property: Data format of media, including rate, bits and channels count.
Definition: fbaudio.h:349
Cancel preparing the audio in to record.
Definition: fbaudio.h:89
FBPropertyUseChnMode UseChannel
Read Write Property: Enables you to control which track are used with stereo clips.
Definition: fbaudio.h:354
Used to play audio clips and access their properties.
Definition: fbaudio.h:304
Append the new recording to existing recording.
Definition: fbaudio.h:96
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBPropertyTime InPoint
[Deprecated]Read Write Property: Refer to DstIn.
Definition: fbaudio.h:362
FBPropertyBool LockPitchToSpeed
Read Write Property: Time stretch enabled factor.
Definition: fbaudio.h:378
FBExistingFileAction
Action to perform, when preparing an Audio In object to record, when the action clip associated to th...
Definition: fbaudio.h:93
class FBPropertyBaseEnum< enum FBUseChnMode > FBPropertyUseChnMode
Definition: fbaudio.h:101
FBPropertyUseChnMode UseChannelMode
[Deprecated]Read Write Property: Enables you to control which track are used with stereo clips...
Definition: fbaudio.h:355
FBPropertyBool LockClipSpeed
Read Write Property: Indicates whether to lock the current playing speed.
Definition: fbaudio.h:372