1

I'm planning to program a small piano in flash that have an x number of notes to play through a SoundChannel.

What I have not found is a way to record what is playing through SoundChannel and send it as byteArray to a server side script that will save it as WAV (or mp3).

I know Flash Player 10.1 allows you to record sound, but everything I have found is about recording sound using the microphone class. It seems the way to go is to send the sound data to the microphone. That doesn't seem very right or possible though... But I don'r really know, has anyone had a similar idea and attempted to do it? Any possible solutions? Thank you!

2 Answers2

1

If you listen for the SampleDataEvent.SAMPLE_DATA of the sound object then you can readBytes as they are played, and save it to a bytearray. Or use the extract method on the sound object to get the bytes.

You can send the bytes to a server for processing into a file. This answer might help with some of the details.

Also this thread might help even more: http://www.kirupa.com/forum/showthread.php?t=338647

Community
  • 1
  • 1
Adam Harte
  • 10,369
  • 7
  • 52
  • 85
0

From my experience it's not possible to record anything except through the microphone. Some other drawbacks that are related:

  • You can't send sound data to the microphone
  • You can't get the raw sound data from a microphone or from streaming.
rzetterberg
  • 10,146
  • 4
  • 44
  • 54
  • yes that is what I fear... i'll keep trying though. i would need to have flash media server of red5 running if I can't do that, no? – Boris Dedoff May 03 '11 at 20:24
  • To being able to save the file you then you will need FMS or red5. Not sure about if you can save the stream if you are using AIR though. Should be possible but then again things that should be possible with Flash sometimes aren't due to all the different limitations. – rzetterberg May 03 '11 at 20:29