fbaudio.h

Go to the documentation of this file.
00001 #ifndef __FBAUDIO_H__
00002 #define __FBAUDIO_H__
00003 /**************************************************************************
00004  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
00005  All Rights Reserved.
00006  
00007  The coded instructions, statements, computer programs, and/or related 
00008  material (collectively the "Data") in these files contain unpublished 
00009  information proprietary to Autodesk, Inc. and/or its licensors, which is 
00010  protected by Canada and United States of America federal copyright law 
00011  and by international treaties.
00012  
00013  The Data may not be disclosed or distributed to third parties, in whole 
00014  or in part, without the prior written consent of Autodesk, Inc. 
00015  ("Autodesk").
00016  
00017  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00018  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 
00019  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR 
00020  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES 
00021  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
00022  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT 
00023  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR 
00024  FREE.
00025  
00026  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 
00027  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR 
00028  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE 
00029  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS 
00030  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR 
00031  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF 
00032  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT 
00033  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE 
00034  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS 
00035  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
00036  
00037 **************************************************************************/
00038 
00043 #include <kaydaradef.h>
00044 #ifndef FBSDK_DLL
00045 
00048     #define FBSDK_DLL K_DLLIMPORT
00049 #endif
00050 
00051 #include <fbsdk/fbcomponent.h>
00052 #include <fbsdk/fbaudiofmt.h>
00053 
00054 #ifdef FBSDKUseNamespace
00055     namespace FBSDKNamespace {
00056 #endif
00057 
00058 __FB_FORWARD( FBAudioIn );
00059 __FB_FORWARD( FBAudioOut );
00060 __FB_FORWARD( FBAudioClip );
00061 FB_DEFINE_COMPONENT( FBSDK_DLL, AudioIn );
00062 FB_DEFINE_COMPONENT( FBSDK_DLL, AudioOut );
00063 FB_DEFINE_COMPONENT( FBSDK_DLL, AudioClip );
00064 
00066 enum FBAccessMode {
00067     kFBAccessModeDisk,  
00068     kFBAccessModeMemory 
00069 };
00070 
00072 enum FBUseChnMode {
00073     kFBUseChannelLeftOnly,  
00074     kFBUseChannelRightOnly, 
00075     kFBUseChannelBoth       
00076 };
00077 
00079 enum FBTriggerStyle {
00080     kFBTriggerStyleContinue,    
00081     kFBTriggerStyleCut,         
00082     kFBTriggerStyleToggle       
00083 };
00084 
00085 FB_DEFINE_ENUM(FBSDK_DLL, AccessMode);
00086 FB_DEFINE_ENUM(FBSDK_DLL, UseChnMode);
00087 FB_DEFINE_ENUM(FBSDK_DLL, TriggerStyle);
00088 
00090 // FBAudioIn
00092 
00095 class FBSDK_DLL FBAudioIn : public FBComponent
00096 {
00097     //--- Open Reality declaration.
00098     __FBClassDeclare(FBAudioIn, FBComponent);
00099 public:
00100 
00104     FBAudioIn(HIObject pObject=NULL);
00105 };
00106 
00108 // FBAudioOut
00110 
00113 class FBSDK_DLL FBAudioOut : public FBComponent
00114 {
00115     //--- Open Reality declaration.
00116     __FBClassDeclare(FBAudioOut, FBComponent);
00117 public:
00118 
00122     FBAudioOut(HIObject pObject=NULL);
00123 };
00124 
00126 FBSDK_DLL HFBAudioOut FBAudioOutGetDefault();
00127 
00129 // FBAudioClip
00131 
00134 class FBSDK_DLL FBAudioClip : public FBComponent
00135 {
00136     //--- Open Reality declaration.
00137     __FBClassDeclare(FBAudioClip, FBComponent);
00138 public:
00139 
00145     FBAudioClip(char* pFileName, bool pSetToDefaultDest=true, HIObject pObject=NULL);
00146 
00149     virtual void FBDelete();
00150 
00156     bool Play(FBTriggerStyle pStyle=kFBTriggerStyleContinue, HFBAudioOut pDestination=NULL);
00157 
00161     void Stop(HFBAudioOut pDestination=NULL);
00162 
00163     FBPropertyString        Filename;       
00164     FBPropertyString        RelativePath;   
00165     FBPropertyInt           Format;         
00166     FBPropertyAudioOut      Destination;    
00167     FBPropertyTime          Duration;       
00168     FBPropertyTime          InPoint;        
00169     FBPropertyAccessMode    AccessMode;     
00170     FBPropertyUseChnMode    UseChannelMode; 
00171     FBPropertyBool          Scrubbing;      
00172 };
00173 
00176 class FBSDK_DLL FBPropertyListAudioIn : public FBPropertyListComponent
00177 {
00178 public:
00179     FBPropertyListAudioIn();
00184     HFBAudioIn operator[](int pIndex);
00185 };
00186 
00188 class FBSDK_DLL FBPropertyListAudioOut : public FBPropertyListComponent
00189 {
00190 public:
00191     FBPropertyListAudioOut();
00196     HFBAudioOut operator[](int pIndex);
00197 };
00198 
00200 class FBSDK_DLL FBPropertyListAudioClip : public FBPropertyListComponent
00201 {
00202 public:
00203     FBPropertyListAudioClip();
00208     FBAudioClip* operator[](int pIndex);
00209 };
00210 
00211 #ifdef FBSDKUseNamespace
00212     }
00213 #endif
00214 #endif /* this must be the last line of this file */