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
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

10: Utilizing Device Features > CAPTURING SOUND USING THE DEVICE'S MICROPHONE

CAPTURING SOUND USING THE DEVICE'S MICROPHONE

The microphone is another core feature of the mobile device. A mobile's sound capture device is commonly used in memo applications, which allow users to record a voice message and play it back later.

In this section you'll explore how to use the Microphone class to record audio streams, using the device's microphone.

Using the Microphone Class

For AS3-based mobile projects, you need to import the Microphone class, found in the flash.media package:

import flash.media.Microphone;

In total, 11 properties are associated with Microphone:

  • Microphone.activityLevel: Returns a number representing the amount of sound the microphone is detecting
  • Microphone.gain: A number representing the amount by which the microphone should multiply the signal before transmitting it

  

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