Audio processing method and device, equipment and storage medium

By judging the recording stream and playback stream status on the terminal device and mute the playback stream in non-call state, the problem that music applications in the prior art cannot be paused is solved, and the user experience and call effect are improved.

CN119960718APending Publication Date: 2025-05-09BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311473832.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-07
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The existing pulseaudio audio server cannot pause other applications when there are music applications to play music, causing users to hear music sounds and call sounds at the same time, affecting the call effect and poor user experience.

Method used

By obtaining the current recording stream list and play stream list, we can determine whether there is a play stream in a call state. If it exists, the play stream in a non-call state will be added to the mute play stream list and mute it to ensure that only play streams in a call state will be played.

Benefits of technology

It effectively avoids the non-call state playback stream affecting the call state playback stream, improves the user experience, and ensures the optimization of call effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960718A_ABST
    Figure CN119960718A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an audio processing method and device, equipment and a storage medium. The method comprises the following steps: acquiring a current recording stream list; obtaining a current playing stream list; according to the multiple first application program identifiers and the multiple second application program identifiers, whether a first target playing stream exists in the multiple playing streams or not is judged, and the first target playing stream is a playing stream corresponding to the application program in the call state; if the first target playing stream exists, determining at least one second target playing stream from the plurality of playing streams, and adding the at least one second target playing stream into a playing stream mute list, the second target playing stream being a playing stream corresponding to an application program in a non-call state; and traversing each second target playing stream in the playing stream mute list, and setting each second target playing stream as a mute playing stream. Only the play stream in the call state is played, so that the influence of other play streams is avoided, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of system development technology, and in particular to an audio processing method, apparatus, device and storage medium. Background Art

[0002] Currently, more and more users choose to install the Linux operating system on terminal devices or smart devices, among which the Linux operating system uses the open source pulseaudio audio server.

[0003] In the prior art, a pulseaudio audio server can be used to create a recording stream and a playback stream for an application, and the recording function of the application is realized through the recording stream, and the playback function of the application is realized through the playback stream.

[0004] However, in the current pulseaudio audio server, when a music application is playing music, if an audio or video call is made through a chat application, the music application will not stop playing. This causes the user to hear the music and the call at the same time, affecting the call quality, and thus the user experience is poor. Summary of the invention

[0005] The embodiments of the present disclosure provide an audio processing method, apparatus, device, and storage medium, which can improve the user experience of an operating system.

[0006] In a first aspect, an embodiment of the present disclosure provides an audio processing method, which is applied to a terminal device installed with an application program; the method comprises:

[0007] Obtaining a current recording stream list, wherein the recording stream list includes a one-to-one correspondence between a plurality of recording streams and a plurality of first application identifiers; and obtaining a current playback stream list, wherein the playback stream list includes a one-to-one correspondence between a plurality of playback streams and a plurality of second application identifiers;

[0008] According to the multiple first application identifiers and the multiple second application identifiers, determining whether there is a first target playback stream in the multiple playback streams, wherein the first target playback stream is a playback stream corresponding to an application in a call state;

[0009] If there is a first target playback stream, determining at least one second target playback stream from the multiple playback streams, and adding the at least one second target playback stream to the playback stream mute list, wherein the second target playback stream is a playback stream corresponding to an application in a non-call state;

[0010] Each second target playback stream in the playback stream mute list is traversed, and each second target playback stream is set as a mute playback stream.

[0011] In a second aspect, an embodiment of the present disclosure provides an audio processing device, which is applied to a terminal device installed with an application program, and the device includes:

[0012] An acquisition module, configured to acquire a current recording stream list, wherein the recording stream list includes a one-to-one correspondence between a plurality of recording streams and a plurality of first application identifiers; and acquire a current playback stream list, wherein the playback stream list includes a one-to-one correspondence between a plurality of playback streams and a plurality of second application identifiers;

[0013] a determination module, configured to determine whether there is a first target playback stream in the multiple playback streams according to the multiple first application identifiers and the multiple second application identifiers, wherein the first target playback stream is a playback stream corresponding to an application in a call state;

[0014] A adding module, configured to determine at least one second target playback stream from the multiple playback streams if there is a first target playback stream, and add the at least one second target playback stream to the playback stream mute list, wherein the second target playback stream is a playback stream corresponding to an application in a non-call state;

[0015] The mute module is used to traverse each second target playback stream in the playback stream mute list and set each second target playback stream as a mute playback stream.

[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0017] A processor, and a memory communicatively connected to the processor;

[0018] The memory stores computer-executable instructions;

[0019] The processor executes the computer-executable instructions stored in the memory to implement the audio processing method as described in the first aspect above.

[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the audio processing method described in the first aspect above is implemented.

[0021] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the audio processing method as described in the first aspect above.

[0022] The audio processing method, apparatus, device and storage medium provided in the present embodiment include: obtaining a current recording stream list, wherein the recording stream list includes a one-to-one correspondence between multiple recording streams and multiple first application identifiers; and obtaining a current playback stream list, wherein the playback stream list includes a one-to-one correspondence between multiple playback streams and multiple second application identifiers; judging whether there is a first target playback stream in the multiple playback streams based on the multiple first application identifiers and the multiple second application identifiers, wherein the first target playback stream is a playback stream corresponding to an application in a call state; if the first target playback stream exists, determining at least one second target playback stream from the multiple playback streams, and adding the at least one second target playback stream to a playback stream mute list, wherein the second target playback stream is a playback stream corresponding to an application in a non-call state; traversing each second target playback stream in the playback stream mute list, and setting each second target playback stream as a mute playback stream. In the embodiment of the present disclosure, it is determined whether there is a playback stream in a call state. If so, the playback stream in a non-call state is added to a silent playback stream list, and the playback stream in the silent playback stream list is muted. That is, only the playback stream in a call state is played, thereby avoiding the impact of other playback streams on the playback stream in the call state, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present disclosure 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, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0024] Figure 1 A schematic diagram of an application scenario of an audio processing method provided by an embodiment of the present disclosure;

[0025] Figure 2 A flowchart of an audio processing method provided by an embodiment of the present disclosure;

[0026] Figure 3 A schematic diagram of an audio processing method provided by an embodiment of the present disclosure;

[0027] Figure 4 A flowchart of obtaining a recording stream list and a playback stream list provided in an embodiment of the present disclosure;

[0028] Figure 5 A flowchart of another audio processing method provided by an embodiment of the present disclosure;

[0029] Figure 6 A structural block diagram of an audio processing device provided in an embodiment of the present disclosure;

[0030] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0033] At present, more and more users choose to install Linux operating system on terminal devices or smart devices, where Linux operating system uses open source pulseaudio audio server. In the prior art, pulseaudio audio server can create recording stream and playback stream for application, realize the recording function of application through recording stream, and realize the playback function of application through playback stream.

