mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
update demo, support acodec
This commit is contained in:
parent
acdd5a827e
commit
15f651bccd
11 changed files with 97 additions and 20 deletions
Binary file not shown.
|
@ -273,7 +273,7 @@ package
|
|||
var microRate:int = 22; // 22 === 22050 Hz
|
||||
|
||||
trace("[Publish] audio encoding parameters: "
|
||||
+ "audio(microphone) encodeQuality=" + microEncodeQuality
|
||||
+ "audio(microphone) codec=" + acodec.codec + "encodeQuality=" + microEncodeQuality
|
||||
+ ", rate=" + microRate + "(22050Hz)"
|
||||
);
|
||||
|
||||
|
@ -288,7 +288,15 @@ package
|
|||
m.rate = microRate;
|
||||
|
||||
// see: http://www.adobe.com/cn/devnet/flashplayer/articles/acoustic-echo-cancellation.html
|
||||
m.codec = SoundCodec.SPEEX;
|
||||
if (acodec.codec == "nellymoser") {
|
||||
m.codec = SoundCodec.NELLYMOSER;
|
||||
} else if (acodec.codec == "pcma") {
|
||||
m.codec = SoundCodec.PCMA;
|
||||
} else if (acodec.codec == "pcmu") {
|
||||
m.codec = SoundCodec.PCMU;
|
||||
} else {
|
||||
m.codec = SoundCodec.SPEEX;
|
||||
}
|
||||
m.framesPerPacket = 1;
|
||||
}
|
||||
private function __build_video_codec(stream:NetStream, c:Camera, vcodec:Object):void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue