版本

menu_open

include/AK/MotionEngine/Common/AkMotionEngine.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 #pragma once
00029 
00030 #include <AK/SoundEngine/Common/AkTypes.h>
00031 #include <AK/SoundEngine/Common/AkSoundEngineExport.h>
00032 #include <AK/SoundEngine/Common/IAkPlugin.h>
00033 
00034 #define AKMOTIONDEVICEID_RUMBLE 406
00035 
00036 /// Audiokinetic namespace
00037 namespace AK
00038 {
00039 
00040 namespace MotionEngine
00041 {
00042     /// Connects a motion device to a player.  Call this function from your game to tell the motion engine that
00043     /// a player is using the specified device.
00044     /// \return 
00045     /// - AK_Success if the initialization was successful
00046     /// - AK_Fail if the device could not be initialized.  Usually this means the drivers are not installed.
00047     /// \sa
00048     /// - \ref integrating_elements_motion
00049     AK_EXTERNAPIFUNC(AKRESULT, AddPlayerMotionDevice)(
00050         AkUInt8 in_iPlayerID,           ///< Player number, must be between 0 and 3.  See platform-specific documentation for more details.
00051         AkUInt32 in_iCompanyID,         ///< Company ID providing support for the device
00052         AkUInt32 in_iDeviceID,          ///< Device ID, must be one of the currently supported devices. 
00053         void* in_pDevice = NULL,        ///< PS4: PS4 Device handle, returned by scePadOpen. 
00054                                         ///< Windows: Windows Direct Input Device reference for DirectInput. NULL to use XInput. 
00055                                         ///< XboxOne: Use IGamepad::Id. 
00056                                         ///< Motion plugins: see plugin vendor documentation.
00057                                         ///< Keep NULL for all other device types.                                      
00058         AkUInt32 in_uSize = 0           ///< Reserved for plugins. Keep to zero unless plugin usage mandates it.
00059         );
00060 
00061     /// Disconnects a motion device from a player port.  Call this function from your game to tell the motion engine that
00062     /// a player is not using the specified device anymore.
00063     /// \sa
00064     /// - \ref integrating_elements_motion
00065     AK_EXTERNAPIFUNC( void, RemovePlayerMotionDevice )(
00066         AkUInt8 in_iPlayerID,           ///< Player number, must be between 0 and 3.  See platform-specific documentation for more details.
00067         AkUInt32 in_iCompanyID,         ///< Company ID providing support for the device
00068         AkUInt32 in_iDeviceID           ///< Device ID, must be one of the currently supported devices. 
00069         );
00070 
00071     /// Attaches a player to a listener.  This is necessary for the player to receive motion through the connected
00072     /// devices.  
00073     /// \sa
00074     /// - \ref integrating_elements_motion
00075     /// - \ref soundengine_listeners 
00076     AK_EXTERNAPIFUNC( void, SetPlayerListener )(
00077         AkUInt8 in_iPlayerID,               ///< Player ID, between 0 and 3
00078         AkGameObjectID in_uListenerID       ///< Listener game object ID
00079         );
00080 
00081     /// Set the master volume for a player.  All devices assigned to this player will be affected by this volume.
00082     /// \sa
00083     /// - \ref integrating_elements_motion
00084     AK_EXTERNAPIFUNC( void, SetPlayerVolume )(
00085         AkUInt8 in_iPlayerID,                   ///< Player ID, between 0 and 3
00086         AkReal32 in_fVolume                     ///< Master volume for the given player, in decibels (-96.3 to 96.3).
00087         );
00088 }
00089 }

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