[0034] However, the pulseaudio audio server cannot pause other applications when an application is making an audio or video call. For example, when a music application is playing music, if an audio or video call is made through a chat application, the music application will not stop playing. This causes the user to hear the music and the call at the same time, affecting the call quality and thus providing a poor user experience.

[0035] It can be seen that under the Linux operating system, how to control the audio of an application through the pulseaudio audio server has become an urgent problem to be solved.

[0036] In order to solve the above problem, this embodiment provides an audio processing method, which first determines whether there is a playback stream in a call state; if there is a playback stream in a call state, the playback stream in a non-call state is added to a silent playback stream list, and the playback stream in the silent playback stream list is muted, that is, only the playback stream in the call state is played, thereby avoiding the impact of other playback streams on the playback stream in the call state, thereby improving the user experience.

[0037] The application scenarios of the embodiments of the present disclosure are explained below:

[0038] The audio processing method provided by the embodiments of the present disclosure can be applied to scenarios for processing call audio or other audio of various applications. Figure 1 Schematic diagram of an application scenario of an audio processing method provided by an embodiment of the present disclosure. Figure 1 As shown, voice applications can create recording streams and playback streams when making audio or video calls. Other applications only create playback streams when playing music.

[0039] Among them, the voice-enabled application can be any application with voice function. For example, the voice-enabled application includes a chat application, a navigation application or a game application. Exemplarily, if the voice-enabled application needs to create a recording stream or a playback stream, the pulse audio interface (pulseaudio api) in the pulseaudio audio server is called; the pulse audio service program (pulseaudio service) in the pulseaudio audio server is started through the pulse audio interface to create a recording stream or a playback stream, and a notification of the event of creating a recording stream or a playback stream is sent to the audio stream control module. The audio stream control module determines that the voice-enabled application is in a call state (at this time, there are both a recording stream and a playback stream), sends a pause message to other applications in a non-call state, and mutes the playback streams of other applications in a non-call state. Among them, other applications in a non-call state only have a playback stream and no recording stream.

[0040] Exemplarily, when a voice-enabled application needs to destroy a recording stream or a playback stream, the pulse audio interface (pulseaudio api) in the pulseaudio audio server is called; the pulse audio service (pulseaudio service) in the pulseaudio audio server is started through the pulse audio interface to destroy the recording stream or the playback stream, and a notification of the event of destroying the recording stream or the playback stream is sent to the audio stream control module. The audio stream control module determines that the voice-enabled application is in a non-call state (at this time, there is no recording stream and playback stream at the same time), and then sends a recovery message to other applications in the non-call state to restore the playback streams of other non-call applications to normal. The audio processing method provided in the embodiment of the present disclosure is described in detail using a detailed embodiment below.

[0041] Example 1

[0042] refer to Figure 2 , Figure 2 A flowchart of an audio processing method provided in an embodiment of the present disclosure. The execution subject of the method can be a terminal or a server device. The present disclosure embodiment is described by taking the execution subject as a terminal device with an application installed as an example. The method includes:

[0043] S201. Obtain a current recording stream list, wherein the recording stream list includes a one-to-one correspondence between multiple recording streams and multiple first application identifiers; and obtain a current playback stream list, wherein the playback stream list includes a one-to-one correspondence between multiple playback streams and multiple second application identifiers.

[0044] In the disclosed embodiment, the recording stream list includes multiple recording streams, and one recording stream corresponds to one first application identifier. The recording stream is used by the application to implement the recording function. For example, the recording stream list includes a one-to-one correspondence between 3 recording streams and 3 first application identifiers; wherein the first application identifier corresponding to recording stream A is: XX game. The first application identifier corresponding to recording stream B is: XX navigation. The first application identifier corresponding to recording stream C is: XX chat. Among them, recording stream A is the recording stream of XX game, which is used for XX game to implement the recording function; recording stream B is the recording stream of XX navigation, which is used for XX navigation to implement the recording function; recording stream C is the recording stream of XX chat, which is used for XX chat to implement the recording function. Optionally, the recording stream list can be represented by recordlist.

[0045] In the disclosed embodiment, the play stream list includes multiple play streams, and one play stream corresponds to one second application identifier. The play stream is used by the application to implement the play function. For example, the play stream list includes a one-to-one correspondence between 3 play streams and 3 second application identifiers; wherein the second application identifier corresponding to play stream A is: XX music. The second application identifier corresponding to play stream B is: XX navigation. The second application identifier corresponding to play stream C is: XX chat. Among them, play stream A is the play stream of XX music, which is used for XX music to implement the play function; play stream B is the play stream of XX video, which is used for XX video to implement the play function; play stream C is the play stream of XX chat, which is used for XX chat to implement the play function. Optionally, the play stream list can be represented by playlist.

[0046] S202: Determine whether there is a first target playback stream among the multiple playback streams according to the multiple first application identifiers and the multiple second application identifiers, wherein the first target playback stream is a playback stream corresponding to an application in a call state.

[0047] Among them, the application in the call state uses both the voice stream and the playback stream. In this case, the voice stream of the application in the call state is in the recording stream list, and the playback stream of the application is in the playback stream list.

[0048] In some instances, when the first application identifier and the second application identifier are the same, the first application identifier and the second application identifier correspond to the same application, and the application uses both the voice stream and the playback stream. In this case, the application is in a call state. Accordingly, this step is: traverse multiple first application identifiers, and for each first application identifier, determine whether there is a second application identifier that is the same as the first application identifier among the multiple second application identifiers; if so, determine that the playback stream corresponding to the second application identifier that is the same as the first application identifier is the first target playback stream, and determine that the first target playback stream exists among the multiple playback streams.

[0049] For example, the first application identifier corresponding to the recording stream C is: XX Chat. The second application identifier corresponding to the playback stream C is: XX Chat. At this time, there is a second application identifier that is the same as the first application identifier, and the playback stream of XX Chat is determined to be the first target playback stream. That is, the first target playback stream is the playback stream of the application XX Chat in the call state.

[0050] S203: If there is a first target playback stream, determine at least one second target playback stream from the multiple playback streams, and add the at least one second target playback stream to a playback stream mute list, wherein the second target playback stream is a playback stream corresponding to an application in a non-call state.

[0051] In the disclosed embodiment, an application in a non-call state has only a playback stream but no voice stream. In this case, the playback stream is the playback stream corresponding to the non-call state. An application in a call state has both a playback stream and a voice stream. In this case, the playback stream is the playback stream corresponding to the call state.

[0052] Continue to refer Figure 3 If there is a playback stream in a call state (ie, the first target playback stream), then continue to determine at least one second target playback stream from the multiple playback streams.

[0053] It should be noted that in this step, to determine at least one second target playback stream from multiple playback streams, the recording stream list can be traversed to compare each recording stream with the playback stream list; or the playback stream list can be traversed to compare each playback stream with the recording stream list. The methods for the two cases are specifically described below.

