バージョン

menu_open

include/AK/SoundEngine/Common/AkStreamMgrModule.h

説明を見る。
00001 /*******************************************************************************
00002 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
00003 released in source code form as part of the SDK installer package.
00004 
00005 Commercial License Usage
00006 
00007 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
00008 may use this file in accordance with the end user license agreement provided 
00009 with the software or, alternatively, in accordance with the terms contained in a
00010 written agreement between you and Audiokinetic Inc.
00011 
00012 Apache License Usage
00013 
00014 Alternatively, this file may be used under the Apache License, Version 2.0 (the 
00015 "Apache License"); you may not use this file except in compliance with the 
00016 Apache License. You may obtain a copy of the Apache License at 
00017 http://www.apache.org/licenses/LICENSE-2.0.
00018 
00019 Unless required by applicable law or agreed to in writing, software distributed
00020 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
00021 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
00022 the specific language governing permissions and limitations under the License.
00023 
00024   Version: <VERSION>  Build: <BUILDNUMBER>
00025   Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
00026 *******************************************************************************/
00027 
00035 
00036 #ifndef _AK_STREAM_MGR_MODULE_H_
00037 #define _AK_STREAM_MGR_MODULE_H_
00038 
00039 #include <AK/SoundEngine/Common/IAkStreamMgr.h>
00040 #include <AK/Tools/Common/AkPlatformFuncs.h>
00041 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 struct AkStreamMgrSettings
00051 {
00052     AkUInt32            uMemorySize;        
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 };
00061 
00067 struct AkDeviceSettings
00068 {
00069     void *              pIOMemory;                  
00070 
00071 
00072     AkUInt32            uIOMemorySize;              
00073     AkUInt32            uIOMemoryAlignment;         
00074     AkMemPoolAttributes ePoolAttributes;            
00075     AkUInt32            uGranularity;               
00076     AkUInt32            uSchedulerTypeFlags;        
00077     AkThreadProperties  threadProperties;           
00078     AkReal32            fTargetAutoStmBufferLength; 
00079     AkUInt32            uMaxConcurrentIO;           
00080     bool                bUseStreamCache;            
00081     AkUInt32            uMaxCachePinnedBytes;       
00082 };
00083 
00085 
00088 #define AK_SCHEDULER_BLOCKING          (0x01)
00089 
00090 
00091 
00092 #define AK_SCHEDULER_DEFERRED_LINED_UP (0x02)
00093 
00097 struct AkFileDesc
00098 {
00099     AkInt64             iFileSize;          
00100     AkUInt32            uSector;            
00101 
00102 
00103 
00104     AkUInt32            uCustomParamSize;   
00105     void *              pCustomParam;       
00106     AkFileHandle        hFile;              
00107     AkDeviceID          deviceID;           
00108 };
00109 
00112 struct AkIOTransferInfo
00113 {
00114     AkUInt64        uFilePosition;      
00115     AkUInt32        uBufferSize;        
00116     AkUInt32        uRequestedSize;     
00117 };
00118 
00119 struct AkAsyncIOTransferInfo;
00129 AK_CALLBACK( void, AkIOCallback )( 
00130     AkAsyncIOTransferInfo * in_pTransferInfo,   
00131     AKRESULT        in_eResult          
00132     );
00133 
00139 struct AkAsyncIOTransferInfo : public AkIOTransferInfo
00140 {
00141     void *          pBuffer;            
00142     AkIOCallback    pCallback;          
00143     void *          pCookie;            
00144     void *          pUserData;          
00145 };
00146 
00154 struct AkIoHeuristics
00155 {
00156     AkReal32        fDeadline;          
00157     AkPriority      priority;           
00158 };
00159 
00160 
00161 
00163 
00164 namespace AK
00165 {
00166     // Audiokinetic Stream Manager's implementation-specific interfaces of the Low-Level IO submodule.
00167     namespace StreamMgr
00168     {
00170         class IAkLowLevelIOHook
00171         {
00172         protected:
00174             virtual ~IAkLowLevelIOHook(){}
00175 
00176         public:
00179             virtual AKRESULT Close(
00180                 AkFileDesc &            in_fileDesc         
00181                 ) = 0;
00182 
00205             virtual AkUInt32 GetBlockSize(
00206                 AkFileDesc &            in_fileDesc         
00207                 ) = 0;
00208 
00212             virtual void GetDeviceDesc(
00213                 AkDeviceDesc &          out_deviceDesc      
00214                 ) = 0;
00215 
00223             virtual AkUInt32 GetDeviceData() = 0;
00224         };
00225 
00230         class IAkIOHookBlocking : public IAkLowLevelIOHook
00231         {
00232         protected:
00234             virtual ~IAkIOHookBlocking(){}
00235 
00236         public:
00237 
00249             virtual AKRESULT Read(
00250                 AkFileDesc &            in_fileDesc,        
00251                 const AkIoHeuristics &  in_heuristics,      
00252                 void *                  out_pBuffer,        
00253                 AkIOTransferInfo &      in_transferInfo     
00254                 ) = 0;
00255 
00266             virtual AKRESULT Write(
00267                 AkFileDesc &            in_fileDesc,        
00268                 const AkIoHeuristics &  in_heuristics,      
00269                 void *                  in_pData,           
00270                 AkIOTransferInfo &      io_transferInfo     
00271                 ) = 0;
00272         };
00273 
00290         class IAkIOHookDeferred : public IAkLowLevelIOHook
00291         {
00292         protected:
00294             virtual ~IAkIOHookDeferred(){}
00295 
00296         public:
00297 
00316             virtual AKRESULT Read(
00317                 AkFileDesc &            in_fileDesc,        
00318                 const AkIoHeuristics &  in_heuristics,      
00319                 AkAsyncIOTransferInfo & io_transferInfo     
00320                 ) = 0;
00321 
00340             virtual AKRESULT Write(
00341                 AkFileDesc &            in_fileDesc,        
00342                 const AkIoHeuristics &  in_heuristics,      
00343                 AkAsyncIOTransferInfo & io_transferInfo     
00344                 ) = 0;
00345 
00379             virtual void Cancel(
00380                 AkFileDesc &        in_fileDesc,            
00381                 AkAsyncIOTransferInfo & io_transferInfo,    
00382                 bool & io_bCancelAllTransfersForThisFile    
00383                 ) = 0;
00384         };
00385 
00401         class IAkFileLocationResolver
00402         {
00403         protected:
00405             virtual ~IAkFileLocationResolver(){}
00406 
00407         public:
00408 
00450             virtual AKRESULT Open( 
00451                 const AkOSChar*         in_pszFileName,     
00452                 AkOpenMode              in_eOpenMode,       
00453                 AkFileSystemFlags *     in_pFlags,          
00454                 bool &                  io_bSyncOpen,       
00455                 AkFileDesc &            io_fileDesc         
00456                 ) = 0;
00457 
00501             virtual AKRESULT Open( 
00502                 AkFileID                in_fileID,          
00503                 AkOpenMode              in_eOpenMode,       
00504                 AkFileSystemFlags *     in_pFlags,          
00505                 bool &                  io_bSyncOpen,       
00506                 AkFileDesc &            io_fileDesc         
00507                 ) = 0;
00508         };
00509 
00511 
00512 
00513 
00514 
00515 
00516 
00517 
00518 
00519 
00520 
00521 
00522 
00523         AK_EXTERNAPIFUNC( IAkStreamMgr *, Create )( 
00524             const AkStreamMgrSettings & in_settings     
00525             );
00526 
00532         AK_EXTERNAPIFUNC( void, GetDefaultSettings )(
00533             AkStreamMgrSettings &       out_settings    
00534             );
00535 
00540         AK_EXTERNAPIFUNC( IAkFileLocationResolver *, GetFileLocationResolver )();
00541 
00545         AK_EXTERNAPIFUNC( void, SetFileLocationResolver )(
00546             IAkFileLocationResolver *   in_pFileLocationResolver 
00547             );
00548 
00555         AK_EXTERNAPIFUNC( AkMemPoolId, GetPoolID )();
00556 
00558 
00560 
00561 
00562 
00563 
00564 
00565 
00566 
00567 
00568 
00569 
00570 
00571 
00572 
00573 
00574 
00575 
00576 
00577 
00578 
00579 
00580 
00581         AK_EXTERNAPIFUNC( AkDeviceID, CreateDevice )(
00582             const AkDeviceSettings &    in_settings,        
00583             IAkLowLevelIOHook *         in_pLowLevelHook    
00584             );
00588         AK_EXTERNAPIFUNC( AKRESULT, DestroyDevice )(
00589             AkDeviceID                  in_deviceID         
00590             );
00591 
00598         AK_EXTERNAPIFUNC( void, GetDefaultDeviceSettings )(
00599             AkDeviceSettings &          out_settings        
00600             );
00602 
00604 
00605 
00606 
00607 
00608 
00609 
00610 
00611 
00612 
00613 
00614 
00615 
00616 
00617 
00618         AK_EXTERNAPIFUNC( AKRESULT, SetCurrentLanguage )(
00619             const AkOSChar *    in_pszLanguageName          
00620             );
00621 
00629         AK_EXTERNAPIFUNC( const AkOSChar *, GetCurrentLanguage )();
00630 
00638         AK_CALLBACK( void, AkLanguageChangeHandler )( 
00639             const AkOSChar * const in_pLanguageName,
00640             void * in_pCookie                       
00641             );
00642 
00649         AK_EXTERNAPIFUNC( AKRESULT, AddLanguageChangeObserver )(
00650             AkLanguageChangeHandler in_handler, 
00651             void * in_pCookie                   
00652             );
00653 
00660         AK_EXTERNAPIFUNC( void, RemoveLanguageChangeObserver )(
00661             void * in_pCookie                   
00662             );
00663 
00665 
00666 
00667 
00668 
00669 
00670         AK_EXTERNAPIFUNC( void, FlushAllCaches )();
00671         
00673     }
00674 }
00675 
00676 #endif //_AK_STREAM_MGR_MODULE_H_

このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう