CN116450079A - Volume control method, vehicle-mounted information entertainment device and storage medium - Google Patents

Volume control method, vehicle-mounted information entertainment device and storage medium Download PDF

Info

Publication number
CN116450079A
CN116450079A CN202310254057.3A CN202310254057A CN116450079A CN 116450079 A CN116450079 A CN 116450079A CN 202310254057 A CN202310254057 A CN 202310254057A CN 116450079 A CN116450079 A CN 116450079A
Authority
CN
China
Prior art keywords
played
sound source
audio
volume
source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310254057.3A
Other languages
Chinese (zh)
Inventor
董世园
艾春玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Jiefa Technology Co ltd
Original Assignee
Hefei Jiefa Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Jiefa Technology Co ltd filed Critical Hefei Jiefa Technology Co ltd
Priority to CN202310254057.3A priority Critical patent/CN116450079A/en
Publication of CN116450079A publication Critical patent/CN116450079A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application discloses a volume control method, vehicle-mounted information entertainment and a storage medium, wherein the volume control method comprises the steps of determining a sound source to be played for playing, wherein the sound source to be played is a sound source which calls or does not call audio tracks for playing; based on the calling condition of the audio track class, responding to the calling of the audio strategy manager class, and acquiring an audio strategy configuration file; according to the audio strategy configuration file, the audio playing volume is obtained through calculation, so that volume control is carried out on at least one played audio source and the audio source to be played, volume control is carried out without calling audioFocus class, dependence on the audioFocus class is eliminated, compatibility is better, flexible customization can be achieved through the audio strategy configuration file, high-priority audio sources are effectively highlighted, and better and flexible volume control effect is achieved.

Description