[0054] In the first case, multiple first application identifiers in the recording stream list are traversed. Accordingly, at least one second target playback stream is determined from the multiple playback streams, including: after traversing the multiple first application identifiers, at least one second application identifier that is different from each of the first application identifiers is determined from the multiple second application identifiers; and the playback stream corresponding to the at least one second application identifier is determined as the second target playback stream, thereby obtaining at least one second target playback stream.

[0055] In this embodiment, each first application identifier is compared with multiple second application identifiers to determine a second application identifier that is different from each first application identifier. That is, if the second application is different from the traversed multiple first application identifiers, the application corresponding to the second application has no recording stream and is not in a call state.

[0056] The second case, such as Figure 3 As shown, multiple second application identifiers in the play stream list are traversed. Accordingly, at least one second target play stream is determined from the multiple play streams, including: traversing the multiple second application identifiers, for each second application identifier, determining whether there is a first application identifier identical to the second application identifier among the multiple first application identifiers; if not, determining that the play stream corresponding to the second application identifier is the second target play stream; after traversing the multiple second application identifiers, at least one second target play stream is obtained.

[0057] In this embodiment, each second application identifier is compared with multiple first application identifiers. If the second application identifier is different from the multiple first application identifiers, the application corresponding to the second application has no recording stream, that is, it is in a non-call state.

[0058] S204: traverse each second target playback stream in the playback stream mute list, and set each second target playback stream as a mute playback stream.

[0059] Each second target play stream in the play stream mute list is a play stream in a non-call state. Optionally, the play stream mute list can be represented by mutelist.

[0060] In some embodiments, the playback stream is paused by sending a pause playback message to the application. Accordingly, the specific steps are: sending a pause playback message to the target application corresponding to each second target playback stream through the audio stream management module, and the target application corresponding to each second target playback stream pauses the playback message to achieve a silent playback stream.

[0061] In other embodiments, this is achieved by reducing the volume of the playback stream to 0. Accordingly, the specific steps are: sending a volume adjustment instruction to the target application corresponding to each second target playback stream through the audio stream management module, and reducing the volume of the playback stream of the target application corresponding to each second target playback stream to 0 through the volume adjustment instruction to achieve a silent playback stream.

[0062] The audio processing method provided in this embodiment first determines whether there is a playback stream in a call state. If so, the playback stream in a non-call state is added to a silent playback stream list, and the playback streams in the silent playback stream list are muted. That is, only the playback stream in a call state is played, thereby avoiding the impact of other playback streams on the playback stream in a call state, thereby improving the user experience.

[0063] Example 2

[0064] refer to Figure 4 , Figure 4 A flowchart of obtaining a recording stream list and a playback stream list is provided in an embodiment of the present disclosure. Figure 2 Based on this, the method of obtaining the current recording stream list in S201 and the method of obtaining the current playback stream list are described in detail.

[0065] In the embodiment of the present disclosure, the recording stream list can be obtained through the recording stream creation event and the recording stream destruction event. Accordingly, the specific steps for obtaining the current recording stream list are:

[0066] S401. If a recording stream creation event is received through the audio stream management module, the recording stream information in the recording stream creation event is added to a recording stream list.

[0067] In some embodiments, it can be determined that the audio stream management module has received the recording stream creation event by registering the first event object corresponding to the recording stream creation event in the audio server. Accordingly, the specific steps for the audio stream management module to receive the recording stream creation event are: registering the first event object corresponding to the recording stream creation event in the audio server, wherein the first event object is used to detect the recording stream creation event; if it is detected through the first event object that the audio server creates the recording stream of the first application, the recording stream information is obtained through the audio server, wherein the recording stream information includes the correspondence between the created recording stream and the first application identifier; and notifying the audio stream management module of the recording stream creation event through the audio server, wherein the recording stream creation event includes the recording stream information.

[0068] Exemplarily, the first event object corresponding to the recording stream creation event can be registered by registering a recording stream creation callback in the audio server.

[0069] In this case, since the first event object corresponding to the recording stream creation event is registered in the audio server, when the audio server creates a recording stream for the first application, the recording stream information can be determined through the first event object corresponding to the recording stream creation event, and the audio stream management module can be notified of the recording stream creation event, thereby ensuring that the audio stream management module receives the recording stream creation event synchronously with the audio server creating the recording stream, facilitating the synchronous addition of the created recording stream to the recording stream list, realizing real-time updating of the recording stream list, and thereby improving the accuracy of the recording stream list.

[0070] S402. If a recording stream destruction event is received through the audio stream management module, the recording stream information in the recording stream destruction event is deleted from the recording stream list to obtain a current recording stream list; wherein the recording stream information includes a correspondence between the recording stream and the first application identifier.

[0071] The recording stream list includes one or more recording stream information. The recording stream information may include any information related to the recording stream. For example, the recording stream information includes a recording stream identifier, a first application identifier, and a mute flag information. In this step, the recording stream information includes a recording stream and a first application identifier. The recording stream identifier can be represented by SteamId, the first application identifier can be represented by AppName, and the mute flag information can be represented by Muteflag.

[0072] In this case, the audio stream management module is used to obtain the recording stream list based on the recording stream creation event and the recording stream destruction event. In this way, the recording stream list can be updated in real time, thereby improving the accuracy of the obtained recording stream list.

[0073] In the embodiment of the present disclosure, the play stream list can be obtained through the play stream creation event and the play stream destruction event. Accordingly, the specific steps for obtaining the current play stream list are:

[0074] In some embodiments, it can be determined that the audio stream management module has received the recording stream destruction event by registering the second event object corresponding to the recording stream destruction event in the audio server. Accordingly, the specific steps for the audio stream management module to receive the recording stream destruction event are: registering the second event object corresponding to the recording stream destruction event in the audio server, wherein the second event object is used to detect the recording stream destruction event; if it is detected through the second event object that the audio server destroys the recording stream of the first application, the recording stream information is obtained through the audio server, wherein the recording stream information includes the corresponding relationship between the destroyed recording stream and the first application identifier; and notifying the audio stream management module of the recording stream destruction event through the audio server, wherein the recording stream destruction event includes the recording stream information.

[0075] Exemplarily, the second event object corresponding to the recording stream destruction event can be registered by registering the recording stream destruction callback in the audio server.

[0076] In this case, since the second event object corresponding to the recording stream destruction event is registered in the audio server, when the audio server destroys the recording stream of the first application, the recording stream information can be determined through the second event object corresponding to the recording stream destruction event, and the audio stream management module can be notified of the recording stream destruction event, thereby ensuring that the audio stream management module receives the recording stream destruction event synchronously with the audio server destroys the recording stream, facilitating the synchronous removal of the destroyed recording stream from the recording stream list, realizing real-time updating of the recording stream list, and thereby improving the accuracy of the recording stream list.

