Tonfall WAV-IO

November 14th, 2010

Tonfall has a new feature called WAV-IO. It reads and writes audio data in wav-format.

Decoding a WAV results in the flash.media.Sound data format 44.1Khz,Stereo,32bit (float).
You can play it with the dynamic Sound API. Encoding can be done by simply passing the data you created in SAMPLE_DATA_EVENT to the encoder after specifying the target wav-format. You have to finalize the encoder after writing. Both processes are on the fly - processing block by block. They do not have to be processed in a single Flashplayer frame time.

Supported formats

  • 44.1Khz/8bit/Mono
  • 44.1Khz/8bit/Stereo
  • 44.1Khz/16bit/Mono
  • 44.1Khz/16bit/Stereo
  • 44.1Khz/32bit/Mono
  • 44.1Khz/32bit/Stereo

Please check out IWavIOStrategy, if you want to implement new wav-formats.

Browse source code

Decode Example

Get Adobe Flash player

Filed under: +

8 Responses to “Tonfall WAV-IO”

  1. Tweets that mention Andre Michelle » Blog Archive » Tonfall WAV-IO -- Topsy.com Says:
    November 14th, 2010 at 1:59 pm

    [...] This post was mentioned on Twitter by Andre Michelle, Burak KALAYCI. Burak KALAYCI said: RT @andremichelle: New Blogpost: Wav Decoding & Encoding with Tonfall http://tinyurl.com/tonfall-wavIO [...]

  2. Nick Says:
    November 14th, 2010 at 5:33 pm

    Hi – very impressive! Lee Brimelow mentioned that you guys might be able to help here so here goes!

    I’m trying to capture input from the Flash mic, encode as an .mp3 and upload to a server. Do you have an .mp3 encoder class that would work?

    Many thanks for your help.

    Nick

  3. Andre Michelle Says:
    November 14th, 2010 at 5:57 pm

    Did you find this?
    http://code.google.com/p/flash-kikko/

  4. kutu Says:
    November 15th, 2010 at 11:08 am

    cant choose file, maybe filefilter set to “Wavformat” not to “wav”

  5. Andre Michelle Says:
    November 15th, 2010 at 9:55 pm

    @kutu: I forgot the asterisk

  6. [Tonfall] Sound API Framework - Flashforum Says:
    December 13th, 2010 at 7:55 am

    [...] WavDecoder (Abspielen von WAV Audio Dateien) Andere Beispiele:AS3 Particle Node Sequencer [...]

  7. Irshad Says:
    July 26th, 2011 at 3:16 pm

    Hi,

    I am trying to play a wav file with the below format, using popforge as3 library but I cannot play it.

    [WAV Header compression: 1, channels: 1, samplingRate: 8000, bytesPerSecond: 8000, blockAlign: 1, bitsPerSample: 8]

    Is there any way I can do it?

    Many thanks
    Irshad

  8. Boc la Rocha Says:
    November 2nd, 2012 at 8:13 am

    Hi,

    Would you like to give me one example of how to use your WavEncoder to encode a byte array ? I found your DemoAudioEncoder.as in demo folder but I can not use it to encode my byte array. In this example, you only encode generated amplitudes.

    My situation is like this :
    - I use Microphone to record voice.
    - I save recorded voice to a bytes array.
    Now I want to encode that bytes array.

    Thank you so much in advance.