How to enable Speex codec on a microphone object in Flex 4?

From what I read, using Speek over Nellymoser is beneficial , but I can't figure out how to use it with the Flex 4 Microphone Object.

For example, the last line of code:

private var oMicrophone:Microphone;    
oMicrophone = Microphone.getMicrophone ();
oMicrophone.codec = "Speex"
oMicrophone.encodeQuality (8)

Gives me this compilation error:

Attempt to access inaccessible encodeQuality method via link with static type flash.media:Microphone

I am not impressed with the Adobe documentation on this .

Suppose I need to either import something or enable an add-on module that does not come with the Flex SDK - or ...?

+3
source share
1 answer

encodeQuality - , . , :

private var oMicrophone:Microphone;    
oMicrophone = Microphone.getMicrophone ();
oMicrophone.codec = SoundCodec.SPEEX //Use an enumerator class
oMicrophone.encodeQuality = 8;

, , .

+4

Source: https://habr.com/ru/post/1776530/


All Articles