[0077] S403: If a play stream creation event is received through the audio stream management module, the play stream information in the play stream creation event is added to a play stream list.

[0078] In some embodiments, the audio stream management module can determine that it has received the play stream creation event by registering the third event object corresponding to the play stream creation event in the audio server. Accordingly, the specific steps for the audio stream management module to receive the play stream creation event are: registering the third event object corresponding to the play stream creation event in the audio server, wherein the third event object is used to detect the play stream creation event; if it is detected through the third event object that the audio server creates the play stream of the second application, then the play stream information is obtained through the audio server, wherein the play stream information includes the corresponding relationship between the created play stream and the second application identifier; and notifying the audio stream management module of the play stream creation event through the audio server, wherein the play stream creation event includes the play stream information.

[0079] Exemplarily, the third event object corresponding to the playback stream creation event is registered by registering a playback stream creation callback in the audio server.

[0080] In this case, since the third event object corresponding to the playback stream creation event is registered in the audio server, when the audio server creates the playback stream of the first application, the playback stream information can be determined through the third event object corresponding to the playback stream creation event, and the audio stream management module can be notified of the playback stream creation event, thereby ensuring that the audio stream management module receives the playback stream creation event synchronously with the audio server creating the playback stream, facilitating the synchronous addition of the created playback stream to the playback stream list, realizing real-time updating of the playback stream list, and thereby improving the accuracy of the playback stream list.

[0081] S404: If a playback stream destruction event is received through the audio stream management module, the playback stream information in the playback stream destruction event is deleted from the playback stream list to obtain a current playback stream list; wherein the playback stream information includes a correspondence between the playback stream and the second application identifier.

[0082] The play stream list includes one or more play stream information. The play stream information may include any information related to the play stream. For example, the play stream information includes a play stream identifier, a second application identifier, and a mute flag information. In this step, the play stream information includes a play stream and a second application identifier as an example. The play stream identifier can be represented by SteamId, the second application identifier can be represented by AppName, and the mute flag information can be represented by Muteflag.

[0083] In this case, the play stream list is obtained according to the play stream creation event and the play stream destruction event through the audio stream management module, so that the play stream list can be updated in real time, thereby improving the accuracy of the obtained play stream list.

[0084] In some embodiments, the audio stream management module can determine that it has received the playback stream destruction event by registering the fourth event object corresponding to the playback stream destruction event in the audio server. Accordingly, the specific steps for the audio stream management module to receive the playback stream destruction event are: registering the fourth event object corresponding to the playback stream destruction event in the audio server, wherein the fourth event object is used to detect the playback stream destruction event; if it is detected through the fourth event object that the audio server destroys the playback stream of the second application, the playback stream information is obtained through the audio server, wherein the playback stream information includes the corresponding relationship between the destroyed playback stream and the second application identifier; and notifying the audio stream management module of the playback stream destruction event through the audio server, wherein the playback stream destruction event includes the playback stream information.

[0085] Exemplarily, the fourth event object corresponding to the playback stream destruction event is registered by registering a playback stream destruction callback in the audio server.

[0086] In this case, since the fourth event object corresponding to the playback stream destruction event is registered in the audio server, when the audio server destroys the playback stream of the first application, the playback stream information can be determined through the fourth event object corresponding to the playback stream destruction event, and the audio stream management module can be notified of the playback stream destruction event, thereby ensuring that the audio stream management module receives the playback stream destruction event synchronously with the audio server destroys the playback stream, facilitating the synchronous removal of the destroyed playback stream from the playback stream list, realizing real-time updating of the playback stream list, and thereby improving the accuracy of the playback stream list.

[0087] It should be noted that there is no necessary order of execution between steps S401-S402 and steps S403-S404. Steps S401-S402 may be executed first, and then steps S403-S404, or steps S403-S404 may be executed first, and then steps S401-S402, or steps S401-S402 and steps S403-S404 may be executed simultaneously.

[0088] Example 3

[0089] refer to Figure 5 , Figure 5 A flowchart of another audio processing method provided by an embodiment of the present disclosure. In an embodiment of the present disclosure, the play stream list also includes first mute flag information corresponding to each play stream, wherein the first mute flag information includes first indication information or second indication information, wherein the first indication information is used to indicate that the play stream is a mute play stream, and wherein the second indication information is used to indicate that the play stream is a non-mute play stream. Accordingly, in step S204, after traversing each second target play stream in the play stream mute list and setting each second target play stream as a mute play stream, it also includes:

[0090] S205: Set the first mute flag information corresponding to each second target play stream in the play stream list as the first indication information.

[0091] Optionally, continue to refer to Figure 3 , the first indication information is True, indicating that the playback stream is in a muted state. In this case, a pause playback message may also be sent to the application corresponding to the muted playback stream to pause the playback of the playback stream. Optionally, the pause playback message is sent to the application corresponding to the muted playback stream via DBUS (Date BUS, data bus) communication.

[0092] It should be noted that when there is no playback stream in the call state, the playback stream can also be restored. Figure 3 , when the recording list is empty, or there is no playback stream in the call state, there is no first target playback stream. In this case, it will ensure that each playback stream plays normally.

[0093] Accordingly, methods for ensuring normal playback of each playback stream include:

[0094] S206: If the first target playback stream does not exist, traverse the first mute flag information corresponding to each playback stream in the playback stream list.

[0095] For example, continue to refer to Figure 3 If the recording list is empty or there is no playback stream in the call state, the first mute flag information corresponding to each playback stream is traversed.

[0096] S207: If the first mute flag information is the first indication information, unmute the playback stream corresponding to the first mute flag information, and modify the first mute flag information to the second indication information.

[0097] For example, continue to refer to Figure 3 , the first indication information is True, and the second indication information is False. Accordingly, it is determined whether the first mute flag information corresponding to each playback stream is True. If the first mute flag information is True, the playback stream corresponding to the first mute flag information is unmuted, and the first mute flag information is modified to False. In this case, a resume playback message may also be sent to the application in the mute state to resume playing the playback stream. Optionally, a resume playback message is sent to the application in the mute state via DBUS communication.

[0098] In the embodiment of the present application, when there is no playback stream in a call state, other playback streams can be automatically restored to normal playback, further improving the user experience.

[0099] It should be noted that there is no necessary order of execution between step S205 and steps S206-S207. Step S205 may be executed first, and then steps S206-S207, or step S205 may be executed separately, and steps S206-S207 may be executed separately.

[0100] Figure 6 This is a structural block diagram of an audio processing device provided by an embodiment of the present disclosure, which is applied to a terminal device with an application installed. Figure 6 The audio processing device includes: an acquisition module 601, a judgment module 602, a joining module 603 and a mute module 604.

[0101] The acquisition module 601 is used to acquire a current recording stream list, wherein the recording stream list includes a one-to-one correspondence between multiple recording streams and multiple first application identifiers; and acquire a current playback stream list, wherein the playback stream list includes a one-to-one correspondence between multiple playback streams and multiple second application identifiers;

