Flash10录音编码设置

flash.media
public final class SoundCodec
继承 SoundCodec Inheritance Object

 

语言版本:  ActionScript 3.0
运行时版本:  Flash Player 10, AIR 1.5

 

 

 

SoundCodec 类是在设置 Microphone 类的 codec 属性时使用的常量值的枚举。

 



公共属性
  属性 定义方
  Inherited constructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
  Inherited prototype : Object
[静态] 对类或函数对象的原型对象的引用。
Object
公共方法
  方法 定义方
  Inherited
指示对象是否已经定义了指定的属性。
Object
  Inherited
指示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
  Inherited
指示指定的属性是否存在、是否可枚举。
Object
  Inherited
设置循环操作动态属性的可用性。
Object
  Inherited
返回指定对象的字符串表示形式。
Object
  Inherited
返回指定对象的原始值。
Object
公共常量
  常量 定义方
    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
posted @ 2009-08-27 15:37  94cool  阅读(512)  评论(0)    收藏  举报