Volume control method, vehicle-mounted information entertainment device and storage medium
Technical Field
The present disclosure relates to the field of automotive electronics, and in particular, to a volume control method, a vehicle-mounted information entertainment device, and a storage medium.
Background
Audio systems on automobiles include, in addition to multimedia sounds, navigation sounds, telephones, etc., many important car alert sounds such as car reversing radar sounds, safety belts, turn signals, trunk, tire pressure, oil mass, electricity, etc. The sound importance of different sound source types is different, so that it is necessary to decide the sound output in different scenes, for example, which sound can be output in what scene, which scene needs to stop output, which scene needs to output the sound of some sound source with low sound pressure, so that the sound output of more important sound source is more obvious, and so on.
Therefore, how to realize the interaction of multiple sound sources on an automobile to make unimportant sound low or mute, and how to realize flexible custom sound source output behavior and other sound volume control aiming at different automobile types are the problems to be solved.
Disclosure of Invention
The application provides at least one volume control method, vehicle-mounted information entertainment and a storage medium, so as to solve the problems.
The first aspect of the application provides a volume control method, which is applied to vehicle-mounted information entertainment equipment, wherein an android operating system is installed in a chip of the vehicle-mounted information entertainment equipment, the android operating system comprises audio tracks and an audio policy manager, and the android operating system is further configured with an audio policy configuration file; the volume control method comprises the following steps: determining a sound source to be played for playing, wherein the sound source to be played is a sound source which calls or does not call the audio track class for playing; based on the calling condition of the audio track class, responding to the calling of the audio strategy manager class, and acquiring the audio strategy configuration file; and calculating the playing volume of the sound source according to the audio strategy configuration file so as to control the volume of at least one played sound source and the sound source to be played.
In some embodiments, the audio source to be played includes a first audio source to be played, where the first audio source to be played is an audio source that invokes the audio track class to play; the obtaining the audio policy configuration file based on the calling condition of the audio track class and in response to the audio policy manager class being called comprises: and in response to being called from the audio track class to start playing, to the audio policy manager class to start outputting, acquiring the audio policy configuration file.
In some embodiments, the audio source to be played further includes a second audio source to be played, where the second audio source to be played is an audio source that does not call the audio track class to play; the obtaining the audio policy configuration file based on the calling condition of the audio track class and in response to the calling of the audio policy manager class further comprises: and responding to the calling of the preset interface by the application program corresponding to the second audio source to be played, calling the audio strategy manager class, and acquiring the audio strategy configuration file.
In some embodiments, the volume control method further comprises: determining a to-be-played sound source from the at least one played sound source, and calculating to obtain the sound source playing volume according to the priority of the at least one played sound source in the audio strategy configuration file and the volume control proportion between the priorities of the at least one played sound source, so as to control the volume of the to-be-played sound source and the remaining played sound sources in the at least one played sound source.
In some embodiments, the calculating, according to the audio policy configuration file, a sound source playing volume to control the volume of at least one played sound source and the sound source to be played includes: according to the priority of the to-be-played sound source, the priority of at least one played sound source and the volume control proportion between the priority of the to-be-played sound source and the priority of the at least one played sound source in the audio strategy configuration file, calculating to obtain the play volume of the sound source, and accordingly controlling the volume of the at least one played sound source and the to-be-played sound source; or according to the priority of the at least one played sound source and the volume control proportion between the priorities of the at least one played sound source in the audio strategy configuration file, calculating to obtain the sound source playing volume, and accordingly controlling the volume of the to-be-stopped played sound source and the remaining played sound sources in the at least one played sound source.
In some embodiments, the calculating according to the priority of the to-be-played sound source, the priority of the at least one played sound source, and the volume control ratio between the priority of the to-be-played sound source and the priority of the at least one played sound source in the audio policy configuration file, obtains a sound source playing volume, and thus performs volume control on the at least one played sound source and the to-be-played sound source, includes: responding to the priority of the to-be-played sound source being higher than the priority of any one played sound source in the at least one played sound source, and performing volume down operation on the at least one played sound source according to the volume of the to-be-played sound source and the volume control proportion; and responding to the priority of the to-be-played sound source not higher than the priority of one played sound source in the at least one played sound source, and performing volume down operation on the to-be-played sound source according to the current volume of the one played sound source in the at least one played sound source and the volume control proportion.
In some embodiments, the at least one played sound source comprises a first played sound source, wherein the first played sound source has a priority no higher than the priority of the sound source to be played; the volume down operation for the first played sound source includes: acquiring the adjusted volume of the first played sound source, wherein the adjusted volume of the first played sound source is obtained according to the volume of the sound source to be played or the current volume of one played sound source in the at least one played sound source and the volume control proportion; in response to the adjusted volume of the first played sound source being greater than or equal to the current volume of the first played sound source, maintaining the current volume of the first played sound source unchanged; and/or modifying the current volume of the first played sound source to the tuned volume in response to the tuned volume of the first played sound source being less than the current volume of the first played sound source.
In some embodiments, the calculating according to the priority of the at least one played sound source in the audio policy configuration file and the volume control proportion between the priorities of the at least one played sound source, to obtain the sound source playing volume, so as to perform volume control on the to-be-stopped playing sound source and the remaining played sound sources in the at least one played sound source includes: stopping playing the play source to be stopped, and keeping the volume of the rest of the played sound sources in the at least one played sound source unchanged, in response to the priority of the play source to be stopped being lower than the priority of one of the rest of the played sound sources in the at least one played sound source; and stopping playing the play source to be stopped in response to the priority of the play source to be stopped being higher than the priority of any one of the at least one played sound source, recovering the volume of the played sound source with the highest priority in the rest played sound sources, and performing volume down operation on the rest played sound sources according to the current volume of the played sound source with the highest priority in the rest played sound sources and the volume control proportion between the priorities of the rest played sound sources.
A second aspect of the present application provides a chip, including a memory and a processor coupled to each other, where the processor is configured to execute program instructions stored in the memory, so as to implement the volume control method in the first aspect.
A third aspect of the present application provides an in-vehicle infotainment device comprising a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the volume control method of the first aspect.
A fourth aspect of the present application provides a control device, including a memory and a processor coupled to each other, where the processor is configured to execute program instructions stored in the memory, so as to implement the volume control method in the first aspect.
A fifth aspect of the present application provides a non-transitory computer readable storage medium for storing program instructions which, when executed by a processor, are for implementing the volume control method in the first aspect described above.
A sixth aspect of the present application provides a computer program product for storing program instructions for implementing the volume control method of the first aspect described above when executed by a processor.
According to the scheme, the audio source to be played is determined to play, wherein the audio source to be played can be an audio source which calls or does not call an audio track class to play, and an audio strategy configuration file is acquired based on the calling condition of the audio track class and in response to the fact that the audio strategy manager class is called; according to the audio strategy configuration file, the audio source playing volume is obtained through calculation, so that volume control is conducted on at least one played audio source and the audio source to be played, volume control can be conducted without calling audioFocus class, dependence on audioFocus class is eliminated, compatibility is better, flexible customization can be achieved through the audio strategy configuration file, high-priority audio sources are effectively highlighted, and better and flexible volume control effect is achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the technical aspects of the application.
Fig. 1 is a schematic diagram of audio playing through AudioFocus class in an Android operating system according to the present application;
FIG. 2 is a schematic diagram of audio preemption for which the present application is directed;
fig. 3 is a flow chart of a volume control method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a scenario of volume control according to an embodiment of the present application;
FIG. 5 is a timing diagram of volume control according to an embodiment of the present application;
FIG. 6 is a schematic diagram of another scenario of volume control in an embodiment of the present application;
FIG. 7 is another timing diagram of volume control according to one embodiment of the present application;
FIG. 8 is a schematic workflow diagram of a volume down operation in one embodiment of the present application;
FIG. 9 is a schematic diagram of a workflow for stopping playback in an embodiment of the present application;
FIG. 10 is a schematic diagram of a chip according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a vehicle infotainment device according to an embodiment of the present application;
FIG. 12 is a schematic view of a control device according to an embodiment of the present application;
FIG. 13 is a schematic diagram of the structure of a non-volatile computer-readable storage medium in an embodiment of the present application;
fig. 14 is a schematic diagram of a computer program product in an embodiment of the present application.
Detailed Description
The present application is described in further detail below with reference to the drawings and examples. It is specifically noted that the following examples are only for illustration of the present application, but do not limit the scope of the present application. Likewise, the following embodiments are only some, but not all, of the embodiments of the present application, and all other embodiments obtained by one of ordinary skill in the art without making any inventive effort are within the scope of the present application.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. Further, "a plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C. Furthermore, the terms "first," "second," and "third" in this application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
Currently, in a vehicle product or a mobile terminal interacting with the vehicle product, volume control is generally performed through AudioFocus class in an Android operating system, wherein the action of volume adjustment can be completed in an application program APP or in the Android operating system. In order to facilitate understanding of the application, audio playing through AudioFocus class in the Android operating system is described first.
As shown in fig. 1, fig. 1 is a schematic diagram of audio playing through AudioFocus class in an Android operating system. In fig. 1, a certain APP is involved for playing. When the APP is to play the audio, firstly, a focus is applied through a requestAudioFocus mechanism, and meanwhile, a Listener function of the APP is registered, so that an audio focus is obtained, after the focus is successfully preempted, the audio is played through an AudioTrack class, wherein interfaces to be used for playing the audio through the AudioTrack class comprise a play interface of a JAVA layer and a start interface of a Native layer.
When there is another APP to play, the focus is applied through the requestAudioFocus mechanism, i.e. the focus is preempted, and then play is performed, where the APP in fig. 1 above is informed of the need to turn down the volume from the registered lister function.
Specifically, assuming that APP in fig. 1 is Music APP (i.e., music APP) above, the other APP is navigation APP, as shown in fig. 2, fig. 2 is a schematic diagram of audio preemption for which the present application is directed. Firstly, music APP plays music, and the process is as follows: applying for audio focus to AudioFocus class through requestAudioFocus mechanism, wherein incoming stream type is MUSIC, i.e. incoming audio stream type is MUSIC, while mListener is registered for receiving notification. Then, after the music APP is successfully applied to the focus, the music starts to be played through the AudioTrack class.
At this time, the navigation APP prepares to broadcast the navigation sound, applies for the audio focus to the AudioFocus class through the requestAudioFocus mechanism, and because the focus is on the music APP at this time, the AudioFocus class notifies the music APP to stop playing through the mlstener.
The music APP receives the notification, and typically executes setVolume of the AudioTrack class in accordance with the notification to perform the volume depression action. However, if the music APP does not apply for the audio focus of AudioFocus before playing, or does not call setVolume after receiving notification, the volume of the music cannot be guaranteed to be low, so that the navigation sound is mixed in the music, and the driver cannot hear the navigation sound.
It should be noted that the descriptions of fig. 1 and fig. 2 above only describe portions relevant to the present application, and those skilled in the art will understand that portions of fig. 1 and fig. 2 not described in detail herein, and those portions not described in detail herein are also within the scope of the present application.
For this reason, the present application provides a volume control method, a vehicle-mounted infotainment and a storage medium to solve the above-mentioned problems.
As shown in fig. 3, fig. 3 is a flow chart of a volume control method according to an embodiment of the present application. The method is applied to vehicle-mounted information entertainment (IVI) equipment, an android operating system is installed in a chip of the vehicle-mounted information entertainment equipment, and it can be understood that the android operating system is a bottom system installed in the vehicle-mounted information entertainment equipment. The android operating system includes an audio track class and an audio policy manager class, where the audio track class is a key class in the android operating system and is used for playing a playback source, that is, playing audio, etc., and the function of the audio track class is understood by those skilled in the art and is not described in detail herein. The android operating system is further configured with an audio policy configuration file, and the format of the audio policy configuration file can be an xml format or any other file format capable of being realized, and is not particularly limited. It should be noted that other key types may be included in the android operating system installed in the vehicle-mounted infotainment device, which is not specifically limited in this application, and volume control may be achieved.
In particular, in some possible implementations, the method may be implemented by way of a processor invoking computer program instructions stored in a memory. As shown in fig. 3, the method comprises the steps of:
s1, determining a sound source to be played for playing, wherein the sound source to be played is a sound source which calls or does not call an audio track class for playing.
The sound source is audio played by a certain APP, for example, the sound source may be any one of touch screen sound, navigation sound, bluetooth communication sound, bluetooth music, multimedia sound, FM sound, reversing radar sound, safety belt sound and steering lamp sound. The audio track class in this embodiment is specifically described by taking the AudioTrack class as an example.
And determining the sound source to be played to play, wherein it can be understood that the sound source to be played is the sound source to be played, determining which one or more sound sources are the sound source to be played, and playing the one or more sound sources. The audio source to be played can be an audio source which calls or does not call an audio track class for playing, namely, when the audio source to be played is played, the audio track class can be called for playing, and the audio track class can be called for playing.
S2, based on the calling condition of the audio track class, responding to the calling of the audio strategy manager class, and acquiring an audio strategy configuration file.
The audio policy manager class in this embodiment is specifically illustrated by using the audiopolicy manager class as an example.
The calling condition of the audio track AudioTrack class, that is, when the audio track AudioTrack class is called or not called when the to-be-played playback source plays. Based on the calling condition of the audio track class, an audio policy configuration file is acquired in response to the audio policy manager class being called. The audio strategy configuration file defines the priorities of all the sound sources and the volume control proportion among the priorities of all the sound sources.
In the audio policy configuration file, each audio source is identified by the audio stream type (stream type), for example, one audio source is MUSIC, the audio stream type is MUSIC and corresponds to one priority, the other audio source is navigation sound, the audio stream type is GIS and corresponds to the other priority; and, the volume control proportion between the priorities corresponding to the audio stream types is also defined in the audio strategy configuration file.
In other embodiments, the audio stream type may also be identified by a number, for example, a certain audio source is music, its audio stream type is 1, corresponding to a priority, another audio source is navigation sound, and its audio stream type is 2; or other marking modes which can be realized, and the marking modes are set according to actual calling requirements, and are not particularly limited.
S3, according to the audio strategy configuration file, the sound source playing volume is obtained through calculation, and volume control is conducted on at least one played sound source and the sound source to be played.
The priority of the to-be-played sound source, such as navigation sound, can be known according to the audio strategy configuration file, the priority of at least one played sound source, such as music, and the volume control proportion between the to-be-played sound source and the priority of the currently played sound source are determined. Furthermore, according to the priority of each sound source and the volume control proportion between the priorities of each sound source, the sound source playing volume, such as navigation sound playing volume and music playing volume, is calculated. Thereby realizing volume control of at least one played sound source and the sound source to be played.
For example, when the music of the current music APP is being played, it is determined that the navigation sound of the navigation APP needs to be played, and in response to the audio policy manager being called, an audio policy configuration file is obtained, and according to the priority corresponding to the navigation sound of the navigation APP, the priority corresponding to the music of the music APP, and the volume control ratio between the priority corresponding to the navigation sound and the priority corresponding to the music in the audio policy configuration file, the navigation sound playing volume and the music playing volume are calculated, so that the volume control on the music of the music APP and the navigation sound of the navigation APP is realized.
According to the scheme, the audio source to be played is determined to play, wherein the audio source to be played can be an audio source which is played by calling or not calling an audio track AudioTrack class, and an audio strategy configuration file is acquired based on the calling condition of the audio track AudioTrack class and in response to the calling of an audio strategy manager audiopolicy manager class; according to the audio strategy configuration file, the audio source playing volume is obtained through calculation, so that volume control is conducted on at least one played audio source and the audio source to be played, volume control can be conducted without calling audioFocus class, dependence on audioFocus class is eliminated, compatibility is better, flexible customization can be achieved through the audio strategy configuration file, high-priority audio sources are effectively highlighted, and better and flexible volume control effect is achieved.
Based on the calling condition of the audio track class, and in response to the audio policy manager class being called, the audio policy configuration file is obtained. In an embodiment of the present application, the audio source to be played includes a first audio source to be played, where the first audio source to be played is an audio source for playing by calling an audio track; based on the calling condition of the audio track class, and in response to the audio policy manager class being called, obtaining an audio policy configuration file comprises the following steps: in response to the audio policy manager class being called to begin outputting from the audio track AudioTrack class to begin playing, an audio policy configuration file is obtained.
The audio track AudioTrack class is a key class in the android operating system, and is used for playing a playback source, that is, playing audio, etc., and the function of the audio track AudioTrack class is understood by those skilled in the art, and is not described in detail herein.
The audio source to be played comprises a first audio source to be played, wherein the first audio source to be played is an audio source for calling an audio track class to play, so that the audio strategy configuration file is obtained based on the fact that the audio track class is called and in response to the fact that an audio strategy manager audiopolicy manager class is called. Specifically, as shown in fig. 4, fig. 4 is a schematic view of a scenario of volume control in an embodiment of the present application, where an audio policy configuration file is obtained in response to an audio track class being called to start playing to an audio policy manager class being called to start outputting. That is, from when the audio track AudioTrack class is called to start playing, until when the audio policy manager audiopolicy manager class is called to start outputting, the audio policy configuration file is acquired to perform volume control.
Further, as shown in fig. 5, fig. 5 is a timing diagram of volume control in an embodiment of the present application, and for a sound source that invokes an AudioTrack class to play, an audio policy configuration file is obtained when a startOutput is invoked to start outputting from invoking AudioTrack. Wherein, calling audiotrack. Start starts playing to AudioPolicyManager in the audiopolicy manager AudioPolicyManager class:: startOutput is called to start outputting, which means that related calling operations between calling audiotrack. Start and calling AudioPolicyManager:: startOutput are all executed.
It should be noted that, in fig. 5, only the portions related to the present application are described, and those skilled in the art will understand that portions of fig. 5 that are not described in detail herein, and that portions that are not described in detail herein are also included in the scope of the present application.
Based on the calling condition of the audio track class, and in response to the audio policy manager class being called, the audio policy configuration file is obtained. In an embodiment of the present application, the audio source to be played further includes a second audio source to be played, where the second audio source to be played is a audio source that does not call an audio track class for playing; based on the calling condition of the audio track class, and in response to the audio policy manager class being called, the method acquires an audio policy configuration file, and further comprises: and responding to the calling of the preset interface by the application program corresponding to the second audio source to be played, calling the audio policy manager class to acquire an audio policy configuration file.
The audio track AudioTrack class is detailed in the description of the above embodiments and is not described here.
The audio strategy manager is used for acquiring an audio strategy configuration file, and the audio strategy manager is used for receiving the audio strategy configuration file. Specifically, as shown in fig. 6, fig. 6 is another schematic view of a sound volume control scenario in an embodiment of the present application, for a second sound source to be played that does not call the audio track class for playing, the audio policy manager class is called by calling a preset interface, and then an audio policy configuration file is obtained for volume control. The preset interface can be set according to actual calling requirements, and the setting process of the preset interface is not particularly limited.
Further, as shown in fig. 7, fig. 7 is another timing diagram of volume control in an embodiment of the present application, where the volume control is triggered by calling a preset interface for a second audio source to be played, which does not call the audio track class for playing. For example, the reversing radar sound of the reversing APP is a sound source that does not call the audio track AudioTrack class to play, and the reversing APP is provided with a preset interface, for example, by calling enablebackcar volume policy () and setParameters () (), until handlevolume policy () in the audio policy manager class is called, so as to obtain an audio policy configuration file to perform volume control.
In an embodiment of the present application, the volume control method further includes: determining a playing source to be stopped from at least one played sound source, and calculating to obtain the playing volume of the sound source according to the priority of the at least one played sound source in the audio strategy configuration file and the volume control proportion between the priority of the at least one played sound source, so as to control the volume of the playing source to be stopped and the remaining played sound sources in the at least one played sound source.
It will be appreciated that the at least one played sound source, i.e. the at least one sound source is currently playing, determines from the at least one played sound source that the sound source to be stopped, i.e. the sound source to be stopped is any one or any several of the at least one played sound sources. Determining the sound source needing to stop playing, and calculating the playing volume of the sound source according to the priority of at least one played sound source in the audio strategy configuration file and the volume control proportion between the priority of at least one played sound source, so as to control the volume of the sound source to be stopped and the rest played sound sources in the at least one played sound source.
It will be appreciated that the audio policy profile defines the priorities of the individual audio sources and the volume control ratio between the priorities of the individual audio sources. According to the priority of at least one played sound source in the audio strategy configuration file and the volume control proportion between the priority of at least one played sound source, calculating to obtain the playing volume of the sound source, and controlling the volume of the to-be-stopped playing sound source and the remaining played sound sources in the at least one played sound source.
For example, the currently playing sound source includes music of the music APP and navigation sound of the navigation APP, and it is determined that the navigation APP needs to stop playing, that is, the navigation sound of the navigation APP is the sound source to be stopped. According to the priority corresponding to the navigation sound of the navigation APP, the priority corresponding to the music of the music APP and the volume control proportion between the priority corresponding to the navigation sound and the priority corresponding to the music in the audio strategy configuration file, the music playing volume and the navigation sound playing volume are obtained through calculation, so that the volume control is carried out on the music of the music APP and the navigation sound of the navigation APP.
In an embodiment of the present application, according to an audio policy configuration file, a sound source playing volume is calculated to control a volume of at least one played sound source and a sound source to be played, including: according to the priority of the sound source to be played, the priority of at least one played sound source and the volume control proportion between the priority of the sound source to be played and the priority of at least one played sound source in the audio strategy configuration file, the sound source playing volume is obtained through calculation, and therefore volume control is carried out on the at least one played sound source and the sound source to be played; or according to the priority of at least one played sound source in the audio strategy configuration file and the volume control proportion between the priority of at least one played sound source, calculating to obtain the playing volume of the sound source, and controlling the volume of the to-be-stopped playing sound source and the remaining played sound sources in the at least one played sound source.
The android operating system is further configured with a configuration file analysis module and a volume processing module, wherein the configuration file analysis module is used for analyzing the audio strategy configuration file into an array in an audio strategy manager audiopolicy manager class. For example, the audio policy configuration file is an xml format file, and the configuration file analysis module can analyze the audio policy configuration file to obtain an array in an audio policy manager class, and further calculate to obtain the playing volume of the audio source according to the corresponding array, so as to control the volume of the audio source.
The volume processing module is used for calculating the playing volume of the sound source according to the priority of the sound source to be played, the priority of at least one played sound source and the volume control proportion between the priority of the sound source to be played and the priority of the at least one played sound source in the audio strategy configuration file, so as to control the volume of the at least one played sound source and the sound source to be played; or the volume control proportion between the priority of at least one played sound source and the priority of at least one played sound source in the audio strategy configuration file is used for calculating the playing volume of the sound source, so that the volume control is carried out on the playing source to be stopped and the rest played sound sources in the at least one played sound source.
The volume processing module performs volume control on the sound sources, and may perform volume down operation on the sound sources according to the volume control proportion between priorities corresponding to the sound sources. When the volume of the low-priority sound source is reduced, the volume of the other low-priority sound sources can be reduced according to the volume of the sound source with the highest priority in each sound source and the volume control proportion between the sound source with the highest priority and the sound sources with other low priorities.
It can be understood that the configuration file analysis module analyzes the audio policy configuration file into an array in an audio policy manager class, so that the volume processing module can calculate the playing volume of the audio source according to the priority of the audio source to be played, the priority of at least one played audio source, and the volume control ratio between the priority of the audio source to be played and the priority of the at least one played audio source in the audio policy configuration file through the corresponding array, so as to control the volume of the at least one played audio source and the audio source to be played.
For example, referring again to FIG. 5, audioTrack. Start is invoked to begin playing until AudioPolicyManager in the Audio policy manager class is invoked to begin outputting, and an audio policy profile is obtained to make volume control. In the startVolumePolicy step, the volume processing module, namely, the handleVolumePolicy () calculates the volume of the sound source to be played and the volume of the sound source to be played according to the priority of the sound source to be played, the priority of at least one played sound source and the volume control proportion between the priority of at least one played sound source and the priority of at least one played sound source, calls the volume setting API (Application Program Interface) to complete the setting of the volume of the sound source to be played and the volume of at least one played sound source, and plays according to the set volume of the sound source to be played, thereby realizing the volume control of at least one played sound source and the sound source to be played.
It can be understood that the configuration file analysis module analyzes the audio policy configuration file into an array in an audio policy manager class, so that the volume processing module can calculate the volume of playing the audio source according to the priority of at least one played audio source in the audio policy configuration file and the volume control proportion between the priorities of at least one played audio source through the corresponding array, so as to control the volume of the audio source to be stopped and the remaining played audio sources in the at least one played audio source.
For example, in the step of the stopVolumePolicy, the volume processing module calculates the volume of the played sound source of each of the to-be-stopped played sound source and the remaining played sound sources in the at least one played sound source according to the priority of the at least one played sound source and the volume control proportion between the priority of the at least one played sound source, calls the volume setting API to complete the setting of the volume of the to-be-stopped sound source and the remaining played sound source in the at least one played sound source, and plays according to the set volume of the played sound source, thereby realizing the volume control of the to-be-stopped sound source and the remaining played sound source in the at least one played sound source.
In an embodiment of the present application, according to a priority of a to-be-played sound source, a priority of at least one played sound source, and a volume control ratio between the priority of the to-be-played sound source and the priority of the at least one played sound source in an audio policy configuration file, a sound source playing volume is calculated, so as to perform volume control on the at least one played sound source and the to-be-played sound source, including: responding to the priority of the to-be-played sound source being higher than the priority of any one played sound source in the at least one played sound source, and performing volume lowering operation on the at least one played sound source according to the volume and the volume control proportion of the to-be-played sound source; and responding to the priority of the sound source to be played is not higher than the priority of one played sound source in the at least one played sound source, and performing volume lowering operation on the sound source to be played according to the current volume and volume control proportion of the one played sound source in the at least one played sound source.
It will be appreciated that in response to the priority of the audio source to be played being higher than the priority of any one of the at least one played audio source, i.e., the priorities of the various audio sources are defined in the audio policy profile and are all different. The priority of the to-be-played sound source is higher than the priority of any one of the at least one played sound source, the at least one played sound source is subjected to sound volume adjustment according to the sound volume and the sound volume control proportion of the to-be-played sound source, namely, the sound volume control proportion among the priorities of various kinds of audio is defined in the audio strategy configuration file, and the at least one played sound source with low priority is subjected to sound volume adjustment according to the corresponding sound volume control proportion.
For example, the currently playing sound source is music of a music APP and navigation sound of a navigation APP, that is, there are two played sound sources, and it is determined that the sound source to be played is a reversing radar sound of a reversing APP. The audio policy configuration file defines that the priority corresponding to music of the music APP is 9, the priority corresponding to navigation sound of the navigation APP is 6, the priority corresponding to reversing radar sound of the reversing APP is 2, the smaller the value is, the higher the priority is, the sound source to be played, namely the priority corresponding to reversing radar sound of the reversing APP is higher than the priority corresponding to played sound source, namely the music of the music APP and the navigation sound of the navigation APP. According to the volume of the reversing radar sound of the reversing APP and the volume control proportion between the priority corresponding to the reversing radar sound of the reversing APP and the priority corresponding to the music of the music APP, performing volume turning-down operation on the music of the music APP; and according to the volume of the reversing radar sound of the reversing APP and the volume control proportion between the priority corresponding to the reversing radar sound of the reversing APP and the priority corresponding to the navigation sound of the navigation APP, performing volume turning-down operation on the navigation sound of the navigation APP.
It will be appreciated that in response to the priority of the audio source to be played being no higher than the priority of one of the at least one played audio source, i.e., the priority of one of the at least one played audio source being higher than the priority of the audio source to be played. According to the current volume and volume control proportion of one played sound source in at least one played sound source, the volume of the to-be-played sound source is reduced, namely, according to the volume control proportion, the volume of the to-be-played sound source with low priority is reduced.
For example, the currently playing sound source includes music of music APP and reversing radar sound of reversing APP, wherein the priority corresponding to the music of music APP is lower than the priority corresponding to the reversing radar sound of reversing APP, and the music of music APP is subjected to volume down operation according to the volume of reversing radar sound of reversing APP and the volume control ratio between the priority corresponding to the reversing radar sound of reversing APP and the priority corresponding to the music of music APP. The method comprises the steps that a sound source to be played is determined to be a navigation sound of a navigation APP, the priority corresponding to the navigation sound of the navigation APP is higher than the priority corresponding to music of the music APP, but lower than the priority corresponding to a reversing radar sound of a reversing APP, and therefore the sound source to be played, namely the navigation sound of the navigation APP, is required to be subjected to sound volume lowering operation according to the sound volume of the reversing radar sound of the reversing APP and the sound volume control ratio between the priority corresponding to the reversing radar sound of the reversing APP and the priority corresponding to the navigation sound of the navigation APP.
In an embodiment of the present application, the at least one played audio source includes a first played audio source, where a priority of the first played audio source is not higher than a priority of an audio source to be played; the volume down operation for the first played sound source comprises: acquiring the adjusted volume of a first played sound source, wherein the adjusted volume of the first played sound source is obtained according to the volume of the sound source to be played or the current volume and volume control proportion of one played sound source in at least one played sound source; in response to the adjusted volume of the first played sound source being greater than or equal to the current volume of the first played sound source, maintaining the current volume of the first played sound source unchanged; and/or modifying the current volume of the first played sound source to the adjusted volume in response to the adjusted volume of the first played sound source being less than the current volume of the first played sound source.
The priority of the first played sound source is not higher than the priority of the sound source to be played, namely the priority of the sound source to be played is higher than the priority of the first played sound source in the audio strategy configuration file. At this time, the volume of the first played sound source is reduced, and a specific procedure of the volume reducing operation is described below with reference to fig. 8, and fig. 8 is a schematic workflow diagram of the volume reducing operation in an embodiment of the present application. Firstly, the adjusted volume of a first played sound source is obtained, wherein the adjusted volume of the first played sound source is obtained according to the volume of the sound source to be played or the current volume and volume control proportion of one played sound source in at least one played sound source. It can be understood that if the priority of the to-be-played sound source is higher than the priority of the first played sound source, according to the volume of the to-be-played sound source and the volume control ratio between the priority of the to-be-played sound source and the priority of the first played sound source, performing a volume down operation on the first played sound source, so as to obtain the adjusted volume of the first played sound source; if the priority of one played sound source in the at least one played sound source is higher than the priority of the first played sound source, the first played sound source is subjected to volume down operation according to the volume of the one played sound source in the at least one played sound source and the volume control proportion between the priority of the one played sound source in the at least one played sound source and the priority of the first played sound source, so that the adjusted volume of the first played sound source is obtained.
Then, the magnitude between the adjusted volume of the first played sound source and the current volume of the corresponding first played sound source is judged, and the current volume of the first played sound source is kept unchanged in response to the adjusted volume of the first played sound source being greater than or equal to the current volume of the first played sound source. That is, if the magnitude between the tuned volume and the current volume of the first played sound source is determined, and the tuned volume is greater than or equal to the current volume, the current volume of the first played sound source is controlled to be unchanged.
And in response to the tuned volume of the first played sound source being less than the current volume of the first played sound source, modifying the current volume of the first played sound source to the tuned volume. That is, if the size between the adjusted volume and the current volume of the first played sound source is determined, and the adjusted volume is smaller than the current volume, the current volume is modified to the adjusted volume.
For example, the audio policy configuration file defines that the priority corresponding to music of the music APP is 9, the priority corresponding to the navigation sound of the navigation APP is 6, the priority corresponding to the reversing radar sound of the reversing APP is 2, the smaller the value is, the higher the priority is, the sound source to be played, namely the priority corresponding to the reversing radar sound of the reversing APP is higher than the priority corresponding to the played sound source, namely the music of the music APP and the navigation sound of the navigation APP; the volume control ratio between the priority corresponding to the reversing radar sound of the reversing APP and the priority corresponding to the navigation sound of the navigation APP is 15%, the volume control ratio between the priority corresponding to the reversing radar sound of the reversing APP and the priority corresponding to the music of the music APP is 15%, and the volume control ratio between the priority corresponding to the navigation sound of the navigation APP and the priority corresponding to the music of the music APP is 20%.
Assuming that the audio source being played has music of the music APP, that is, one played audio source, the music of the music APP may be called a first played audio source, and the audio source to be played is determined to be a navigation sound of the navigation APP. Further, assuming that the current volume of music of the music APP is 25 db, and the volume of the audio to be played, that is, the navigation audio of the navigation APP is 50 db, according to the volume control ratio (20%) between the priority corresponding to the navigation audio of the navigation APP and the priority corresponding to the music of the music APP, the adjusted volume of the music APP is calculated to be 50×20% =10 db. As can be seen from the comparison, the adjusted volume (10 db) of the music APP is smaller than the current volume (25 db) of the music, the current volume of the music APP is modified to 10 db, and the music of the music APP is played according to the volume of 10 db.
Therefore, the sound source being played is music of the music APP and navigation sound of the navigation APP, namely, two played sound sources are provided, and the sound source to be played is determined to be reversing radar sound of the reversing APP. The current volume of music of the music APP is 10 db, the current volume of navigation sound of the navigation APP is 50 db, and further, assuming that the volume of the sound source to be played, that is, the reversing radar sound of the reversing APP is 80 db, according to the volume control ratio (15%) between the priority corresponding to the reversing radar sound of the reversing APP and the priority corresponding to the music of the music APP, the adjusted volume of the music APP is calculated to be 80×15% =12 db. As can be seen from comparison, the adjusted volume (12 db) of the music APP is greater than the current volume (10 db) of the music, and the current volume (10 db) of the music APP is controlled to be unchanged, i.e. the music of the music APP is continuously played at the volume of 10 db. According to the volume control proportion (15%) between the priority corresponding to the reversing radar sound of the reversing APP and the priority corresponding to the navigation sound of the navigation APP, the adjusted volume of the navigation sound of the navigation APP is calculated to be 80 x 15% = 12 db. As can be seen from the comparison, the tuned volume (12 db) of the navigation sound of the navigation APP is smaller than the current volume (50 db) of the navigation sound, the current volume of the navigation sound of the navigation APP is modified to 12 db, and the navigation sound of the navigation APP is played according to the volume of 12 db.
In an embodiment of the present application, according to a priority of at least one played sound source in an audio policy configuration file and a volume control ratio between priorities of at least one played sound source, a sound source playing volume is calculated, so as to perform volume control on a to-be-stopped playing sound source and remaining played sound sources in at least one played sound source, including: stopping playing the play source to be stopped, and keeping the volume of the rest played sound sources in the at least one played sound source unchanged, in response to the priority of the play source to be stopped being lower than the priority of one played sound source in the rest played sound sources in the at least one played sound source; and stopping playing the play source to be stopped in response to the priority of the play source to be stopped being higher than the priority of any played sound source in the at least one played sound source, recovering the volume of the played sound source with the highest priority in the rest of the played sound sources, and performing volume down operation on the rest of the played sound sources according to the current volume of the played sound source with the highest priority in the rest of the played sound sources and the volume control proportion between the priorities of the rest of the played sound sources.
Fig. 9 is a schematic workflow diagram of stopping playing in an embodiment of the present application, as shown in fig. 9, in an audio policy configuration file, priorities of each audio source and a volume control ratio between priorities of each audio source are defined, and according to the audio policy configuration file, a volume lowering operation is performed on a to-be-stopped playing source and the remaining played audio sources in at least one played source. The volume reducing operation is described in detail in the above embodiments, and will not be described here.
And stopping playing the play source to be stopped and controlling the volume of the rest played sound sources in the at least one played sound sources to be unchanged in response to the priority of the play source to be stopped being lower than the priority of one played sound source in the rest played sound sources, namely, the priority of the rest played sound sources is higher than the priority of the play source to be stopped.
For example, the audio source being played includes music of the music APP, navigation sound of the navigation APP and reversing radar sound of the reversing APP, the priority corresponding to the navigation sound of the navigation APP is 6, the priority corresponding to the reversing radar sound of the reversing APP is 2, and the priority corresponding to the reversing radar sound of the reversing APP, the priority corresponding to the navigation sound of the navigation APP and the priority corresponding to the music of the music APP decrease in sequence as the value is smaller. Assuming that the current volume of the reverse radar sound of the reverse APP is 80 db, the current volume of the navigation sound of the navigation APP is 12 db, and the current volume of the music APP is 10 db. The music of the music APP is required to be stopped to be played, the music of the music APP is determined as the music of the music APP, the priority corresponding to the music of the music APP is lower than the priority corresponding to the navigation sound of the navigation APP and the reversing radar sound of the reversing APP, the music of the music APP is stopped to be played, the sound volume of the navigation sound of the navigation APP and the reversing radar sound of the reversing APP are controlled to be unchanged, namely the reversing radar sound of the reversing APP is played still according to the sound volume of 80 decibels, and the navigation sound of the navigation APP is played according to the sound volume of 12 decibels.
And stopping playing the playback source to be stopped in response to the priority of the playback source to be stopped being higher than the priority of any played audio source in the at least one played audio source, namely, the priority of the playback source to be stopped is highest in the priorities of the at least one played audio source. After stopping playing the playing source to be stopped, restoring the volume of the played source with the highest priority in the remaining played sources, namely restoring the volume of the played source with the highest priority in the remaining played sources to the volume before volume control according to the volume of the playing source to be stopped and the corresponding volume control proportion. And traversing the residual played sound sources and performing volume lowering operation according to the current volume of the played sound source with the highest priority in the residual played sound sources and the volume control proportion between the priorities of the residual played sound sources.
For example, the audio source being played includes music of the music APP, navigation sound of the navigation APP and reversing radar sound of the reversing APP, the priority corresponding to the navigation sound of the navigation APP is 6, the priority corresponding to the reversing radar sound of the reversing APP is 2, and the priority corresponding to the reversing radar sound of the reversing APP, the priority corresponding to the navigation sound of the navigation APP and the priority corresponding to the music of the music APP decrease in sequence as the value is smaller. Assuming that the current volume of the reverse radar sound of the reverse APP is 80 db, the current volume of the navigation sound of the navigation APP is 12 db, and the current volume of the music APP is 10 db. Stopping playing of the reversing radar sound of the reversing APP is needed, the reversing radar sound of the reversing APP with the playing source to be stopped is determined to be the reversing radar sound of the reversing APP, the priority corresponding to the reversing radar sound of the reversing APP is higher than the priority corresponding to the navigation sound of the navigation APP and the music of the music APP, and the reversing radar sound of the reversing APP is stopped to be played.
Thus, the remaining played sound sources include the navigation sound of the navigation APP and the music of the music APP, the navigation sound of the navigation APP has a higher priority than the music of the music APP, and the volume of the navigation sound of the navigation APP is restored to be depressed. Before the volume of the reverse radar sound of the reverse APP and the volume of the music APP are adjusted down according to the volume control proportion, the volume of the navigation sound of the navigation APP is 50 db, and then the volume of the navigation sound of the navigation APP is restored, so that the current volume of the navigation sound of the navigation APP is 50 db.
Further, the priority corresponding to the navigation sound of the navigation APP is higher than the priority corresponding to the music of the music APP, and according to the volume control ratio (20%) between the priority corresponding to the navigation sound of the navigation APP and the priority corresponding to the music of the music APP, the adjusted volume of the music APP is calculated to be 50×20% =10 db. As can be seen from the comparison, the adjusted volume (10 db) of the music APP is equal to the current volume (10 db) of the music, the music of the music APP is continuously played according to the volume of 10 db, and the navigation sound of the navigation APP is played according to the volume of 50 db.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a chip according to an embodiment of the present application. The chip 1000 comprises a memory 1001 and a processor 1002 coupled to each other, the processor 1002 being adapted to execute program instructions stored in the memory 1001 to implement the steps of the volume control method embodiment described above.
In particular, the processor 1002 is configured to control itself and the memory 1001 to implement the steps of the volume control method embodiments described above. The processor 1002 may also be referred to as a CPU (Central Processing Unit ), and the processor 1002 may be an integrated circuit chip with signal processing capabilities. The processor 1002 may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 1002 may be commonly implemented by an integrated circuit chip.
Referring to fig. 11, fig. 11 is a schematic structural diagram of an in-vehicle infotainment device according to an embodiment of the present application. The in-vehicle infotainment device 1100 comprises a memory 1101 and a processor 1102 coupled to each other, the processor 1102 being adapted to execute program instructions stored in the memory 1101 to implement the steps of the volume control method embodiment described above. In one particular implementation scenario, the in-vehicle infotainment device 1100 may include, but is not limited to: the microcomputer, server, and in-vehicle infotainment device 1100 may also include mobile devices such as a notebook computer, tablet computer, and the like, without limitation.
In particular, the processor 1102 is configured to control itself and the memory 1101 to implement the steps of the volume control method embodiments described above. The processor 1102 may also be referred to as a CPU (Central Processing Unit ), and the processor 1102 may be an integrated circuit chip with signal processing capabilities. The processor 1102 may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 1102 may be commonly implemented by an integrated circuit chip.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a control device according to an embodiment of the present application. The control device 1200 comprises a memory 1201 and a processor 1202 coupled to each other, the processor 1202 being adapted to execute program instructions stored in the memory 1201 to implement the steps of the volume control method embodiment described above.
In particular, the processor 1202 is operative to control itself and the memory 1201 to implement the steps of the volume control method embodiments described above. The processor 1202 may also be referred to as a CPU (Central Processing Unit ), and the processor 1202 may be an integrated circuit chip with signal processing capabilities. The processor 1202 may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 1202 may be commonly implemented by an integrated circuit chip.
Referring to fig. 13, fig. 13 is a schematic structural diagram of a nonvolatile computer readable storage medium according to an embodiment of the present application. The computer readable storage medium 1300 is for storing program instructions 1301 which program instructions 1301 when executed by the processor 1102 are for implementing the steps in the embodiments of the volume control method described above.
Referring to fig. 14, fig. 14 is a schematic structural diagram of a computer program product according to an embodiment of the present application. The computer program product 1400 is for storing program instructions 1401 which program instructions 1401, when executed by the processor 1102, are for carrying out the steps of the volume control method embodiment described above.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
In the several embodiments provided in this application, it should be understood that the disclosed methods and related devices may be implemented in other ways. For example, the above-described embodiments of related devices are merely illustrative, e.g., the division of modules or elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication disconnection between the illustrated or discussed elements may be through some interface, indirect coupling or communication disconnection of a device or element, electrical, mechanical, or other form.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all or part of the technical solution contributing to the prior art or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (13)