[0102] A determination module 602 is used to determine whether there is a first target playback stream in the multiple playback streams according to the multiple first application identifiers and the multiple second application identifiers, wherein the first target playback stream is a playback stream corresponding to the application in a call state;

[0103] The adding module 603 is used to determine at least one second target playback stream from the multiple playback streams if there is a first target playback stream, and add the at least one second target playback stream to the playback stream mute list, wherein the second target playback stream is a playback stream corresponding to the application in a non-call state;

[0104] The mute module 604 is configured to traverse each second target play stream in the play stream mute list and set each second target play stream as a mute play stream.

[0105] According to one or more embodiments of the present disclosure, the judgment module 602 judges whether there is a first target playback stream in the multiple playback streams based on the multiple first application identifiers and the multiple second application identifiers, specifically including: traversing the multiple first application identifiers, for each first application identifier, judging whether there is a second application identifier that is identical to the first application identifier in the multiple second application identifiers; if so, determining that the playback stream corresponding to the second application identifier that is identical to the first application identifier is the first target playback stream, and determining that the first target playback stream exists in the multiple playback streams.

[0106] According to one or more embodiments of the present disclosure, the judgment module 602 determines at least one second target playback stream from the multiple playback streams, specifically including: traversing the multiple first application identifiers, determining at least one second application identifier that is different from each first application identifier from the multiple second application identifiers; determining that the playback stream corresponding to the at least one second application identifier is the second target playback stream, and obtaining at least one second target playback stream.

[0107] According to one or more embodiments of the present disclosure, the judgment module 602 determines at least one second target playback stream from the multiple playback streams, specifically including: traversing the multiple second application identifiers, and for each second application identifier, determining whether there is a first application identifier that is identical to the second application identifier among the multiple first application identifiers; if not, determining that the playback stream corresponding to the second application identifier is the second target playback stream; and obtaining at least one second target playback stream after traversing the multiple second application identifiers.

[0108] According to one or more embodiments of the present disclosure, the acquisition module 601 acquires the current recording stream list, specifically including: if a recording stream creation event is received through the audio stream management module, the recording stream information in the recording stream creation event is added to the recording stream list; if a recording stream destruction event is received through the audio stream management module, the recording stream information in the recording stream destruction event is deleted from the recording stream list to obtain the current recording stream list; wherein the recording stream information includes the correspondence between the recording stream and the first application identifier.

[0109] According to one or more embodiments of the present disclosure, the device also includes: a first detection module; the first detection module is used to register a first event object corresponding to a recording stream creation event in an audio server, wherein the second event object is used to detect a recording stream destruction event; if it is detected through the first event object that the audio server creates a recording stream for a first application, recording stream information is obtained through the audio server, wherein the recording stream information includes a correspondence between the created recording stream and the first application identifier; and the audio stream management module is notified of the recording stream creation event through the audio server, wherein the recording stream creation event includes the recording stream information.

[0110] According to one or more embodiments of the present disclosure, the first detection module is further used to register a second event object corresponding to a recording stream destruction event in an audio server, wherein the second event object is used to detect a recording stream destruction event; if it is detected through the second event object that the audio server destroys the recording stream of the first application, recording stream information is obtained through the audio server, wherein the recording stream information includes a correspondence between the destroyed recording stream and the first application identifier; and the audio stream management module is notified of the recording stream destruction event through the audio server, wherein the recording stream destruction event includes the recording stream information.

[0111] According to one or more embodiments of the present disclosure, the acquisition module 601 acquires the current playback stream list, specifically including: if a playback stream creation event is received through the audio stream management module, the playback stream information in the playback stream creation event is added to the playback stream list; if a playback stream destruction event is received through the audio stream management module, the playback stream information in the playback stream destruction event is deleted from the playback stream list to obtain the current playback stream list; wherein the playback stream information includes the correspondence between the playback stream and the second application identifier.

[0112] According to one or more embodiments of the present disclosure, the device also includes: a second detection module; the second detection module is used to register a third event object corresponding to a playback stream creation event in an audio server, wherein the third event object is used to detect the playback stream creation event; if it is detected through the third event object that the audio server creates a playback stream of a second application, the playback stream information is obtained through the audio server, wherein the playback stream information includes the correspondence between the created playback stream and the second application identifier; and the audio stream management module is notified of the playback stream creation event through the audio server, wherein the playback stream creation event includes the playback stream information.

[0113] According to one or more embodiments of the present disclosure, the second detection module is further used to register a fourth event object corresponding to a playback stream destruction event in the audio server, wherein the fourth event object is used to detect the playback stream destruction event; if it is detected through the fourth event object that the audio server destroys the playback stream of the second application, the playback stream information is obtained through the audio server, wherein the playback stream information includes the correspondence between the destroyed playback stream and the second application identifier; and the audio stream management module is notified of the playback stream destruction event through the audio server, wherein the playback stream destruction event includes the playback stream information.

[0114] According to one or more embodiments of the present disclosure, the playback stream list also includes first mute flag information corresponding to each playback stream, wherein the first mute flag information includes first indication information or second indication information, wherein the first indication information is used to indicate that the playback stream is a mute playback stream, and the second indication information is used to indicate that the playback stream is a non-mute playback stream; accordingly, the device also includes: a setting module; the setting module is used to set the first mute flag information corresponding to each second target playback stream in the playback stream list to the first indication information.

[0115] According to one or more embodiments of the present disclosure, the playback stream list also includes first mute flag information corresponding to each playback stream, wherein the first mute flag information includes first indication information or second indication information, wherein the first indication information is used to indicate that the playback stream is a mute playback stream, and the second indication information is used to indicate that the playback stream is a non-mute playback stream; accordingly, the device also includes: a cancel mute module; the cancel mute module is used to traverse the first mute flag information corresponding to each playback stream in the playback stream list if the first target playback stream does not exist; if the first mute flag information is the first indication information, the playback stream corresponding to the first mute flag information is canceled, and the first mute flag information is modified to the second indication information.

[0116] The acquisition module 601, the judgment module 602, the joining module 603 and the mute module 604 are connected in sequence. The audio processing device provided in this embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.

[0117] An embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the audio processing method provided in any of the above embodiments of the present application.

[0118] Figure 7 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present disclosure. Figure 7 The electronic device 700 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0119] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0120] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication devices 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0121] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0122] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0123] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0124] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0125] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0127] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0128] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0129] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0130] In a first aspect, according to one or more embodiments of the present disclosure, there is provided an audio processing method, which is applied to a terminal device having an application installed thereon, comprising:

[0131] Obtaining a current recording stream list, wherein the recording stream list includes a one-to-one correspondence between a plurality of recording streams and a plurality of first application identifiers; and obtaining a current playback stream list, wherein the playback stream list includes a one-to-one correspondence between a plurality of playback streams and a plurality of second application identifiers;

