Audio control method and device and storage medium
By delaying the connection status disconnect request of the call application in an electronic device and maintaining the call connection status, the sound leakage problem during the switching of VOIP application is solved, improving the user experience and reducing logical redundancy.
Patent Information
- Application Number
- CN202310986970.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-07
- Publication Date
- 2025-02-14
AI Technical Summary
In multiple IP-based voice transmission (VOIP) applications interaction scenarios, voice leakage is likely to occur when switching to call applications, affecting the user experience.
By detecting whether the second call application exists at the end of the first call application in the electronic device, keeping the connection state between the electronic device and the external playback device into the call connection state, delaying the connection state disconnection request of the first call application until The identification of the second call application is detected mainly to avoid disconnection.
It reduces the underlying interaction between electronic devices and external playback devices, avoids call voice leakage and logical redundancy, and improves user experience.
Smart Images

Figure CN119449944A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to an audio control method, device and storage medium. Background Art
[0002] With the development of science and technology, Bluetooth headset electronic devices have become a part of people's lives. In daily life, people listen to music, watch movies, hold video conferences, and answer voice calls by connecting Bluetooth headsets. However, in the scenario where multiple Voice over Internet Protocol (VOIP) applications interact, there is a phenomenon of audio leakage when switching call applications, which affects the user experience. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides an audio control method, device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an audio control method, including:
[0005] In response to a first call application in an electronic device ending the use of an external playback device to play the audio of the first call application, and determining to use the external playback device to play the audio of a second call application, the connection state between the electronic device and the external playback device is maintained as a call connection state, and the second call application is a call application that has been executed in the electronic device and uses the external playback device to play audio before the first call application is executed; using the external playback device that maintains the call connection state, switch back to playing the audio of the second call application.
[0006] In one implementation, maintaining the connection state between the electronic device and the external playback device as a call connection state includes:
[0007] Delay response to the connection status disconnection request of the first call application to keep the connection status between the electronic device and the external playback device in a call connection state; the connection status disconnection request is triggered when the first call application ends using the external playback device to play the first call application audio.
[0008] In one implementation, the delayed response to the connection state disconnection request of the first call application to keep the connection state between the electronic device and the external playback device in a call connection state includes:
[0009] Performing an i-th delayed response to the connection status disconnection request of the first call application based on a predefined duration, where i is a positive integer greater than or equal to 1; detecting a call application identifier of an external playback device using the call connection status within the predefined duration; if it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, stopping the delayed response; if it is not detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, performing an i+1-th delayed response to the connection status disconnection request of the first call application based on the predefined duration, and detecting the call application identifier of the external playback device using the call connection status within the predefined duration; repeating the above process until it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, or the i value reaches a number threshold.
[0010] In one embodiment, the method further comprises:
[0011] After maintaining the connection state between the electronic device and the external playback device as a call connection state, each time a delay is made in responding to a connection state disconnection request of the first call application, a flag is set, wherein the flag is used to indicate whether there is a call application that uses the external playback device to play audio and issues a connection state disconnection request but does not change the call connection state.
[0012] In one embodiment, the method further comprises:
[0013] In response to switching back to playing the audio of the second call application, restoring the flag bit to a default value.
[0014] According to a second aspect of an embodiment of the present disclosure, there is provided an audio control device, including:
[0015] A processing unit is used to respond to the first call application in the electronic device ending the use of an external playback device to play the audio of the first call application, and determine to use the external playback device to play the audio of the second call application, and maintain the connection state between the electronic device and the external playback device as a call connection state, where the second call application is a call application that has been executed in the electronic device and uses the external playback device to play audio before the first call application is executed; a switching unit is used to use the external playback device that maintains the call connection state to switch back to playing the audio of the second call application.
[0016] In one implementation, the processing unit maintains the connection state between the electronic device and the external playback device as a call connection state in the following manner:
[0017] Delay response to the connection status disconnection request of the first call application to keep the connection status between the electronic device and the external playback device in a call connection state; the connection status disconnection request is triggered when the first call application ends using the external playback device to play the first call application audio.
[0018] In one implementation, the processing unit delays responding to the connection state disconnection request of the first call application in the following manner to keep the connection state between the electronic device and the external playback device in the call connection state:
[0019] Performing an i-th delayed response to the connection status disconnection request of the first call application based on a predefined duration, where i is a positive integer greater than or equal to 1; detecting a call application identifier of an external playback device using the call connection status within the predefined duration; if it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, stopping the delayed response; if it is not detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, performing an i+1-th delayed response to the connection status disconnection request of the first call application based on the predefined duration, and detecting the call application identifier of the external playback device using the call connection status within the predefined duration; repeating the above process until it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, or the i value reaches a number threshold.
[0020] In one implementation, the processing unit is further configured to:
[0021] After maintaining the connection state between the electronic device and the external playback device as a call connection state, a flag is set, wherein the flag is used to indicate whether there is a call application that uses the external playback device to play audio and issues a connection state disconnection request but does not change the call connection state.
[0022] In one implementation, the processing unit is further configured to:
[0023] In response to switching back to playing the audio of the second call application, restoring the flag bit to a default value.
[0024] According to a third aspect of an embodiment of the present disclosure, there is provided an audio control device, including:
[0025] A processor; a memory for storing processor executable instructions; wherein the processor is configured to: execute the function control method described in the first aspect or any one of the embodiments of the first aspect.
[0026] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor of a terminal, the terminal can perform the method described in the first aspect or any one of the implementations of the first aspect.
[0027] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when the electronic device detects that the first call application sends a signal to end the use of an external device to play the audio of the first call application, and determines to use the external playback device to play the audio of the second call application, the connection state between the electronic device and the external playback device is maintained as a call connection state, and the external playback device is used to switch back to playing the audio of the second call application, thereby reducing the underlying interaction of the electronic device, avoiding the phenomenon of call leakage and external playback of call sound, as well as logical redundancy and memory overhead caused by additional operations.
[0028] 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 present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] 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.
[0030] Figure 1 It is a schematic diagram of an audio control according to the related art.
[0031] Figure 2 The present invention is a flowchart of an audio control method according to an exemplary embodiment.
[0032] Figure 3 The figure is a flow chart showing a delayed disconnection method according to an exemplary embodiment.
[0033] Figure 4 The figure is a flow chart showing a multiple delay disconnection method according to an exemplary embodiment.
[0034] Figure 5 The figure is a flowchart of a flag setting method according to an exemplary embodiment.
[0035] Figure 6 The figure is a flow chart of a flag bit recovery method according to an exemplary embodiment.
[0036] Figure 7 is a schematic diagram of audio control according to an exemplary embodiment.
[0037] Figure 8 The diagram is a schematic diagram showing a processing process of an electronic device according to an exemplary embodiment.
[0038] Fig. 9 The present invention is a block diagram of an audio control device according to an exemplary embodiment.
[0039] Fig.10 The present invention is a block diagram of an audio control device according to an exemplary embodiment. DETAILED DESCRIPTION
[0040] Here, exemplary embodiments will be described in detail, 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 implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0041] In the accompanying drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limitations on the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. The embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0042] The audio control method provided by the embodiment of the present disclosure can be applied to the application scenario of multiple IP-based voice transmission (Voice over Internet Protocol, VOIP) applications interacting when the electronic device is connected to an external device. By judging whether there are other VOIP applications in a call state when the VOIP application ends a call, the connection between the electronic device and the external device can be controlled, and the problems of audio routing and sound leakage generated during multiple VOIP calls can be solved to avoid the occurrence of sound leakage.
[0043] In the related art, when a VOIP application ends a call, the application will send a request to the electronic device to disconnect the call connection with the external device, the electronic device disconnects the call connection with the external device, and the external device sends a broadcast that the current call connection is in an unconnected state. When the electronic device receives the broadcast from the external device and there is an application in a call state, it re-establishes the call connection with the external device. For example, in a terminal device of the Android system, there are call applications A and call applications B. During a call with application A, application B is answered. When application B hangs up, the stopBluetoothSco method is called to notify Bluetooth to disconnect the call. After the Bluetooth device is disconnected, it will send a disconnection broadcast. When the electronic device receives the broadcast, it determines whether application A is currently in a call state. If so, it will re-notify Bluetooth to establish a call request.
[0044] However, the electronic device needs to meet many conditions when notifying the external device to re-establish the call request. Only when the conditions are met will the request to establish the call connection be resent. Therefore, the electronic device may not necessarily notify the external device to establish the call request. In addition, after the electronic device re-establishes the call connection with the external device, it is also necessary to notify the underlying switching device. In summary, there are complicated and repetitive processes in the related art, and other call applications leak sound when the call connection is disconnected. For example, in daily life, people listen to songs, watch movies, hold video conferences, and answer voice calls by connecting Bluetooth headsets. In life, people often encounter this problem: connecting Bluetooth headsets, interacting with teammates in game voice, receiving voice calls during voice interaction, and when the voice call is connected and then hung up, it is found that the game sound is turned on externally. If it is in a public place, such as on the subway, during lunch break in the office, playing games during the period, the voice sound of the game will make the user feel uncomfortable, and it will also have an adverse effect on the users around. Or, a user is in an online meeting in the office and receives a voice call. If the user chooses to reject the call, the sound of the online meeting will be played out of the speaker or receiver for a while, which means that sound leakage will occur, giving the user an unfriendly experience.
[0045] Figure 1 It is a schematic diagram of an audio control according to the related art.
[0046] In the embodiments of the present disclosure, the audio control method involved in the above embodiments is described by taking an electronic device as a terminal and an external playback device as a Bluetooth headset as an example.
[0047] In the related technology, after the call of application A is connected, the call of application B is connected again. At this time, both application A and application B are in call connection state. When application B hangs up or is rejected, application B will change the call connection state to non-call connection state and send a request to disconnect the call connection to the system. After receiving the request, the terminal sends an instruction to disconnect the call. After the call is disconnected, the Bluetooth headset sends a broadcast that the current Bluetooth headset is not connected. After receiving the broadcast, the terminal needs to perform conditional judgment, and then notify the Bluetooth headset to re-issue the instruction to establish the call connection, and it needs to re-notify the underlying device that the switch has occurred. When the required conditions are met, the call connection between the terminal and the Bluetooth headset is re-established.
[0048] In view of this, an embodiment of the present disclosure provides an audio control method. In the audio control method provided by the present disclosure, when the current call application ends the call, the call connection state is maintained, and other applications that issue call requests are set as call applications, thereby avoiding the occurrence of call leakage and logical redundancy.
[0049] Figure 2 is a flow chart of an audio control method according to an exemplary embodiment. Figure 2 As shown, the audio control method includes the following steps.
[0050] In step S21, in response to the first call application in the electronic device ending the use of the external playback device to play the first call application audio, and determining to use the external playback device to play the audio of the second call application, the connection state between the electronic device and the external playback device is maintained as a call connection state.
[0051] In the disclosed embodiment, the second call application is a call application that has been executed in the electronic device before the first call application is executed and uses an external playback device to play audio. When the electronic device detects that the first call application has issued a request to end the call, and there is a second call application that wants to play audio through an external device, the call connection state between the electronic device and the external playback device is maintained. For example, in an electronic device of the Android system, the call connection between the electronic device and the external playback device (such as: Bluetooth headset) is a connection-oriented synchronous link (Synchronous Connection Oriented link, sco), and when there is an application using the voice call function, the electronic device will establish a sco connection with the external playback device. If there are call application A and call application B, and during the call of application A, application B is answered, then application B is the first call application and application A is the second call application. When application B hangs up, the electronic device does not disconnect the sco connection with the Bluetooth headset.
[0052] In step S22, the external playback device that maintains the call connection state is used to switch back to playing the audio of the second call application.
[0053] In the embodiment of the present disclosure, the external playback device that maintains the call connection state is used, that is, the call connection between the electronic device and the external playback device established by the first call application sending the call request is retained. Switching back to playing the audio of the second call application, that is, playing the playback content of the second call application through the retained call connection between the electronic device and the external playback device.
[0054] In the embodiment of the present disclosure, after the connection state of the first call application is disconnected from the request, it is necessary to delay the request to facilitate subsequent processing operations by the electronic device.
[0055] Figure 3 is a flow chart of a delayed disconnection method according to an exemplary embodiment. Figure 3 As shown, the delayed disconnection method includes the following steps.
[0056] In step S31, in response to the first call application in the electronic device ending the use of the external playback device to play the first call application audio, a connection state disconnection request is triggered.
[0057] In the embodiment of the present disclosure, when the first call application ends playing the first call application audio using the external playback device, a request to disconnect the connection with the external playback device is sent to the electronic device. For example, when call application A ends the call, a request to disconnect the SCO connection is sent to the electronic device.
[0058] In step S32, a connection state disconnection request of the first call application is responded to with delay, so as to keep the connection state between the electronic device and the external playback device in a call connection state.
[0059] In the embodiment of the present disclosure, by delaying the response to the connection state disconnection request of the first call application, the connection state between the electronic device and the external playback device is prevented from being disconnected due to the request. For example, when the electronic device receives the connection state disconnection request sent by application A, the request will be delayed by 100 milliseconds. During the delay period, the electronic device and the external playback device still maintain the sco connection state.
[0060] In the embodiment of the present disclosure, the number of times of delaying the response to the connection state disconnection request of the first call application is not limited to once.
[0061] Figure 4 is a flow chart of a multiple delay disconnection method according to an exemplary embodiment. Figure 4 As shown, the multiple delayed disconnection method includes the following steps.
[0062] In step S41, a delayed response is made to a connection state disconnection request of the first call application for the i-th time based on a predefined time length, where i is a positive integer greater than or equal to 1.
[0063] In the embodiment of the present disclosure, the predefined duration is used to indicate the time of each delay in responding to the connection state disconnection request of the first call application. For example, if the predefined duration is 100 milliseconds, the duration of each delay is 100 milliseconds.
[0064] In step S42, a call application identifier of an external playback device in a call connection state is detected within a predefined time period.
[0065] In the disclosed embodiment, the call application identifier is the identifier of the call application that made the most recent call. For example, in the case where the call application B is connected to the call application A, the call application identifier is the identifier of B, and when the call application B hangs up, the call application identifier changes from the identifier of B back to the identifier of A. It should be understood that there is a delay in the conversion of the call application identifier, so it is necessary to delay the detection of the call application identifier multiple times to determine whether the call application identifier has changed.
[0066] In step S43a, if it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, the delayed response is stopped.
[0067] In step S43b, if it is not detected that the call application identifier has changed from the identifier of the first call application to the identifier of the second call application, a delayed response to the connection status disconnection request of the first call application is performed for the i+1th time based on a predefined time length, and the call application identifier of the external playback device using the call connection status is detected within the predefined time length.
[0068] In the disclosed embodiment, when the electronic device detects that the call application has changed, it will no longer delay; when the electronic device detects that the call application has not changed, it will delay again and detect whether the call application identifier has changed.
[0069] In step S44, the above process is repeatedly performed until it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, or the value i reaches the number threshold.
[0070] In the embodiment of the present disclosure, the number threshold is a certain value. For example, if the number threshold is 3, the delay detection is stopped only when the call application identifier changes or the delay number is 3.
[0071] In the disclosed embodiment, a flag is required to indicate that a call application ends a call but the connection state between the electronic device and the external playback device does not change.
[0072] Figure 5is a flowchart of a flag bit setting method according to an exemplary embodiment. Figure 5 As shown, the flag bit setting method includes the following steps.
[0073] because Figure 5 Step S52 in Figure 2 The process is the same as step S22 in , which will not be repeated here, and reference may be made to the relevant description of the above embodiment.
[0074] In step S51, in response to the first call application in the electronic device ending the use of the external playback device to play the first call application audio, and determining to use the external playback device to play the audio of the second call application, the connection state between the electronic device and the external playback device is maintained as a call connection state, and a flag is set.
[0075] In the disclosed embodiment, in response to the first call application in the electronic device ending the use of an external playback device to play the audio of the first call application, and determining to use the external playback device to play the audio of the second call application, the connection state between the electronic device and the external playback device is maintained as a call connection state. This operation causes the call application that uses the external playback device to play the audio to issue a connection state disconnection request but does not change the call connection state, so the flag bit needs to be set. For example, the default value of the flag bit is false. When call application A hangs up, it is necessary to delay the connection state disconnection request of application A. At this time, the flag bit is set to true to indicate that there is a situation where the call application A that is currently using the external playback audio has issued a connection state disconnection request but the connection state between the electronic device and the external playback device is the call connection state and has not changed.
[0076] In the disclosed embodiment, after the conversion of the call application identifier is completed, the flag bit needs to be restored to the default value.
[0077] Figure 6 is a flowchart of a flag bit recovery method according to an exemplary embodiment. Figure 6 As shown, the flag bit setting method includes the following steps.
[0078] because Figure 6 Step S61, step S62 and Figure 5 Step S51 and step S52 are the same as in the above embodiment and will not be described in detail here. Please refer to the relevant description of the above embodiment.
[0079] In step S63, the flag is restored to a default value.
[0080] In the disclosed embodiment, in response to using an external playback device that maintains a call connection, the audio of the second call application is switched back to play. At this time, the call application that uses the external playback device to play the audio is the second call application, and the second call application has not issued a request to disconnect the call connection, so the flag bit needs to be restored to the default value. For example, after connecting to application B, application A is connected. After hanging up application A, if it is detected that the call application identifier has changed to the identifier of B, it indicates that the current application B is the call application that uses the external playback device to play the audio, that is, it switches back to play the audio of the second call application. Therefore, the flag bit is restored to the default value of false.
[0081] Figure 7 is a schematic diagram of audio control according to an exemplary embodiment.
[0082] An exemplary audio control process of the present disclosure is as follows Figure 7 As shown, after the call with application A is connected, the call with application B is connected again. At this time, both application A and application B are in call connection state. When application B hangs up or is rejected, application B will change the call connection state to non-call connection state and send a request to disconnect the call to the system. After receiving the request, the electronic device determines whether there is another application that has issued a request to establish a call connection. If so, the call connection will not be disconnected.
[0083] Figure 8 The diagram is a schematic diagram showing a processing process of an electronic device according to an exemplary embodiment.
[0084] The processing procedure of this exemplary embodiment is as follows Figure 8As shown, when the external application ends the use of the external playback device to play audio, the electronic device determines whether there are other applications that have issued a call connection request. If so, it delays 100 milliseconds to check whether the current call connection needs to be disconnected, and sets the flag value to true, and the number of checks is set to 1. If it is not a call connection request, the instruction to disconnect the call connection is executed. After 100 milliseconds, if the call application identifier of the external playback device currently in the call connection state has not changed, it is necessary to delay 100 milliseconds again, and the maximum extension time is 3 times. After 3 delays, it is determined whether the application corresponding to the current call application identifier has issued a request for a call request. If yes, the call connection is disconnected, otherwise the call connection is disconnected. If the call application identifier of the external playback device currently in the call connection state changes, and the flag is true, it is determined whether the application corresponding to the current call application identifier has issued a request for a call request. If yes, the call connection is disconnected. When the call application identifier of the external playback device currently in the call connection state changes, if the current number of checks has not reached the maximum value, it is necessary to stop checking the call application identifier of the external playback device currently in the call connection state and set some parameters to default values.
[0085] In the disclosed embodiment, when the current call application finishes using the external playback device to play the application audio, the call connection state between the electronic device and the external playback device is maintained, and switching back to other applications that use the external playback device audio is performed, thereby improving the phenomenon of call leakage when the external playback device switches between different call application audios, and reducing the interaction between the electronic device and the external playback device and the underlying layer of the electronic device, thereby avoiding logical redundancy and memory overhead caused by repeated disconnection and establishment of call connections.
[0086] Based on the same concept, an embodiment of the present disclosure also provides an audio control device.
[0087] It is understandable that the audio control device provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0088] Fig. 9 is a block diagram of an audio control device according to an exemplary embodiment. Fig. 9The device 100 includes a processing unit 101 and a switching unit 102.
[0089] The processing unit 101 is used for, in response to the first call application in the electronic device ending playing the first call application audio using the external playback device, and determining to use the external playback device to play the audio of the second call application, maintaining the connection state between the electronic device and the external playback device as a call connection state, and the second call application is a call application that has been executed in the electronic device before the first call application is executed and uses the external playback device to play the audio;
[0090] The switching unit 102 is used to switch back to playing the audio of the second call application using the external playback device that maintains the call connection state.
[0091] In one embodiment, the processing unit 101 maintains the connection status between the electronic device and the external playback device as a call connection status by delaying the response to the connection status disconnection request of the first call application to maintain the connection status between the electronic device and the external playback device as a call connection status; the connection status disconnection request is triggered when the first call application ends using the external playback device to play the first call application audio.
[0092] In one embodiment, the processing unit 101 delays the response to the connection status disconnection request of the first call application in the following manner to keep the connection status between the electronic device and the external playback device in the call connection status: based on a predefined duration, the i-th delayed response to the connection status disconnection request of the first call application is performed, where i is a positive integer greater than or equal to 1; within the predefined duration, the call application identifier of the external playback device using the call connection status is detected; if it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, the delayed response is stopped; if it is not detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, based on the predefined duration, the i+1-th delayed response to the connection status disconnection request of the first call application is performed, and the call application identifier of the external playback device using the call connection status is detected within the predefined duration; the above process is repeated until it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, or the i value reaches the number threshold.
[0093] In one embodiment, the processing unit 101 further includes: after maintaining the connection state between the electronic device and the external playback device as a call connection state, setting a flag bit, the flag bit being used to indicate that an application has ended the call but has not changed the call connection state.
[0094] In one embodiment, the flag is restored to a default value after switching back to playing the audio of the second call application.
[0095] Fig.102 is a block diagram of an apparatus 200 for audio control according to an exemplary embodiment. For example, the apparatus 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0096] Reference Fig.10 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0097] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
[0098] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device 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.
[0099] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.
[0100] The multimedia component 208 includes a screen that provides an output interface between the device 200 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 touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0101] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.
[0102] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0103] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0104] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 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 216 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.
[0105] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0106] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0107] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0108] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0109] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.
[0110] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0111] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0112] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. An audio control method, characterized in that: include: In response to a first call application in the electronic device ending the use of an external playback device to play the audio of the first call application, and determining to use the external playback device to play the audio of a second call application, maintaining the connection state between the electronic device and the external playback device as a call connection state, wherein the second call application is a call application that has been executed in the electronic device and uses the external playback device to play audio before the first call application is executed; Use the external playback device that maintains the call connection state to switch back to playing the audio of the second call application.
2. The audio control method according to claim 1, characterized in that: The step of maintaining the connection state between the electronic device and the external playback device as a call connection state includes: Delaying the response to the connection state disconnection request of the first call application to keep the connection state between the electronic device and the external playback device in a call connection state; The connection state disconnection request is triggered when the first call application finishes playing the first call application audio using an external playback device.
3. The audio control method according to claim 2, characterized in that: The delayed response to the connection state disconnection request of the first call application to keep the connection state between the electronic device and the external playback device in a call connection state includes: Performing an i-th delayed response to the connection state disconnection request of the first call application based on a predefined time, where i is a positive integer greater than or equal to 1; Detecting a call application identifier of an external playback device using the call connection state within the predefined time period; If it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, stopping the delayed response; If it is not detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, a delayed response is made to the connection state disconnection request of the first call application for the (i+1)th time based on the predefined time length, and a call application identifier of the external playback device using the call connection state is detected within the predefined time length; The above process is repeated until it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, or the i value reaches a number threshold.
4. The audio control method according to claim 1, characterized in that: The method further comprises: After maintaining the connection state between the electronic device and the external playback device as a call connection state, a flag is set, wherein the flag is used to indicate whether there is a call application that uses the external playback device to play audio and issues a connection state disconnection request but does not change the call connection state.
5. The audio control method according to claim 4, characterized in that: The method further comprises: In response to switching back to playing the audio of the second call application, restoring the flag bit to a default value.
6. An audio control device, characterized in that: include: a processing unit, configured to respond to a first call application in the electronic device ending the use of an external playback device to play the audio of the first call application, and determine to use the external playback device to play the audio of a second call application, and maintain the connection state between the electronic device and the external playback device as a call connection state, wherein the second call application is a call application that has been executed in the electronic device before the first call application is executed and uses the external playback device to play audio; The switching unit is used to use the external playback device that maintains the call connection state to switch back to playing the audio of the second call application.
7. The audio control device according to claim 6, characterized in that: The processing unit maintains the connection state between the electronic device and the external playback device as a call connection state in the following manner: Delaying the response to the connection state disconnection request of the first call application to keep the connection state between the electronic device and the external playback device in a call connection state; The connection state disconnection request is triggered when the first call application finishes playing the first call application audio using an external playback device.
8. The audio control device according to claim 7, characterized in that: The processing unit delays responding to the connection state disconnection request of the first call application in the following manner to keep the connection state between the electronic device and the external playback device in the call connection state: Performing an i-th delayed response to the connection state disconnection request of the first call application based on a predefined time, where i is a positive integer greater than or equal to 1; Detecting a call application identifier of an external playback device using the call connection state within the predefined time period; If it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, stopping the delayed response; If it is not detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, a delayed response is made to the connection state disconnection request of the first call application for the (i+1)th time based on the predefined time length, and a call application identifier of the external playback device using the call connection state is detected within the predefined time length; The above process is repeated until it is detected that the call application identifier is changed from the identifier of the first call application to the identifier of the second call application, or the i value reaches a number threshold.
9. The audio control device according to claim 6, characterized in that: The processing unit is also used for: After maintaining the connection state between the electronic device and the external playback device as a call connection state, a flag is set, wherein the flag is used to indicate whether there is a call application that uses the external playback device to play audio and issues a connection state disconnection request but does not change the call connection state.
10. The audio control device according to claim 9, characterized in that: The processing unit is also used for: In response to switching back to playing the audio of the second call application, restoring the flag bit to a default value.
11. An audio control device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the method described in any one of claims 1 to 5.
12. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor of an electronic device, the terminal is enabled to execute the method described in any one of claims 1 to 5.