Audio processing method and device, electronic equipment and medium
By delaying the distribution of audio focus after the voice call and switching the mode of the audio module, the problem of audio playback is solved and the quality of audio playback is improved.
Patent Information
- Application Number
- CN202410196256.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-21
- Publication Date
- 2025-08-22
AI Technical Summary
After the voice call is over, the audio may be played from the speakers of the electronic device, causing problems with the audio playback.
After the voice call is over, determine the audio mode and delay the distribution of the audio focus or switch the mode of the audio module to prevent the speaker from playing audio due to premature distribution of audio or the mode cannot be switched in time.
By controlling the delayed distribution of audio focus and timely switching of audio modes, the possibility of audio playback is reduced and the quality of audio playback is improved.
Smart Images

Figure CN120529232A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of audio processing technology, and in particular to an audio processing method, device, electronic device, and medium. Background Art
[0002] With the development of wireless communication technology, more and more users are using wireless audio devices to play audio from electronic devices to improve audio playback quality. However, when playing audio through audio devices, the audio may be played from the speakers of the electronic device, resulting in the problem of external audio playback from the electronic device. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides an audio processing method, device, electronic device and medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an audio processing method, the audio processing method comprising:
[0005] After the voice call conducted with the target application ends, determining a first audio mode to be sent to the target application;
[0006] According to the first audio mode, the distribution of audio focus is controlled or the second audio mode of the audio module in the electronic device is set.
[0007] In some embodiments of the present disclosure, controlling the distribution of audio focus or setting the second audio mode of an audio module in the electronic device according to the first audio mode includes:
[0008] When the first audio mode is the first preset mode, in response to a target instruction sent by the target application, switching the second audio mode of the audio module to a second preset mode;
[0009] During the switching of the second audio mode, delaying the distribution of the audio focus;
[0010] The first preset mode is used for voice calls, and the second preset mode is used for music playback.
[0011] In some embodiments of the present disclosure, after switching the second audio mode of the audio module to the second preset mode, controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode further includes:
[0012] Setting the identification information to the first identification information;
[0013] When the identification information is the first identification information and the second audio mode is the first preset mode, delaying the distribution of the audio focus;
[0014] The first identification information is used to indicate that the music module in the audio device is unusable.
[0015] In some embodiments of the present disclosure, setting the identification information as the first identification information includes:
[0016] Setting the identification information as the first identification information in a first preset manner; and / or,
[0017] Setting the identification information as the first identification information in a second preset manner;
[0018] The first preset method and the second preset method call different interfaces.
[0019] In some embodiments of the present disclosure, after switching the second audio mode of the audio module to the second preset mode, controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode further includes:
[0020] When the second audio mode switching is completed, if the identification information is the second identification information and / or the second audio mode is the second preset mode, distributing the audio focus;
[0021] The second identification information is used to indicate that the music module can be used.
[0022] In some embodiments of the present disclosure, controlling the distribution of audio focus or setting the second audio mode of an audio module in the electronic device according to the first audio mode includes:
[0023] In a case where the first audio mode is the second preset mode, determining the second audio mode;
[0024] The second audio mode is set according to the first audio mode and the second audio mode.
[0025] In some embodiments of the present disclosure, setting the second audio mode according to the first audio mode and the second audio mode includes:
[0026] When the first audio mode is the same as the second audio mode, keeping the second audio mode unchanged;
[0027] In a case where the first audio mode is different from the second audio mode, the second audio mode is switched to the second preset mode.
[0028] According to a second aspect of an embodiment of the present disclosure, there is provided an audio processing device, the audio processing device comprising:
[0029] a determining module configured to determine a first audio mode to be sent to the target application after the voice call conducted with the target application ends;
[0030] A control module is configured to control the distribution of audio focus or set a second audio mode of an audio module in the electronic device according to the first audio mode.
[0031] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising:
[0032] processor;
[0033] a memory for storing instructions executable by the processor;
[0034] The processor is configured to execute the audio processing method described above.
[0035] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to perform the audio processing method as described above.
[0036] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0037] After the voice call conducted with the target application ends, the first audio mode sent to the target application is determined to determine whether the target application will switch the second audio mode of the audio module. According to the first audio mode, the distribution of the audio focus is controlled or the second audio mode of the audio module in the electronic device is set, so that the audio focus is delayed in distribution or the second audio mode is switched in time. By controlling the distribution of the audio focus or setting the second audio mode according to the first audio mode, it is possible to prevent the speaker from playing audio caused by the audio focus being distributed too early or the second audio mode being unable to switch in time, thereby reducing the possibility of audio being played out.
[0038] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0040] Figure 1 is a flowchart of an audio processing method according to an exemplary embodiment;
[0041] Figure 2 is a flowchart of an audio processing method according to another exemplary embodiment;
[0042] Figure 3 is a flowchart of an audio processing method according to another exemplary embodiment;
[0043] Figure 4 is a flowchart of an audio processing method according to another exemplary embodiment;
[0044] Figure 5 is a flowchart of an audio processing method according to another exemplary embodiment;
[0045] Figure 6 is a block diagram of an audio processing device according to an exemplary embodiment;
[0046] Figure 7 is a block diagram of an electronic device according to an exemplary embodiment.
[0047] In the picture:
[0048] 100 - determination module; 200 - control module; 400 - electronic device; 402 - processing component; 404 - memory; 406 - power supply component; 408 - multimedia component; 410 - audio component; 412 - input / output interface; 414 - sensor component; 416 - communication component; 420 - processor. DETAILED DESCRIPTION
[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure as detailed in the appended claims. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0050] At present, with the development of wireless communication technology, more and more users play the audio of electronic devices through wirelessly connected audio devices to improve the effect of audio playback. For example, users can play music in electronic devices through Bluetooth headphones or Star Flash headphones, and can also make voice calls through Bluetooth headphones or Star Flash headphones. In audio devices, in order to improve the quality of music playback and voice calls, the audio device is provided with a music module and a call module. The music module adopts the Advanced Audio Distribution Profile (A2DP) protocol, and the call module adopts the Synchronous Connection Oriented (SCO) protocol. However, after the voice call through the call module ends, the audio may be played from the speaker of the electronic device due to the need to use the music module to play the audio, resulting in the problem of external audio playback in the electronic device.
[0051] To solve the above technical problems, the present disclosure provides an audio processing method. After a voice call conducted with a target application ends, the audio module is controlled based on the first audio mode sent to the target application so that the second audio mode of the audio module can be switched in time or the audio focus is delayed. By controlling the audio module, it is possible to prevent the speaker from playing audio due to premature distribution of the audio focus or the inability to switch to the second audio mode in time, thereby reducing the possibility of audio being played outwardly.
[0052] The present disclosure provides an audio processing method, such as Figure 1 As shown, the method includes:
[0053] S100: After the voice call conducted with the target application ends, determine a first audio mode to be sent to the target application.
[0054] S200: Control distribution of audio focus or set a second audio mode of an audio module in the electronic device according to the first audio mode.
[0055] In this embodiment, after the voice call conducted with the target application ends, the first audio mode sent to the target application is determined to determine whether the target application will switch the second audio mode of the audio module. According to the first audio mode, the distribution of the audio focus is controlled or the second audio mode of the audio module in the electronic device is set, so that the audio focus is delayed in distribution or the second audio mode is switched in time. By controlling the distribution of the audio focus or setting the second audio mode according to the first audio mode, it is possible to prevent the speaker from playing audio caused by the audio focus being distributed too early or the second audio mode being unable to switch in time, thereby reducing the possibility of audio being played out.
[0056] Exemplarily, after the voice call ends, the target application obtains the second audio mode of the audio module. In the process of the target application obtaining the second audio mode of the audio module, if the flag information (AudioTrack) for indicating the stop of audio playback and / or the flag information (AudioRecord) for stopping audio recording in the target application is in an active state, the first audio mode sent to the target application is the first preset mode. At this time, the first audio mode obtained by the target application is the same as the second audio mode, and the first audio mode can correctly reflect the second audio mode. If the flag information for indicating the stop of audio playback and the flag information for stopping audio recording in the target application are in an inactive state, the first audio mode sent to the target application is the second preset mode. At this time, the first audio mode obtained by the target application is different from the second audio mode, and the first audio mode cannot correctly reflect the second audio mode. Among them, the first preset mode is used for voice calls, and the second preset mode is used for music playback.
[0057] In one embodiment, if Figure 2 As shown, in step S200, controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode can be determined as follows:
[0058] S210: When the first audio mode is the first preset mode, in response to a target instruction sent by a target application, switch the second audio mode of the audio module to the second preset mode.
[0059] S220: During the switching process of the second audio mode, delay the distribution of the audio focus.
[0060] In this embodiment, when the first audio mode is the first preset mode, since the target application determines that the voice call is over, it will notify the audio device through the audio module to disconnect the call module and switch the audio module to the second audio mode. In response to the target instruction sent by the target application, it is necessary to switch the second audio mode, and switch the second audio mode to the second preset mode to play audio through the music module. After sending the target instruction to the audio module, the target application will release the audio focus to distribute the audio focus to the application that plays music. Since the switching of the second audio mode takes a certain amount of time, if the audio focus is distributed during the switching of the second audio mode, the audio of the application that plays music will be played from the speaker of the electronic device. By delaying the distribution of the audio focus during the switching of the second audio mode, the audio is prevented from being played from the speaker of the electronic device, thereby reducing the possibility of audio being played out.
[0061] For example, the delayed distribution of audio focus in step S220 may be performed by delaying the distribution of audio focus via an audio focus delay module. The delayed distribution of audio focus may be performed without notifying the music playing application of the audio focus update. The audio focus delay module may be a submodule of the audio module or a separate module.
[0062] In one embodiment, if Figure 3 As shown, after switching the second audio mode of the audio module to the second preset mode in step S210, controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode in step S200 further includes:
[0063] S230: Set the identification information as first identification information.
[0064] S240: When the identification information is the first identification information and the second audio mode is the first preset mode, delay distribution of the audio focus.
[0065] The first identification information is used to indicate that the music module in the audio device is unusable.
[0066] In this embodiment, since it takes a certain amount of time to switch to the second audio mode, the identification information is set to the first identification information to indicate that the music module cannot be used. Since the second audio mode is the first preset mode before the switch is completed, the distribution of the audio focus is delayed when the identification information is the first identification information and the second audio mode is the first preset mode. By delaying the distribution of the audio focus when the music module cannot be used and the second audio mode is the first preset mode, the audio is prevented from being played from the speaker of the electronic device, thereby reducing the possibility of the audio being played out.
[0067] In one embodiment, setting the identification information as the first identification information in step S230 is determined by:
[0068] The identification information is set as the first identification information in a first preset manner. And / or,
[0069] The identification information is set as the first identification information in a second preset manner.
[0070] The first preset method and the second preset method call different interfaces.
[0071] In this embodiment, since the interface required to set the identification information may be different in different types of electronic devices, the identification information needs to be set in different ways. When the identification information is set to the first identification information only in the first preset manner or the second preset manner, the complexity of the audio module control can be reduced, thereby reducing the complexity of the audio processing. When the identification information is set to the first identification information in the first preset manner and the second preset manner, it is possible to prevent the speaker from playing audio due to different types of electronic devices, thereby reducing the possibility of audio being played out.
[0072] In one embodiment, after switching the second audio mode of the audio module to the second preset mode in step S210, controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode in step S200 further includes:
[0073] When the second audio mode switching is completed, if the identification information is the second identification information and / or the second audio mode is the second preset mode, the audio focus is distributed.
[0074] The second identification information is used to indicate that the music module can be used.
[0075] In this embodiment, if the audio focus is directly distributed when the second audio mode is switched, the audio may be played out of the speaker. By distributing the audio focus when the music module is enabled and / or the second audio mode is the second preset mode, the audio is prevented from being played out of the speaker of the electronic device, thereby reducing the possibility of the audio being played out of the speaker.
[0076] Illustratively, the distribution of the audio focus in the above step may be to notify the application program that plays music to update the audio focus.
[0077] In one embodiment, if Figure 4 As shown, controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode in step S200 can also be determined in the following manner:
[0078] S250: When the first audio mode is the second preset mode, determine the second audio mode.
[0079] S260: Set the second audio mode according to the first audio mode and the second audio mode.
[0080] In this embodiment, when the first audio mode is the second preset mode, it may be because the flag information for indicating the stop of audio playback and the flag information for stopping audio recording in the target application are in an inactive state, resulting in the inability to switch the second audio mode through the target application and the possibility of audio being played from the speaker of the electronic device. The second audio mode of the audio module is determined, and the second audio mode is set according to the first audio mode and the second audio mode to prevent the second audio mode from being unable to switch. By setting the second audio mode in combination with the first audio mode and the second audio mode, it is avoided that the audio is played from the speaker of the electronic device because the second audio mode cannot be switched by the target application, thereby reducing the possibility of audio being played out.
[0081] In one embodiment, the second audio mode is set according to the first audio mode and the second audio mode in step S260 by:
[0082] In the case that the first audio mode is the same as the second audio mode, the second audio mode is kept unchanged.
[0083] When the first audio mode is different from the second audio mode, the second audio mode is switched to a second preset mode.
[0084] In this embodiment, when the first audio mode and the second audio mode are the same, the second audio mode is switched to the second preset mode and the audio is not played from the speaker of the electronic device, and the second audio mode remains unchanged. When the first audio mode and the second audio mode are different, the target application does not switch to the second audio mode but plays the audio from the speaker of the electronic device, switching the second audio mode to the second preset mode. By comparing whether the first audio mode and the second audio mode are the same, it is determined whether to switch to the second audio mode, thereby avoiding the audio being played from the speaker of the electronic device due to the second audio mode not being switched by the target application, thereby reducing the possibility of audio being played externally.
[0085] Exemplarily, after the second audio mode is switched to the second preset mode in the above steps, steps S220 to S240 may also be performed.
[0086] The present disclosure provides an audio processing method, such as Figure 5 As shown, the method includes:
[0087] S300: After the voice call conducted with the target application ends, determine a first audio mode to be sent to the target application.
[0088] S310: When the first audio mode is the first preset mode, in response to a target instruction sent by a target application, switch the second audio mode of the audio module to the second preset mode.
[0089] S320: During the switching process of the second audio mode, delay the distribution of the audio focus.
[0090] S330: Set the identification information as the first identification information in a first preset manner and a second preset manner.
[0091] S340: When the identification information is the first identification information and the second audio mode is the first preset mode, delay distribution of the audio focus.
[0092] S350: When the second audio mode is switched, if the identification information is the second identification information and / or the second audio mode is the second preset mode, distribute the audio focus.
[0093] S360: When the first audio mode is the second preset mode, determine the second audio mode.
[0094] S370: When the first audio mode is the same as the second audio mode, keep the second audio mode unchanged.
[0095] S380: When the first audio mode is different from the second audio mode, switch the second audio mode to a second preset mode.
[0096] In this embodiment, after a voice call ends, audio may play from the speaker of the electronic device rather than the audio device. The first audio mode sent to the target application is determined to determine whether the second audio mode of the audio module can be switched by the target application. If the first audio mode is the first preset mode, the target application can switch to the second audio mode. In response to a target instruction sent by the target application, the second audio mode of the audio module is switched to the second preset mode. Because switching to the second audio mode takes time and may cause audio to play outward, the distribution of audio focus is delayed during the switching of the second audio mode. Simultaneously, identification information is set to first identification information in first and second preset modes. If the identification information is the first identification information and the second audio mode is the first preset mode, the distribution of audio focus is delayed to further reduce the possibility of audio playing outward. If the first audio mode is the second preset mode, the target application cannot switch to the second audio mode, and the second audio mode of the audio module is determined. If the first audio mode is the same as the second audio mode, the second audio mode has been switched to the second preset mode without causing audio to play from the speaker of the electronic device, and the second audio mode remains unchanged. If the first audio mode and the second audio mode are different, the target application will not switch to the second audio mode but will play the audio from the speaker of the electronic device, switching the second audio mode to the second preset mode. By controlling the distribution of audio focus or setting the second audio mode based on the first audio mode, it is possible to prevent the speaker from playing audio due to premature distribution of audio focus or failure to switch to the second audio mode in a timely manner, thereby reducing the possibility of audio being played out of the speaker.
[0097] In an exemplary embodiment, an audio processing device is provided, which is used to implement the above method. Figure 6 As shown, the audio processing device may include a determination module 100 and a control module 200, wherein, in the process of implementing the above method,
[0098] The determination module 100 is configured to determine a first audio mode to be sent to the target application after the voice call conducted with the target application ends.
[0099] The control module 200 is configured to control the distribution of audio focus or set a second audio mode of an audio module in the electronic device according to the first audio mode.
[0100] In an exemplary embodiment, an audio processing device is provided, in which a control module 200 is configured to:
[0101] In a case where the first audio mode is the first preset mode, in response to a target instruction sent by a target application, the second audio mode of the audio module is switched to the second preset mode.
[0102] During the second audio mode switching process, the distribution of the audio focus is delayed.
[0103] In an exemplary embodiment, an audio processing device is provided, in which a control module 200 is configured to:
[0104] The identification information is set as the first identification information.
[0105] When the identification information is the first identification information and the second audio mode is the first preset mode, distribution of the audio focus is delayed.
[0106] In an exemplary embodiment, an audio processing device is provided, in which a control module 200 is configured to:
[0107] The identification information is set as first identification information in a first preset manner.
[0108] In an exemplary embodiment, an audio processing device is provided, in which a control module 200 is configured to:
[0109] The identification information is set as the first identification information in a second preset manner.
[0110] In an exemplary embodiment, an audio processing device is provided, in which a control module 200 is configured to:
[0111] When the second audio mode switching is completed, if the identification information is the second identification information and / or the second audio mode is the second preset mode, the audio focus is distributed.
[0112] In an exemplary embodiment, an audio processing device is provided, in which a control module 200 is configured to:
[0113] In case the first audio mode is the second preset mode, a second audio mode is determined.
[0114] The second audio mode is set according to the first audio mode and the second audio mode.
[0115] In an exemplary embodiment, an audio processing device is provided, in which a control module 200 is configured to:
[0116] In the case that the first audio mode is the same as the second audio mode, the second audio mode is kept unchanged.
[0117] When the first audio mode is different from the second audio mode, the second audio mode is switched to a second preset mode.
[0118] In an exemplary embodiment, an electronic device is provided, such as a mobile phone, a laptop computer, a tablet computer, a wearable device, etc.
[0119] refer to Figure 7 As shown, electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0120] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 402 may include one or more modules to facilitate interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
[0121] The memory 404 is configured to store various types of data to support operations on the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0122] The power supply assembly 406 provides power to the various components of the electronic device 400. The power supply assembly 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.
[0123] The multimedia component 408 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera module and / or a rear camera module. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera module and / or the rear camera module can receive external multimedia data. Each front camera module and the rear camera module can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0124] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0125] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0126] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of components, such as the display and keypad of the electronic device 400. The sensor assembly 414 can also detect changes in the position of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and temperature changes of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0127] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other terminals. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0128] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the methods shown in the above embodiments or a combination thereof.
[0129] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as memory 404 including instructions. The instructions can be executed by processor 420 of electronic device 400 to perform the methods described in the above embodiments or combinations thereof. For example, the non-transitory computer-readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage terminal. When the instructions in the storage medium are executed by the processor of the terminal, the terminal is enabled to perform the methods described in the above embodiments or combinations thereof.
[0130] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.
[0131] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, unless they are mutually inconsistent.
[0132] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0133] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0134] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. An audio processing method, characterized in that: The audio processing method comprises: After the voice call conducted with the target application ends, determining a first audio mode to be sent to the target application; According to the first audio mode, the distribution of audio focus is controlled or the second audio mode of the audio module in the electronic device is set.
2. The audio processing method according to claim 1, wherein: The controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode includes: When the first audio mode is the first preset mode, in response to a target instruction sent by the target application, switching the second audio mode of the audio module to a second preset mode; During the switching of the second audio mode, delaying the distribution of the audio focus; The first preset mode is used for voice calls, and the second preset mode is used for music playback.
3. The audio processing method according to claim 2, characterized in that After switching the second audio mode of the audio module to the second preset mode, controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode further includes: Setting the identification information to the first identification information; When the identification information is the first identification information and the second audio mode is the first preset mode, delaying the distribution of the audio focus; The first identification information is used to indicate that the music module in the audio device is unusable.
4. The audio processing method according to claim 3, characterized in that: The step of setting the identification information as the first identification information includes: Setting the identification information as the first identification information in a first preset manner; and / or, Setting the identification information as the first identification information in a second preset manner; The first preset method and the second preset method call different interfaces.
5. The audio processing method according to claim 3, characterized in that: After switching the second audio mode of the audio module to the second preset mode, controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode further includes: When the second audio mode switching is completed, if the identification information is the second identification information and / or the second audio mode is the second preset mode, distributing the audio focus; The second identification information is used to indicate that the music module can be used.
6. The audio processing method according to any one of claims 1 to 5, characterized in that: The controlling the distribution of audio focus or setting the second audio mode of the audio module in the electronic device according to the first audio mode includes: In a case where the first audio mode is the second preset mode, determining the second audio mode; The second audio mode is set according to the first audio mode and the second audio mode.
7. The audio processing method according to claim 6, characterized in that: The setting the second audio mode according to the first audio mode and the second audio mode includes: When the first audio mode is the same as the second audio mode, keeping the second audio mode unchanged; In a case where the first audio mode is different from the second audio mode, the second audio mode is switched to the second preset mode.
8. An audio processing device, characterized in that: The audio processing device comprises: a determining module configured to determine a first audio mode to be sent to the target application after the voice call conducted with the target application ends; A control module is configured to control the distribution of audio focus or set a second audio mode of an audio module in the electronic device according to the first audio mode.
9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the audio processing method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the audio processing method according to any one of claims 1 to 7.