[0132] According to the multiple first application identifiers and the multiple second application identifiers, determining whether there is a first target playback stream in the multiple playback streams, wherein the first target playback stream is a playback stream corresponding to an application in a call state;

[0133] If there is a first target playback stream, determining at least one second target playback stream from the multiple playback streams, and adding the at least one second target playback stream to the playback stream mute list, wherein the second target playback stream is a playback stream corresponding to an application in a non-call state;

[0134] Each second target playback stream in the playback stream mute list is traversed, and each second target playback stream is set as a mute playback stream.

[0135] According to one or more embodiments of the present disclosure, determining whether a first target playback stream exists in the multiple playback streams based on the multiple first application identifiers and the multiple second application identifiers includes: traversing the multiple first application identifiers, and for each first application identifier, determining whether a second application identifier identical to the first application identifier exists in the multiple second application identifiers; if so, determining that the playback stream corresponding to the second application identifier identical to the first application identifier is the first target playback stream, and determining that the first target playback stream exists in the multiple playback streams.

[0136] According to one or more embodiments of the present disclosure, determining at least one second target playback stream from the multiple playback streams includes: traversing the multiple first application identifiers, determining at least one second application identifier from the multiple second application identifiers that is different from each first application identifier; determining the playback stream corresponding to the at least one second application identifier as the second target playback stream, and obtaining at least one second target playback stream.

[0137] According to one or more embodiments of the present disclosure, determining at least one second target playback stream from the multiple playback streams includes: traversing the multiple second application identifiers, and for each second application identifier, determining whether there is a first application identifier that is identical to the second application identifier among the multiple first application identifiers; if not, determining that the playback stream corresponding to the second application identifier is the second target playback stream; and obtaining at least one second target playback stream after traversing the multiple second application identifiers.

[0138] According to one or more embodiments of the present disclosure, obtaining the current recording stream list includes: if a recording stream creation event is received through the audio stream management module, the recording stream information in the recording stream creation event is added to the recording stream list; if a recording stream destruction event is received through the audio stream management module, the recording stream information in the recording stream destruction event is deleted from the recording stream list to obtain the current recording stream list; wherein the recording stream information includes the correspondence between the recording stream and the first application identifier.

[0139] According to one or more embodiments of the present disclosure, if a recording stream creation event is received through the audio stream management module, before adding the recording stream information in the recording stream creation event to the recording stream list, it also includes: registering a first event object corresponding to the recording stream creation event in the audio server, wherein the first event object is used to detect the recording stream creation event; if it is detected through the first event object that the audio server creates a recording stream for the first application, obtaining the recording stream information through the audio server, wherein the recording stream information includes the correspondence between the created recording stream and the first application identifier; and notifying the audio stream management module of the recording stream creation event through the audio server, wherein the recording stream creation event includes the recording stream information.

[0140] According to one or more embodiments of the present disclosure, if a recording stream destruction event is received through the audio stream management module, before deleting the recording stream information in the recording stream destruction event from the recording stream list, it also includes: registering a second event object corresponding to the recording stream destruction event in the audio server, wherein the second event object is used to detect the recording stream destruction event; if it is detected through the second event object that the audio server destroys the recording stream of the first application, obtaining the recording stream information through the audio server, wherein the recording stream information includes the correspondence between the destroyed recording stream and the first application identifier; notifying the audio stream management module of the recording stream destruction event through the audio server, wherein the recording stream destruction event includes the recording stream information.

[0141] According to one or more embodiments of the present disclosure, obtaining the current playback stream list includes: if a playback stream creation event is received through the audio stream management module, adding the playback stream information in the playback stream creation event to the playback stream list; if a playback stream destruction event is received through the audio stream management module, deleting the playback stream information in the playback stream destruction event from the playback stream list to obtain the current playback stream list; wherein the playback stream information includes the correspondence between the playback stream and the second application identifier.

[0142] According to one or more embodiments of the present disclosure, if a playback stream creation event is received through the audio stream management module, before adding the playback stream information in the playback stream creation event to the playback stream list, it also includes: registering a third event object corresponding to the playback stream creation event in the audio server, wherein the third event object is used to detect the playback stream creation event; if it is detected through the third event object that the audio server creates a playback stream of the second application, obtaining the playback stream information through the audio server, wherein the playback stream information includes the correspondence between the created playback stream and the second application identifier; and notifying the audio stream management module of the playback stream creation event through the audio server, wherein the playback stream creation event includes the playback stream information.

[0143] According to one or more embodiments of the present disclosure, if a playback stream destruction event is received through the audio stream management module, before deleting the playback stream information in the playback stream destruction event from the playback stream list, it also includes: registering a fourth event object corresponding to the playback stream destruction event in the audio server, wherein the fourth event object is used to detect the playback stream destruction event; if it is detected through the fourth event object that the audio server destroys the playback stream of the second application, obtaining the playback stream information through the audio server, wherein the playback stream information includes the correspondence between the destroyed playback stream and the second application identifier; notifying the audio stream management module of the playback stream destruction event through the audio server, wherein the playback stream destruction event includes the playback stream information.

[0144] According to one or more embodiments of the present disclosure, the playback stream list also includes first mute flag information corresponding to each playback stream, wherein the first mute flag information includes first indication information or second indication information, wherein the first indication information is used to indicate that the playback stream is a mute playback stream, and the second indication information is used to indicate that the playback stream is a non-mute playback stream; accordingly, after traversing each second target playback stream in the playback stream mute list and setting each second target playback stream as a mute playback stream, it also includes: setting the first mute flag information corresponding to each second target playback stream in the playback stream list to the first indication information.

[0145] According to one or more embodiments of the present disclosure, the playback stream list also includes first mute flag information corresponding to each playback stream, wherein the first mute flag information includes first indication information or second indication information, wherein the first indication information is used to indicate that the playback stream is a mute playback stream, and the second indication information is used to indicate that the playback stream is a non-mute playback stream; accordingly, the method also includes: if the first target playback stream does not exist, traversing the first mute flag information corresponding to each playback stream in the playback stream list; if the first mute flag information is the first indication information, unmuting the playback stream corresponding to the first mute flag information, and modifying the first mute flag information to the second indication information.

[0146] In a second aspect, according to one or more embodiments of the present disclosure, there is provided an audio processing apparatus, which is applied to a terminal device installed with an application program, and includes: an acquisition module, a judgment module, a joining module and a mute module.

[0147] The acquisition module is used to acquire the current recording stream list, wherein the recording stream list includes a one-to-one correspondence between multiple recording streams and multiple first application identifiers; and acquire the current playback stream list, wherein the playback stream list includes a one-to-one correspondence between multiple playback streams and multiple second application identifiers;

[0148] a determination module, configured to determine whether there is a first target playback stream in the multiple playback streams according to the multiple first application identifiers and the multiple second application identifiers, wherein the first target playback stream is a playback stream corresponding to an application in a call state;

