This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Plugins::FMOD::FMODCore Class

Header: #include <plugins/UnigineFMOD.h>
Notice
This set of functions is available when the FMOD plugin is loaded.

This class is intended to cover the basics / primitives of sound.

FMODCore Class

Members


void close ( ) #

Closes the connection to the output and returns to an uninitialized state without releasing the object.

void release ( ) #

Closes and frees this object and its resources.

void update ( ) #

Updates the FMOD system.

void initCore ( int max_channels, FMODEnums::INIT_FLAGS flags ) #

Initializes the system object and prepares FMOD for playback.

Arguments

  • int max_channels - Maximum number of Channel objects available for playback, also known as virtual channels. Virtual channels will play with minimal overhead, with a subset of 'real' voices that are mixed, and selected based on priority and audibility. Range: [0; 4095]
  • FMODEnums::INIT_FLAGS flags - Initialization flags. More than one mode can be set at once by combining them with the OR operator.

Sound * createSound ( const char * name_of_data, FMODEnums::FMOD_MODE mode ) #

Loads a sound into memory, opens it for streaming or sets it up for callback based sounds.

Arguments

  • const char * name_of_data - Name of the file or URL to open (UTF-8 string) or a pointer to a preloaded sound memory block.
  • FMODEnums::FMOD_MODE mode - Behavior modifier for opening the sound.

Return value

Newly created Sound object.

Sound * createStream ( const char * url ) #

Creates a stream, for example, an internet stream to be used as a radio.

Arguments

  • const char * url - URL of the resource.

Return value

Newly created Sound object.

Channel * playSound ( Sound * sound, ChannelGroup * channel_group, bool paused ) #

Plays a sound on a channel.

Arguments

  • Sound * sound - Sound to play.
  • ChannelGroup * channel_group - Group to output to instead of the master.
  • bool paused - Determines whether to start in the paused state. Start a Channel paused to allow altering attributes without it being audible, then follow it up with a call to ChannelControl::setPaused with paused = False.

Return value

Newly playing channel.

void setListener3DAttributes ( int listener, const Math::Vec3 & position, const Math::Vec3 & up, const Math::Vec3 & forward, const Math::Vec3 & velocity ) #

Sets the 3D attributes of the listener. Vectors must be provided in the correct handedness.

Arguments

  • int listener - Listener index.
  • const Math::Vec3 & position - Position in world space used for panning and attenuation.
  • const Math::Vec3 & up - Upwards orientation, must be of unit length (1.0) and perpendicular to forward.
  • const Math::Vec3 & forward - Forwards orientation, must be of unit length (1.0) and perpendicular to up.
  • const Math::Vec3 & velocity - Velocity in world space used for doppler.

void getListener3DAttributes ( int listener, Math::Vec3 & position, Math::Vec3 & up, Math::Vec3 & forward, Math::Vec3 & velocity ) #

Returns the 3D attributes of the listener.

Arguments

  • int listener - Listener index.
  • Math::Vec3 & position - Position in world space.
  • Math::Vec3 & up - Upwards orientation.
  • Math::Vec3 & forward - Forwards orientation.
  • Math::Vec3 & velocity - Velocity in world space.

Channel * getChannel ( int index ) #

Returns the channel object at the specified index.

Arguments

  • int index - Channel index.

Return value

Channel object.
Last update: 2022-03-10
Build: ()