1. The volume control method is characterized by being applied to vehicle-mounted information entertainment equipment, wherein an android operating system is installed in a chip of the vehicle-mounted information entertainment equipment, the android operating system comprises audio tracks and an audio strategy manager, and the android operating system is further configured with an audio strategy configuration file; the volume control method comprises the following steps:
determining a sound source to be played for playing, wherein the sound source to be played is a sound source which calls or does not call the audio track class for playing;
based on the calling condition of the audio track class, responding to the calling of the audio strategy manager class, and acquiring the audio strategy configuration file;
and calculating the playing volume of the sound source according to the audio strategy configuration file so as to control the volume of at least one played sound source and the sound source to be played.
2. The method of claim 1, wherein the audio source to be played comprises a first audio source to be played, the first audio source to be played being an audio source that invokes the audio track class to play;
the obtaining the audio policy configuration file based on the calling condition of the audio track class and in response to the audio policy manager class being called comprises:
And in response to being called from the audio track class to start playing, to the audio policy manager class to start outputting, acquiring the audio policy configuration file.
3. The method of claim 1, wherein the audio source to be played further comprises a second audio source to be played, the second audio source to be played being an audio source that does not invoke the audio track class for playing;
the obtaining the audio policy configuration file based on the calling condition of the audio track class and in response to the calling of the audio policy manager class further comprises:
and responding to the calling of the preset interface by the application program corresponding to the second audio source to be played, calling the audio strategy manager class, and acquiring the audio strategy configuration file.
4. The method of claim 1, wherein the volume control method further comprises:
determining a to-be-played sound source from the at least one played sound source, and calculating to obtain the sound source playing volume according to the priority of the at least one played sound source in the audio strategy configuration file and the volume control proportion between the priorities of the at least one played sound source, so as to control the volume of the to-be-played sound source and the remaining played sound sources in the at least one played sound source.
5. The method of claim 1, wherein the calculating the audio source playing volume according to the audio policy profile to control the volume of at least one played audio source and the audio source to be played comprises:
according to the priority of the to-be-played sound source, the priority of at least one played sound source and the volume control proportion between the priority of the to-be-played sound source and the priority of the at least one played sound source in the audio strategy configuration file, calculating to obtain the play volume of the sound source, and accordingly controlling the volume of the at least one played sound source and the to-be-played sound source; or alternatively
According to the priority of the at least one played sound source and the volume control proportion between the priorities of the at least one played sound source in the audio strategy configuration file, the sound source playing volume is calculated, and accordingly volume control is conducted on the to-be-played sound source and the rest played sound sources in the at least one played sound source.
6. The method according to claim 5, wherein calculating the sound source playing volume according to the priority of the sound source to be played, the priority of the at least one played sound source, and the volume control ratio between the priority of the sound source to be played and the priority of the at least one played sound source in the audio policy configuration file, thereby performing volume control on the at least one played sound source and the sound source to be played, comprises:
Responding to the priority of the to-be-played sound source being higher than the priority of any one played sound source in the at least one played sound source, and performing volume down operation on the at least one played sound source according to the volume of the to-be-played sound source and the volume control proportion;
and responding to the priority of the to-be-played sound source not higher than the priority of one played sound source in the at least one played sound source, and performing volume down operation on the to-be-played sound source according to the current volume of the one played sound source in the at least one played sound source and the volume control proportion.
7. The method of claim 6, wherein the at least one played sound source comprises a first played sound source, wherein the first played sound source has a priority no higher than the priority of the sound source to be played;
the volume down operation for the first played sound source includes:
acquiring the adjusted volume of the first played sound source, wherein the adjusted volume of the first played sound source is obtained according to the volume of the sound source to be played or the current volume of one played sound source in the at least one played sound source and the volume control proportion;
In response to the adjusted volume of the first played sound source being greater than or equal to the current volume of the first played sound source, maintaining the current volume of the first played sound source unchanged; and/or
And in response to the tuned volume of the first played sound source being less than the current volume of the first played sound source, modifying the current volume of the first played sound source to the tuned volume.
8. The method of claim 4, wherein calculating the volume control ratio between the priority of the at least one played sound source and the priority of the at least one played sound source according to the audio policy configuration file, so as to perform volume control on the to-be-stopped played sound source and the remaining played sound sources in the at least one played sound source, comprises:
stopping playing the play source to be stopped, and keeping the volume of the rest of the played sound sources in the at least one played sound source unchanged, in response to the priority of the play source to be stopped being lower than the priority of one of the rest of the played sound sources in the at least one played sound source;
And stopping playing the play source to be stopped in response to the priority of the play source to be stopped being higher than the priority of any one of the at least one played sound source, recovering the volume of the played sound source with the highest priority in the rest played sound sources, and performing volume down operation on the rest played sound sources according to the current volume of the played sound source with the highest priority in the rest played sound sources and the volume control proportion between the priorities of the rest played sound sources.
9. A chip comprising a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the volume control method of any one of claims 1 to 8.
10. A vehicle-mounted infotainment device comprising a memory and a processor coupled to each other, the processor being adapted to execute program instructions stored in the memory to implement the volume control method of any of claims 1 to 8.
11. A control device comprising a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the volume control method of any one of claims 1 to 8.
12. A non-transitory computer readable storage medium storing program instructions which, when executed by a processor, are adapted to carry out the volume control method according to any one of claims 1 to 8.
13. A computer program product for storing program instructions for implementing a volume control method as claimed in any one of claims 1 to 8 when executed by a processor
CN202310254057.3A 2023-03-13 2023-03-13 Volume control method, vehicle-mounted information entertainment device and storage medium Pending CN116450079A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310254057.3A CN116450079A (en) 2023-03-13 2023-03-13 Volume control method, vehicle-mounted information entertainment device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310254057.3A CN116450079A (en) 2023-03-13 2023-03-13 Volume control method, vehicle-mounted information entertainment device and storage medium