[0149] A adding module, configured to determine at least one second target playback stream from the multiple playback streams if there is a first target playback stream, and add the at least one second target playback stream to the playback stream mute list, wherein the second target playback stream is a playback stream corresponding to an application in a non-call state;

[0150] The mute module is used to traverse each second target playback stream in the playback stream mute list and set each second target playback stream as a mute playback stream.

[0151] According to one or more embodiments of the present disclosure, the judgment module judges whether there is a first target playback stream in the multiple playback streams based on the multiple first application identifiers and the multiple second application identifiers, specifically including: traversing the multiple first application identifiers, for each first application identifier, judging whether there is a second application identifier that is identical to the first application identifier in the multiple second application identifiers; if so, determining that the playback stream corresponding to the second application identifier that is identical to the first application identifier is the first target playback stream, and determining that the first target playback stream exists in the multiple playback streams.

[0152] According to one or more embodiments of the present disclosure, the judgment module determines at least one second target playback stream from the multiple playback streams, specifically including: traversing the multiple first application identifiers, determining at least one second application identifier that is different from each first application identifier from the multiple second application identifiers; determining that the playback stream corresponding to the at least one second application identifier is the second target playback stream, and obtaining at least one second target playback stream.

[0153] According to one or more embodiments of the present disclosure, the judgment module determines at least one second target playback stream from the multiple playback streams, specifically including: traversing the multiple second application identifiers, and for each second application identifier, judging whether there is a first application identifier that is the same as the second application identifier among the multiple first application identifiers; if not, determining that the playback stream corresponding to the second application identifier is the second target playback stream; and obtaining at least one second target playback stream after traversing the multiple second application identifiers.

[0154] According to one or more embodiments of the present disclosure, the acquisition module obtains the current recording stream list, specifically including: if a recording stream creation event is received through the audio stream management module, the recording stream information in the recording stream creation event is added to the recording stream list; if a recording stream destruction event is received through the audio stream management module, the recording stream information in the recording stream destruction event is deleted from the recording stream list to obtain the current recording stream list; wherein the recording stream information includes the correspondence between the recording stream and the first application identifier.

[0155] According to one or more embodiments of the present disclosure, the device also includes: a first detection module; the first detection module is used to register a first event object corresponding to a recording stream creation event in an audio server, wherein the first event object is used to detect a recording stream creation event; if it is detected through the first event object that the audio server creates a recording stream of a first application, recording stream information is obtained through the audio server, wherein the recording stream information includes a correspondence between the created recording stream and the first application identifier; and the audio stream management module is notified of the recording stream creation event through the audio server, wherein the recording stream creation event includes the recording stream information.

[0156] According to one or more embodiments of the present disclosure, the first detection module is further used to register a second event object corresponding to a recording stream destruction event in an audio server, wherein the second event object is used to detect a recording stream destruction event; if it is detected through the second event object that the audio server destroys the recording stream of the first application, recording stream information is obtained through the audio server, wherein the recording stream information includes a correspondence between the destroyed recording stream and the first application identifier; and the audio stream management module is notified of the recording stream destruction event through the audio server, wherein the recording stream destruction event includes the recording stream information.

[0157] According to one or more embodiments of the present disclosure, the acquisition module acquires the current playback stream list, specifically including: if a playback stream creation event is received through the audio stream management module, the playback stream information in the playback stream creation event is added to the playback stream list; if a playback stream destruction event is received through the audio stream management module, the playback stream information in the playback stream destruction event is deleted from the playback stream list to obtain the current playback stream list; wherein the playback stream information includes the correspondence between the playback stream and the second application identifier.

[0158] According to one or more embodiments of the present disclosure, the device also includes: a second detection module; the second detection module is used to register a third event object corresponding to a playback stream creation event in an audio server, wherein the third event object is used to detect the playback stream creation event; if it is detected through the third event object that the audio server creates a playback stream of a second application, the playback stream information is obtained through the audio server, wherein the playback stream information includes the correspondence between the created playback stream and the second application identifier; and the audio stream management module is notified of the playback stream creation event through the audio server, wherein the playback stream creation event includes the playback stream information.

[0159] According to one or more embodiments of the present disclosure, the second detection module is further used to register a fourth event object corresponding to a playback stream destruction event in the audio server, wherein the fourth event object is used to detect the playback stream destruction event; if it is detected through the fourth event object that the audio server destroys the playback stream of the second application, the playback stream information is obtained through the audio server, wherein the playback stream information includes the correspondence between the destroyed playback stream and the second application identifier; and the audio stream management module is notified of the playback stream destruction event through the audio server, wherein the playback stream destruction event includes the playback stream information.

[0160] According to one or more embodiments of the present disclosure, the playback stream list further includes first mute flag information corresponding to each playback stream, wherein the first mute flag information includes first indication information or second indication information, wherein the first indication information is used to indicate that the playback stream is a mute playback stream, and the second indication information is used to indicate that the playback stream is a non-mute playback stream;

[0161] Correspondingly, the device further includes: a setting module; the setting module is used to set the first mute flag information corresponding to each second target playback stream in the playback stream list as the first indication information.

[0162] According to one or more embodiments of the present disclosure, the playback stream list also includes first mute flag information corresponding to each playback stream, wherein the first mute flag information includes first indication information or second indication information, wherein the first indication information is used to indicate that the playback stream is a mute playback stream, and the second indication information is used to indicate that the playback stream is a non-mute playback stream; accordingly, the device also includes: a cancel mute module; the cancel mute module is used to traverse the first mute flag information corresponding to each playback stream in the playback stream list if the first target playback stream does not exist; if the first mute flag information is the first indication information, the playback stream corresponding to the first mute flag information is canceled, and the first mute flag information is modified to the second indication information.

[0163] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0164] The memory stores computer-executable instructions;

[0165] The processor executes the computer-executable instructions stored in the memory to implement the audio processing method as described in the first aspect and various possible designs of the first aspect.

[0166] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the audio processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0167] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the audio processing method as described in the first aspect and various possible designs of the first aspect.

[0168] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0169] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0170] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. An audio processing method, characterized in that: Applicable to terminal devices with applications installed, including: Obtaining a current recording stream list, wherein the recording stream list includes a one-to-one correspondence between a plurality of recording streams and a plurality of first application identifiers; and obtaining a current playback stream list, wherein the playback stream list includes a one-to-one correspondence between a plurality of playback streams and a plurality of second application identifiers; According to the multiple first application identifiers and the multiple second application identifiers, determining whether there is a first target playback stream in the multiple playback streams, wherein the first target playback stream is a playback stream corresponding to an application in a call state; If there is a first target playback stream, determining at least one second target playback stream from the multiple playback streams, and adding the at least one second target playback stream to the playback stream mute list, wherein the second target playback stream is a playback stream corresponding to an application in a non-call state; Each second target playback stream in the playback stream mute list is traversed, and each second target playback stream is set as a mute playback stream.

