バージョン
menu_open

include/AK/SoundEngine/Common/AkDynamicSequence.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 
00028 #ifndef _AK_SOUNDENGINE_AKDYNAMICSEQUENCE_H
00029 #define _AK_SOUNDENGINE_AKDYNAMICSEQUENCE_H
00030 
00031 #include <AK/SoundEngine/Common/AkSoundEngine.h>
00032 #include <AK/Tools/Common/AkArray.h>
00033 
00034 class AkExternalSourceArray;
00035 
00036 namespace AK
00037 {
00038     namespace SoundEngine
00039     {
00042         namespace DynamicSequence
00043         {
00049             class PlaylistItem
00050             {
00051             public:
00052                 PlaylistItem();
00053                 PlaylistItem(const PlaylistItem& in_rCopy);
00054                 ~PlaylistItem();
00055 
00056                 PlaylistItem& operator=(const PlaylistItem& in_rCopy);
00057                 bool operator==(const PlaylistItem& in_rCopy)
00058                 {
00059                     AKASSERT(pExternalSrcs == NULL);
00060                     return audioNodeID == in_rCopy.audioNodeID && 
00061                         msDelay == in_rCopy.msDelay && 
00062                         pCustomInfo == in_rCopy.pCustomInfo;
00063                 };
00064 
00068                 AKRESULT SetExternalSources(AkUInt32 in_nExternalSrc, AkExternalSourceInfo* in_pExternalSrc);
00069 
00071                 AkExternalSourceArray* GetExternalSources(){return pExternalSrcs;}
00072 
00073                 AkUniqueID audioNodeID; 
00074                 AkTimeMs   msDelay;     
00075                 void *     pCustomInfo; 
00076 
00077             private:
00078                 AkExternalSourceArray *pExternalSrcs;
00079             };
00080 
00085             class Playlist
00086                 : public AkArray<PlaylistItem, const PlaylistItem&, ArrayPoolDefault, 4>
00087             {
00088             public:
00091                 AkForceInline AKRESULT Enqueue( 
00092                     AkUniqueID in_audioNodeID,      
00093                     AkTimeMs in_msDelay = 0,        
00094                     void * in_pCustomInfo = NULL,   
00095                     AkUInt32 in_cExternals = 0,                 
00096                     AkExternalSourceInfo *in_pExternalSources = NULL
00097                     )
00098                 {
00099                     PlaylistItem * pItem = AddLast();
00100                     if ( !pItem )
00101                         return AK_Fail;
00102 
00103                     pItem->audioNodeID = in_audioNodeID;
00104                     pItem->msDelay = in_msDelay;
00105                     pItem->pCustomInfo = in_pCustomInfo;
00106                     return pItem->SetExternalSources(in_cExternals, in_pExternalSources);
00107                 }
00108             };
00109 
00130             enum DynamicSequenceType
00131             {
00132                 DynamicSequenceType_SampleAccurate,         
00133                 DynamicSequenceType_NormalTransition        
00134             };
00135 
00141             AK_EXTERNAPIFUNC( AkPlayingID, Open )(
00142                 AkGameObjectID      in_gameObjectID,            
00143                 AkUInt32            in_uFlags      = 0,         
00144                 AkCallbackFunc      in_pfnCallback = NULL,      
00145                 void*               in_pCookie     = NULL,      
00146                 DynamicSequenceType in_eDynamicSequenceType = DynamicSequenceType_SampleAccurate 
00147                 );
00148                                                         
00151             AK_EXTERNAPIFUNC( AKRESULT, Close )(
00152                 AkPlayingID in_playingID                        
00153                 );
00154 
00156             AK_EXTERNAPIFUNC( AKRESULT, Play )( 
00157                 AkPlayingID in_playingID,                                           
00158                 AkTimeMs in_uTransitionDuration = 0,                                
00159                 AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear    
00160                 );
00161 
00164             AK_EXTERNAPIFUNC( AKRESULT, Pause )( 
00165                 AkPlayingID in_playingID,                                           
00166                 AkTimeMs in_uTransitionDuration = 0,                                
00167                 AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear    
00168                 );
00169 
00171             AK_EXTERNAPIFUNC( AKRESULT, Resume )(
00172                 AkPlayingID in_playingID,                                           
00173                 AkTimeMs in_uTransitionDuration = 0,                                    
00174                 AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear    
00175                 );
00176 
00180             AK_EXTERNAPIFUNC( AKRESULT, Stop )(
00181                 AkPlayingID in_playingID,                                           
00182                 AkTimeMs in_uTransitionDuration = 0,                                
00183                 AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear    
00184                 );
00185 
00187             AK_EXTERNAPIFUNC( AKRESULT, Break )(
00188                 AkPlayingID in_playingID                        
00189                 );
00190 
00192             AK_EXTERNAPIFUNC(AKRESULT, GetPauseTimes)(
00193                 AkPlayingID in_playingID,                       
00194                 AkUInt32 &out_uTime,                            
00195                 AkUInt32 &out_uDuration                         
00196                 );
00197 
00200             AK_EXTERNAPIFUNC(AKRESULT, GetPlayingItem)(
00201                 AkPlayingID in_playingID,                       
00202                 AkUniqueID & out_audioNodeID,                   
00203                 void *& out_pCustomInfo                         
00204                 );
00205 
00210             AK_EXTERNAPIFUNC( Playlist *, LockPlaylist )(
00211                 AkPlayingID in_playingID                        
00212                 );
00213 
00217             AK_EXTERNAPIFUNC( AKRESULT, UnlockPlaylist )(
00218                 AkPlayingID in_playingID                        
00219                 );
00220         }
00221     }
00222 }
00223 
00224 #endif // _AK_SOUNDENGINE_AKDYNAMICSEQUENCE_H

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

サポートは必要ですか?

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

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

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

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

Wwiseからはじめよう