Audio source playback control method, electronic device and storage medium
By updating the sound source list and determining the volume playback level, the problem that the existing technology cannot achieve multiple sound down control is solved, and effective volume management of multiple car audio sources is realized, which improves the car usage experience.
Patent Information
- Application Number
- CN202411903909.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing audio source playback control method cannot implement multiple sound down control for multiple sound sources at the same time, resulting in the inability to effectively manage the volume when multiple sound sources are played at the same time by car audio sources.
By responding to the received sound source focus request, the sound source list is updated based on the preset arbitration rules, the sound source to be down and its blocked sound source list is determined, and the volume playback level is determined based on these lists, so that multiple sound down control of multiple sound sources is realized.
It realizes the multiple sound down function of the car audio source, improves the car usage experience of the people in the car, and can effectively manage the volume of multiple sound sources.
Smart Images

Figure CN119357427B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle-mounted audio source playback, and in particular to an audio source playback control method, an electronic device, and a storage medium. Background Art
[0002] As vehicles become more intelligent, the types of in-vehicle audio sources are also increasing, such as music, navigation, phone calls, system prompts, emergency calls, etc. This has also caused a significant increase in the number of audio sources that the vehicle needs to play at the same time.
[0003] However, the existing sound source playback control method can only perform simple volume reduction control on the sound source when multiple sound sources need to be played simultaneously. For example, when the vehicle is playing music, if the navigation voice with a higher playback priority is turned on, when the two sound sources are played simultaneously, the navigation voice can be played normally, while the music with a lower playback priority is played at a lower volume. However, if a phone call voice with a higher priority is connected, the phone call voice, navigation voice and music cannot be controlled to play at different volumes, etc. Therefore, the existing sound source playback control method cannot achieve multiple volume reduction control on multiple sound sources at the same time. Therefore, how to achieve the multiple volume reduction function of the vehicle-mounted sound source has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a sound source playback control method, an electronic device and a storage medium to solve the problem that the existing sound source playback control method cannot realize multiple sound reduction controls on multiple sound sources at the same time.
[0005] In a first aspect, the present application provides a method for controlling audio source playback, the method comprising:
[0006] In response to a received focus application request corresponding to a first sound source, the first list, the second list, and the third list are updated based on a preset arbitration rule, wherein the first list is used to store relevant information of a sound source that currently holds the focus and is in a normal volume playing state, the second list is used to store relevant information of a sound source that currently holds the focus and is in a reduced volume playing state, and the third list is used to store relevant information of a sound source that is currently in a focus waiting state, and the arbitration rule is used to characterize an arbitration result between any focus holding sound source and any focus applying sound source;
[0007] According to the update results of the first list, the second list and the third list, determining each sound source to be lowered and a blocking sound source list corresponding to each sound source to be lowered from the new second list, wherein the blocking sound source list stores all blocking sound sources that prevent the sound source to be lowered from obtaining focus;
[0008] Based on each sound source to be lowered and a list of obstructing sound sources corresponding to each sound source to be lowered, determining a volume playback level corresponding to each sound source to be lowered;
[0009] Control each sound source to be lowered to play according to the volume playback level corresponding to each sound source to be lowered.
[0010] Optionally, updating the first list, the second list, and the third list based on a preset arbitration rule includes:
[0011] Traversing each sound source in the first list in turn, arbitrating each traversed sound source and the first sound source based on the arbitration rule, obtaining arbitration results of each sound source in the first list, and updating the first list, the second list and the third list according to the arbitration results of each sound source in the first list, and obtaining an application result corresponding to the first sound source;
[0012] Traversing each sound source in the second list in turn, arbitrating each traversed sound source and the first sound source based on the arbitration rule, obtaining arbitration results of each sound source in the second list, and updating the application results corresponding to the first list, the second list, the third list and the first sound source according to the arbitration results of each sound source in the second list;
[0013] Each sound source in the third list is traversed in turn, and the sound source traversed each time and the first sound source are arbitrated based on the arbitration rule to obtain the arbitration result of each sound source in the third list, and the third list is updated according to the arbitration result of each sound source in the third list and the application result corresponding to the updated first sound source.
[0014] Optionally, the arbitration results of each sound source in the first list, the arbitration results of each sound source in the second list, and the arbitration results of each sound source in the third list all include at least one of a first arbitration result, a second arbitration result, a third arbitration result, a fourth arbitration result, a fifth arbitration result, a sixth arbitration result, and a seventh arbitration result;
[0015] Among them, the first arbitration result refers to mixing the focus holding sound source participating in the arbitration with the focus applying sound source, the second arbitration result refers to lowering the volume of the focus holding sound source participating in the arbitration, the third arbitration result refers to lowering the volume of the focus applying sound source participating in the arbitration, the fourth arbitration result refers to refusing the focus applying sound source participating in the arbitration to obtain focus, the fifth arbitration result refers to delaying the focus applying sound source participating in the arbitration to obtain focus, the sixth arbitration result refers to suspending the playback of the focus holding sound source participating in the arbitration, and the seventh arbitration result refers to stopping the playback of the focus holding sound source participating in the arbitration.
[0016] Optionally, updating the first list, the second list, and the third list according to the arbitration results of each sound source in the first list, and obtaining the application result corresponding to the first sound source includes:
[0017] If there is a second sound source whose arbitration result is the first arbitration result in the first list, the first sound source and the second sound source are added to a new first list, and the application result of the first sound source is marked as successful application; and / or,
[0018] If there is a third sound source in the first list whose arbitration result is the second arbitration result, the third sound source is added to the second list, and the first sound source is added to the blocking sound source list corresponding to the third sound source in the second list and the new first list, and the application result of the first sound source is marked as successful; and / or,
[0019] If there is a fourth sound source whose arbitration result is the third arbitration result in the first list, the first sound source is added to the second list, and the fourth sound source is added to the blocking sound source list corresponding to the first sound source in the second list and the new first list respectively, and the application result of the first sound source is marked as successful application; and / or,
[0020] If there is a fifth sound source whose arbitration result is the fourth arbitration result in the first list, adding the fifth sound source to the new first list, and marking the application result of the first sound source as application failure; and / or,
[0021] If there is a sixth sound source whose arbitration result is the fifth arbitration result in the first list, the first sound source is added to the third list, the sixth sound source is added to the new first list, and the application result of the first sound source is marked as application delay; and / or,
[0022] If there is a seventh sound source in the first list whose arbitration result is the sixth arbitration result, the seventh sound source is added to the third list, the first sound source is added to the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0023] When there is an eighth sound source whose arbitration result is the seventh arbitration result in the first list, the first sound source is added to the new first list, and the eighth sound source is added to the third list, and the eighth sound source is deleted from the blocking sound source list of each sound source in the second list and the third list, and the application result of the first sound source is marked as successful application.
[0024] Optionally, updating the application results corresponding to the first list, the second list, the third list and the first sound source according to the arbitration results of each sound source in the second list includes:
[0025] If there is a ninth sound source in the second list whose arbitration result is the first arbitration result, the ninth sound source is added to a new second list, the first sound source is added to a new first list, and the application result of the first sound source is marked as successful application; and / or,
[0026] If there is a tenth sound source whose arbitration result is the second arbitration result in the second list, the tenth sound source is added to the new second list, and the first sound source is added to the blocking sound source list corresponding to the tenth sound source in the new second list and the new first list respectively, and the application result of the first sound source is marked as successful application; and / or,
[0027] If there is an eleventh sound source whose arbitration result is the third arbitration result in the second list, both the first sound source and the eleventh sound source are added to the new second list, and the eleventh sound source is added to the blocking sound source list corresponding to the first sound source in the new second list, and the application result of the first sound source is marked as successful application; and / or,
[0028] If there is a twelfth sound source whose arbitration result is the fourth arbitration result in the second list, the twelfth sound source is added to the new second list, and the application result of the first sound source is marked as application failure; and / or,
[0029] If there is a thirteenth sound source whose arbitration result is the fifth arbitration result in the second list, the first sound source is added to the third list, the thirteenth sound source is added to the new second list, and the application result of the first sound source is marked as application delay; and / or,
[0030] If there is a fourteenth sound source whose arbitration result is the sixth arbitration result in the second list, the fourteenth sound source is added to the third list, and the first sound source is added to the blocking sound source list corresponding to the fourteenth sound source in the third list and the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0031] When there is a fifteenth sound source in the second list whose arbitration result is the seventh arbitration result, the first sound source is added to the new first list, and the fifteenth sound source is added to the third list, and the fifteenth sound source is deleted from the blocking sound source list of each sound source in the second list, the third list and the new second list, and the application result of the first sound source is marked as successful application.
[0032] Optionally, updating the third list according to the arbitration results of the sound sources in the third list and the updated application results corresponding to the first sound source includes:
[0033] If there is a sixteenth sound source whose arbitration result is the second arbitration result in the third list, and the application result of the first sound source is application success or application delay, adding the first sound source to the blocking sound source list corresponding to the sixteenth sound source in the third list; and / or,
[0034] If there is a seventeenth sound source whose arbitration result is the sixth arbitration result in the third list, and the application result of the first sound source is successful, adding the first sound source to the blocking sound source list corresponding to the seventeenth sound source in the third list; and / or,
[0035] When there is an eighteenth sound source in the third list whose arbitration result is the seventh arbitration result and the application result of the first sound source is successful, the eighteenth sound source is deleted from the third list, and the eighteenth sound source is deleted from the blocking sound source list of each sound source in the third list and the new second list.
[0036] Optionally, the determining the volume playback level corresponding to each sound source to be lowered based on each sound source to be lowered and a list of blocking sound sources corresponding to each sound source to be lowered includes:
[0037] Based on each sound source to be reduced and the list of obstructing sound sources corresponding to each sound source to be reduced, a relationship map is constructed, wherein the relationship map is used to represent the corresponding relationship between each sound source to be reduced and each obstructing sound source list;
[0038] Traversing the sound sources in the new second list in turn, and determining whether the currently traversed sound source belongs to the sound source to be lowered in the relationship map;
[0039] In the case where it is determined that the currently traversed sound source belongs to the sound source to be lowered in the relationship map, the obstructing sound sources in the target obstructing sound source list corresponding to the currently traversed sound source are traversed in sequence, the target obstructing sound source with the smallest volume loudness in the target obstructing sound source list and the volume loudness corresponding to the target obstructing sound source are determined, and the volume loudness corresponding to the target obstructing sound source is subtracted from a preset threshold, and the volume playback level corresponding to the currently traversed sound source is determined according to the volume loudness after subtracting the preset threshold;
[0040] When it is determined that the currently traversed sound source does not belong to the sound source to be lowered in the relationship map, continue to traverse the next sound source in the new second list until all sound sources in the new second list have been traversed, and the volume playback level corresponding to each sound source to be lowered is obtained.
[0041] Optionally, a method for receiving the focus application request corresponding to the first audio source includes at least one of the following:
[0042] Using a sound source manager in the in-vehicle infotainment system to receive a focus request sent by a target application, wherein the target application is an application in the in-vehicle infotainment system corresponding to the first sound source;
[0043] An instrument audio source message sent by a target instrument is received by using an inter-core communication service, and based on the audio source level carried in the instrument audio source message, a focus application request corresponding to the audio source level of the instrument audio source message is selected from multiple focus application requests in a preset cache, and the selected focus application request is used as the focus application request corresponding to the first audio source, wherein the target instrument is an instrument in an on-board instrument terminal that corresponds to the first audio source, and the inter-core communication service is used to realize communication between the on-board instrument terminal and the on-board infotainment system, and the multiple focus application requests in the preset cache correspond one-to-one to the multiple audio source levels.
[0044] In a second aspect, the present application further provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0045] Memory, used to store computer programs;
[0046] The processor is used to implement the sound source playback control method described in the first aspect when executing the program stored in the memory.
[0047] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the sound source playback control method described in the first aspect is implemented.
[0048] The above technical solution provided by the present application has the following advantages compared with the prior art: the method provided by the present application, through
[0049] In response to a focus application request corresponding to a received first sound source, the first list, the second list and the third list are updated based on preset arbitration rules, wherein the first list is used to store relevant information of a sound source that currently holds focus and is in a normal volume playback state, the second list is used to store relevant information of a sound source that currently holds focus and is in a volume reduction playback state, and the third list is used to store relevant information of a sound source that is currently in a focus waiting state, and the arbitration rules are used to characterize the arbitration result between any focus holding sound source and any focus applying sound source; according to the update results of the first list, the second list and the third list, each sound source to be reduced and a list of obstructing sound sources corresponding to each sound source to be reduced are determined from the new second list, wherein the list of obstructing sound sources stores all obstructing sound sources that obstruct the sound source to be reduced from obtaining focus; based on each sound source to be reduced and the list of obstructing sound sources corresponding to each sound source to be reduced, the volume playback level corresponding to each sound source to be reduced is determined; and each sound source to be reduced is controlled to play according to the volume playback level corresponding to each sound source to be reduced. Through the above method, when a focus application request corresponding to the first sound source is received, the first list, the second list and the third list can be updated based on the preset arbitration rules, and according to the update results of the first list, the second list and the third list, each sound source to be lowered and the list of obstructing sound sources corresponding to each sound source to be lowered are determined from the new second list, so as to determine the volume playback level corresponding to each sound source to be lowered and perform multiple volume reduction controls on it, thereby realizing the multiple volume reduction function of the vehicle sound source and improving the car-using experience of the people in the car. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0052] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0053] Figure 1A flowchart of a method for controlling audio source playback provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of updating a first list, a second list, and a third list according to arbitration results of each sound source in the first list provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of updating the application results corresponding to the first list, the second list, the third list and the first sound source according to the arbitration results of each sound source in the second list provided in an embodiment of the present application;
[0056] Figure 4 A schematic diagram of a flow chart for determining the volume playback level corresponding to each sound source to be lowered provided in an embodiment of the present application;
[0057] Figure 5 A structural block diagram of a sound source playback control system provided in an embodiment of the present application;
[0058] Figure 6 A schematic diagram of the structure of a sound source playback control device provided in an embodiment of the present application;
[0059] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0061] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0062] In order to solve the problem that the existing sound source playback control method cannot realize multiple volume reduction control of multiple sound sources at the same time, the present application provides a sound source playback control method, electronic device and storage medium, which can realize the multiple volume reduction function of vehicle-mounted sound sources.
[0063] See also Figure 1 , Figure 1 A flowchart of a method for controlling the playback of a sound source provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the sound source playback control method may include the following steps:
[0064] Step S101, in response to a focus application request corresponding to a received first audio source, the first list, the second list and the third list are updated based on preset arbitration rules, wherein the first list is used to store relevant information of an audio source that currently holds focus and is playing at a normal volume, the second list is used to store relevant information of an audio source that currently holds focus and is playing at a lowered volume, and the third list is used to store relevant information of an audio source that is currently in a focus waiting state, and the arbitration rules are used to characterize the arbitration result between any focus holding audio source and any focus applying audio source.
[0065] It should be noted that the first sound source may be any sound source on the vehicle, such as any warning sound source in the vehicle instrument terminal, or any sound source in the in-vehicle infotainment (IVI) system, etc. The focus application request is used to request to give focus to the first sound source.
[0066] When receiving the focus application request corresponding to the first sound source, different methods can be used for receiving according to the source of the first sound source. Specifically, if the first sound source is any sound source in the in-vehicle infotainment system, the sound source manager (i.e., AudioManager) in the in-vehicle infotainment system can be used to receive the focus application request sent by the application corresponding to the first sound source; if the first sound source is any alarm sound source in the in-vehicle instrument terminal, the inter-core communication service can be used to directly receive the focus application request sent by the instrument corresponding to the first sound source, or the inter-core communication service can be used to receive the instrument sound source message sent by the instrument corresponding to the first sound source, and then based on the sound source level carried in the instrument sound source message, the focus application request corresponding to the sound source level of the instrument sound source message is selected from the multiple focus application requests in the preset cache, and the selected focus application request is used as the focus application request corresponding to the first sound source. Of course, other methods can also be used for receiving, and the embodiments of the present application are not specifically limited.
[0067] The above arbitration rules are pre-set according to the control logic required by the vehicle audio source, and the arbitration rules can be stored in a table form or a matrix form. As an optional implementation, it can be stored in a table form, wherein the first column field in the table represents the focus holding audio source, the first row field in the table represents the focus application audio source, and the cells in the table other than the first row and the first column are used to store the arbitration results between the corresponding focus holding audio source and the focus application audio source. Among them, the arbitration results may include but are not limited to mixing the focus holding audio source participating in the arbitration with the focus application audio source (C), lowering the focus holding audio source participating in the arbitration (C0), lowering the focus application audio source participating in the arbitration (C1), refusing the focus application audio source participating in the arbitration to obtain focus (R), delaying the focus application audio source participating in the arbitration to obtain focus (D), pausing the playback of the focus holding audio source participating in the arbitration (P) and stopping the playback of the focus holding audio source participating in the arbitration (S). The type of arbitration result can be expanded or reduced according to the actual control requirements of the vehicle audio source, and the embodiment of the present application is not specifically limited.
[0068] The first list can be used to store relevant information (such as the name of the sound source, the list of obstructing sound sources corresponding to each sound source, etc.) of the sound source that currently holds the focus and is in the normal volume playback state (the sound source is represented by a holder), and the first list can be represented as a holders list. The second list can be used to store relevant information of the sound source that currently holds the focus and is in the volume reduction playback state (the sound source is represented by a ducker), and the second list can be represented as a duckers list. The third list can be used to store relevant information of the sound source that is currently in the focus waiting state (the sound source is represented by a loser), and the third list can be represented as a losers list. It should be noted that the information in the first list, the second list, and the third list changes in real time. For example, assuming that music is currently playing, when a call comes in, the music will be paused and the sound of the call will start to play. At this time, the phone sound source will be added to the first list, and the music sound source originally belonging to the first list will be deleted from the first list and added to the third list.
[0069] Step S102: according to the update results of the first list, the second list and the third list, determine from the new second list each sound source to be lowered and a list of obstructing sound sources corresponding to each sound source to be lowered, wherein the list of obstructing sound sources stores all obstructing sound sources that prevent the sound source to be lowered from obtaining focus.
[0070] It should be noted that, in addition to storing the corresponding sound source names, the first list, the second list and the third list mentioned above also have a blocking sound source list (i.e., a blockers list) corresponding to the sound source. The blocking sound source list can be used to store blocking sound sources that prevent the sound source from playing normally (such as sound sources that force the sound source to lower the volume or pause, etc.). For example, in the above example, the telephone sound source is a blocking sound source of the music sound source and needs to be added to the blocking sound source list of the music sound source.
[0071] In this way, after the first list, the second list and the third list are updated based on the preset arbitration rules, the sound sources to be lowered that ultimately need to be lowered and the list of obstructing sound sources corresponding to each sound source to be lowered can be determined from the new second list according to the update results of the first list, the second list and the third list and according to the new sound sources in the new second list and their corresponding list of obstructing sound sources.
[0072] Step S103: based on each sound source to be reduced and a list of blocking sound sources corresponding to each sound source to be reduced, determine a volume playback level corresponding to each sound source to be reduced.
[0073] Since the blocking sound source list corresponding to each sound source to be lowered stores information on all blocking sound sources that cause the sound source to be lowered, the volume playback level relationship between the sound sources to be lowered can be determined based on the blocking sound source list corresponding to each sound source to be lowered. For example, assuming that the blocking sound source list of sound source B includes sound source A, and the blocking sound source list of sound source C includes sound source A and sound source B, and the blocking sound source list of sound source D includes sound source B, then the volume playback level of sound source A is higher than that of sound source B, and the volume playback level of sound source B is higher than that of sound sources C and D, that is, the volume playback levels of these four sound sources are ranked as A>B>C / D.
[0074] Step S104: Control each sound source to be lowered to play according to the volume playback level corresponding to each sound source to be lowered.
[0075] In this step, after the volume playback level corresponding to each sound source to be lowered is determined, each sound source to be lowered can be controlled to play at its corresponding volume playback level according to the volume playback level corresponding to each sound source to be lowered. For example, when the volume playback levels of sound sources A, B, C, and D are determined to be A>B>C / D, sound source A can be controlled to play at a higher volume, sound source B can be controlled to play at a medium volume, and sound sources C and D can be controlled to play at a lower volume.
[0076] In this embodiment, when a focus application request corresponding to the first sound source is received, the first list, the second list and the third list can be updated based on the preset arbitration rules, and according to the update results of the first list, the second list and the third list, each sound source to be lowered and the list of obstructing sound sources corresponding to each sound source to be lowered are determined from the new second list, so as to determine the volume playback level corresponding to each sound source to be lowered and perform multiple volume reduction controls on it, thereby realizing the multiple volume reduction function of the vehicle-mounted sound source and improving the car-using experience of the people in the car.
[0077] In an optional embodiment, the above step S102, updating the first list, the second list and the third list based on the preset arbitration rule, includes:
[0078] Traverse each sound source in the first list in turn, arbitrate each traversed sound source and the first sound source based on the arbitration rule, obtain the arbitration result of each sound source in the first list, and update the first list, the second list and the third list according to the arbitration result of each sound source in the first list, and obtain the application result corresponding to the first sound source;
[0079] Traverse each sound source in the second list in turn, arbitrate each traversed sound source and the first sound source based on the arbitration rule, obtain the arbitration result of each sound source in the second list, and update the application results corresponding to the first list, the second list, the third list and the first sound source according to the arbitration result of each sound source in the second list;
[0080] Each sound source in the third list is traversed in turn, and the sound source traversed each time and the first sound source are arbitrated based on the arbitration rules to obtain the arbitration results of each sound source in the third list, and the third list is updated according to the arbitration results of each sound source in the third list and the application results corresponding to the updated first sound source.
[0081] In this embodiment, when the first list, the second list, and the third list are updated based on the preset arbitration rules, each sound source in the first list can be traversed in turn, and then the sound source traversed each time and the first sound source are arbitrated based on the arbitration rules to obtain the arbitration results of each sound source in the first list, and according to the arbitration results of each sound source in the first list, the first list, the second list, and the third list are updated, and the application result corresponding to the first sound source is obtained. It should be noted that the application result corresponding to the first sound source here can be application success, application failure, or application delay. When the application result corresponding to the first sound source is application failure or application delay, it does not need to participate in the subsequent traversal of the second list; when the application result corresponding to the first sound source is application success, it must participate in the subsequent traversal of the second list. At this time, each sound source in the second list can be traversed in turn, and then the sound source traversed each time and the first sound source are arbitrated based on the arbitration rules to obtain the arbitration results of each sound source in the second list, and according to the arbitration results of each sound source in the second list, the application results corresponding to the first list, the second list, the third list, and the first sound source are updated. Then, each sound source in the third list can be traversed in turn, and the sound source traversed each time and the first sound source can be arbitrated based on the arbitration rules to obtain the arbitration results of each sound source in the third list, and the third list can be updated according to the arbitration results of each sound source in the third list and the application results corresponding to the updated first sound source.
[0082] In this embodiment, the first sound source can be arbitrated with each sound source in the first list, the second list and the third list respectively, so as to update the first list, the second list and the third list, so as to accurately confirm the changes of other sound sources under the influence of the first sound source, and facilitate the subsequent accurate determination of each sound source to be lowered and the list of obstructing sound sources corresponding to each sound source to be lowered according to the update results of the first list, the second list and the third list.
[0083] In an optional embodiment, the arbitration results of each sound source in the first list, the arbitration results of each sound source in the second list, and the arbitration results of each sound source in the third list all include at least one of the first arbitration result, the second arbitration result, the third arbitration result, the fourth arbitration result, the fifth arbitration result, the sixth arbitration result, and the seventh arbitration result;
[0084] Among them, the first arbitration result refers to mixing the focus holding sound source participating in the arbitration with the focus application sound source, the second arbitration result refers to lowering the volume of the focus holding sound source participating in the arbitration (at this time, the focus application sound source participating in the arbitration is not lowered), the third arbitration result refers to lowering the volume of the focus application sound source participating in the arbitration (at this time, the focus holding sound source participating in the arbitration is not lowered), the fourth arbitration result refers to refusing the focus application sound source participating in the arbitration to obtain focus, the fifth arbitration result refers to delaying the focus application sound source participating in the arbitration from obtaining focus, the sixth arbitration result refers to suspending the playback of the focus holding sound source participating in the arbitration (at this time, the focus application sound source participating in the arbitration is played), and the seventh arbitration result refers to stopping the playback of the focus holding sound source participating in the arbitration (at this time, the focus application sound source participating in the arbitration is played).
[0085] In this embodiment, the arbitration result may include a first arbitration result, a second arbitration result, a third arbitration result, a fourth arbitration result, a fifth arbitration result, a sixth arbitration result and a seventh arbitration result, so as to realize diversified control of the vehicle audio source. That is to say, the arbitration result between any focus holding audio source and any focus applying audio source may be any one of the seven results.
[0086] For ease of understanding, the arbitration rules between multiple vehicle-mounted audio sources are explained below. As an optional implementation, the arbitration rules between multiple vehicle-mounted audio sources may be as shown in Table 1.
[0087] Table 1
[0088]
[0089] Among them, C in Table 1 above is the first arbitration result, C0 in Table 1 above is the second arbitration result, C1 in Table 1 above is the third arbitration result, R in Table 1 above is the fourth arbitration result, D in Table 1 above is the fifth arbitration result, P in Table 1 above is the sixth arbitration result, and S in Table 1 above is the seventh arbitration result.
[0090] When defining arbitration rules, you can use the csv format to write an arbitration table similar to Table 1 above (represented by focus.csv). Each horizontal row represents a focus holding source, and each vertical column represents a focus application source. For example, the second row and sixth column of the table indicates that instrument source 0 holds the focus, and the arbitration result when the emergency call applies for focus is the first arbitration result C. After the arbitration rules are defined, focus.csv can be integrated into the vehicle system, so that when the arbitration rules need to be modified, the product definition personnel can modify them directly without the intervention of the developer, thereby improving the flexibility of the arbitration rules.
[0091] It should be noted that when focus.csv is needed for arbitration, focus.csv can be read and put into the two-dimensional array focusTable, and then the field value of the first row in the table can be associated with the Usage value of the focus application sound source, and then associated according to Usage-Index, and searched for each other through getIndexByUsage and getUsageByIndex, and the getStrategyByUsage(int hodlerUsage, int requestUsage) method is provided to obtain the arbitration result.
[0092] In an optional embodiment, the above steps of updating the first list, the second list and the third list according to the arbitration results of each sound source in the first list, and obtaining the application result corresponding to the first sound source include:
[0093] If there is a second sound source whose arbitration result is the first arbitration result in the first list, the first sound source and the second sound source are added to a new first list, and the application result of the first sound source is marked as successful application; and / or,
[0094] If there is a third sound source in the first list whose arbitration result is the second arbitration result, the third sound source is added to the second list, and the first sound source is added to the blocking sound source list corresponding to the third sound source in the second list and the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0095] If there is a fourth sound source in the first list whose arbitration result is the third arbitration result, the first sound source is added to the second list, and the fourth sound source is added to the blocking sound source list corresponding to the first sound source in the second list and the new first list respectively, and the application result of the first sound source is marked as successful application; and / or,
[0096] If there is a fifth sound source whose arbitration result is the fourth arbitration result in the first list, the fifth sound source is added to the new first list, and the application result of the first sound source is marked as application failure; and / or,
[0097] If there is a sixth sound source whose arbitration result is the fifth arbitration result in the first list, the first sound source is added to the third list, the sixth sound source is added to the new first list, and the application result of the first sound source is marked as application delay; and / or,
[0098] If there is a seventh sound source in the first list whose arbitration result is the sixth arbitration result, the seventh sound source is added to the third list, the first sound source is added to the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0099] When there is an eighth sound source whose arbitration result is the seventh arbitration result in the first list, the first sound source is added to the new first list, and the eighth sound source is added to the third list, and the eighth sound source is deleted from the blocking sound source list of each sound source in the second list and the third list, and the application result of the first sound source is marked as successful application.
[0100] In this embodiment, after traversing each sound source in the first list and arbitrating each traversed sound source and the first sound source based on the arbitration rule to obtain the arbitration result of each sound source in the first list, the first list, the second list and the third list can be updated according to the arbitration result of each sound source in the first list. Figure 2As shown, the following steps are included: step S201, traversing each sound source in the first list, and determining the arbitration result between the currently traversed sound source and the first sound source. When the arbitration result is the first arbitration result C, step S202 is executed; when the arbitration result is the second arbitration result C0, step S203 is executed; when the arbitration result is the third arbitration result C1, step S204 is executed; when the arbitration result is the fourth arbitration result R, step S205 is executed; when the arbitration result is the fifth arbitration result D, step S206 is executed; when the arbitration result is the sixth arbitration result P, step S207 is executed; when the arbitration result is the seventh arbitration result S, step S208 is executed.That is to say, assuming that before the arbitration, there is a second sound source in the first list, and after the second sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the first arbitration result, then step S202 can be executed: the first sound source and the second sound source are added to the new first list, and the application result of the first sound source is marked as successful application; assuming that before the arbitration, there is a third sound source in the first list, and after the third sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the second arbitration result, then step S203 can be executed: the third sound source is added to the second list, and the first sound source is added to the block corresponding to the third sound source in the second list. The first sound source is added to the obstructing sound source list and the new first list, and the application result of the first sound source is marked as successful; assuming that before the arbitration, there is a fourth sound source in the first list, and after the fourth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the third arbitration result, then step S204 can be executed: the first sound source is added to the second list, and the fourth sound source is added to the obstructing sound source list corresponding to the first sound source in the second list and the new first list, and the application result of the first sound source is marked as successful; assuming that before the arbitration, there is a fifth sound source in the first list, and after the fifth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is If the arbitration result is the fourth arbitration result, then step S205 can be executed: the fifth sound source is added to the new first list, and the application result of the first sound source is marked as application failure; assuming that before the arbitration, there is a sixth sound source in the first list, and after the sixth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the fifth arbitration result, then step S206 can be executed: the first sound source is added to the third list, and the sixth sound source is added to the new first list, and the application result of the first sound source is marked as application delay; assuming that before the arbitration, there is a seventh sound source in the first list, and after the seventh sound source and the first sound source are arbitrated according to the arbitration rules, the result obtained is If the arbitration result is the sixth arbitration result, then step S207 can be executed: add the seventh sound source to the third list, add the first sound source to the new first list, and mark the application result of the first sound source as successful application; assuming that before the arbitration, there is an eighth sound source in the first list, and after arbitrating the eighth sound source and the first sound source according to the arbitration rules, the arbitration result is the seventh arbitration result, then step S208 can be executed: add the first sound source to the new first list, add the eighth sound source to the third list, and delete the eighth sound source from the blocking sound source list of each sound source in the second list and the third list, and mark the application result of the first sound source as successful application.
[0101] It should be noted that before traversing each sound source in the first list, it is necessary to determine whether the first list is empty. If the first list is empty, the blocker list of the first sound source can be initialized to empty, and then the focus entry object (i.e., FocusEntry object) of the first sound source can be added to the first list. At this time, the application result of the first sound source is successful. The FocusEntry object here is pre-defined, and the FocusEntry object stores the sound source name usage, the blocker list of the blocking sound source, the focus request FocusRequest and other parameters of the current application focus sound source (i.e., the first sound source). If the first list is not empty, the first list can be traversed in a loop, and the arbitration results of each sound source in the first list can be obtained through the getStrategyByUsage method. According to the arbitration results of each sound source, a new first list is created, and the second and third lists are updated.
[0102] In the above manner, based on the arbitration results between the first sound source and each sound source in the first list, a new first list can be created, and the second list and the third list can be updated to prepare for subsequent arbitration between the first sound source and each sound source in the second list and the third list.
[0103] In an optional embodiment, the above step of updating the application results corresponding to the first list, the second list, the third list and the first sound source according to the arbitration results of each sound source in the second list includes:
[0104] If there is a ninth sound source in the second list whose arbitration result is the first arbitration result, the ninth sound source is added to the new second list, the first sound source is added to the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0105] If there is a tenth sound source whose arbitration result is the second arbitration result in the second list, the tenth sound source is added to the new second list, and the first sound source is added to the blocking sound source list corresponding to the tenth sound source in the new second list and the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0106] If there is an eleventh sound source in the second list whose arbitration result is the third arbitration result, both the first sound source and the eleventh sound source are added to the new second list, and the eleventh sound source is added to the blocking sound source list corresponding to the first sound source in the new second list, and the application result of the first sound source is marked as successful application; and / or,
[0107] If there is a twelfth sound source whose arbitration result is the fourth arbitration result in the second list, the twelfth sound source is added to the new second list, and the application result of the first sound source is marked as application failure; and / or,
[0108] If there is a thirteenth sound source whose arbitration result is the fifth arbitration result in the second list, the first sound source is added to the third list, the thirteenth sound source is added to the new second list, and the application result of the first sound source is marked as application delay; and / or,
[0109] If there is a fourteenth sound source whose arbitration result is the sixth arbitration result in the second list, the fourteenth sound source is added to the third list, and the first sound source is added to the blocking sound source list corresponding to the fourteenth sound source in the third list and the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0110] When there is a fifteenth sound source in the second list whose arbitration result is the seventh arbitration result, the first sound source is added to the new first list, and the fifteenth sound source is added to the third list, and the fifteenth sound source is deleted from the blocking sound source list of each sound source in the second list, the third list and the new second list, and the application result of the first sound source is marked as successful application.
[0111] In this embodiment, after traversing each sound source in the second list, arbitrating each traversed sound source and the first sound source based on the arbitration rule, and obtaining the arbitration result of each sound source in the second list, the application results corresponding to the first list, the second list, the third list and the first sound source can be updated according to the arbitration result of each sound source in the second list. Figure 3As shown, the following steps are included: Step S301, traverse each sound source in the second list, and determine the arbitration result between the currently traversed sound source and the first sound source. When the arbitration result is the first arbitration result C, execute step S302; when the arbitration result is the second arbitration result C0, execute step 303; when the arbitration result is the third arbitration result C1, execute step S304; when the arbitration result is the fourth arbitration result R, execute step S305; when the arbitration result is the fifth arbitration result D, execute step S306; when the arbitration result is the sixth arbitration result P, execute step S307; when the arbitration result is the seventh arbitration result S, execute step S308.That is, assuming that before the arbitration, there is a ninth sound source in the second list, and after the ninth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the first arbitration result, then step S302 can be executed: the ninth sound source is added to the new second list, and the first sound source is added to the new first list, and the application result of the first sound source is marked as successful application; assuming that before the arbitration, there is a tenth sound source in the second list, and after the tenth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the second arbitration result, then step S303 can be executed: the tenth sound source is added to the new second list, and the first sound source is added to the corresponding list of the tenth sound source in the new second list. The first sound source is added to the blocking sound source list and the new first list, and the application result of the first sound source is marked as successful; assuming that before the arbitration, there is an eleventh sound source in the second list, and after the eleventh sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the third arbitration result, then step S304 can be executed: both the first sound source and the eleventh sound source are added to the new second list, and the eleventh sound source is added to the blocking sound source list corresponding to the first sound source in the new second list, and the application result of the first sound source is marked as successful; assuming that before the arbitration, there is a twelfth sound source in the second list, and after the twelfth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the fourth arbitration result , then step S305 can be executed: add the twelfth sound source to the new second list, and mark the application result of the first sound source as application failure; assuming that before the arbitration, there is a thirteenth sound source in the second list, and after the thirteenth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the fifth arbitration result, then step S306 can be executed: add the first sound source to the third list, and add the thirteenth sound source to the new second list, and mark the application result of the first sound source as application delay; assuming that before the arbitration, there is a fourteenth sound source in the second list, and after the fourteenth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the sixth arbitration result, then step S306 can be executed. 307: Add the fourteenth sound source to the third list, and add the first sound source to the obstruction sound source list corresponding to the fourteenth sound source in the third list and the new first list respectively, and mark the application result of the first sound source as successful application; assuming that before the arbitration, there is a fifteenth sound source in the second list, and after the fifteenth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result obtained is the seventh arbitration result, then step S308 can be executed: add the first sound source to the new first list, and add the fifteenth sound source to the third list, and delete the fifteenth sound source from the obstruction sound source list of each sound source in the second list, the third list and the new second list, and mark the application result of the first sound source as successful application.
[0112] Through the above method, the new first list, the new second list, and the third list can be updated based on the arbitration results of the first sound source and each sound source in the second list, and the application results corresponding to the first sound source can be modified to prepare for the subsequent update of the third list.
[0113] In an optional embodiment, the above step of updating the third list according to the arbitration results of each sound source in the third list and the application results corresponding to the updated first sound source includes:
[0114] If there is a sixteenth sound source in the third list whose arbitration result is the second arbitration result, and the application result of the first sound source is application success or application delay, the first sound source is added to the blocking sound source list corresponding to the sixteenth sound source in the third list; and / or,
[0115] If there is a seventeenth sound source whose arbitration result is the sixth arbitration result in the third list and the application result of the first sound source is successful, the first sound source is added to the blocking sound source list corresponding to the seventeenth sound source in the third list; and / or,
[0116] If there is an eighteenth sound source in the third list whose arbitration result is the seventh arbitration result and the application result of the first sound source is successful, the eighteenth sound source will be deleted from the third list, and the eighteenth sound source will be deleted from the blocking sound source list of each sound source in the third list and the new second list.
[0117] In this embodiment, the current third list can be looped through, and the arbitration result between the first sound source and each sound source in the third list (i.e., the focus waiter) can be obtained through the getStrategyByUsage method, and then a comprehensive judgment can be made based on the application result of the first sound source finally obtained. Specifically, assuming that before the arbitration, there is a sixteenth sound source in the third list, and after the sixteenth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result is the second arbitration result, and the application result of the first sound source is successful or delayed, the first sound source is added to the obstruction sound source list corresponding to the sixteenth sound source in the third list; assuming that before the arbitration, there is a seventeenth sound source in the third list, and after the seventeenth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result is the sixth arbitration result, and the application result of the first sound source is successful, the first sound source is added to the obstruction sound source list corresponding to the seventeenth sound source in the third list, and the seventeenth sound source is notified to temporarily lose focus and remain in a paused state; assuming that before the arbitration, there is an eighteenth sound source in the third list, and after the eighteenth sound source and the first sound source are arbitrated according to the arbitration rules, the arbitration result is the seventh arbitration result, and the application result of the first sound source is successful, the eighteenth sound source is deleted from the third list, and the eighteenth sound source is deleted from the obstruction sound source list of each sound source in the third list and the new second list. It should be noted that when traversing the third list, the audio sources whose arbitration results do not satisfy the above three arbitration results are directly skipped without any processing.
[0118] Through the above method, a new round of updating can be performed on the blocking sound source list of each sound source, and a new blocking sound source list corresponding to each sound source can be obtained after the first sound source makes a focus application request.
[0119] In an optional embodiment, the above step S104, based on each sound source to be lowered and a list of blocking sound sources corresponding to each sound source to be lowered, determines the volume playback level corresponding to each sound source to be lowered, including:
[0120] Based on each sound source to be lowered and the list of obstructing sound sources corresponding to each sound source to be lowered, a relationship map is constructed, where the relationship map is used to represent the corresponding relationship between each sound source to be lowered and each list of obstructing sound sources;
[0121] Traverse the sound sources in the new second list in turn, and determine whether the currently traversed sound source belongs to the sound source to be lowered in the relationship map;
[0122] In the case where it is determined that the currently traversed sound source belongs to the sound source to be lowered in the relationship map, the obstructing sound sources in the target obstructing sound source list corresponding to the currently traversed sound source are traversed in sequence, the target obstructing sound source with the smallest volume loudness in the target obstructing sound source list and the volume loudness corresponding to the target obstructing sound source are determined, and the volume loudness corresponding to the target obstructing sound source is subtracted from a preset threshold, and the volume playback level corresponding to the currently traversed sound source is determined according to the volume loudness after subtracting the preset threshold;
[0123] When it is determined that the currently traversed sound source does not belong to the sound source to be lowered in the relationship map, continue to traverse the next sound source in the new second list until all sound sources in the new second list have been traversed, and the volume playback level corresponding to each sound source to be lowered is obtained.
[0124] It should be noted that, since the obstructing sound source list corresponding to each sound source to be lowered stores all obstructing sound sources that prevent the corresponding sound source from obtaining focus, including obstructing sound sources that force the corresponding sound source to be lowered and obstructing sound sources that force the corresponding sound source to be paused, when constructing the relationship map, it is necessary to filter the obstructing sound source list corresponding to each sound source to be lowered, and only retain the obstructing sound sources that force the corresponding sound source to be lowered.
[0125] As an optional implementation, you can first create a Map called duckerBlockerMap (the Map is empty at this time). Traverse the new second list (each duck in the new second list corresponds to each ducker's blocking sound source list blockers one by one). When traversing to duckerItem (i.e. a ducker in the second list), traverse its blocking sound source list blockers in a loop, arbitrate the duckerItem with the blockerItem currently traversed from the blocking sound source list blockers, treat the duckerItem as the focus holding sound source, and the blockerItem as the focus application sound source into getStrategyByUsage for arbitration. If the arbitration result is the second arbitration result C0, then add the blockerItem to the duckBlocker list of this duckitem. When all the blockers in the blocking sound source list blockers of the duckerItem are looped through, put the duckerItem and the duckBlockers list into the duckerBlockerMap until the new second list is traversed. In this way, a relationship map can be constructed.
[0126] After constructing the relationship map, the sound sources in the new second list can be traversed in turn, and it can be determined whether the currently traversed sound source belongs to the sound source to be lowered in the relationship map. When it is determined that the currently traversed sound source belongs to the sound source to be lowered in the relationship map, the obstructing sound sources in the target obstructing sound source list corresponding to the currently traversed sound source are traversed in turn, and the target obstructing sound source with the smallest volume in the target obstructing sound source list and the volume loudness corresponding to the target obstructing sound source are determined, and the volume loudness corresponding to the target obstructing sound source is subtracted from the preset threshold. According to the volume loudness after subtracting the preset threshold, the volume playback level corresponding to the currently traversed sound source is determined; when it is determined that the currently traversed sound source does not belong to the sound source to be lowered in the relationship map, continue to traverse the next sound source in the new second list until all the sound sources in the new second list have been traversed, and the volume playback level corresponding to each sound source to be lowered is obtained. Figure 4 As shown, the specific process includes the following steps:
[0127] Step S401: Create a UsageVolumeMap for caching the volume after the sound is reduced.
[0128] In UsageVolumeMap, it is a key-value pair of Usage-Volume, where Usage represents the name of the sound source and Volume represents the volume.
[0129] Step S402: Determine whether duckerBlockerMap is empty.
[0130] When duckerBlockerMap (ie, the relationship map mentioned above) is empty, it means that each ducker in duckerBlockerMap has determined the corresponding volume after the sound is lowered, and step S412 can be executed. When duckerBlockerMap is not empty, step S403 can be executed.
[0131] Step S403, traverse the new duckers list, and determine whether the currently traversed ducker exists in the duckerBlockerMap.
[0132] When the currently traversed ducker exists in duckerBlockerMap, step S404 can be executed. When the currently traversed ducker does not exist in duckerBlockerMap, it means that the ducker has determined the corresponding volume after the sound is lowered, and step S403 can be continued to traverse the next ducker in the new duckers list.
[0133] Step S404: Determine whether the duckBlocker list of the currently traversed ducker is empty.
[0134] When the duckBlocker list of the currently traversed ducker is empty, step S410 is executed. When the duckBlocker list of the currently traversed ducker is not empty, step S405 is executed.
[0135] Step S405: traverse the duckBlocker list of the currently traversed ducker, and set the minimum volume loudness of the blocker traversed for the first time to 0db by default.
[0136] Step S406: Determine whether the currently traversed blocker exists in duckerBlockerMap.
[0137] When the currently traversed blocker exists in duckerBlockerMap, step S411 is executed; when the currently traversed blocker does not exist in duckerBlockerMap, step S407 is executed.
[0138] Step S407: Obtain the actual volume loudness of the currently traversed blocker.
[0139] When obtaining the actual volume loudness of the currently traversed blocker, if the value of the currently traversed blocker exists in UsageVolumeMap and the value is not equal to NONE_DUCKING, the value of the currently traversed blocker in UsageVolumeMap is determined as the actual volume loudness. If the value of the currently traversed blocker does not exist in UsageVolumeMap, or the value is equal to NONE_DUCKING, the actual volume level cached in AudioControl is obtained, and then the actual volume loudness (in decibels) of the currently traversed blocker is determined by the actual volume level.
[0140] Step S408: Compare the current minimum volume loudness with the actual volume loudness of the currently traversed blocker, and update the minimum blocker and the minimum volume loudness in the duckBlocker list.
[0141] Step S409, subtract 6db from the minimum volume loudness in the duckBlocker list, obtain the volume level corresponding to this loudness value through the AudioControl module, cache this volume level in the UsageVolumeMap, and then remove the currently traversed ducker from the duckerBlockerMap, indicating that the volume reduction of the currently traversed ducker has been processed.
[0142] Step S410, set the volume of the currently traversed ducker to NONE_DUCKING, and loop to the next ducker.
[0143] Step S411: exit the traversal of the duckBlocker list.
[0144] Step S412: loop UsageVolumeMap to obtain the value of each Usage after volume reduction processing.
[0145] Step S413: Determine whether the value of each Usage after the tone reduction processing is NONE_DUCKING.
[0146] When the value of a certain Usage after the tone reduction processing is NONE_DUCKING, it means that the Usage does not need to be tone reduced, and step S415 can be executed; when the value of a certain Usage after the tone reduction processing is not NONE_DUCKING, it means that the Usage needs to be tone reduced, and step S414 can be executed.
[0147] Step S414: actually lower the volume, setting the actual volume to the volume after lowering the volume, and the UI volume remains unchanged.
[0148] Step S415, cancel the volume reduction and set the volume to the UI display volume.
[0149] By executing the above steps S401 to S415, the volume playback level corresponding to each sound source to be lowered can be accurately determined, which facilitates the subsequent control of each sound source to be lowered to play according to the volume playback level corresponding to each sound source to be lowered. For example, when a vehicle encounters a complex sound reduction situation: A is a ducker, and A is also a blocker for B and C; B is a ducker, and B is also a blocker for C and D, the volume playback level of A can be determined first according to the above logic, and then the volume playback level of B can be determined, and then the volume playback level of C and D can be determined. After the volume playback levels of A, B, C and D are determined, multiple sound reduction playbacks can be performed according to their corresponding volume playback levels.
[0150] It should be noted that when the first sound source finishes playing or stops playing and needs to release the focus, it is necessary to remove the first sound source from the new first list, the new second list, and the new third list, and then loop through the sound sources in the new third list, remove the first sound source from the blocking sound source list blocker of each sound source in the new third list, and then arbitrate the sound source to be restored and the blocking sound source in the blocker list after removing the first sound source, and process the sound source to be restored to obtain the new first list, second list, and third list. When the sound source to be restored moves from the third list to the first list or the second list, notify the corresponding sound source to obtain the focus so that it can resume playing.
[0151] In an optional embodiment, the method of receiving the focus application request corresponding to the first audio source in step S101 above includes at least one of the following:
[0152] Using a sound source manager in the in-vehicle infotainment system to receive a focus request sent by a target application, wherein the target application is an application in the in-vehicle infotainment system corresponding to the first sound source;
[0153] An instrument audio source message sent by a target instrument is received by using an inter-core communication service, and based on the audio source level carried in the instrument audio source message, a focus application request corresponding to the audio source level of the instrument audio source message is selected from multiple focus application requests in a preset cache, and the selected focus application request is used as the focus application request corresponding to the first audio source, wherein the target instrument is an instrument in an on-board instrument terminal that corresponds to the first audio source, and the inter-core communication service is used to realize communication between the on-board instrument terminal and the on-board infotainment system, and multiple focus application requests in the preset cache correspond one-to-one to multiple audio source levels.
[0154] In one embodiment, the first sound source may be any sound source on the vehicle, such as any warning sound source in the vehicle instrument terminal, or any sound source in the vehicle infotainment system. Figure 5In the audio source playback control system shown (which includes an in-vehicle instrument terminal 501 and an in-vehicle infotainment system 502), if the first audio source is any audio source in the in-vehicle infotainment system 502, the audio source manager (i.e., AudioManager) in the in-vehicle infotainment system 502 can be used to receive a focus application request sent by an application (Application, referred to as APP) corresponding to the first audio source, and then send the focus application request to the focus arbitration module FocusManager for arbitration. If the first audio source is any alarm audio source in the in-vehicle instrument terminal 501, the inter-core communication service (i.e., Coresign service) can be used to receive an instrument audio source message sent by an instrument corresponding to the first audio source, and then the volume control module AudioControl can be used to forward it to the HalFocus module, and the HalFocus module selects a focus application request corresponding to the audio source level of the instrument audio source message from multiple focus application requests in the preset cache based on the audio source level carried in the instrument audio source message, and uses the selected focus application request as the focus application request corresponding to the first audio source, and sends it to the focus arbitration module FocusManager for arbitration. It should be noted that the instrument audio source message here carries the audio source level (such as Chime0, Chime1, Chime2, Chime3, etc.). When the instrument audio source message is sent to the IVI system, the volume control module AudioControl in the IVI system can receive the instrument audio source message. The volume control module AudioControl itself is not responsible for focus arbitration, and can send the instrument audio source message to the HalFocus module in HIDL mode. When the HalFocus module is initialized at startup, it can create 4 focus requests FocusRequest based on the instrument audio source focus, and save these 4 FocusRequests and the focus holding status in the cache HashMap. For example, if Chime0 is in the state of holding focus, when the next Chime0 is played, it will not be repeated; if Chime0 does not hold focus, when the next Chime0 is played, a focus application will be initiated. The advantage of doing this is that since the playing time of the instrument sound source is usually short, it is not suitable to create a focus request FocusRequest every time the focus is needed, because frequent creation will occupy resources. Therefore, the focus request FocusRequest can be created in HalFocus in advance and called directly when needed.
[0155] Through the above method, multi-system communication can be realized in the vehicle, thereby realizing the volume reduction or pause playback scenarios of other non-IVI systems such as instruments and vehicle T-BOX (short for Telematics BOX).
[0156] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a sound source playback control device provided in an embodiment of the present application. Figure 6 As shown, the sound source playback control device 600 includes:
[0157] An updating module 601 is used to respond to a focus application request corresponding to a received first sound source, and to update a first list, a second list, and a third list based on a preset arbitration rule, wherein the first list is used to store relevant information of a sound source that currently holds focus and is playing at a normal volume, the second list is used to store relevant information of a sound source that currently holds focus and is playing at a reduced volume, and the third list is used to store relevant information of a sound source that is currently in a focus waiting state, and the arbitration rule is used to characterize an arbitration result between any focus holding sound source and any focus applying sound source;
[0158] A first determining module 602 is used to determine, from the new second list, each sound source to be lowered and a blocking sound source list corresponding to each sound source to be lowered according to the update results of the first list, the second list and the third list, wherein the blocking sound source list stores all blocking sound sources that prevent the sound source to be lowered from obtaining focus;
[0159] The second determination module 603 is used to determine the volume playback level corresponding to each sound source to be lowered based on each sound source to be lowered and a list of blocking sound sources corresponding to each sound source to be lowered;
[0160] The control module 604 is used to control each audio source to be lowered to play according to the volume playback level corresponding to each audio source to be lowered.
[0161] In an optional embodiment, the update module 601 includes:
[0162] A first updating submodule is used to traverse each sound source in the first list in turn, arbitrate each traversed sound source and the first sound source based on the arbitration rule, obtain the arbitration result of each sound source in the first list, and update the first list, the second list and the third list according to the arbitration result of each sound source in the first list, and obtain the application result corresponding to the first sound source;
[0163] A second updating submodule is used to traverse each sound source in the second list in turn, arbitrate each traversed sound source and the first sound source based on the arbitration rule, obtain the arbitration result of each sound source in the second list, and update the application results corresponding to the first list, the second list, the third list and the first sound source according to the arbitration result of each sound source in the second list;
[0164] The third updating submodule is used to traverse each sound source in the third list in turn, arbitrate the sound source traversed each time and the first sound source based on the arbitration rules, obtain the arbitration results of each sound source in the third list, and update the third list according to the arbitration results of each sound source in the third list and the application results corresponding to the updated first sound source.
[0165] In an optional embodiment, the arbitration results of each sound source in the first list, the arbitration results of each sound source in the second list, and the arbitration results of each sound source in the third list all include at least one of the first arbitration result, the second arbitration result, the third arbitration result, the fourth arbitration result, the fifth arbitration result, the sixth arbitration result, and the seventh arbitration result;
[0166] Among them, the first arbitration result refers to mixing the focus holding sound source participating in the arbitration with the focus applying sound source, the second arbitration result refers to lowering the volume of the focus holding sound source participating in the arbitration, the third arbitration result refers to lowering the volume of the focus applying sound source participating in the arbitration, the fourth arbitration result refers to refusing the focus applying sound source participating in the arbitration to obtain focus, the fifth arbitration result refers to delaying the focus applying sound source participating in the arbitration to obtain focus, the sixth arbitration result refers to suspending the playback of the focus holding sound source participating in the arbitration, and the seventh arbitration result refers to stopping the playback of the focus holding sound source participating in the arbitration.
[0167] In an optional embodiment, the first updating submodule is specifically used for:
[0168] If there is a second sound source whose arbitration result is the first arbitration result in the first list, the first sound source and the second sound source are added to a new first list, and the application result of the first sound source is marked as successful application; and / or,
[0169] If there is a third sound source in the first list whose arbitration result is the second arbitration result, the third sound source is added to the second list, and the first sound source is added to the blocking sound source list corresponding to the third sound source in the second list and the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0170] If there is a fourth sound source in the first list whose arbitration result is the third arbitration result, the first sound source is added to the second list, and the fourth sound source is added to the blocking sound source list corresponding to the first sound source in the second list and the new first list respectively, and the application result of the first sound source is marked as successful application; and / or,
[0171] If there is a fifth sound source whose arbitration result is the fourth arbitration result in the first list, the fifth sound source is added to the new first list, and the application result of the first sound source is marked as application failure; and / or,
[0172] If there is a sixth sound source whose arbitration result is the fifth arbitration result in the first list, the first sound source is added to the third list, the sixth sound source is added to the new first list, and the application result of the first sound source is marked as application delay; and / or,
[0173] If there is a seventh sound source in the first list whose arbitration result is the sixth arbitration result, the seventh sound source is added to the third list, the first sound source is added to the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0174] When there is an eighth sound source whose arbitration result is the seventh arbitration result in the first list, the first sound source is added to the new first list, and the eighth sound source is added to the third list, and the eighth sound source is deleted from the blocking sound source list of each sound source in the second list and the third list, and the application result of the first sound source is marked as successful application.
[0175] In an optional embodiment, the second updating submodule is specifically used for:
[0176] If there is a ninth sound source in the second list whose arbitration result is the first arbitration result, the ninth sound source is added to the new second list, the first sound source is added to the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0177] If there is a tenth sound source whose arbitration result is the second arbitration result in the second list, the tenth sound source is added to the new second list, and the first sound source is added to the blocking sound source list corresponding to the tenth sound source in the new second list and the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0178] If there is an eleventh sound source in the second list whose arbitration result is the third arbitration result, both the first sound source and the eleventh sound source are added to the new second list, and the eleventh sound source is added to the blocking sound source list corresponding to the first sound source in the new second list, and the application result of the first sound source is marked as successful application; and / or,
[0179] If there is a twelfth sound source whose arbitration result is the fourth arbitration result in the second list, the twelfth sound source is added to the new second list, and the application result of the first sound source is marked as application failure; and / or,
[0180] If there is a thirteenth sound source whose arbitration result is the fifth arbitration result in the second list, the first sound source is added to the third list, the thirteenth sound source is added to the new second list, and the application result of the first sound source is marked as application delay; and / or,
[0181] If there is a fourteenth sound source whose arbitration result is the sixth arbitration result in the second list, the fourteenth sound source is added to the third list, and the first sound source is added to the blocking sound source list corresponding to the fourteenth sound source in the third list and the new first list, and the application result of the first sound source is marked as successful application; and / or,
[0182] When there is a fifteenth sound source in the second list whose arbitration result is the seventh arbitration result, the first sound source is added to the new first list, and the fifteenth sound source is added to the third list, and the fifteenth sound source is deleted from the blocking sound source list of each sound source in the second list, the third list and the new second list, and the application result of the first sound source is marked as successful application.
[0183] In an optional embodiment, the third updating submodule is specifically used for:
[0184] If there is a sixteenth sound source in the third list whose arbitration result is the second arbitration result, and the application result of the first sound source is application success or application delay, the first sound source is added to the blocking sound source list corresponding to the sixteenth sound source in the third list; and / or,
[0185] If there is a seventeenth sound source whose arbitration result is the sixth arbitration result in the third list and the application result of the first sound source is successful, the first sound source is added to the blocking sound source list corresponding to the seventeenth sound source in the third list; and / or,
[0186] If there is an eighteenth sound source in the third list whose arbitration result is the seventh arbitration result and the application result of the first sound source is successful, the eighteenth sound source will be deleted from the third list, and the eighteenth sound source will be deleted from the blocking sound source list of each sound source in the third list and the new second list.
[0187] In an optional embodiment, the second determining module 603 includes:
[0188] A construction submodule is used to construct a relationship map based on each sound source to be reduced and the list of obstructing sound sources corresponding to each sound source to be reduced, wherein the relationship map is used to represent the corresponding relationship between each sound source to be reduced and each list of obstructing sound sources;
[0189] A judgment submodule, used to traverse the sound sources in the new second list in turn, and judge whether the currently traversed sound source belongs to the sound source to be lowered in the relationship map;
[0190] A determination submodule is used for, when it is determined that the currently traversed sound source belongs to the sound source to be lowered in the relationship map, sequentially traversing the obstructing sound sources in the target obstructing sound source list corresponding to the currently traversed sound source, determining the target obstructing sound source with the smallest volume loudness in the target obstructing sound source list and the volume loudness corresponding to the target obstructing sound source, and subtracting a preset threshold from the volume loudness corresponding to the target obstructing sound source, and determining the volume playback level corresponding to the currently traversed sound source according to the volume loudness after subtracting the preset threshold;
[0191] The traversal submodule is used to continue traversing the next sound source in the new second list when it is determined that the currently traversed sound source does not belong to the sound source to be lowered in the relationship map, until all the sound sources in the new second list have been traversed, and the volume playback level corresponding to each sound source to be lowered is obtained.
[0192] In an optional embodiment, the audio source playback control device 600 further includes:
[0193] A first receiving module is used to receive a focus application request sent by a target application using a sound source manager in the in-vehicle infotainment system, wherein the target application is an application corresponding to the first sound source in the in-vehicle infotainment system;
[0194] The second receiving module is used to use the inter-core communication service to receive the instrument audio source message sent by the target instrument, and based on the audio source level carried in the instrument audio source message, select a focus application request corresponding to the audio source level of the instrument audio source message from multiple focus application requests in a preset cache, and use the selected focus application request as the focus application request corresponding to the first audio source, wherein the target instrument is the instrument corresponding to the first audio source in the vehicle-mounted instrument end, and the inter-core communication service is used to realize the communication between the vehicle-mounted instrument end and the vehicle-mounted infotainment system, and the multiple focus application requests in the preset cache correspond one-to-one to the multiple audio source levels.
[0195] It should be noted that the sound source playback control device 600 can implement the sound source playback control method provided by any of the aforementioned method embodiments and can achieve the same technical effects, which will not be described in detail herein.
[0196] like Figure 7 As shown, the embodiment of the present application further provides an electronic device, including a processor 711, a communication interface 712, a memory 713 and a communication bus 714, wherein the processor 711, the communication interface 712, and the memory 713 communicate with each other through the communication bus 714.
[0197] Memory 713, used for storing computer programs;
[0198] In one embodiment of the present application, the processor 711 is used to implement the audio source playback control method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 713.
[0199] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the sound source playback control method provided by any of the aforementioned method embodiments is implemented.
[0200] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0201] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0202] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0203] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for controlling sound source playback, characterized in that: The method comprises: In response to a received focus application request corresponding to a first sound source, the first list, the second list, and the third list are updated based on a preset arbitration rule, wherein the first list is used to store relevant information of a sound source that currently holds the focus and is in a normal volume playing state, the second list is used to store relevant information of a sound source that currently holds the focus and is in a reduced volume playing state, and the third list is used to store relevant information of a sound source that is currently in a focus waiting state, and the arbitration rule is used to characterize an arbitration result between any focus holding sound source and any focus applying sound source; According to the update results of the first list, the second list and the third list, determining each sound source to be lowered and a blocking sound source list corresponding to each sound source to be lowered from the new second list, wherein the blocking sound source list stores all blocking sound sources that prevent the sound source to be lowered from obtaining focus; Based on each sound source to be lowered and a list of obstructing sound sources corresponding to each sound source to be lowered, determining a volume playback level corresponding to each sound source to be lowered; Control each sound source to be lowered to play according to the volume playback level corresponding to each sound source to be lowered.
2. The sound source playback control method according to claim 1, characterized in that: The updating of the first list, the second list and the third list based on the preset arbitration rules includes: Traversing each sound source in the first list in turn, arbitrating each traversed sound source and the first sound source based on the arbitration rule, obtaining arbitration results of each sound source in the first list, and updating the first list, the second list and the third list according to the arbitration results of each sound source in the first list, and obtaining an application result corresponding to the first sound source; Traversing each sound source in the second list in turn, arbitrating each traversed sound source and the first sound source based on the arbitration rule, obtaining arbitration results of each sound source in the second list, and updating the application results corresponding to the first list, the second list, the third list and the first sound source according to the arbitration results of each sound source in the second list; Each sound source in the third list is traversed in turn, and the sound source traversed each time and the first sound source are arbitrated based on the arbitration rule to obtain the arbitration result of each sound source in the third list, and the third list is updated according to the arbitration result of each sound source in the third list and the application result corresponding to the updated first sound source.
3. The sound source playback control method according to claim 2, characterized in that: The arbitration results of each sound source in the first list, the arbitration results of each sound source in the second list, and the arbitration results of each sound source in the third list all include at least one of a first arbitration result, a second arbitration result, a third arbitration result, a fourth arbitration result, a fifth arbitration result, a sixth arbitration result, and a seventh arbitration result; Among them, the first arbitration result refers to mixing the focus holding sound source participating in the arbitration with the focus applying sound source, the second arbitration result refers to lowering the volume of the focus holding sound source participating in the arbitration, the third arbitration result refers to lowering the volume of the focus applying sound source participating in the arbitration, the fourth arbitration result refers to refusing the focus applying sound source participating in the arbitration to obtain focus, the fifth arbitration result refers to delaying the focus applying sound source participating in the arbitration to obtain focus, the sixth arbitration result refers to suspending the playback of the focus holding sound source participating in the arbitration, and the seventh arbitration result refers to stopping the playback of the focus holding sound source participating in the arbitration.
4. The sound source playback control method according to claim 3, characterized in that: The updating of the first list, the second list and the third list according to the arbitration results of each sound source in the first list, and obtaining the application result corresponding to the first sound source, includes: If there is a second sound source whose arbitration result is the first arbitration result in the first list, the first sound source and the second sound source are added to a new first list, and the application result of the first sound source is marked as successful application; and / or, If there is a third sound source in the first list whose arbitration result is the second arbitration result, the third sound source is added to the second list, and the first sound source is added to the blocking sound source list corresponding to the third sound source in the second list and the new first list, and the application result of the first sound source is marked as successful; and / or, If there is a fourth sound source whose arbitration result is the third arbitration result in the first list, the first sound source is added to the second list, and the fourth sound source is added to the blocking sound source list corresponding to the first sound source in the second list and the new first list respectively, and the application result of the first sound source is marked as successful application; and / or, If there is a fifth sound source whose arbitration result is the fourth arbitration result in the first list, adding the fifth sound source to the new first list, and marking the application result of the first sound source as application failure; and / or, If there is a sixth sound source whose arbitration result is the fifth arbitration result in the first list, the first sound source is added to the third list, the sixth sound source is added to the new first list, and the application result of the first sound source is marked as application delay; and / or, If there is a seventh sound source in the first list whose arbitration result is the sixth arbitration result, the seventh sound source is added to the third list, the first sound source is added to the new first list, and the application result of the first sound source is marked as successful application; and / or, When there is an eighth sound source whose arbitration result is the seventh arbitration result in the first list, the first sound source is added to the new first list, and the eighth sound source is added to the third list, and the eighth sound source is deleted from the blocking sound source list of each sound source in the second list and the third list, and the application result of the first sound source is marked as successful application.
5. The sound source playback control method according to claim 4, characterized in that: The updating of the application results corresponding to the first list, the second list, the third list and the first sound source according to the arbitration results of each sound source in the second list includes: If there is a ninth sound source in the second list whose arbitration result is the first arbitration result, the ninth sound source is added to a new second list, the first sound source is added to a new first list, and the application result of the first sound source is marked as successful application; and / or, If there is a tenth sound source whose arbitration result is the second arbitration result in the second list, the tenth sound source is added to the new second list, and the first sound source is added to the blocking sound source list corresponding to the tenth sound source in the new second list and the new first list respectively, and the application result of the first sound source is marked as successful application; and / or, If there is an eleventh sound source whose arbitration result is the third arbitration result in the second list, both the first sound source and the eleventh sound source are added to the new second list, and the eleventh sound source is added to the blocking sound source list corresponding to the first sound source in the new second list, and the application result of the first sound source is marked as successful application; and / or, If there is a twelfth sound source whose arbitration result is the fourth arbitration result in the second list, the twelfth sound source is added to the new second list, and the application result of the first sound source is marked as application failure; and / or, If there is a thirteenth sound source whose arbitration result is the fifth arbitration result in the second list, the first sound source is added to the third list, the thirteenth sound source is added to the new second list, and the application result of the first sound source is marked as application delay; and / or, If there is a fourteenth sound source whose arbitration result is the sixth arbitration result in the second list, the fourteenth sound source is added to the third list, and the first sound source is added to the blocking sound source list corresponding to the fourteenth sound source in the third list and the new first list, and the application result of the first sound source is marked as successful application; and / or, When there is a fifteenth sound source in the second list whose arbitration result is the seventh arbitration result, the first sound source is added to the new first list, and the fifteenth sound source is added to the third list, and the fifteenth sound source is deleted from the blocking sound source list of each sound source in the second list, the third list and the new second list, and the application result of the first sound source is marked as successful application.
6. The sound source playback control method according to claim 5, characterized in that: The updating of the third list according to the arbitration results of the sound sources in the third list and the updated application results corresponding to the first sound source includes: If there is a sixteenth sound source whose arbitration result is the second arbitration result in the third list, and the application result of the first sound source is application success or application delay, adding the first sound source to the blocking sound source list corresponding to the sixteenth sound source in the third list; and / or, If there is a seventeenth sound source whose arbitration result is the sixth arbitration result in the third list, and the application result of the first sound source is successful, adding the first sound source to the blocking sound source list corresponding to the seventeenth sound source in the third list; and / or, When there is an eighteenth sound source in the third list whose arbitration result is the seventh arbitration result and the application result of the first sound source is successful, the eighteenth sound source is deleted from the third list, and the eighteenth sound source is deleted from the blocking sound source list of each sound source in the third list and the new second list.
7. The sound source playback control method according to any one of claims 1 to 6, characterized in that: The step of determining the volume playback level corresponding to each sound source to be lowered based on each sound source to be lowered and a list of obstructing sound sources corresponding to each sound source to be lowered includes: Based on each sound source to be reduced and the list of obstructing sound sources corresponding to each sound source to be reduced, a relationship map is constructed, wherein the relationship map is used to represent the corresponding relationship between each sound source to be reduced and each obstructing sound source list; Traversing the sound sources in the new second list in turn, and determining whether the currently traversed sound source belongs to the sound source to be lowered in the relationship map; In the case where it is determined that the currently traversed sound source belongs to the sound source to be lowered in the relationship map, the obstructing sound sources in the target obstructing sound source list corresponding to the currently traversed sound source are traversed in sequence, the target obstructing sound source with the smallest volume loudness in the target obstructing sound source list and the volume loudness corresponding to the target obstructing sound source are determined, and the volume loudness corresponding to the target obstructing sound source is subtracted from a preset threshold, and the volume playback level corresponding to the currently traversed sound source is determined according to the volume loudness after subtracting the preset threshold; When it is determined that the currently traversed sound source does not belong to the sound source to be lowered in the relationship map, continue to traverse the next sound source in the new second list until all sound sources in the new second list have been traversed, and the volume playback level corresponding to each sound source to be lowered is obtained.
8. The sound source playback control method according to any one of claims 1 to 6, characterized in that: The receiving method of the focus application request corresponding to the first sound source includes at least one of the following: Using a sound source manager in the in-vehicle infotainment system to receive a focus request sent by a target application, wherein the target application is an application in the in-vehicle infotainment system corresponding to the first sound source; An instrument audio source message sent by a target instrument is received by using an inter-core communication service, and based on the audio source level carried in the instrument audio source message, a focus application request corresponding to the audio source level of the instrument audio source message is selected from multiple focus application requests in a preset cache, and the selected focus application request is used as the focus application request corresponding to the first audio source, wherein the target instrument is an instrument in an on-board instrument terminal that corresponds to the first audio source, and the inter-core communication service is used to realize communication between the on-board instrument terminal and the on-board infotainment system, and the multiple focus application requests in the preset cache correspond one-to-one to the multiple audio source levels.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the sound source playback control method described in any one of claims 1 to 8 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the sound source playback control method described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method and equipment for recovering abnormal crash of vehicle-mounted sound source management program
CN114764378A
Transcript aggregaton for non-linear editors
US20240202239A1