Call flowchart of the getoutput function of the audio output device in the audio system

Source: Internet
Author: User

In the audio system, the call flowchart of the getoutput function for setting the sound output device is as follows:

There is only one derived class for audiopolicyclientinterface, that is, the audiopolicyservice class. The base classes of audiopolicyservice are defined as follows:

Class audiopolicyservice: Public bnaudiopolicyservice, public audiopolicyclientinterface, public ibinder: deathrecipient {

Therefore, the audiopolicymanagerbase: getoutput function calls the openoutput function of the member variable of the audiopolicyclientinterface interface type, which is actually called the audiopolicyservice: getoutput function.

The audiotrack: getoutput function is called in the audiotrack: Start () and audiotrack: obtainbuffer functions.

The audiotrack: Start () function is called in the mediaplayerservice: audiooutput: Start () function.

For the relationship between audiotrack and mediaplayer, refer:Process of creating audiotrack in mediaplayer

In addition, audioflinger's internal class playbackthread also contains the getoutput function, which returns an audio output hardware abstract interface class audiostreamout object.

There are four Derived classes for the interface class audiostreamout, which are:

Audiostreamoutdump, audiostreamoutalsa, audiostreamoutgeneric, and audiostreamoutstub.

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: 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.