OROCHI
 
Loading...
Searching...
No Matches
GxSysSoundBase.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13GX_CORE_NAMESPACE_BEGIN()
14
15//===========================================================================
17//===========================================================================
19{
20 //-------------------------------------------------------------
22 //-------------------------------------------------------------
24public:
25 // RTTI宣言
27 // 禁止宣言
29
30
31 //-------------------------------------------------------------
33 //-------------------------------------------------------------
35
38
40 //-------------------------------------------------------------
42 //-------------------------------------------------------------
44
46 GX_FORCE_INLINE virtual void loadJson(const GxJson::GxJsonNode& /*jsonNode*/) {}
47
49};
50
51//===========================================================================
53//===========================================================================
54class GxSysSoundBase : public GxSysBase, public SingletonBase<GxSysSoundBase>
55{
56 //-------------------------------------------------------------
58 //-------------------------------------------------------------
60public:
62 enum class CHANNEL
63 {
64 MONO,
65 STEREO,
66 _5_1,
67 _7_1,
68 _7_1_4,
69 MAX,
70 };
72 static GX_CSTR CHANNEL_TEXTS[static_cast<s32>(CHANNEL::MAX)];
74 enum class CHANNEL_COUNT
75 {
76 MONO = 1,
77 STEREO = 2,
78 _5_1 = 6,
79 _7_1 = 8,
80 _7_1_4 = 12,
81 MAX = _7_1_4,
82 };
83
84 // RTTI定義
85 GX_RTTI_ABSTRACT_CLASS(GxSysSoundBase, GxSysBase)
86 // GxClassBase継承クラス用禁止宣言
88
89
90 static constexpr u32 OBJECT_MOTION_DATA_MAX = GxMath::VALUE_128;
92 static constexpr u32 OBJECT_MOTION_PLAY_MAX = GxMath::VALUE_2;
94 static constexpr u32 OBJECT_MOTION_USE_BONE_MAX = GxMath::VALUE_32;
96 static constexpr u32 MOTION_REPLACE_MAX = GxMath::VALUE_2;
98 static constexpr u32 JOINT_BIT_MAX = GxMath::VALUE_8;
99
102 {
105 };
106
109 {
110 //-----------------------------------------------------------
112 //-----------------------------------------------------------
114
117 : _pCharacter( nullptr )
118 , _pCharacterFunction( nullptr )
119 , _attribute( 0 )
120 {
121 for( u32 i = 0; i < OBJECT_MOTION_USE_BONE_MAX; i++ )
122 {
123 _bonePosition[ i ]._x = _bonePosition[ i ]._y = _bonePosition[ i ]._z = 0.0f;
124 _bonePosition[ i ]._w = 1.0f;
125 _useBoneNo[ i ] = -1;
126 }
127 for( u32 i = 0; i < OBJECT_MOTION_PLAY_MAX; i++ )
128 {
129 _motion[ i ]._oldAnimID = -1;
130 _motion[ i ]._oldFrame = -1;
131 }
132 };
133
135 //-----------------------------------------------------------
137 //-----------------------------------------------------------
139
146
148 };
149
151 typedef f32* (*getBonePositionFunction)( void* pValue, s32 jointId );
152
154 //-------------------------------------------------------------
156 //-------------------------------------------------------------
158public:
160 GxSysSoundBase(void);
162 ~GxSysSoundBase( void ) override {}
163
165 //-------------------------------------------------------------
167 //-------------------------------------------------------------
169public:
171 virtual b32 isPause(void) const { return false; }
173 virtual void pause(b32 enable) {}
174
176 void getFinalPath(GxString& dst, GX_CSTR src);
177
179 GX_FORCE_INLINE virtual b32 registMotionLink( void* pUnitChar, u32 uniqueID, s32* pAttribute, void** ppMotionLinkHandle ) const { GX_UNUSED( pUnitChar ); GX_UNUSED( uniqueID ); GX_UNUSED( pAttribute ); GX_UNUSED( ppMotionLinkHandle ); return false; }
181 GX_FORCE_INLINE virtual void releaseMotionLink( void** ppMotionLinkHandle ) const { GX_UNUSED( ppMotionLinkHandle ); }
183 GX_FORCE_INLINE virtual void updateMotionLink( void* pMotionLinkHandle, GxObjMotionBlend* pObjMotionBlend, s32 NowAnimeId, s32 NowFrame, u32* pJoint ) const { GX_UNUSED( pMotionLinkHandle ); GX_UNUSED( pObjMotionBlend ); GX_UNUSED( NowAnimeId ); GX_UNUSED( NowFrame ); GX_UNUSED( pJoint ); }
185 GX_FORCE_INLINE virtual void setGetBonePositionFunction( getBonePositionFunction function ) const { GX_UNUSED( function ); }
186
188 GX_FORCE_INLINE virtual void* getSoundDriverObject( void ) const { return nullptr; }
189
191 //-------------------------------------------------------------
193 //-------------------------------------------------------------
195public:
196#if GX_DEVELOP
198 GX_FORCE_INLINE b32 isDevelopRender(void) const { return _isDevelopRender; }
200 GX_FORCE_INLINE void setDevelopRender(b32 enable) { _isDevelopRender = enable; }
201#endif // GX_DEVELOP
202
204 //-------------------------------------------------------------
206 //-------------------------------------------------------------
208private:
209#if GX_DEVELOP
210 b32 _isDevelopRender;
211#endif //GX_DEVELOP
212
214};
215
216// アクセスインターフェース
217GX_FORCE_INLINE GxSysSoundBase* getGxSysSoundBase (void){ return GxSysSoundBase::getSingletonPointer(); }
218
219GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE(__CLASS__)
GxClassBase継承の禁止宣言
Definition GxBase.h:240
オブジェクト基底クラス
Definition GxBase.h:88
JSON解析用ノード
Definition GxJson.h:108
算術演算クラス
Definition GxMath.h:84
初期化クラス
Definition GxSysSoundBase.h:19
virtual GX_FORCE_INLINE void loadJson(const GxJson::GxJsonNode &)
JSONから読み込み
Definition GxSysSoundBase.h:46
システム基底クラス
Definition GxSysBase.h:18
サウンドシステム基底クラス
Definition GxSysSoundBase.h:55
CHANNEL
チャンネル数定義
Definition GxSysSoundBase.h:63
@ _7_1_4
7.1.4チャンネル
@ _7_1
7.1チャンネル
@ _5_1
5.1チャンネル
virtual GX_FORCE_INLINE void updateMotionLink(void *pMotionLinkHandle, GxObjMotionBlend *pObjMotionBlend, s32 NowAnimeId, s32 NowFrame, u32 *pJoint) const
モーション連動更新
Definition GxSysSoundBase.h:183
virtual GX_FORCE_INLINE void releaseMotionLink(void **ppMotionLinkHandle) const
モーション連動解除
Definition GxSysSoundBase.h:181
virtual void pause(b32 enable)
一時停止設定
Definition GxSysSoundBase.h:173
f32 *(*) getBonePositionFunction(void *pValue, s32 jointId)
ボーン位置取得関数
Definition GxSysSoundBase.h:151
static constexpr u32 JOINT_BIT_MAX
関節のビット最大数
Definition GxSysSoundBase.h:98
static constexpr u32 OBJECT_MOTION_PLAY_MAX
モーション再生最大数
Definition GxSysSoundBase.h:92
static constexpr u32 OBJECT_MOTION_USE_BONE_MAX
モーションで使用する骨の最大数
Definition GxSysSoundBase.h:94
virtual GX_FORCE_INLINE b32 registMotionLink(void *pUnitChar, u32 uniqueID, s32 *pAttribute, void **ppMotionLinkHandle) const
モーション連動に登録
Definition GxSysSoundBase.h:179
static constexpr u32 MOTION_REPLACE_MAX
モーションの置き換え最大数
Definition GxSysSoundBase.h:96
static constexpr u32 OBJECT_MOTION_DATA_MAX
モーションデータ最大数
Definition GxSysSoundBase.h:90
virtual b32 isPause(void) const
一時停止判定
Definition GxSysSoundBase.h:171
GxSysSoundBase(void)
デフォルトコンストラクタ
Definition GxSysSoundBase.cpp:46
static GX_CSTR CHANNEL_TEXTS[static_cast< s32 >(CHANNEL::MAX)]
チャンネル数定義文字列テーブル
Definition GxSysSoundBase.h:26
virtual GX_FORCE_INLINE void * getSoundDriverObject(void) const
サウンドドライバーオブジェクト取得
Definition GxSysSoundBase.h:188
~GxSysSoundBase(void) override
デストラクタ
Definition GxSysSoundBase.h:162
void getFinalPath(GxString &dst, GX_CSTR src)
リソースの最終パスを取得(プラットフォーム依存パスを追加)
Definition GxSysSoundBase.cpp:58
virtual GX_FORCE_INLINE void setGetBonePositionFunction(getBonePositionFunction function) const
骨座標取得関数セット
Definition GxSysSoundBase.h:185
CHANNEL_COUNT
各チャンネル数定義
Definition GxSysSoundBase.h:75
シングルトン基礎クラス
Definition GxSingleton.h:19
static constexpr GxSysSoundBase * getSingletonPointer(void)
Definition GxSingleton.h:59
4次元浮動小数点数クラス
Definition GxStruct.h:153
f32 _x
X値
Definition GxStruct.h:192
f32 _y
Y値
Definition GxStruct.h:193
f32 _z
Z値
Definition GxStruct.h:194
f32 _w
W値
Definition GxStruct.h:195
文字列型クラス
Definition GxString.h:18
モーションブレンド定義
Definition GxSysSoundBase.h:102
s32 _oldFrame
フレーム(整数値、小数切捨て)
Definition GxSysSoundBase.h:104
s32 _oldAnimID
モーションNo
Definition GxSysSoundBase.h:103
モーションデータ定義
Definition GxSysSoundBase.h:109
s32 _useBoneNo[OBJECT_MOTION_USE_BONE_MAX]
使用骨番号
Definition GxSysSoundBase.h:145
GxObjMotionData(void)
デフォルトコンストラクタ
Definition GxSysSoundBase.h:116
GxObjMotionBlend _motion[OBJECT_MOTION_PLAY_MAX]
モーション
Definition GxSysSoundBase.h:143
s32 _attribute
足元情報
Definition GxSysSoundBase.h:144
void * _pCharacter
データ判別用ポインタ ( nullptr でデータ無し )
Definition GxSysSoundBase.h:140
GxFloat4 _bonePosition[OBJECT_MOTION_USE_BONE_MAX]
骨座標
Definition GxSysSoundBase.h:142
void * _pCharacterFunction
モーション連動データアドレス
Definition GxSysSoundBase.h:141
32bitブーリアン
Definition GxDefine.h:173