Android audio system Java code reading

Source: Internet
Author: User

The audio system Java-related code is in the./frameworks/base/Media/Java/Android/Media/directory.

There are mainly the following files:
Audiomanager. Java
Provides an interface for upper-layer applications to manage sound settings.

Audioservice. Java
Audio setting service, which is started in systemserver to provide services for all audio-related settings.
An audiosystemthread class is defined in audioservice to monitor audio control.
When there is a request, it calls the audiosystem interface to implement audio control,
Here message processing is asynchronous. In addition, the audioservice abstracts a set of audio sending control messages.
Good interfaces provide support for audiomanager.

Audiosystem. Java:
It defines the basic types of audio systems and interfaces for basic operations. It corresponds
Frameworks/base/CORE/JNI/android_media_audiosystem.cpp

Ringtone. Java
Ringtonemanager. Java
Provides quick playback and management interfaces for ringtones, alarm alarms, and other reminders.

Audiotrack. Java
Directly provides support for PCM data, corresponding to frameworks/base/CORE/JNI/android_media_audiotrack.cpp
Soundpool. Java
Provides an interface for referencing playback sound and optimizes file loading.

Tonegenerator. Java
Supports playing DTMF tones,
For example, the dialing tone of the phone corresponds to directly providing support for PCM data, corresponding to frameworks/base/CORE/JNI/android_media_tonegenerator.cpp

Audiorecord. Java
This is the external recording interface of the audio system, corresponding to: Frameworks/base/CORE/JNI/android_media_audiorecord.cpp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.