0

I want to record audio from a Swf file , not mic , not from network

just a simple swf file in local filesystem .

I use SwfLoader , load into my app , and record by :

// tigger by ENTEY_FRAME event
var bytes:ByteArray = new ByteArray();
SoundMixer.computeSpectrum(bytes, false, 0);
this.sound_bytes.writeBytes(bytes); //sound_bytes is ByteArray too

by , how to convert sound_bytes into a wav or mp3 ,or another known format ?

Thank you !!

Wendal Chen
  • 258
  • 3
  • 11

2 Answers2

0

Hey read the reply to this post a while back on how to record wav or mp3 files using a microphone How do I embed a Flash audio recorder in my site

I know you are not recording from a microphone but i think this is the general idea of how to do it... This is how the guy records to a wave file, look in his source code.

 WaveFile.writeBytesToWavFile(myWavFile, recorder.output, 16000, 1, 16)
Community
  • 1
  • 1
Stefan
  • 352
  • 3
  • 15
0

Flex 4 API allows you to directly do that. Check the following link out.

http://titansturf.in/2010/02/08/fetching-data-from-the-microhpone-and-recording-sound/

Neeraj
  • 8,408
  • 8
  • 41
  • 69