dl
dl::Audio类 参考

音频主控 更多...

#include <dl_audio.h>

Public 成员函数

 Audio (bool open)
 
void Init (std::string_view path_name)
 初始化配置
 
bool IsOpen ()
 是否使用
 
void SetPath (std::string_view path)
 设置资源路径(不设置则不会加载)
 
void SetWhitelist (const std::vector< std::string > &vec_load)
 设置加载白名单
 
void Load (std::string_view name, std::string_view path_name)
 加载一个音效
 
std::vector< std::string > GetAllSound ()
 返回所有加载的音效名
 
gcSound Create (std::string_view name)
 创建一个声音
 
gcSound CreateDefault ()
 
void _load ()
 由system调用
 
void _delete_sound (Sound *snd)
 
 ~Audio ()
 

友元

class System
 

详细描述

音频主控

在文件 dl_audio.h79 行定义.

构造及析构函数说明

◆ Audio()

dl::Audio::Audio ( bool open)

◆ ~Audio()

dl::Audio::~Audio ( )

成员函数说明

◆ _delete_sound()

void dl::Audio::_delete_sound ( Sound * snd)

◆ _load()

void dl::Audio::_load ( )

由system调用

◆ Create()

gcSound dl::Audio::Create ( std::string_view name)

创建一个声音

参数
[in]name资源名
注解
不会返回空指针

◆ CreateDefault()

gcSound dl::Audio::CreateDefault ( )
inline

在文件 dl_audio.h131 行定义.

◆ GetAllSound()

std::vector< std::string > dl::Audio::GetAllSound ( )

返回所有加载的音效名

◆ Init()

void dl::Audio::Init ( std::string_view path_name)

初始化配置

参数
[in]path_namejson文件路径

◆ IsOpen()

bool dl::Audio::IsOpen ( )
inline

是否使用

注解
启动参数关闭、或声音设备不存在

在文件 dl_audio.h93 行定义.

◆ Load()

void dl::Audio::Load ( std::string_view name,
std::string_view path_name )

加载一个音效

参数
[in]path_name路径
[in]name动命名

◆ SetPath()

void dl::Audio::SetPath ( std::string_view path)
inline

设置资源路径(不设置则不会加载)

参数
[in]path路径

在文件 dl_audio.h98 行定义.

◆ SetWhitelist()

void dl::Audio::SetWhitelist ( const std::vector< std::string > & vec_load)
inline

设置加载白名单

参数
[in]vec_load资源名,例如 music.intro
注解
白名单为空时,加载所有

在文件 dl_audio.h108 行定义.

友元及相关符号说明

◆ System

friend class System
friend

在文件 dl_audio.h81 行定义.


该类的文档由以下文件生成: