Wwise 버전

include/AK/Wwise/AudioPlugin.h

Go to the documentation of this file.
00001 
00002 //
00003 // Copyright (c) 2006 Audiokinetic Inc. / All Rights Reserved
00004 //
00006 
00009 
00010 #ifndef _AK_WWISE_AUDIOPLUGIN_H
00011 #define _AK_WWISE_AUDIOPLUGIN_H
00012 
00013 #include "Undo.h"
00014 
00015 #include <AK/Wwise/Utilities.h>
00016 #include <AK/SoundEngine/Common/AkSoundEngine.h> 
00017 #include <AK/Wwise/PlatformID.h>
00018 
00019 // Audiokinetic namespace
00020 namespace AK
00021 {
00022     class IXmlTextReader;
00023     class IXmlTextWriter;
00024 
00025     // Audiokinetic Wwise namespace
00026     namespace Wwise
00027     {
00028         class IPluginMediaConverter
00029         {
00030         public:
00035             virtual ConversionResult ConvertFile( 
00036                 const GUID & in_guidPlatform,                   
00037                 const BasePlatformID & in_basePlatform,         
00038                 LPCWSTR in_szSourceFile,                        
00039                 LPCWSTR in_szDestFile,                          
00040                 AkUInt32 in_uSampleRate,                        
00041                 AkUInt32 in_uBlockLength,                       
00042                 AK::Wwise::IProgress* in_pProgress,             
00043                 IWriteString* io_pError                         
00044                 ) = 0;
00045 
00046             virtual ULONG GetCurrentConversionSettingsHash(
00047                 const GUID & in_guidPlatform,           
00048                 AkUInt32 in_uSampleRate = 0,            
00049                 AkUInt32 in_uBlockLength = 0            
00050                 ) = 0;
00051         };
00052 
00062         class IPluginPropertySet
00063         {
00064         public:
00069             virtual bool GetValue( 
00070                 const GUID & in_guidPlatform,   
00071                 LPCWSTR in_pszPropertyName,     
00072                 VARIANT & out_varProperty       
00073                 ) = 0;
00074             
00077             virtual bool SetValue( 
00078                 const GUID & in_guidPlatform,   
00079                 LPCWSTR in_pszPropertyName,     
00080                 const VARIANT & in_varProperty  
00081                 ) = 0;
00082 
00085             virtual bool PropertyHasRTPC(
00086                 LPCWSTR in_pszPropertyName      
00087                 ) = 0;
00088 
00094             virtual GUID GetCurrentPlatform() = 0;
00095 
00098             virtual BasePlatformID GetCurrentBasePlatform() = 0;
00099 
00101             virtual BasePlatformID GetDefaultNativeAuthoringPlaybackPlatform() = 0;
00102 
00104             virtual GUID GetAuthoringPlaybackPlatform() = 0;
00105 
00111             virtual void NotifyInternalDataChanged(AkPluginParamID in_idData) = 0;
00112 
00116             virtual bool CanLogUndos() = 0;
00117 
00120             virtual AK::Wwise::IUndoManager * GetUndoManager() = 0;
00121 
00123             virtual void GetAssetLicenseStatus( 
00124                 const GUID & in_guidPlatform,           
00125                 AkUInt32 in_uAssetID,                   
00126                 AK::Wwise::LicenseType & out_eType,     
00127                 AK::Wwise::LicenseStatus & out_eStatus, 
00128                 UINT32 & out_uDaysToExpiry              
00129                 ) = 0;
00130         };
00131 
00141         class IPluginObjectStore
00142         {
00143         public:
00147             virtual void InsertObject( 
00148                 LPCWSTR in_pszListName,
00149                 unsigned int in_uiIndex,
00150                 IPluginPropertySet* in_pPropertySet
00151                 ) = 0;
00152             
00156             virtual bool RemoveObject( 
00157                 IPluginPropertySet* in_pPropertySet
00158                 ) = 0;
00159 
00162             virtual IPluginPropertySet* GetObject( 
00163                 LPCWSTR in_pszListName,
00164                 unsigned int in_uiIndex
00165                 ) const = 0;
00166 
00169             virtual unsigned int GetObjectCount( 
00170                 LPCWSTR in_pszListName
00171                 ) const = 0;
00172 
00176             virtual IPluginPropertySet* CreateObject( 
00177                 LPCWSTR in_pszType
00178                 ) = 0;
00179 
00182             virtual void DeleteObject( 
00183                 IPluginPropertySet* in_pPropertySet
00184                 ) = 0;
00185 
00188             virtual unsigned int GetListCount() const = 0;
00189 
00193             virtual unsigned int GetListName( 
00194                 unsigned int in_uiListIndex,
00195                 LPWSTR out_pszListName,
00196                 unsigned int in_uiBufferSize
00197                 ) const = 0;
00198         };
00199 
00205         class IPluginObjectMedia
00206         {
00207         public:
00208             
00210             virtual bool SetMediaSource( 
00211                 LPCWSTR in_pszFilePathToImport, 
00212                 unsigned int in_Index = 0,      
00213                 bool in_bReplace = false        
00214                 ) = 0;
00215 
00217             virtual void RemoveMediaSource( 
00218                 unsigned int in_Index = 0   
00219                 ) = 0;
00220 
00223             virtual unsigned int GetMediaSourceCount() const = 0;
00224 
00229             virtual unsigned int GetMediaSourceFileName(
00230                 LPWSTR out_pszFileName,         
00231                 unsigned int in_uiBufferSize,   
00232                 unsigned int in_Index = 0       
00233                 ) const = 0;
00234 
00237             virtual unsigned int GetMediaSourceOriginalFilePath(
00238                 LPWSTR out_pszFileName,         
00239                 unsigned int in_uiBufferSize,   
00240                 unsigned int in_Index = 0       
00241                 ) const = 0;
00242 
00245             virtual unsigned int GetMediaSourceConvertedFilePath(
00246                 LPWSTR out_pszFileName,         
00247                 unsigned int in_uiBufferSize,   
00248                 const GUID & in_guidPlatform,   
00249                 unsigned int in_Index = 0       
00250                 ) const = 0;
00251 
00253             virtual void InvalidateMediaSource( unsigned int in_Index = 0 ) = 0;
00254 
00257             virtual unsigned int GetOriginalDirectory(
00258                 LPWSTR out_pszDirectory,        
00259                 unsigned int in_uiBufferSize    
00260                 ) const = 0;
00261 
00264             virtual unsigned int GetConvertedDirectory(
00265                 LPWSTR out_pszDirectory,        
00266                 unsigned int in_uiBufferSize,   
00267                 const GUID & in_guidPlatform    
00268                 ) const = 0;
00269         };
00270 
00276         class IAudioPlugin
00277             : public IPluginBase
00278         {
00279         public:
00285             enum eDialog
00286             {
00287                 SettingsDialog,         
00288 
00289 
00290                 ContentsEditorDialog    
00291 
00292             };
00293 
00295             enum NotifyInnerObjectOperation
00296             {
00297                 InnerObjectAdded,
00298                 InnerObjectRemoved
00299             };
00300 
00306             virtual void SetPluginPropertySet( 
00307                 IPluginPropertySet * in_pPSet   
00308                 ) = 0;
00309 
00316             virtual void SetPluginObjectStore( 
00317                 IPluginObjectStore * in_pObjectStore 
00318                 ) = 0;
00319 
00330             virtual void SetPluginObjectMedia( 
00331                 IPluginObjectMedia * in_pObjectMedia
00332                 ) = 0;
00333 
00337             virtual bool IsPlayable() const = 0;
00338 
00343             virtual void InitToDefault() = 0;
00344 
00348             virtual void Delete() = 0;
00349 
00352             virtual bool Load( IXmlTextReader* in_pReader ) = 0;
00353 
00356             virtual bool Save( IXmlTextWriter* in_pWriter ) = 0;
00357 
00362             virtual bool CopyInto(
00363                 IAudioPlugin* io_pWObject        // The object that will receive the custom data of this object.
00364                 ) const = 0;
00365 
00370             virtual void NotifyCurrentPlatformChanged( 
00371                 const GUID & in_guidCurrentPlatform     
00372                 ) = 0;
00373 
00380             virtual void NotifyPropertyChanged( 
00381                 const GUID & in_guidPlatform,   
00382                 LPCWSTR in_pszPropertyName      
00383                 ) = 0;
00384 
00392             virtual void NotifyInnerObjectPropertyChanged( 
00393                 IPluginPropertySet* in_pPSet,   
00394                 const GUID & in_guidPlatform,   
00395                 LPCWSTR in_pszPropertyName      
00396                 ) = 0;
00397 
00404             virtual void NotifyInnerObjectAddedRemoved( 
00405                 IPluginPropertySet* in_pPSet,   
00406                 unsigned int in_uiIndex,        
00407                 NotifyInnerObjectOperation in_eOperation    
00408                 ) = 0;
00409 
00418             virtual void NotifyPluginMediaChanged() = 0;
00419 
00428             virtual bool GetBankParameters( 
00429                 const GUID & in_guidPlatform,   
00430                 IWriteData* in_pDataWriter      
00431                 ) const = 0;
00432 
00443             virtual bool GetPluginData(
00444                 const GUID & in_guidPlatform,       
00445                 AkPluginParamID in_idParam, 
00446                 IWriteData* in_pDataWriter          
00447                 ) const = 0;
00448 
00454             virtual HINSTANCE GetResourceHandle() const = 0;
00455 
00462             virtual bool GetDialog( 
00463                 eDialog in_eDialog,             
00464                 UINT & out_uiDialogID,          
00465                 PopulateTableItem *& out_pTable 
00466                 ) const = 0;
00467 
00473             virtual bool WindowProc( 
00474                 eDialog in_eDialog,     
00475                 HWND in_hWnd,           
00476                 UINT in_message,        
00477                 WPARAM in_wParam,       
00478                 LPARAM in_lParam,       
00479                 LRESULT & out_lResult   
00480                 ) = 0;
00481 
00491             virtual bool DisplayNameForProp( 
00492                 LPCWSTR in_pszPropertyName,     
00493                 LPWSTR out_pszDisplayName,      
00494                 UINT in_unCharCount             
00495                 ) const = 0;
00496 
00512             virtual bool DisplayNamesForPropValues( 
00513                 LPCWSTR in_pszPropertyName,     
00514                 LPWSTR out_pszValuesName,       
00515                 UINT in_unCharCount             
00516                 ) const = 0;
00517 
00523             virtual bool Help( 
00524                 HWND in_hWnd,                   
00525                 eDialog in_eDialog,             
00526                 LPCWSTR in_szLanguageCode       
00527                 ) const = 0;
00528 
00532             virtual void NotifyMonitorData( 
00533                 void * in_pData,                
00534                 unsigned int in_uDataSize,      
00535                 bool in_bNeedsByteSwap          
00536                 ) = 0;
00537 
00540             virtual IPluginMediaConverter* GetPluginMediaConverterInterface() = 0;
00541 
00546             virtual bool GetLicenseStatus(
00547                 const GUID & in_guidPlatform,       
00548                 AK::Wwise::Severity& out_eSeverity, 
00549                 LPWSTR out_pszMessage,              
00550                 unsigned int in_uiBufferSize        
00551                 ) = 0;
00552         };
00553 
00555         class DefaultAudioPluginImplementation : public IAudioPlugin
00556         {
00557         public:
00558             virtual void SetPluginPropertySet( IPluginPropertySet * in_pPSet ){}
00559             virtual void SetPluginObjectStore( IPluginObjectStore * in_pObjectStore ){}
00560             virtual void SetPluginObjectMedia( IPluginObjectMedia * in_pObjectMedia ){}
00561             virtual bool IsPlayable() const { return true; }
00562             virtual void InitToDefault() {}
00563             virtual void Delete() {}
00564             virtual bool Load( IXmlTextReader* in_pReader ) { return false; }
00565             virtual bool Save( IXmlTextWriter* in_pWriter ) { return false; }
00566             virtual bool CopyInto( IAudioPlugin* io_pWObject ) const { return true; }
00567             virtual void NotifyCurrentPlatformChanged( const GUID & in_guidCurrentPlatform ) {}
00568             virtual void NotifyPropertyChanged( const GUID & in_guidPlatform, LPCWSTR in_pszPropertyName ) {}
00569             virtual void NotifyInnerObjectPropertyChanged( IPluginPropertySet* in_pPSet, const GUID & in_guidPlatform, LPCWSTR in_pszPropertyName ) {}
00570             virtual void NotifyInnerObjectAddedRemoved( IPluginPropertySet* in_pPSet, unsigned int in_uiIndex, NotifyInnerObjectOperation in_eOperation ) {}
00571             virtual void NotifyPluginMediaChanged() {}
00572             virtual bool GetBankParameters( const GUID & in_guidPlatform, IWriteData* in_pDataWriter ) const { return false; }
00573             virtual bool GetPluginData( const GUID & in_guidPlatform, AkPluginParamID in_idParam, IWriteData* in_pDataWriter ) const { return false; }
00574             virtual bool WindowProc( eDialog in_eDialog, HWND in_hWnd, UINT in_message, WPARAM in_wParam, LPARAM in_lParam, LRESULT & out_lResult ){ return false; }
00575             virtual bool DisplayNameForProp( LPCWSTR in_pszPropertyName, LPWSTR out_pszDisplayName, UINT in_unCharCount ) const { return false; }
00576             virtual bool DisplayNamesForPropValues( LPCWSTR in_pszPropertyName, LPWSTR out_pszValuesName, UINT in_unCharCount ) const { return false; }
00577             virtual bool Help( HWND in_hWnd, eDialog in_eDialog, LPCWSTR in_szLanguageCode ) const { return false; }
00578             virtual void NotifyMonitorData( void * in_pData, unsigned int in_uDataSize, bool in_bNeedsByteSwap ){}
00579             virtual IPluginMediaConverter* GetPluginMediaConverterInterface() { return NULL; }
00580             virtual bool GetLicenseStatus( const GUID &, AK::Wwise::Severity&, LPWSTR, unsigned int in_uiBufferSize ){ return true; }
00581         };
00582     }
00583 }
00584 
00585 
00588 #define WM_AK_PRIVATE_SHOW_HELP_TOPIC   0x4981
00589 
00590 #endif // _AK_WWISE_AUDIOPLUGIN_H