Publications (1)

Publication Number Publication Date
CN116450079A true CN116450079A (en) 2023-07-18

Family

ID=87119203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310254057.3A Pending CN116450079A (en) 2023-03-13 2023-03-13 Volume control method, vehicle-mounted information entertainment device and storage medium

Country Status (1)

Country Link
CN (1) CN116450079A (en)

Similar Documents

Publication Publication Date Title
CN104023305B (en) A kind of mixing control method of Wince vehicle mounted multimedia and device
CN108062215A (en) Vehicle source of sound control method and system, vehicle and its car-mounted terminal
JP2013516814A (en) Audio application conflict management method and manager
CN107977185A (en) Audio output control method and device
CN112235063A (en) Vehicle-mounted audio playing control method, device, equipment and storage medium
CN111459455A (en) Vehicle-mounted audio control method and device and vehicle-mounted system
CN115022773A (en) Bluetooth device audio control method, device and storage medium
CN114446296A (en) Vehicle-mounted voice interaction method and device and vehicle
KR102468799B1 (en) Electronic apparatus, method for controlling thereof and computer program product thereof
CN116450079A (en) Volume control method, vehicle-mounted information entertainment device and storage medium
CN112312280B (en) In-vehicle sound playing method and device
CN108184193B (en) Play control method of Bluetooth play terminal, Bluetooth device and computer storage medium
CN114641930A (en) Apparatus for adjusting volume in audio system
CN113643686A (en) Voice broadcasting method, device, system, equipment and computer readable medium
CN110809219B (en) Method, device and equipment for playing audio and storage medium
CN107704172B (en) Multimedia application switching control method, system and storage device
CN109155680B (en) Method and apparatus for resuming current audio/video reproduction after current audio/video reproduction is overwritten by interruption
CN114802029A (en) Vehicle-mounted multi-screen control method, device and system and vehicle
CN115278484A (en) Audio stream control method, device, equipment and medium
CN113002449B (en) Control method and device of vehicle-mounted HMI (human machine interface) equipment
CN115129408A (en) Method for acquiring foreground application based on full-buried-point technology in vehicle-mounted Android system
CN116471517A (en) Method and device for mixing automobile cabin audio, automobile and storage medium
CN113778371B (en) System, method and device for realizing multi-module sound management control for vehicle-mounted computer system, processor and computer storage medium thereof
CN111381797B (en) Processing method and device for realizing KTV function on client and user equipment
CN115223582B (en) Audio noise processing method, system, electronic device and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination