バージョン

menu_open
Wwise SDK 2021.1.14
AkMusicEngine.h
[詳解]
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Version: v2021.1.14 Build: 6590
25  Copyright (c) 2006-2023 Audiokinetic Inc.
26 *******************************************************************************/
27 
28 // AkMusicEngine.h
29 
30 /// \file
31 /// The main music engine interface.
32 
33 
34 #ifndef _AK_MUSICENGINE_H_
35 #define _AK_MUSICENGINE_H_
36 
40 
41 /// Platform-independent initialization settings of the music engine
42 /// \sa
43 /// - AK::MusicEngine::Init()
44 /// - \ref soundengine_integration_init_advanced
46 {
47  AkReal32 fStreamingLookAheadRatio; ///< Multiplication factor for all streaming look-ahead heuristic values.
48 };
49 
50 // Audiokinetic namespace
51 namespace AK
52 {
53  /// Music engine namespace
54  /// \akwarning
55  /// The functions in this namespace are not thread-safe, unless stated otherwise.
56  /// \endakwarning
57  namespace MusicEngine
58  {
59  ///////////////////////////////////////////////////////////////////////
60  /// @name Initialization
61  //@{
62 
63  /// Initialize the music engine.
64  /// \warning This function must be called after the base sound engine has been properly initialized.
65  /// There should be no AK API call between AK::SoundEngine::Init() and this call. Any call done in between is potentially unsafe.
66  /// \return AK_Success if the Init was successful, AK_Fail otherwise.
67  /// \sa
68  /// - \ref workingwithsdks_initialization
70  AkMusicSettings * in_pSettings ///< Initialization settings (can be NULL, to use the default values)
71  );
72 
73  /// Get the music engine's default initialization settings values
74  /// \sa
75  /// - \ref soundengine_integration_init_advanced
76  /// - AK::MusicEngine::Init()
78  AkMusicSettings & out_settings ///< Returned default platform-independent music engine settings
79  );
80 
81  /// Terminate the music engine.
82  /// \warning This function must be called before calling Term() on the base sound engine.
83  /// \sa
84  /// - \ref workingwithsdks_termination
86  );
87 
88  /// Query information on the active segment of a music object that is playing. Use the playing ID
89  /// that was returned from AK::SoundEngine::PostEvent(), provided that the event contained a play
90  /// action that was targetting a music object. For any configuration of interactive music hierarchy,
91  /// there is only one segment that is active at a time.
92  /// To be able to query segment information, you must pass the AK_EnableGetMusicPlayPosition flag
93  /// to the AK::SoundEngine::PostEvent() method. This informs the sound engine that the source associated
94  /// with this event should be given special consideration because GetPlayingSegmentInfo() can be called
95  /// at any time for this AkPlayingID.
96  /// Notes:
97  /// - If the music object is a single segment, you will get negative values for AkSegmentInfo::iCurrentPosition
98  /// during the pre-entry. This will never occur with other types of music objects because the
99  /// pre-entry of a segment always overlaps another active segment.
100  /// - The active segment during the pre-entry of the first segment of a Playlist Container or a Music Switch
101  /// Container is "nothing", as well as during the post-exit of the last segment of a Playlist (and beyond).
102  /// - When the active segment is "nothing", out_uSegmentInfo is filled with zeros.
103  /// - If in_bExtrapolate is true (default), AkSegmentInfo::iCurrentPosition is corrected by the amount of time elapsed
104  /// since the beginning of the audio frame. It is thus possible that it slightly overshoots the total segment length.
105  /// \return AK_Success if there is a playing music structure associated with the specified playing ID.
106  /// \sa
107  /// - AK::SoundEngine::PostEvent
108  /// - AkSegmentInfo
110  AkPlayingID in_PlayingID, ///< Playing ID returned by AK::SoundEngine::PostEvent().
111  AkSegmentInfo & out_segmentInfo, ///< Structure containing information about the active segment of the music structure that is playing.
112  bool in_bExtrapolate = true ///< Position is extrapolated based on time elapsed since last sound engine update.
113  );
114 
115  //@}
116  }
117 }
118 
119 #endif // _AK_MUSICENGINE_H_
120 
float AkReal32
32-bit floating point
Definition: AkTypes.h:70
Audiokinetic namespace
#define AK_EXTERNAPIFUNC(_type, _name)
AKRESULT
Standard function call result.
Definition: AkTypes.h:132
Structure used to query info on active playing segments.
Definition: AkCallback.h:216
AKSOUNDENGINE_API AKRESULT GetPlayingSegmentInfo(AkPlayingID in_PlayingID, AkSegmentInfo &out_segmentInfo, bool in_bExtrapolate=true)
AKSOUNDENGINE_API void GetDefaultInitSettings(AkMusicSettings &out_settings)
AkReal32 fStreamingLookAheadRatio
Multiplication factor for all streaming look-ahead heuristic values.
Definition: AkMusicEngine.h:47
AKSOUNDENGINE_API AKRESULT Init(AkMusicSettings *in_pSettings)
AKSOUNDENGINE_API void Term()
AkUInt32 AkPlayingID
Playing ID
Definition: AkTypes.h:65

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

サポートは必要ですか?

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

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

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

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

Wwiseからはじめよう