Flash10录音编码设置
| 包 | flash.media |
| 类 | public final class SoundCodec |
| 继承 | SoundCodec Object |
| 语言版本: | ActionScript 3.0 |
| 运行时版本: | Flash Player 10, AIR 1.5 |
SoundCodec 类是在设置
Microphone 类的 codec 属性时使用的常量值的枚举。
公共常量
| 常量 | 定义方 | ||
|---|---|---|---|
| NELLYMOSER : String = "NellyMoser"
[静态] 指定将使用 Nellymoser 编解码器进行音频压缩。 |
SoundCodec | ||
| SPEEX : String = "Speex"
[静态] 指定将使用 Speex 编解码器进行音频压缩。 |
SoundCodec | ||
常量详细信息
| NELLYMOSER | 常量 |
public static const NELLYMOSER:String = "NellyMoser"
| 语言版本: | ActionScript 3.0 |
| 运行时版本: | Flash Player 10, AIR 1.5 |
指定将使用 Nellymoser 编解码器进行音频压缩。此常量为 Microphone.codec 属性的默认值。
| SPEEX | 常量 |
public static const SPEEX:String = "Speex"
| 语言版本: | ActionScript 3.0 |
| 运行时版本: | Flash Player 10, AIR 1.5 |
指定将使用 Speex 编解码器进行音频压缩。
if(mic!=null)
{
mic.codec="Speex";
mic.encodeQuality=3; //这是设置压缩质量,越大音频质量越好,但是占用传输的带宽越大
}
编译的时候选择flash palyer 10,要不然编译不能通过的.
测试了一下语音编码,果然比以前的NellyMoser编码小了很多,带宽占用情况如下,
品质值 所需的比特率(KB/秒)
0 3.95
1 5.75
2 7.75
3 9.80
4 12.8
5 16.8
6 20.6
7 23.8
8 27.8
9 34.2
10 42.2
隐藏继承的公共属性
显示继承的公共属性
浙公网安备 33010602011771号