Playing recorded audio
After capturing the microphone's raw audio data, you will need a means of playing it back. This recipe will show you how to send the data to your device's speaker.
If you have completed the Recording microphone audio recipe, then you can work from the code you wrote for it. Alternatively, from the book's accompanying code bundle, open
chapter10\recipe6\recipe.fla and use it as a starting point.
Currently the FLA will record audio from the microphone and store it within a member variable of type
soundData. We will add code that plays back the audio once the user has finished recording it.
How to do it...
The following changes are required to read and playback the recorded audio:
- Import ...