2. The method according to claim 1, characterized in that: The step of determining, according to the plurality of first application identifiers and the plurality of second application identifiers, whether there is a first target playback stream in the plurality of playback streams comprises: Traversing the multiple first application identifiers, for each first application identifier, determining whether there is a second application identifier that is identical to the first application identifier among the multiple second application identifiers; If so, it is determined that the playback stream corresponding to the second application identifier that is the same as the first application identifier is the first target playback stream, and it is determined that the first target playback stream exists in the multiple playback streams.

3. The method according to claim 1, characterized in that The step of determining at least one second target playback stream from the multiple playback streams comprises: After traversing the plurality of first application identifiers, determining at least one second application identifier that is different from each of the first application identifiers from the plurality of second application identifiers; Determine that the playback stream corresponding to the at least one second application identifier is a second target playback stream, and obtain at least one second target playback stream.

4. The method according to claim 1, characterized in that: The step of determining at least one second target playback stream from the multiple playback streams comprises: Traversing the plurality of second application identifiers, for each second application identifier, determining whether there is a first application identifier that is identical to the second application identifier among the plurality of first application identifiers; If not, determining that the playback stream corresponding to the second application identifier is the second target playback stream; After traversing the multiple second application identifiers, at least one second target playback stream is obtained.

5. The method according to claim 1, characterized in that The method of obtaining the current recording stream list includes: If a recording stream creation event is received through the audio stream management module, the recording stream information in the recording stream creation event is added to the recording stream list; If a recording stream destruction event is received through the audio stream management module, the recording stream information in the recording stream destruction event is deleted from the recording stream list to obtain a current recording stream list; The recording stream information includes a corresponding relationship between the recording stream and the first application identifier.

6. The method according to claim 5, characterized in that If a recording stream creation event is received through the audio stream management module, before adding the recording stream information in the recording stream creation event to the recording stream list, the method further includes: Registering a first event object corresponding to a recording stream creation event in an audio server, wherein the first event object is used to detect the recording stream creation event; If it is detected through the first event object that the audio server creates a recording stream of the first application, obtaining recording stream information through the audio server, wherein the recording stream information includes a correspondence between the created recording stream and the first application identifier; The audio server notifies the audio stream management module of a recording stream creation event, wherein the recording stream creation event includes the recording stream information.

7. The method according to claim 5, characterized in that If a recording stream destruction event is received through the audio stream management module, before deleting the recording stream information in the recording stream destruction event from the recording stream list, the method further includes: Registering a second event object corresponding to the recording stream destruction event in the audio server, wherein the second event object is used to detect the recording stream destruction event; If it is detected through the second event object that the audio server destroys the recording stream of the first application, the recording stream information is obtained through the audio server, wherein the recording stream information includes a correspondence between the destroyed recording stream and the first application identifier; The audio server notifies the audio stream management module of a recording stream destruction event, wherein the recording stream destruction event includes the recording stream information.

8. The method according to claim 1, characterized in that: The obtaining of the current playback stream list includes: If a play stream creation event is received through the audio stream management module, the play stream information in the play stream creation event is added to the play stream list; If a play stream destruction event is received through the audio stream management module, the play stream information in the play stream destruction event is deleted from the play stream list to obtain a current play stream list; The playback stream information includes a corresponding relationship between the playback stream and the second application identifier.

9. The method according to claim 8, characterized in that If a play stream creation event is received through the audio stream management module, before adding the play stream information in the play stream creation event to the play stream list, the method further includes: Registering a third event object corresponding to the play stream creation event in the audio server, wherein the third event object is used to detect the play stream creation event; If it is detected through the third event object that the audio server creates a playback stream of the second application, then the playback stream information is obtained through the audio server, wherein the playback stream information includes a correspondence between the created playback stream and the second application identifier; The audio server notifies the audio stream management module of a playback stream creation event, wherein the playback stream creation event includes the playback stream information.

10. The method according to claim 8, characterized in that If a playback stream destruction event is received through the audio stream management module, before deleting the playback stream information in the playback stream destruction event from the playback stream list, the method further includes: Registering a fourth event object corresponding to the playback stream destruction event in the audio server, wherein the fourth event object is used to detect the playback stream destruction event; If it is detected through the fourth event object that the audio server destroys the playback stream of the second application, the playback stream information is obtained through the audio server, wherein the playback stream information includes a correspondence between the destroyed playback stream and the second application identifier; The audio server notifies the audio stream management module of a playback stream destruction event, wherein the playback stream destruction event includes the playback stream information.

11. The method according to any one of claims 1 to 10, characterized in that: The playback stream list further includes first mute flag information corresponding to each playback stream, wherein the first mute flag information includes first indication information or second indication information, wherein the first indication information is used to indicate that the playback stream is a mute playback stream, and the second indication information is used to indicate that the playback stream is a non-mute playback stream; Correspondingly, after traversing each second target playback stream in the playback stream mute list and setting each second target playback stream as a mute playback stream, the method further includes: The first mute flag information corresponding to each second target play stream in the play stream list is set as the first indication information.

12. The method according to any one of claims 1 to 10, characterized in that: The playback stream list also includes first mute flag information corresponding to each playback stream, wherein the first mute flag information includes first indication information or second indication information, wherein the first indication information is used to indicate that the playback stream is a mute playback stream, and the second indication information is used to indicate that the playback stream is a non-mute playback stream; accordingly, the method further includes: If the first target playback stream does not exist, traverse the first mute flag information corresponding to each playback stream in the playback stream list; If the first mute flag information is the first indication information, the playback stream corresponding to the first mute flag information is unmuted, and the first mute flag information is modified to the second indication information.

13. An audio processing device, characterized in that: Applicable to terminal devices with applications installed, including: An acquisition module, configured to acquire a current recording stream list, wherein the recording stream list includes a one-to-one correspondence between a plurality of recording streams and a plurality of first application identifiers; and acquire a current playback stream list, wherein the playback stream list includes a one-to-one correspondence between a plurality of playback streams and a plurality of second application identifiers; a determination module, configured to determine whether there is a first target playback stream in the multiple playback streams according to the multiple first application identifiers and the multiple second application identifiers, wherein the first target playback stream is a playback stream corresponding to an application in a call state; A adding module, configured to determine at least one second target playback stream from the multiple playback streams if there is a first target playback stream, and add the at least one second target playback stream to the playback stream mute list, wherein the second target playback stream is a playback stream corresponding to an application in a non-call state; The mute module is used to traverse each second target playback stream in the playback stream mute list and set each second target playback stream as a mute playback stream.

14. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the audio processing method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the audio processing method according to any one of claims 1 to 12 is implemented.

16. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the audio processing method according to any one of claims 1 to 12.