Flash record sound locally

断了今生、忘了曾经 提交于 2019-12-08 13:51:04

问题


Using flex,As can we record sound from microphone and store locally and and upload later?? Is there any relevant links to this please indicate


回答1:


Check this link for how to use the microphone to record and use FileReference to save the recording




回答2:


It is possible to record audio using the Microphone API SAMPLE_DATA event. The data property of the event is a ByteArray with the audio data.

A web based Flash application could copy these data samples to a data structure in memory and prompt the user to save the data to a local file. An AIR application would be able to write the data to the file system or SQL database directly.

See the links below for accessing audio from the microphone in ActionScript:

  • http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d1d.html
  • http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Microphone.html

It may help to encode the data in a standardised format to help with reading and editing later (WAV or PCM). You may also want to use compression to reduce the file size for transmission (eg: Ogg Vorbis codec from Adobe).



来源:https://stackoverflow.com/questions/10102860/flash-record-sound-locally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!