AudioServer¶
继承: Object
类别: 核心
简要说明¶
用于低级音频访问的服务器接口。
方法¶
无效 |
|
无效 |
add_bus_effect ( int bus_idx, AudioEffect effect, int at_position=-1 ) |
无效 |
capture_set_device ( String name ) |
generate_bus_layout ( ) const |
|
get_bus_channels ( int bus_idx ) const |
|
get_bus_effect ( int bus_idx, int effect_idx ) |
|
get_bus_effect_count ( int bus_idx ) |
|
get_bus_effect_instance ( int bus_idx, int effect_idx, int channel=0 ) |
|
get_bus_index ( String bus_name ) const |
|
get_bus_name ( int bus_idx ) const |
|
get_bus_peak_volume_left_db ( int bus_idx, int channel ) const |
|
get_bus_peak_volume_right_db ( int bus_idx, int channel ) const |
|
get_bus_send ( int bus_idx ) const |
|
get_bus_volume_db ( int bus_idx ) const |
|
get_device_list ( ) |
|
get_mix_rate ( ) const |
|
get_output_latency ( ) const |
|
get_speaker_mode ( ) const |
|
get_time_since_last_mix ( ) const |
|
get_time_to_next_mix ( ) const |
|
is_bus_bypassing_effects ( int bus_idx ) const |
|
is_bus_effect_enabled ( int bus_idx, int effect_idx ) const |
|
is_bus_mute ( int bus_idx ) const |
|
is_bus_solo ( int bus_idx ) const |
|
无效 |
lock ( ) |
无效 |
|
无效 |
remove_bus ( int index ) |
无效 |
remove_bus_effect ( int bus_idx, int effect_idx ) |
无效 |
set_bus_bypass_effects ( int bus_idx, bool enable ) |
无效 |
set_bus_effect_enabled ( int bus_idx, int effect_idx, bool enabled ) |
无效 |
set_bus_layout ( AudioBusLayout bus_layout ) |
无效 |
set_bus_mute ( int bus_idx, bool enable ) |
无效 |
set_bus_name ( int bus_idx, String name ) |
无效 |
set_bus_send ( int bus_idx, String send ) |
无效 |
set_bus_solo ( int bus_idx, bool enable ) |
无效 |
set_bus_volume_db ( int bus_idx, float volume_db ) |
无效 |
swap_bus_effects ( int bus_idx, int effect_idx, int by_effect_idx ) |
无效 |
unlock ( ) |
枚举¶
枚举 SpeakerMode :
SPEAKER_MODE_STEREO = 0 ---检测到两个或更少的扬声器。
SPEAKER_SURROUND_31 = 1 ---检测到3.1声道环绕声设置。
SPEAKER_SURROUND_51 = 2 ---检测到5.1声道环绕声设置。
SPEAKER_SURROUND_71 = 3 ---检测到7.1声道环绕声设置。
描述¶
音频服务器是用于音频访问的低级服务器接口。它负责创建示例数据(可播放音频)以及通过语音接口播放。
属性描述¶
int bus_count
违约 |
1 |
设定器 |
设置总线计数(值) |
吸气剂 |
获取总线计数() |
可用音频总线数。
String device
违约 |
“默认” |
设定器 |
设置设备(值) |
吸气剂 |
获取设备() |
当前设备的名称(请参见 get_device_list )
float global_rate_scale
违约 |
1.0 |
设定器 |
设置全局速率刻度(值) |
吸气剂 |
获取全局比率 |
缩放播放音频的速率(即将其设置为 0.5
将使音频播放速度提高两倍)。
方法说明¶
void add_bus ( int at_position=-1 )
在处添加总线 at_position
.
void add_bus_effect ( int bus_idx, AudioEffect effect, int at_position=-1 )
添加一个 AudioEffect 对公共汽车的影响 bus_idx
在 at_position
.
String capture_get_device ( )
Array capture_get_device_list ( )
void capture_set_device ( String name )
AudioBusLayout generate_bus_layout ( ) const
生成一个 AudioBusLayout 使用可用的总线和效果。
返回索引处总线的通道数 bus_idx
.
AudioEffect get_bus_effect ( int bus_idx, int effect_idx )
返回 AudioEffect 就位 effect_idx
在公共汽车上 bus_idx
.
返回在处对总线的影响数 bus_idx
.
AudioEffectInstance get_bus_effect_instance ( int bus_idx, int effect_idx, int channel=0 )
返回具有名称的总线索引 bus_name
.
返回带有索引的总线的名称 bus_idx
.
返回总线索引处左扬声器的峰值音量 bus_idx
和信道索引 channel
.
返回总线索引处右扬声器的峰值音量 bus_idx
和信道索引 channel
.
返回总线在索引处的总线的名称 bus_idx
发送到。
返回索引处的总线卷 bus_idx
在数据库中。
Array get_device_list ( )
返回在系统上检测到的所有音频设备的名称。
float get_mix_rate ( ) const
返回 AudioServer
.
float get_output_latency ( ) const
返回音频驱动程序的输出延迟。
SpeakerMode get_speaker_mode ( ) const
返回扬声器配置。
float get_time_since_last_mix ( ) const
float get_time_to_next_mix ( ) const
如果 true
,索引处的总线 bus_idx
正在绕过效果。
如果 true
,索引处的效果 effect_idx
在索引处的总线上 bus_idx
启用。
如果 true
,索引处的总线 bus_idx
静音。
如果 true
,索引处的总线 bus_idx
处于单独模式。
void lock ( )
锁定音频驱动程序的主循环。以后记得打开。
从索引移动总线 index
到索引 to_index
.
void remove_bus ( int index )
删除索引处的总线 index
.
删除索引处的效果 effect_idx
从索引处的总线 bus_idx
.
如果 true
,索引处的总线 bus_idx
正在绕过效果。
如果 true
,索引处的效果 effect_idx
在索引处的总线上 bus_idx
启用。
void set_bus_layout ( AudioBusLayout bus_layout )
覆盖当前使用的 AudioBusLayout .
如果 true
,索引处的总线 bus_idx
静音。
在索引处设置总线的名称 bus_idx
到 name
.
连接总线的输出 bus_idx
去一辆叫 send
.
如果 true
,索引处的总线 bus_idx
处于单独模式。
在索引处设置总线的卷 bus_idx
到 volume_db
.
交换总线中两个效果的位置 bus_idx
.
void unlock ( )
解锁音频驱动程序的主回路。(锁定后,应始终将其解锁。)