![]() |
Kiwano Engine v1.3.x
|
音频模块 更多...
#include <Module.h>
Public 成员函数 | |
| void | Open () |
| 开启音频设备 | |
| void | Close () |
| 关闭音频设备 | |
| void | RegisterTranscoder (StringView ext, RefPtr< Transcoder > transcoder) |
| 注册解码器 更多... | |
| RefPtr< Transcoder > | GetTranscoder (StringView ext) |
| 获取解码器 | |
| RefPtr< AudioData > | Decode (StringView file_path) |
| 解码音频 更多... | |
| RefPtr< AudioData > | Decode (const Resource &res, StringView ext="") |
| 解码音频 更多... | |
| bool | CreateSound (Sound &sound, RefPtr< AudioData > data) |
| 创建音频 | |
| void | SetupModule () override |
| 启动模块 更多... | |
| void | DestroyModule () override |
| 销毁模块 更多... | |
Public 成员函数 继承自 kiwano::Module | |
| virtual void | SetupModule () |
| 启动模块 更多... | |
| virtual void | DestroyModule () |
| 销毁模块 更多... | |
| virtual void | OnUpdate (UpdateModuleContext &ctx) |
| 更新时 更多... | |
| virtual void | HandleEvent (EventModuleContext &ctx) |
| 事件处理 更多... | |
| virtual void | BeforeRender (RenderModuleContext &ctx) |
| 渲染前 更多... | |
| virtual void | OnRender (RenderModuleContext &ctx) |
| 渲染时 更多... | |
| virtual void | AfterRender (RenderModuleContext &ctx) |
| 渲染后 更多... | |
额外继承的成员函数 | |
Public 类型 继承自 kiwano::Singleton< Module > | |
| using | object_type = Module |
静态 Public 成员函数 继承自 kiwano::Singleton< Module > | |
| static object_type & | GetInstance () |
| static object_type * | GetInstancePtr () |
Protected 成员函数 继承自 kiwano::Singleton< Module > | |
| Singleton (const Singleton &)=delete | |
| Singleton & | operator= (const Singleton &)=delete |
静态 Protected 属性 继承自 kiwano::Singleton< Module > | |
| static Module | instance_ |
音频模块
| RefPtr< AudioData > kiwano::audio::Module::Decode | ( | const Resource & | res, |
| StringView | ext = "" |
||
| ) |
解码音频
| res | 音频资源 |
| ext | 音频类型,决定了使用何种解码器 |
| RefPtr< AudioData > kiwano::audio::Module::Decode | ( | StringView | file_path | ) |
解码音频
| file_path | 本地音频文件路径 |
|
overridevirtual |
销毁模块
重载 kiwano::Module .
| void kiwano::audio::Module::RegisterTranscoder | ( | StringView | ext, |
| RefPtr< Transcoder > | transcoder | ||
| ) |
注册解码器
| ext | 文件类型(如:ogg),* 为默认解码器 |
| transcoder | 解码器 |
|
overridevirtual |
启动模块
重载 kiwano::Module .