Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

4. Exploring the APIs > Microphone

Microphone

All recently manufactured full sized iPods, iPhones, and iPads have microphones available.

Let’s review the code below. First, you will notice there is a private variable named microphone declared of type flash.media.Microphone. Within applicationComplete of the application an event handler function is called, which first checks to see if the device supports access to the microphone by reading the static property of the Microphone class. If this property returns as true, an instance of the Microphone is retrieved and set to the microphone variable, the rate is set to 44, and the setUseEchoSuppression method is used to set the echo suppression to true. There are also variables of type ByteArray and Sound declared within this application. There will be instances of these variables created during use of this application.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint