WO2024067432A1 - Audio transmission method and system, and related apparatus - Google Patents

Audio transmission method and system, and related apparatus Download PDF

Info

Publication number
WO2024067432A1
WO2024067432A1 PCT/CN2023/120907 CN2023120907W WO2024067432A1 WO 2024067432 A1 WO2024067432 A1 WO 2024067432A1 CN 2023120907 W CN2023120907 W CN 2023120907W WO 2024067432 A1 WO2024067432 A1 WO 2024067432A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
window
audio device
electronic device
display screen
Prior art date
Application number
PCT/CN2023/120907
Other languages
French (fr)
Chinese (zh)
Inventor
陈永
孙强
尤君
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024067432A1 publication Critical patent/WO2024067432A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones

Definitions

  • the present application relates to the technical field of terminals and audio transmission, and in particular to an audio transmission method, system and related devices.
  • the present application provides an audio transmission method, system and related devices, through which multiple users can listen to different audios in the same electronic device through multiple pairs of wireless headphones.
  • the present application provides an audio transmission method, which may include: an electronic device establishing a connection with a first audio device and a second audio device; the electronic device displays a first window and a second window on a display screen, wherein the first window is an application window of a first application, and the first window plays first audio data, and the second window is an application window of a second application, and the second window plays second audio data; the electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the status of the first window and the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device.
  • the first audio device and the second audio device may be wireless headphones.
  • the orientation of the first audio device and the orientation of the second audio device may be specific orientations (eg, azimuth angles) or relative orientations.
  • the first application and the second application are applications that can play audio.
  • the first application can be any one of an audio playback application, a video playback application, a call application, an instant messaging application, and a browser application.
  • the second application can also be any one of an audio playback application, a video playback application, a call application, an instant messaging application, and a browser application.
  • the electronic device may be a tablet, a mobile phone, a computer, a notebook, or the like, which has a display screen and can play audio.
  • the user of the first audio device and the user of the second audio device can listen to different audio data.
  • the state of the first window on the display screen includes the display mode of the first window and/or the position of the first window on the display screen;
  • the state of the second window on the display screen includes the display mode of the second window and/or the position of the second window on the display screen; wherein the display mode includes full-screen display, floating display, and split-screen display.
  • floating display and split-screen display may also be referred to as small window display.
  • the display mode of the first window is full-screen display
  • the display mode of the second window is floating display.
  • the electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the status of the first window and the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device.
  • the electronic device sends the second audio data to the second audio device according to the position of the second window on the display screen and the orientations of the first audio device and the second audio device, wherein the position of the second window on the display screen matches the position of the second audio device relative to the first audio device, and the position of the second audio device relative to the first audio device is determined by the orientation of the first audio device and the orientation of the second audio device.
  • the user of the second audio device can listen to the audio data played by the application window that matches the relative position of the second audio device.
  • the relative position of the second audio device matches the position of the application window on the display screen, it is convenient for the user of the second audio device to watch and listen to the content played by the application window.
  • the display mode of the first window and the second window is split-screen display, or the display mode of the first window and the second window is suspended display, and the electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the status of the first window and the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device.
  • the electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the position of the first window on the display screen, the position of the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device, wherein the position of the first window on the display screen matches the position of the first audio device relative to the second audio device, and the second window is The position on the display screen matches the position of the second audio device relative to the first audio device, and the position of the first audio device relative to the second audio device and the position of the second audio device relative to the first audio device are determined by the orientation of the first audio device and the orientation of the second audio device.
  • the user of the first audio device and the user of the second audio device can listen to the audio data played by the application window that matches the relative position of the second audio device.
  • the relative position of the first audio device matches the position of the first window on the display screen, it is convenient for the user of the first audio device to watch and listen to the content played by the first window.
  • the relative position of the second audio device matches the position of the second window on the display screen, it is convenient for the user of the second audio device to watch and listen to the content played by the second window.
  • the position of the second window on the display screen matches the position of the second audio device relative to the first audio device, including: the second window is on the left side of the display screen, and the position of the second audio device relative to the first audio device is that the second audio device is located on the left side of the first audio device; or, the second window is on the right side of the display screen, and the position of the second audio device relative to the first audio device is that the second audio device is located on the right side of the first audio device.
  • the position of the first window on the display screen matches the position of the first audio device relative to the second audio device, including: the first window is on the left side of the display screen, and the position of the first audio device relative to the second audio device is that the first audio device is located on the left side of the second audio device; or, the first window is on the right side of the display screen, and the position of the first audio device relative to the second audio device is that the first audio device is located on the right side of the second audio device.
  • the electronic device sends the audio data of the second window to the second audio device based on the position of the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device, specifically including: when the second window is in the middle area of the display screen, the electronic device sends the second audio data to the first audio device and the second audio device at the same time.
  • the method may also include: when the second window is in the middle area of the display screen, the electronic device stops sending the first audio data to the first audio device; or, the electronic device sends the first audio data to the first audio device and the second audio device at the same time.
  • the second window is on the left side of the display screen
  • the position of the second audio device relative to the first audio device is that the second audio device is located on the left side of the first audio device.
  • the method may also include: based on the first user operation, the electronic device moves the second window from the left side of the display screen to the right side of the display screen; the electronic device sends the first audio data to the second audio device and stops sending the second audio data to the second audio device; the electronic device sends the second audio data to the first audio device and stops sending the first audio data to the first audio device.
  • the second window is on the right side of the display screen
  • the position of the second audio device relative to the first audio device is that the second audio device is located on the right side of the first audio device
  • the electronic device sends the first audio data to the second audio device, and stops sending the second audio data to the second audio device
  • the method may further include:
  • the electronic device moves the second window from the left side of the display screen to the right side of the display screen; the electronic device sends the second audio data to the second audio device and stops sending the first audio data to the second audio device; the electronic device sends the first audio data to the first audio device and stops sending the second audio data to the first audio device.
  • the user of the first audio device and the user of the second audio device want to exchange the content they are listening to, the user only needs to move the positions of the first window and the second window on the display screen. In this way, the user operation is simple and the user experience can be improved.
  • the electronic device when the electronic device detects that the position of the first audio device relative to the second audio device changes and the positions of the first window and the second window on the display screen do not change, the audio data received by the first audio device and the second audio device changes.
  • the electronic device when the first window is located on the left side of the display screen and the second window is located on the right side of the display screen, and the position of the first audio device relative to the second audio device changes from the first audio device being located on the left side of the second audio device to the first audio device being located on the right side of the second audio device, the electronic device sends the second audio data to the first audio device and stops sending the first audio data to the first audio device; the electronic device sends the first audio data to the second audio device and stops sending the second audio device to the first audio device.
  • the position of the first audio device is calculated by the electronic device based on a received Bluetooth signal sent by the first audio device; the position of the second audio device is calculated by the electronic device based on a received Bluetooth signal sent by the second audio device.
  • an audio transmission system may include an electronic device, a first audio device, and a second audio device.
  • the electronic device establishes a communication connection with the first audio device and the second audio device, respectively.
  • the electronic device, the first audio device, and the second audio device are used to execute the audio transmission method in any possible implementation of the first aspect above.
  • an electronic device comprising a memory, a processor, and a display screen, wherein the memory, the display screen, and the processor are electrically coupled, the display screen is used to display an application window of an application for playing audio data in the electronic device, the memory is used to store program instructions, and the processor is configured to call all or part of the program instructions stored in the memory so that the electronic device executes the audio transmission method in any possible implementation of the first aspect above.
  • a computer storage medium comprising computer instructions.
  • the computer instructions When the computer instructions are executed on an electronic device, the electronic device executes the audio transmission method in any possible implementation of the first aspect.
  • a computer program product is provided.
  • the electronic device executes the audio transmission method in any possible implementation of any of the above aspects.
  • FIG1 is a schematic diagram of an audio transmission system provided by an embodiment of the present application.
  • FIG2 is a schematic diagram of an audio transmission scenario provided in an embodiment of the present application.
  • 3A-3B are schematic diagrams of another set of audio transmission scenarios provided in an embodiment of the present application.
  • FIGS. 4A-4D are schematic diagrams of another set of audio transmission scenarios provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of the middle area of the tablet 100 provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of the tablet 100 determining the orientation of the earphone 200 and the earphone 300 provided in an embodiment of the present application;
  • FIG7 is a schematic diagram of determining the azimuth angle of the earphone 200 by using a phase difference model provided in an embodiment of the present application;
  • FIG8 is a flow chart of an audio transmission method provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of a flow chart of an audio transmission method provided in an embodiment of the present application.
  • FIG10 is a schematic flow chart of an audio transmission method provided in an embodiment of the present application.
  • FIG11 is a schematic flow chart of an audio transmission method provided in an embodiment of the present application.
  • FIG12 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of a framework of an electronic device provided in an embodiment of the present application.
  • FIG14 is a schematic diagram of a device 1400 provided in an embodiment of the present application.
  • FIG15 is a schematic diagram of a device 1500 provided in an embodiment of the present application.
  • FIG. 16 is a schematic diagram of a device 1600 provided in an embodiment of the present application.
  • first and second are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features.
  • a feature defined as “first” or “second” may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality” means two or more.
  • an electronic device can support connecting two pairs of headphones, and the electronic device can transmit audio data to the two pairs of headphones at the same time. Multiple application windows can also be displayed simultaneously in the electronic device. However, the electronic device can only transmit the same audio data to the two pairs of headphones, that is, the audio data output by the window of one application among the multiple application windows. In some scenarios, the wearers of the two pairs of headphones want to watch the windows of different applications and listen to different audios on the electronic device at the same time. In this way, the existing technology cannot meet the needs of users.
  • an embodiment of the present application provides an audio transmission system 10.
  • the audio transmission system 10 may include an electronic device and multiple (2 or more) audio devices.
  • the electronic device may display two windows that can play audio.
  • window 1 can play audio data 1
  • window 2 can play audio data 2.
  • the electronic device can transmit audio data 1 played by window 1 to an audio device, and transmit the audio data played by window 2 to other audio devices.
  • the audio device can be used to play audio data.
  • the audio device can be a wireless headset, a speaker, etc.
  • the electronic device can be a tablet, a mobile phone, a computer, etc.
  • the specific type of electronic device and audio device in the embodiment of the present application is not limited. The following is an example in which the electronic device is a tablet 100 and the audio device is headphones 200 and headphones 300.
  • the audio transmission system 10 provided in the embodiment of the present application may be as shown in FIG1 .
  • the electronic device in the audio transmission system 10 may be the tablet 100 shown in FIG1 .
  • the multiple pairs of wireless headphones included in the audio transmission system 10 may include the headphones 200 and the headphones 300 shown in FIG1 . Among them:
  • a video play window 101 and an audio play window 102 may be displayed in the user interface 1000 of the tablet 100 .
  • the headset 200 establishes a communication connection with the tablet 100, and the headset 300 establishes a communication connection with the tablet 100.
  • the headset 200 and the tablet 100 can establish a communication connection via Bluetooth.
  • the headset 300 and the tablet 100 can establish a communication connection via Bluetooth.
  • the embodiment of the application does not limit the manner in which the headset 200 and the tablet 100 establish a communication connection, and the manner in which the headset 300 and the tablet 100 establish a communication connection.
  • the tablet 100 may display two windows of application programs that can play audio, such as the video playback window 101 and the audio playback window 102 shown in FIG. 1.
  • the video playback window 101 is a window of the video playback APP in the tablet 100.
  • the audio playback window 102 is a window of the audio playback APP in the tablet 100.
  • the video playback window 101 and the audio playback window 102 may be suspended in the user interface 1000.
  • the video playback window 101 is close to the right side of the display screen of the tablet 100, and the audio playback window 102 is close to the left side of the display screen of the tablet 100.
  • the video playback window 101 and the audio playback window 102 shown in FIG. 1 may be referred to as floating windows. It is understood that the embodiment of the present application does not limit the state of the video playback window 101 and the audio playback window 102 displayed in the tablet 100 in the tablet 100.
  • the status of the video playback window 101 and the audio playback window 102 in the tablet 100 may include the display mode of the video playback window 101 and the audio playback window 102 in the tablet 100 (for example, floating display, full screen display, split screen display, etc.) and/or the position (or orientation) of the video playback window 101 and the audio playback window 102 on the display screen of the tablet 100.
  • the display mode of the video playback window 101 and the audio playback window 102 in the tablet 100 for example, floating display, full screen display, split screen display, etc.
  • the position (or orientation) of the video playback window 101 and the audio playback window 102 on the display screen of the tablet 100 for example, floating display, full screen display, split screen display, etc.
  • the earphone 200 is on the left side of the earphone 300.
  • the tablet 100 can send the audio data 1 of the audio being played in the audio playing window 102 to the earphone 200.
  • the tablet 100 can send the audio data 2 of the video being played in the video playing window 101 to the earphone 300.
  • the audio data of the audio currently played by the audio playback window 102 is referred to as audio data 1.
  • the audio data 1 is not limited to the audio data of the specific audio played by the audio playback window 102 in a specific time period.
  • the audio content of the audio data 1 played by the audio playback window 102 in the first time period and the audio data 1 played by the audio playback window 102 in the second time period described in the embodiment of the present application may be different.
  • the audio data of the audio currently played by the video playback window 101 is referred to as audio data 2.
  • the audio data 2 is not limited to the audio data of a specific video played by the video playback window 101 in a specific time period.
  • the audio content of the audio data 2 played by the video playback window 101 in the first time period and the audio data 2 played by the video playback window 101 in the second time period described in the embodiment of the present application may be different.
  • the tablet 100 in the audio transmission system 10 shown in FIG1 can send the audio data played in the windows of two application programs to two pairs of headphones respectively. In this way, the user wearing the headphones 200 and the user wearing the headphones 300 can listen to the audio played in the windows of different application programs in the tablet 100.
  • tablet 100 can determine to send audio data 1 of the audio being played in audio playback window 102 to earphone 200 and to send audio data 2 of the video being played in video playback window 101 to earphone 300 based on the relative positions of earphone 200 and earphone 300 .
  • tablet 100 can decide how to distribute audio data 1 of the audio being played in audio playback window 102 and audio data 2 of the video being played in video playback window 101 to earphones 200 and 300 based on the current relative positions of earphones 200 and 300.
  • the relative directions of the earphone 200 and the earphone 300 are changed, and the earphone 200 is changed from being on the left side of the earphone 300 to being on the right side of the earphone 300.
  • the tablet 100 can send the audio data 1 of the audio being played in the audio playing window 102 to the earphone 300.
  • the tablet 100 can send the audio data 2 of the video being played in the video playing window 101 to the earphone 200.
  • the user wearing earphone 200 when the user wearing earphone 200 wants to listen to the audio data played by the video playback APP, the user wearing earphone 200 can exchange positions with the user wearing earphone 300. In this way, the user wearing earphone 200 can listen to the audio data of the video playback APP, and the user wearing earphone 300 can listen to the audio data played by the audio playback APP.
  • the tablet 100 can determine to send audio data 1 of the audio being played in the audio playback window 102 to the earphone 300, and to send audio data 2 of the video being played in the video playback window 101 to the earphone 200, or to send audio data 1 of the audio being played in the audio playback window 102 to the earphone 200, and to send audio data 2 of the video being played in the video playback window 101 to the earphone 300 based on the relative positions of the earphone 200 and the earphone 300, and the positions and states of the audio playback window 102 and the video playback window 101 in the display screen of the tablet 100.
  • window when a window (the center line or midpoint of the window) is closer to the left frame of the tablet 100, the window can be said to be on the left side of the display screen of the tablet 100.
  • window when a window is closer to the right frame of the tablet 100, the window can be said to be on the right side of the display screen of the tablet 100.
  • both window 1 and window 2 are closer to the left frame of the tablet 100, if the distance between window 1 and the left frame of the tablet 100 is less than the distance between window 2 and the left frame of the tablet 100, then window 1 can be said to be on the left side of the display screen of the tablet 100, and window 2 can be said to be on the right side of the display screen of the tablet 100.
  • the tablet 100 can determine to send audio data 1 of the audio being played in the audio playback window 102 to the earphone 300, send audio data 2 of the video being played in the video playback window 101 to the earphone 200, or send audio data 1 of the audio being played in the audio playback window 102 to the earphone 200, and send audio data 2 of the video being played in the video playback window 101 to the earphone 300 based on the changed positions of the audio playback window 102 and the video playback window 101, and the relative positions of the earphone 200 and the earphone 300.
  • the positions of the video play window 101 and the audio play window 102 in the tablet 100 in the display screen are changed. Specifically, the position of the video play window 101 in the tablet 100 is changed from the right side to the left side of the tablet display screen. The position of the audio play window 102 in the tablet 100 is changed from the left side to the right side of the tablet display screen. The relative direction of the earphone 200 and the earphone 300 remains unchanged. The earphone 200 is still on the left side of the earphone 300.
  • the tablet 100 Based on the positions of the video play window 101 and the audio play window 102, and the relative direction of the earphone 200 and the earphone 300, the tablet 100 sends the audio data 2 of the video being played in the video play window 101 to the earphone 200, and sends the audio data 1 of the audio being played in the audio play window 102 to the earphone 300.
  • the user wearing headphones 200 wants to listen to the audio data of the video playback APP
  • the user wearing headphones 300 wants to listen to the audio data of the audio playback APP
  • the user wearing headphones 200 can change from listening to the audio data of the audio playback APP to listening to the audio data of the video playback APP
  • the user wearing headphones 300 can change from listening to the audio data of the video playback APP to listening to the audio data of the audio playback APP.
  • the tablet 100 can determine, based on the positions of the windows of the two applications and the relative directions of the headphones 200 and the headphones 300, to send audio data 1 of the audio being played by the audio playback window 102 to the headphones 300, and to send audio data 2 of the video being played by the video playback window 101 to the headphones 200, or to send audio data 1 of the audio being played by the audio playback window 102 to the headphones 200, and to send audio data 2 of the video being played by the video playback window 101 to the headphones 300.
  • two split-screen windows may be displayed in the tablet 100, namely, a video playback window 101 and an audio playback window 102.
  • the video playback window 101 and the audio playback window 102 may divide the display screen of the tablet 100 into two areas, area 1 and area 2.
  • the video playback window 101 may be displayed in area 1, and the audio playback window 102 may be displayed in area 2.
  • Area 1 is an area formed by quadrilaterals ABDE
  • area 2 is an area formed by quadrilaterals BECF.
  • the video playback window 101 is located on the left side of the display screen of the tablet 100, and the audio playback window 102 is located on the right side of the display screen of the tablet 100.
  • the earphone 200 is located on the left side of the earphone 300.
  • the tablet 100 may determine to send the audio data 2 of the video being played in the video playback window 101 to the earphone 200, and to send the audio data 1 of the audio being played in the audio playback window 102 to the earphone 300, based on the positions of the two split-screen windows and the relative directions of the earphone 200 and the earphone 300.
  • the video play window 101 is located on the right side of the display screen of the tablet 100
  • the audio play window 102 is located on the left side of the display screen of the tablet 100
  • the earphone 200 is located on the left side of the earphone 300.
  • the tablet 100 can determine to send the audio data 2 of the video being played in the video play window 101 to the earphone 300 and to send the audio data 1 of the audio being played in the audio play window 102 to the earphone 200 based on the positions of the two split-screen windows and the relative directions of the earphone 200 and the earphone 300.
  • the two split-screen windows displayed in the tablet 100 may not occupy the entire display screen of the tablet 100. That is, the two split-screen windows may equally divide the user interface in the tablet 100, and the user interface may be displayed in full screen or in small windows. This embodiment of the present application does not limit this.
  • the tablet 100 can determine whether to send the audio data of the full-screen window to the earphone 200 or the earphone 300, and whether to send the audio data of the floating window to the earphone 200 or the earphone 300 based on the position of the floating window and the relative directions of the earphone 200 and the earphone 300.
  • the user wearing the earphone 200 and the user wearing the earphone 300 can choose to listen to the audio data of the video playback APP or the audio data of the audio playback APP according to their own needs.
  • a full-screen window and a floating window are displayed on the tablet 100, the floating window is located on the right side of the display screen of the tablet 100, and the earphone 200 is located on the left side of the earphone 300.
  • the position of the floating window on the display screen of the tablet 100 is consistent with the relative position of the earphone 300 (the position of the earphone 300 relative to the earphone 200). Based on the position of the floating window and the relative direction of the earphone 200 and the earphone 300, the tablet 100 can send the audio data being played in the floating window to the earphone 300, and send the audio data being played in the full-screen window to the earphone 200.
  • a full-screen video playback window 101 and a floating window may be displayed in the tablet 100.
  • the call window 103 may be located on the right side of the display screen of the tablet 100.
  • the video playback window 101 may be an application window of a video APP in the tablet 100.
  • the call window 103 may be an application window of a call APP in the tablet 100.
  • the earphone 200 is located on the left side of the earphone 300.
  • the tablet 100 may send the audio data 2 of the video being played in the video playback window 101 to the earphone 200, and send the audio data 3 of the call being played in the call window 103 to the earphone 300.
  • a full-screen window and a floating window are displayed on the tablet 100, the floating window is located on the left side of the display screen of the tablet 100, and the earphone 200 is located on the left side of the earphone 300.
  • the position of the floating window on the display screen of the tablet 100 is consistent with the relative position of the earphone 200 (the position of the earphone 200 relative to the earphone 300).
  • the tablet 100 can send the audio data being played in the floating window to the earphone 200, and send the audio data being played in the full-screen window to the earphone 300.
  • a full-screen video playback window 101 and a floating window may be displayed in the tablet 100.
  • the call window 103 may be located on the left side of the display screen of the tablet 100.
  • the video playback window 101 may be an application window of a video APP in the tablet 100.
  • the call window 103 may be an application window of a call APP in the tablet 100.
  • the earphone 200 is located on the left side of the earphone 300.
  • the tablet 100 may send the audio data 2 of the video being played in the video playback window 101 to the earphone 300, and send the audio data 3 of the call being made in the call window 103 to the earphone 200.
  • the user wearing the headset 200 needs to make a call, he only needs to move the application window of the call APP to the same position as the headset 200. In this way, the user wearing the headset 200 can make a call and chat, while the user wearing the headset 300 can continue to listen to the audio data of the video playback APP.
  • a full-screen window and a floating window are displayed on the tablet 100, and the floating window is located in the middle area of the display screen of the tablet 100.
  • the earphone 200 is located on the left side of the earphone 300.
  • the tablet 100 can send only the audio data being played in the floating window to the earphone 200 and the earphone 300 based on the position of the floating window.
  • the tablet 100 may display a full-screen video playback window 101 and a floating window, namely, a call window 103.
  • the call window 103 may be located in the middle of the display screen of the tablet 100.
  • the earphone 200 is located on the left side of the earphone 300.
  • the tablet 100 may only send the audio data 3 of the call in the call window 103 to the earphone 200 and the earphone 300.
  • a full-screen window and a floating window are displayed in the tablet 100, and the floating window is located in the middle area of the display screen of the tablet 100.
  • the tablet 100 can send the audio data being played in the floating window and the audio data being played in the full-screen window to the earphones 200 and 300 based on the position of the floating window.
  • the tablet 100 may display a full-screen video playback window 101 and a floating window, namely, a call window 103.
  • the call window 103 may be located in the middle of the display screen of the tablet 100.
  • the earphone 200 is located on the left side of the earphone 300.
  • the tablet 100 may send the audio data 2 being played in the full-screen window and the audio data 3 of the call being made in the call window 103 to the earphone 200 and the earphone 300.
  • the central axis of the call window 103 may coincide with the central axis of the display screen of the tablet 100 .
  • the floating window being located in the middle area of the tablet 100 is not limited to the central axis of the floating curtain coinciding with the central axis of the display screen of the tablet 100.
  • the floating window can be located in a preset middle area of the tablet 100, and the size and position of the preset middle area can be set by the user or configured by default by the tablet 100.
  • the embodiment of the present application does not limit the size and position of the preset middle area of the display screen of the tablet 100.
  • the preset middle area of the tablet 100 may be the area 501 shown in Fig. 5.
  • the size and position of the area 501 may be set by the user or configured by default by the tablet 100.
  • the embodiment of the present application does not limit the size and position of the area 501.
  • two or more windows for playing audio data may be displayed in the tablet 100.
  • the tablet 100 may use the window for playing audio data selected by the user (the window clicked by the finger) or the window for playing audio data that was recently opened as the focus window. Then, the tablet 100 may send the audio data of the focus window to the earphone 200 and the earphone 300.
  • the tablet 100 may send the audio data of the focus window to the earphone with the relative position on the left side if the focus window is located on the left side of the tablet 100 display screen, and send the audio data of the focus window to the earphone with the relative position on the right side if the focus window is located on the right side of the tablet 100 display screen based on the position of the focus window in the tablet 100.
  • two or more windows for playing audio data may be displayed in the tablet 100.
  • the tablet 100 may only send the audio data of the window of the application with the highest application priority to the earphone 200 and the earphone 300.
  • the application priority may be set by the user or configured by the tablet system, which is not limited here.
  • two or more windows for playing audio data may be displayed on the tablet 100.
  • the user may choose to send the audio data of one of the two or more windows for playing audio data to the headset 200, and the audio data of the other window may be sent to the headset 200.
  • the first area of the tablet 100 may be a sidebar of the tablet 100, which is not limited here.
  • window 1 and window 2 for playing audio data are displayed in the tablet 100, and window 1 can be located on the left side of the display screen of the tablet 100, and window 2 can be located on the right side of the tablet 100.
  • the tablet 100 can open and display a window 3 for playing audio data. If window 3 covers window 1, the tablet 100 sends the audio data of window 3 to the earphone on the left, and pauses sending the audio data of window 1 to the earphone on the left. If window 3 covers window 2, the tablet 100 sends the audio data of window 3 to the earphone on the right, and pauses sending the audio data of window 2 to the earphone on the right.
  • window 3 covering window 1 can mean that window 3 is displayed on window 1, completely blocking or partially blocking window 1.
  • a floating window or a split-screen window may also be referred to as a small window (or small window).
  • the earphone 200 may be referred to as a first audio device, and the earphone 300 may be referred to as a second audio device; alternatively, the earphone 200 may be referred to as a second audio device, and the earphone 300 may be referred to as a first audio device.
  • the tablet 100 can obtain the position of the earphone 200 and the earphone 300, and determine the relative position of the earphone 200 and the earphone 300.
  • the tablet 100 can be positioned by an ultra wide band positioning method or a Bluetooth positioning method, and the position and distance of the earphone 200 and the earphone 300 can be obtained, thereby determining the relative position of the earphone 200 and the earphone 300.
  • the embodiment of the present application does not limit the specific positioning position used by the tablet 100 to position the earphone 200 and the earphone 300.
  • the following description takes the example of the tablet 100 positioning the earphones 200 and 300 by using the Bluetooth positioning method.
  • the tablet 100 may have an antenna array module, and the tablet 100 may receive and send Bluetooth signals through the antenna array module.
  • the antenna array module may receive Bluetooth signals sent by the earphone 200 and the earphone 300.
  • the Bluetooth signal may carry positioning information, such as an angle of arrival (AOA) data packet.
  • the tablet 100 may locate the earphone 200 based on the positioning information in the Bluetooth signal sent by the earphone 200 received by the antenna array module.
  • the tablet 100 may locate the earphone 300 based on the positioning information in the Bluetooth signal sent by the earphone 300 received by the antenna array module.
  • AOA angle of arrival
  • FIG6 exemplarily shows a schematic diagram of the tablet 100 determining the orientation of the earphone 200 and the earphone 300.
  • the tablet 100 may include an antenna array module 600.
  • the antenna array module 600 may include three positioning antennas.
  • the tablet 100 may select two positioning antennas in the antenna array module 600 through a switching switch to position the earphone 200, and determine that the orientation angle of the earphone 200 is ⁇ 1, and the distance between the earphone 200 and the antenna array module 600 is d1.
  • the tablet 100 may select two positioning antennas in the antenna array module 600 through a switching switch to position the earphone 300, and determine that the orientation angle of the earphone 300 is ⁇ 2, and the distance between the earphone 300 and the antenna array module 600 is d2.
  • the number and arrangement of the positioning antennas shown in the antenna array module 600 are only examples, and the antenna array module 600 may include 2 positioning antennas or 3 positioning antennas, or more positioning antennas.
  • the embodiment of the present application does not limit the number and arrangement of the positioning antennas in the antenna array module 600.
  • the tablet 100 can determine the azimuth angle of the headset 200 through the phase difference of the Bluetooth signal of the headset 200 received by different antenna units in the antenna array module 600.
  • the earphone 200 can transmit a Bluetooth signal.
  • Antenna 1 and antenna 2 in the antenna array module 600 can receive the Bluetooth signal transmitted by the earphone 200.
  • the tablet 100 can determine the incident angle of the Bluetooth signal transmitted by the earphone 200, that is, the azimuth angle ⁇ 1 of the earphone 200, based on the distance between antenna 1 and antenna 2 in the antenna array module 600, the wavelength of the Bluetooth signal transmitted by the earphone 200, and the phase difference between antenna 1 and antenna 2 receiving the Bluetooth signal transmitted by the earphone 200:
  • the tablet 100 can determine that the distance between the earphone 200 and the antenna array module 600 is d1 by receiving the time when the earphone 200 transmits the Bluetooth signal and the propagation speed of the Bluetooth signal transmitted by the earphone 200 through the antenna array module 600.
  • the tablet 100 can determine the azimuth angle of the headset 300 through the phase difference of the Bluetooth signal of the headset 300 received by different antenna units in the antenna array module 600.
  • the earphone 300 can transmit a Bluetooth signal.
  • Antenna 1 and antenna 2 in the antenna array module 600 can receive the Bluetooth signal transmitted by the earphone 300.
  • the tablet 100 can determine the incident angle of the Bluetooth signal transmitted by the earphone 300, that is, the azimuth angle ⁇ 2 of the earphone 300, based on the distance between antenna 1 and antenna 2 in the antenna array module 600, the wavelength of the Bluetooth signal transmitted by the earphone 300, and the phase difference between antenna 1 and antenna 2 receiving the Bluetooth signal transmitted by the earphone 300:
  • the tablet 100 can receive the time when the headset 300 transmits the Bluetooth signal and the propagation speed of the Bluetooth signal transmitted by the headset 300 through the antenna array module 600 to determine that the distance between the headset 300 and the antenna array module 600 is d2.
  • the embodiment of the present application does not limit the specific method or algorithm used by the tablet 100 to determine the orientation and distance of the earphones 200 and 300.
  • the tablet 100 can determine the relative orientation of the earphone 200 and the earphone 300 by the azimuth angle ⁇ 1 of the earphone 200 and the azimuth angle ⁇ 2 of the earphone 300. For example, if ⁇ 1 is -30° and ⁇ 2 is 60°, the earphone 200 is located on the left side of the earphone 300, and the earphone 300 is located on the right side of the earphone 200. If ⁇ 1 is 90° and ⁇ 2 is 60°, the earphone 200 is located on the right side of the earphone 300, and the earphone 300 is located on the left side of the earphone 200.
  • ⁇ 1 is -90° and ⁇ 2 is -60°
  • the earphone 200 is located on the left side of the earphone 300
  • the earphone 300 is located on the right side of the earphone 200.
  • the angles of ⁇ 1 and ⁇ 2 are not limited to 0° to +180° and -180° to 0°, and can also be between 0° and 360°, which is not limited in the embodiments of the present application.
  • the specific relative positions of the earphone 200 and the earphone 300 may include: the earphone 200 is located on the left side of the earphone 300, or the earphone 200 is located on the right side of the earphone 300.
  • the earphone 200 being located on the left side of the earphone 300 may also be referred to as the earphone 200 being located on the left side and the earphone 300 being located on the right side.
  • the earphone 200 being located on the right side of the earphone 300 may also be referred to as the earphone 200 being located on the right side and the earphone 300 being located on the left side.
  • the headset 200 when the headset 200 is described as being located on the left side in the embodiment of the present application, it is not limited to the headset 200 being located on the left side of the central axis of the display screen of the tablet 100 (see the central axis of the display screen of the tablet 100 shown in FIG. 4C or FIG. 4D ).
  • the headset 200 can be located on either side of the central axis of the display screen of the tablet 100.
  • the headset 300 When the headset 300 is described as being located on the right side in the embodiment of the present application, it is not limited to the headset 300 being located on the right side of the central axis of the display screen of the tablet 100.
  • the headset 300 can be located on either side of the central axis of the display screen of the tablet 100.
  • the tablet 100 can determine the relative orientation of the earphone 200 and the earphone 300 through the azimuth angle ⁇ 1 of the earphone 200 and the azimuth angle ⁇ 2 of the earphone 300, as well as the distance d1 between the earphone 200 and the antenna array module 600 in the tablet 100, and the distance d2 between the earphone 300 and the antenna array module 600 in the tablet 100.
  • the embodiment of the present application takes two windows that can play audio displayed in an electronic device as an example, which are a full-screen window and a floating window, respectively, to introduce in detail how the electronic device distributes the audio of the two windows to headphones 200 and headphones 300.
  • FIG8 exemplarily shows a flow chart of an audio transmission method provided in an embodiment of the present application.
  • an audio transmission method provided in an embodiment of the present application may include the following steps:
  • S800a The electronic device establishes a Bluetooth connection with the headset 200 based on user operation 1.
  • S800b The electronic device establishes a Bluetooth connection with the headset 300 based on user operation 2.
  • the electronic device can establish a Bluetooth connection with the headset 200 and the headset 300 respectively based on user operation 1 and user operation 2. For example, the user can click on the control for turning on the Bluetooth function in the electronic device, and then the user can turn on the headset 200 and adjust it to a connectable state. Then, the user can choose to connect the headset 200 in the electronic device. Finally, the electronic device can establish a Bluetooth connection with the headset 200. Similarly, when the Bluetooth function of the electronic device is turned on, the user can turn on the headset 300 and adjust it to a connectable state, and then the user can choose to connect the headset 300 in the electronic device. Finally, the electronic device can establish a Bluetooth connection with the headset 300.
  • user operation 1 may include an operation of a user clicking a control in an electronic device for turning on a Bluetooth function, an operation of a user clicking a control for turning on a Bluetooth function of the headset 200, an operation of clicking a control for placing the headset 200 in a connectable state, and an operation of clicking a control in an electronic device for establishing a Bluetooth connection between the electronic device and the headset 200, etc. It is understandable that user operation 1 may enable the electronic device to establish a Bluetooth connection with the headset 200. For different electronic devices or different operating habits of different users, the operation of establishing a Bluetooth connection between the electronic device and the headset 200 may be different. The embodiment of the present application does not limit the specific user operation 1.
  • user operation 2 may include an operation of a user clicking on a control in an electronic device for turning on a Bluetooth function, an operation of a user clicking on a control for turning on the Bluetooth function of the headset 300, an operation of clicking on a control for making the headset 300 connectable, and an operation of clicking on a control in an electronic device for establishing a Bluetooth connection between the electronic device and the headset 300, etc.
  • user operation 1 may enable the electronic device to establish a Bluetooth connection with the headset 300.
  • the operation of establishing a Bluetooth connection between the electronic device and the headset 300 may be different.
  • the embodiment of the present application does not limit the specific user operation 1.
  • the embodiment of the present application does not limit the order in which the electronic device establishes a Bluetooth connection with the headset 200, and the electronic device establishes a Bluetooth connection with the headset 300. That is, the embodiment of the present application does not limit the execution order of step S800a and step S800b.
  • the electronic device may first establish a Bluetooth connection with the headset 200, and then establish a Bluetooth connection with the headset 300. Alternatively, the electronic device may first establish a Bluetooth connection with the headset 300, and then establish a Bluetooth connection with the headset 200.
  • the electronic device may be able to display the application window and connect to the wireless headset, such as a mobile phone, a tablet and other devices.
  • the electronic device starts a full-screen APP1 that outputs audio data data1.
  • the electronic device can open the full-screen APP1 based on the user operation 3, and the full-screen APP1 can output the audio data data1.
  • the user operation 3 can be that the user clicks the icon of the full-screen APP1 in the main interface of the electronic device displaying the application icon.
  • the user operation 3 can also be that the user inputs a voice command to the electronic device to open the full-screen APP1, or clicks the shortcut key for opening the full-screen APP1 in the electronic device, etc.
  • the embodiment of the present application does not limit the user operation 3.
  • the full-screen APP1 can be an APP that can play audio, for example, the video APP shown in Figure 4A.
  • the audio data data1 can be the audio data that is playing audio in the full-screen APP1.
  • the audio data 2 that is being played in the video playback window 101 shown in Figure 4A does not limit what type of APP the full-screen APP1 is, nor does it limit the specific content of the audio data data1 played by the full-screen APP1.
  • S802a The electronic device sends the audio data data1 to the headset 200 .
  • the electronic device sends the audio data data1 to the earphone 300 .
  • the electronic device can send audio data data1 to earphones 200 and 300. It is understandable that when the electronic device only opens one APP that can play audio, that is, full-screen APP1, the electronic device can simultaneously send the audio data played by the APP to multiple earphones connected to the electronic device, that is, earphones 200 and 300.
  • the electronic device starts the floating APP2 that outputs the audio data data2, and displays the floating APP2 in the first area of the display screen of the electronic device.
  • the electronic device can open the floating APP2 based on the user operation 4, and the floating APP2 can output the audio data data2.
  • the user operation 4 can be that the user clicks the icon of the floating APP2 in the main interface of the electronic device displaying the application icon, and adjusts the application window of the floating APP2 to the first area of the display screen of the electronic device for floating display.
  • the user operation 4 can also be that the user inputs a voice command to the electronic device to open the floating APP2, and adjusts the application window of the floating APP2 to the first area of the display screen of the electronic device for floating display.
  • the embodiment of the present application does not limit the user operation 4.
  • the floating APP2 can be an APP that can play audio, for example, a call APP corresponding to the call window 103 shown in FIG. 4A.
  • the audio data data2 can be the audio data being played by the floating APP2, for example, the audio data data2 can be the call audio data 3 of the call window 103 shown in FIG. 4A. It can be understood that the embodiment of the present application does not limit what type of APP the floating APP2 is, nor does it limit the specific content of the audio data data2 played by the floating APP2.
  • the full-screen APP1 in the embodiment of the present application is not displayed in full screen in all scenarios.
  • the full-screen APP1 can also be displayed in a suspended state or in a split screen based on user operations in some scenarios, and the embodiment of the present application does not limit this.
  • the floating APP2 in the embodiment of the present application is not displayed in a suspended state in all scenarios.
  • the floating APP2 can also be displayed in a full screen or in a split screen based on user operations in some scenarios, and the embodiment of the present application does not limit this.
  • S804a The electronic device monitors the position of the earphone 200.
  • S804b The electronic device monitors the position of the earphone 300.
  • the electronic device can detect the position of the earphone 200 and the earphone 300, for example, the azimuth and/or distance of the earphone 200, and the azimuth and/or distance of the earphone 300.
  • the electronic device can monitor the position of the earphone 200 and the earphone 300 based on the antenna array module 600 shown in FIG. 6.
  • how the electronic device detects the position of the earphone 200 and the earphone 300 can refer to the description in FIG. 6 and FIG. 7, which will not be repeated here.
  • the electronic device determines that the earphone 200 is located at the position d1, and the earphone 300 is located at the position d2, and the position d1 is the same as the position of the first area in the display screen.
  • the electronic device can determine that the earphone 200 is located at the position d1 and the earphone 300 is located at the position d2 according to the monitored position of the earphone 200 and the monitored position of the earphone 300. Specifically, the earphone 200 being located at the position d1 can indicate that the earphone 200 has an azimuth angle of ⁇ 1; the earphone 300 being located at the position d2 can indicate that the earphone 300 has an azimuth angle of ⁇ 2.
  • the electronic device can determine the relative positions of the earphone 200 and the earphone 300 according to the position d1 of the earphone 200 and the position d2 of the earphone 300 .
  • the orientation d1 and the orientation d2 may be relative orientations, and the orientation d1 and the orientation d2 are different.
  • the orientation d1 may be the left side, that is, the earphone 200 is located on the left side of the earphone 300.
  • the orientation d2 may be the right side, that is, the earphone 300 is located on the right side of the earphone 200.
  • the embodiment of the present application does not specifically limit the orientation d1.
  • the electronic device may determine the position of the first area in the display screen.
  • the position of the first area in the display screen may be the same as the position d1.
  • the position d1 is the left side, and the first area is located on the left side of the display screen of the electronic device.
  • the orientation of the earphone 200 can be said to match or be the same as the orientation of the first area (or the orientation of the window of the suspended APP2).
  • the orientation d1 and the orientation d2 indicate that the earphone 200 is located on the right side of the earphone 300 and the first area is located on the right side of the electronic device display screen
  • the orientation of the earphone 200 matches or is the same as the orientation of the first area (or the orientation of the window of the suspended APP2). It is said that the orientation of the earphone 200 matches or is the same as the orientation of the first area (or the orientation of the window of the floating APP2).
  • S806 The electronic device stops sending the audio data data1 to the earphone 200 , and sends the audio data data2 to the earphone 200 .
  • the electronic device can stop sending the audio data data1 of the full-screen APP1 to the headset 200 and send the audio data data2 of the floating APP2 to the headset 200 instead.
  • the electronic device Based on user operation 5, the electronic device displays the floating APP2 in the second area of the display screen, and determines that the position of the second area in the display screen is the same as the position d2.
  • User operation 5 may be that the user moves the application window of the floating APP2 from the first area of the display screen to the second area. That is, the user may move the application window of the floating APP2 to the second area of the electronic device display screen, and in response to the user operation, the electronic device may display the floating APP2 in the second area of the display screen.
  • the embodiment of the present application does not specifically limit user operation 5.
  • the orientation of the second area in the display screen is different from the orientation of the first area in the display screen.
  • the orientation of the second area in the display screen may be the same as the orientation d2.
  • the second area is on the right side of the display screen, and the orientation d2 may also be on the right side (i.e., the earphone 300 is on the right side of the earphone 200).
  • S808a The electronic device stops sending the audio data data2 to the earphone 200, and sends the audio data data1 to the earphone 200.
  • S808b The electronic device stops sending the audio data data1 to the earphone 300, and sends the audio data data2 to the earphone 300.
  • the electronic device can stop sending the audio data data2 of the floating APP2 to the earphone 200, and instead send the audio data data1 of the full-screen APP1 to the earphone 200; and stop sending the audio data data1 of the full-screen APP1 to the earphone 300, and instead send the audio data data2 of the floating APP2 to the earphone 300.
  • the user may also adjust the position of the floating APP2 in the display screen to be the same as the position of the earphone 300. That is, the floating APP2 may also be located in the second area first, and then moved from the second area to the first area.
  • the electronic device may send the audio data data2 of the floating APP2 to the earphone 300 with the same position as the floating APP2. For example, as shown in FIG4A, when the call window 103 of the call APP is located on the right side of the display screen, the electronic device may send the audio data 3 of the call window 103 to the earphone 300 with the same position as the call window 103.
  • the user may move the floating APP2 from the second area to the first area, and when the floating APP2 is located in the first area, the electronic device may send the audio data data2 of the floating APP2 to the earphone 200 with the same position as the floating APP2.
  • the electronic device may send the audio data 3 of the call window 103 to the earphone 200 with the same position as the call window 103.
  • the electronic device sends the audio data data2 of the suspended APP2 to the earphone (earphone 200 or earphone 300) consistent with the position of the suspended APP2 based on the position of the suspended APP2 in the display screen, the position of the earphone 200 and the position of the earphone 300.
  • the first area where the floating APP2 is displayed on the display screen is the first area where the application window (or user interface) of the floating APP2 is displayed on the display screen.
  • the second area where the floating APP2 is displayed on the display screen is the second area where the application window (or user interface) of the floating APP2 is displayed on the display screen.
  • User operation 6 may be that the user moves the floating APP2 to the third area of the display screen.
  • the embodiment of the present application does not specifically limit user operation 6.
  • the electronic device may display the floating APP2 in the third area of the display screen based on user operation 6.
  • the third area may be the middle area of the electronic device display screen, for example, area 501 shown in FIG. 5.
  • the embodiment of the present application does not limit the specific position of the third area in the display screen and the specific size of the third area.
  • the user involved in the embodiment of the present application moves the floating APP2 to the first area of the display screen, or from the first area to the second area, and to the third area, which means that the user moves the application window (or user interface) of the floating APP2 to the first area of the display screen, or from the first area to the second area, and to the third area.
  • S810a The electronic device sends the audio data data1 and the audio data data2 to the headset 200 .
  • S810b The electronic device sends the audio data data1 and the audio data data2 to the headset 300.
  • the electronic device When the electronic device detects that the floating APP2 is located in the third area of the display screen, such as the middle area, the electronic device can send the audio data data1 and the audio data data2 to the earphone 200, and send the audio data data1 and the audio data data2 to the earphone 300. That is, the earphone 200 and the earphone 300 can receive the audio data data1 and the audio data data2 at the same time. For example, when the call window 103 in FIG.
  • the tablet 100 sends the audio data 3 of the call window 103 and the audio data 2 of the video playback window 101 to the earphone 200, and sends the audio data 3 of the call window 103 and the audio data 2 of the video playback window 101 to the earphone 300.
  • the electronic device when the electronic device detects that the floating APP2 is located in the third area of the display screen, the electronic device can send the audio data data2 of the floating APP2 to the earphone 200 and the earphone 300 at the same time.
  • the tablet 100 when the call window 103 in FIG4C is in the middle area of the display screen of the tablet 100, the tablet 100 sends the audio data 3 of the call window 103 to the earphone 200 and the earphone 300.
  • the electronic device exits the floating APP2 based on the user operation 7.
  • the user may also click on a control for closing the floating APP.
  • the electronic device may exit the floating APP2, that is, the electronic device closes the floating APP2.
  • the electronic device sends the audio data data1 to the earphone 200 .
  • S812b The electronic device sends the audio data data1 to the headset 200.
  • the electronic device may only send the audio data data1 of the full-screen APP1 to the earphone 200 and the earphone 300.
  • the electronic device when the user clicks the control to pause the playing of the audio data data2 of the floating APP2, in response to the user operation, the electronic device pauses sending the audio data data2 to the earphone 200 or the earphone 300, and sends the audio data data1 to the earphone 200 and the earphone 300.
  • the electronic device when the user clicks the control to pause playing the audio data data1 of the full-screen APP1, in response to the user operation, the electronic device pauses sending the audio data data1 to the earphone 200 or the earphone 300, and sends the audio data data2 to the earphone 200 and the earphone 300.
  • the electronic device when the electronic device plays the audio of only one application, the electronic device can send the audio data of the application to the earphone 200 and the earphone 300 at the same time.
  • the electronic device When the application is displayed in a floating manner in the electronic device, the electronic device does not need to consider the position of the application in the display screen, and still sends the audio data of the application to the earphone 200 and the earphone 300.
  • the electronic device When the audio of two applications is played simultaneously in the electronic device, the electronic device needs to choose to send the audio data of one application of the two applications to the earphone 200 and the audio data of the other application to the earphone 300 according to the status and position of the two applications; or send the audio data of the two applications to the earphone 200 and the earphone 300 at the same time, or send the audio data of one application of the two applications to the earphone 200 and the earphone 300 at the same time.
  • FIG. 9 shows an audio transmission method provided in an embodiment of the present application.
  • the electronic device when the electronic device determines that two pairs of headphones are connected to the electronic device and two apps that output audio are opened in the electronic device, the electronic device will start to detect the window status of the apps and monitor the position of the headphones.
  • an audio transmission method provided in an embodiment of the present application may include the following steps:
  • the electronic device can be connected to multiple pairs of headphones.
  • the electronic device can determine whether an APP with two output audios is turned on, that is, execute the following step S902a.
  • the electronic device may stop detecting the position of the headset, that is, execute step S902b.
  • the electronic device continuously monitors whether two pairs of wireless headphones are connected to the electronic device.
  • the electronic device first determines that the electronic device is connected to two pairs of wireless headphones, while monitoring the positions of the two pairs of wireless headphones, if the electronic device detects that any one of the two pairs of headphones is disconnected from the electronic device, the electronic device stops monitoring the positions of the two pairs of headphones.
  • the electronic device may continuously monitor whether two pairs of wireless headphones are connected, that is, continuously execute step S901.
  • the electronic device determines whether two apps that output audio are turned on, if so, executes step S903, if not, continues to execute S902a.
  • the electronic device can also determine whether two APPs with audio output are turned on: APP11 with audio output and APP22 with audio output.
  • APP11 and APP22 can be the video APP, call APP in Figures 4A-4D, or the full-screen APP1 and floating APP2 involved in Figure 8.
  • the embodiment of the present application does not limit the specific type and name of APP11 and APP22.
  • the electronic device determines that two APPs with audio output are not turned on (that is, only one APP with audio output is turned on or the APP with audio output is not turned on)
  • the electronic device can continue to detect whether two APPs with audio output are turned on in the electronic device, that is, continue to execute step S902.
  • the electronic device stops monitoring the position of the earphone.
  • the electronic device When the electronic device has started to monitor the position of the earphones and the electronic device changes from being connected to two pairs of earphones to not being connected to two pairs of earphones, the electronic device can stop monitoring the position of the earphones.
  • the electronic device monitors the APP window status.
  • the electronic device can monitor the status of the application window of APP11 and the application window of APP22.
  • the status of APP11 and APP22 can be full screen display, floating display or split screen display, etc.
  • the electronic device can monitor the window status of APP11 and APP2 through the application window monitoring service module in the electronic device.
  • the application window monitoring service module please refer to the description of FIG. 12 below, which will not be repeated here.
  • the electronic device monitors the position of the earphone.
  • the electronic device can start monitoring the position of the headphones. How the electronic device detects the position of the headphones can refer to the description in Figures 6 and 7 above, which will not be repeated here.
  • the electronic device can determine in real time the positions of the two connected wireless earphones and the relative positions of the two wireless earphones.
  • the electronic device determines whether the position of the floating APP is the same as the position of a pair of headphones. If so, execute step S906; if not, execute step S903.
  • step S906 is executed; if not, the electronic device can continue to monitor the APP window status, that is, step S903 is executed.
  • the electronic device sends the audio data of the two audio-output APPs to the corresponding earphones according to the directions.
  • the electronic device can send the audio data of the two audio-output APPs to the corresponding headphones according to the window status of the two audio-output APPs and the orientation of the application windows of the two audio-output APPs in the display screen. Since the window status of the two audio-output APPs can be divided into multiple situations, the following will describe how the electronic device specifically sends the audio data of the two audio-output APPs to the corresponding headphones according to different situations.
  • APP11 may be a full-screen APP, a floating APP, or a split-screen APP.
  • APP2 may also be a full-screen APP, a floating APP, or a split-screen APP.
  • the APP when the current display state of an application window of an APP is full-screen display (that is, an application window of an APP is currently a full-screen window), the APP can be called a full-screen APP.
  • the current display state of an application window of an APP is split-screen display (that is, an application window of an APP is currently a split-screen window)
  • the APP can be called a split-screen APP.
  • the current display state of an application window of an APP is suspended display (that is, an application window of an APP is currently a suspended window)
  • the APP can be called a suspended APP.
  • Case 1 APP11 is a floating APP, APP22 is a full-screen APP
  • APP11 can be a floating APP, that is, the application window of APP11 is a floating window.
  • APP22 can be a full-screen APP, that is, the application window of APP22 is a full-screen window. It can be understood that the application window of APP11 is displayed floatingly above the application window of APP22.
  • the video playback window 101 of the video playback APP shown in FIG. 4A is a full-screen window
  • the call window 103 of the call APP is a floating window.
  • the call window 103 is displayed floatingly above the video playback window 101.
  • the electronic device can send the audio data of the two audio-output APPs to the corresponding headphones according to the orientation. For example, when the orientation of the application window of APP11 is the same as the orientation of earphone 200 in two pairs of wireless headphones (such as earphone 200 and earphone 300), the electronic device can send the audio data of APP11 to earphone 200 and the audio data of APP22 to earphone 300; when the orientation of the application window of APP11 is the same as the orientation of earphone 300, the electronic device can send the audio data of APP11 to earphone 300 and the audio data of APP22 to earphone 200.
  • the electronic device determines that the orientation of the application window of APP11 is different from the orientation of the two pairs of wireless headphones, for example, the application window of APP11 is in the middle area of the display screen of the electronic device (for example, the call window 103 shown in Figure 4C is located on the central axis of the display screen of the tablet 100, or the area 501 shown in Figure 5), the electronic device can send the audio data of APP11 to headphones 200 and headphones 300.
  • the electronic device determines that the orientation of the application window of APP11 and the orientation of the two pairs of wireless headphones are different, for example, APP11 is in the middle area of the display screen of the electronic device (for example, the call window 103 shown in Figure 4D is located on the central axis of the display screen of the tablet 100, or the area 501 shown in Figure 5), the electronic device can send the audio data of APP11 and the audio data of APP22 to the headset 200, and send the audio data of APP11 and the audio data of APP22 to the headset 300.
  • APP11 can be a floating APP, that is, the application window of APP11 is a floating window.
  • APP22 can also be a floating APP, that is, the application window of APP22 is a floating window.
  • the video playback window 101 of the video playback APP shown in FIG. 3A is a floating window
  • the audio playback window 102 of the audio playback APP is also a floating window.
  • the video playback window 101 and the audio playback window 102 can be displayed in a floating manner on the main interface of the electronic device or the full-screen window of other applications.
  • the electronic device can send the audio data of two audio-outputting APPs to the earphones with the same orientation based on the orientation of the application windows of the two audio-outputting APPs. For example, when the electronic device determines that the orientation of the application window of APP11 is the same as the orientation of earphone 200, and the orientation of the application window of APP22 is the same as the orientation of earphone 300, the electronic device sends the audio data of APP11 to earphone 200 and the audio data of APP22 to earphone 300. The data is sent to the headset 300.
  • the electronic device determines that the orientation of the application window of APP11 is the same as the orientation of the headset 300 and the orientation of the application window of APP22 is the same as the orientation of the headset 200, the electronic device sends the audio data of APP11 to the headset 300 and sends the audio data of APP22 to the headset 200.
  • Case 3 APP11 is a split-screen APP, APP22 is a split-screen APP
  • APP11 and APP22 can be split-screen APPs, that is, the application window of APP11 and the application window of APP22 can be split-screen displayed in the electronic device.
  • the video playback window 101 of the audio playback APP and the audio playback window 102 of the audio playback APP shown in FIG. 3B are split-screen displayed in the tablet 100.
  • the electronic device can send the audio data of two audio-outputting APPs to the earphones with the same orientation based on the orientation of the application windows of the two audio-outputting APPs. For example, when the electronic device determines that the orientation of the application window of APP11 is the same as the orientation of the earphone 200, and the orientation of the application window of APP22 is the same as the orientation of the earphone 300, the electronic device sends the audio data of APP11 to the earphone 200, and sends the audio data of APP22 to the earphone 300.
  • the electronic device determines that the orientation of the application window of APP11 is the same as the orientation of the earphone 300, and the orientation of the application window of APP22 is the same as the orientation of the earphone 200, the electronic device sends the audio data of APP11 to the earphone 300, and sends the audio data of APP22 to the earphone 200.
  • the electronic device can send the audio data of the two audio output APPs to the headphones with the same orientation based on the status and orientation of the application windows of the two audio output APPs.
  • the user wearing the headphones 200 and the user wearing the headphones 300 can choose to keep the orientation of the headphones and the application window of one of the two audio output APPs the same based on user needs, so as to listen to the audio data of the audio APP they want to listen to.
  • the user wearing the headphones 200 can also listen to the audio data of different audio APPs with the user wearing the headphones 300.
  • the electronic device starts to detect the position of the earphone after determining that the electronic device has opened two APPs that output audio. In this way, the power consumption of the electronic device can be saved. In some scenarios, in order to shorten the waiting time for the electronic device to send the audio data of the two APPs to different earphones.
  • the electronic device can monitor the position of the two earphones immediately after the electronic device is connected to two wireless earphones.
  • Figure 10 provides an audio transmission method, in which the electronic device monitors the position of the two pairs of wireless earphones after connecting them. Then, after the electronic device opens two APPs that output audio, the audio data of the two APPs that output audio are sent to different earphones respectively according to the position of the application windows of the two APPs that output audio.
  • an audio transmission method provided in an embodiment of the present application may specifically include the following steps:
  • S1000a The electronic device establishes a Bluetooth connection with the headset 200 based on user operation 1.
  • S1000b The electronic device establishes a Bluetooth connection with the headset 300 based on user operation 2.
  • Step S1000a may refer to the description in the above step S800a, which will not be described in detail here.
  • Step S1000b may refer to the description in the above step S800b, which will not be described in detail here.
  • the electronic device monitors the position of the earphone 200.
  • the electronic device monitors the position of the earphone 300.
  • step S1001a may refer to the description of step S804a, which will not be repeated here.
  • step S1001b may refer to the description of step S804b, which will not be repeated here.
  • the electronic device starts a full-screen APP1 that outputs audio data data1 .
  • step S1002 refers to the above step S801 and will not be repeated here.
  • S1003a The electronic device sends the audio data data1 to the earphone 200 .
  • S1003b The electronic device sends the audio data data1 to the earphone 300 .
  • Step S1003a may refer to the description in the above step S802a, which is not repeated here.
  • Step S1003b may refer to the description in the above step S802b, which is not repeated here.
  • the electronic device starts the floating APP2 that outputs the audio data data2, and displays the floating APP2 in the first area of the display screen of the electronic device.
  • step S1004 may refer to step S804 and will not be repeated here.
  • the electronic device determines that the earphone 200 is located at the position d1, and the earphone 300 is located at the position d2, and the position d1 is the same as the position of the first area in the display screen.
  • step S1005 may refer to that of step S805 and will not be repeated here.
  • S1006 The electronic device stops sending the audio data data1 to the earphone 200 , and sends the audio data data2 to the earphone 200 .
  • step S1006 may refer to that of step S806 and will not be repeated here.
  • the electronic device displays the floating APP2 in the second area of the display screen, and determines that the position of the second area in the display screen is the same as the position d2.
  • step S1007 reference may be made to the description in step S807, which will not be repeated here.
  • S1008a The electronic device stops sending the audio data data2 to the earphone 200, and sends the audio data data1 to the earphone 200.
  • S1008b The electronic device stops sending the audio data data1 to the earphone 300, and sends the audio data data2 to the earphone 300.
  • Step S1008a and step S1008b may refer to the description of the above-mentioned step S808a and step S808b, which will not be repeated here.
  • Step S1009 may refer to the description of the above step S809 and will not be repeated here.
  • S1010a The electronic device sends the audio data data1 and the audio data data2 to the headset 200 .
  • S1010b The electronic device sends the audio data data1 and the audio data data2 to the headset 300 .
  • Step S1010a and step S1010b may refer to the description of the above-mentioned step S810a and step S810b, which will not be repeated here.
  • the electronic device exits the floating APP2 based on the user operation 7.
  • Step S1011 may refer to the description of the above step S811 and will not be repeated here.
  • S1012a The electronic device sends the audio data data1 to the headset 200 .
  • S1012b The electronic device sends the audio data data1 to the headset 200 .
  • Step S1012a and step S1012b may refer to the description of the above-mentioned step S812a and step S812b, which will not be repeated here.
  • FIG. 11 shows an audio transmission method provided in an embodiment of the present application.
  • the electronic device when the electronic device determines that two pairs of headphones are connected to the electronic device, the electronic device starts to detect the position of the headphones. In this way, when two apps that output audio are opened in the electronic device, the electronic device can quickly determine to send the audio data of the two apps to the corresponding headphones according to the position of the headphones without waiting to determine the position of the headphones.
  • an audio transmission method provided in an embodiment of the present application may include the following steps:
  • step S1102a Is the electronic device connected to two wireless headphones? If so, execute step S1102a; if not, execute step S1102b.
  • the electronic device may be connected to multiple pairs of headphones.
  • the electronic device may start to monitor the position of the headphones, that is, execute the following step S1102a.
  • the electronic device may stop detecting the orientation of the headset, ie, execute step S1102b.
  • the electronic device continuously monitors whether two pairs of wireless headphones are connected to the electronic device.
  • the electronic device first determines that the electronic device is connected to two pairs of wireless headphones, while monitoring the positions of the two pairs of wireless headphones, if the electronic device detects that any one of the two pairs of headphones is disconnected from the electronic device, the electronic device stops monitoring the positions of the two pairs of headphones.
  • the electronic device may continuously monitor whether two pairs of wireless headphones are connected, that is, continuously execute step S1101.
  • the electronic device monitors the position of the earphone.
  • the electronic device can start to monitor the position of the headphones. How the electronic device detects the position of the headphones can refer to the description in Figures 6 and 7 above, which will not be repeated here.
  • the electronic device can determine in real time the positions of the two connected wireless earphones and the relative positions of the two wireless earphones.
  • the electronic device stops monitoring the position of the earphone.
  • the electronic device When the electronic device has started to monitor the position of the earphones and the electronic device changes from being connected to two pairs of earphones to not being connected to two pairs of earphones, the electronic device can stop monitoring the position of the earphones.
  • step S1103 The electronic device determines whether two apps that output audio are turned on. If so, step S1104 is executed. If not, step S1103 is continued.
  • the electronic device can detect the window status of the two APPs.
  • APP11 and APP22 can be the video APPs, call APPs in Figures 4A-4D, or the full-screen APP1 and floating APP2 involved in Figure 8.
  • the embodiment of the present application does not limit the specific type and name of APP11 and APP22.
  • the electronic device monitors the APP window status.
  • the electronic device When the electronic device determines to start two APPs that output audio, namely APP11 and APP22, the electronic device can monitor the application of APP11.
  • the status of APP11 and APP22 can be full screen display, floating display or split screen display, etc.
  • the electronic device can monitor the window status of APP11 and APP2 through the application window monitoring service module in the electronic device.
  • the application window monitoring service module please refer to the description of FIG. 12 below, which will not be repeated here.
  • step S1105. The electronic device determines whether the position of the floating APP is the same as the position of one of the two headphones. If so, execute step S1106; if not, continue to execute step S1104.
  • step S1106 is executed; if not, the electronic device can continue to monitor the APP window status, that is, step S1104 is executed.
  • the electronic device sends the audio data of the two audio-output APPs to the corresponding earphones according to the directions.
  • the electronic device can send the audio data of the two audio output APPs to the corresponding headphones according to the window states of the two audio output APPs and the positions of the application windows of the two audio output APPs on the display screen. For details, please refer to the description in step S906, which will not be repeated here.
  • the electronic device can send the audio data of the two audio output APPs to the headphones with the same orientation based on the status and orientation of the application windows of the two audio output APPs.
  • the user wearing the headphones 200 and the user wearing the headphones 300 can choose to keep the headphones in the same orientation as the application window of one of the two audio output APPs based on user needs, so as to listen to the audio data of the audio APP they want to listen to.
  • the user wearing the headphones 200 can also listen to the audio data of different audio APPs with the user wearing the headphones 300.
  • the electronic device can start monitoring the position of the earphones when two pairs of earphones are connected. In this way, the electronic device can timely send the audio data of the two audio output APPs to the earphones with the same position.
  • FIG. 12 is a schematic diagram of the structure of an electronic device 1200 provided in an embodiment of the present application.
  • the electronic device 1200 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations.
  • the various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
  • the electronic device 1200 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194 and a subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 1200.
  • the electronic device 1200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • controller a memory
  • video codec a digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • Different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 1200.
  • the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple groups of I2C buses.
  • the processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 1200.
  • the I2S interface can be used for audio communication.
  • the processor 110 can include multiple I2S buses.
  • the processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170.
  • the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 1200.
  • the processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 1200.
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc.
  • the GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
  • the SIM interface can be used to communicate with the SIM card interface 195 to implement the function of transmitting data to the SIM card or reading data in the SIM card.
  • the USB interface 130 is an interface that complies with USB standard specifications, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 1200, and can also be used to transmit data between the electronic device 1200 and a peripheral device. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 1200.
  • the electronic device 1200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the wireless communication function of the electronic device 1200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 1200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
  • antenna 1 can be reused as a diversity antenna for a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 1200.
  • the mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), Etc.
  • LNA low noise amplifier
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, and filter, amplify and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
  • at least some functional modules of the mobile communication module 150 can be set in the processor 110.
  • at least some functional modules of the mobile communication module 150 can be set in the same device as at least some modules of the processor 110.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied to the electronic device 1200.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared
  • the wireless communication module 160 can be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
  • the antenna 1 of the electronic device 1200 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 1200 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation system
  • the electronic device 1200 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
  • the electronic device 1200 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device 1200 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
  • ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it onto the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor.
  • CMOS complementary metal oxide semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • the DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
  • the electronic device 1200 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals. For example, When the electronic device 1200 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital videos.
  • the electronic device 1200 may support one or more video codecs.
  • the electronic device 1200 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG Moving Picture Experts Group
  • MPEG2 MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural network (NN) computing processor, which can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain.
  • NPU can realize applications such as intelligent cognition of electronic device 1200, such as image recognition, face recognition, voice recognition, text understanding, etc.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 1200.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
  • the internal memory 121 can be used to store computer executable program codes, which include instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 1200 by running the instructions stored in the internal memory 121.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the program storage area may store an operating system, applications required for at least one function (such as face recognition function, fingerprint recognition function, mobile payment function, etc.), etc.
  • the data storage area may store data created during the use of the electronic device 1200 (such as face information template data, fingerprint information template, etc.), etc.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • UFS universal flash storage
  • the electronic device 1200 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
  • the speaker 170A also called a "speaker" is used to convert an audio electrical signal into a sound signal.
  • the electronic device 1200 can listen to music or listen to a hands-free call through the speaker 170A.
  • the receiver 170B also called a "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be received by placing the receiver 170B close to the human ear.
  • Microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C.
  • the electronic device 1200 can be provided with at least one microphone 170C. In other embodiments, the electronic device 1200 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 1200 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
  • the earphone interface 170D is used to connect a wired earphone.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals.
  • the gyro sensor 180B may be used to determine the motion posture of the electronic device 1200 .
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 1200 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor, and the electronic device 1200 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 1200 in all directions (generally three axes). When the electronic device 1200 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 1200 can measure the distance by infrared or laser.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 1200 emits infrared light outward through the light emitting diode.
  • the electronic device 1200 uses the photodiode to detect infrared reflected light from nearby objects.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the electronic device 1200 can adaptively adjust the brightness of the display screen 194 according to the sensed brightness of the ambient light.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the temperature sensor 180J is used to detect the temperature.
  • the touch sensor 180K is also called a "touch panel”.
  • the touch sensor 180K can be set on the display screen 194.
  • the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the key 190 includes a power key, a volume key, etc.
  • the key 190 may be a mechanical key or a touch key.
  • the electronic device 1200 may receive key input and generate key signal input related to user settings and function control of the electronic device 1200.
  • Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the electronic device 1200 interacts with the network through the SIM card to implement functions such as calls and data communications.
  • the electronic device 1200 shown in FIG. 12 may be the tablet 100 or the electronic device involved in the above embodiments.
  • FIG. 13 is a block diagram of the software and hardware structure of an electronic device 1300 according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, each with a clear role and division of labor.
  • the layers communicate with each other through software interfaces.
  • the system of the electronic device 1300 is divided into an application layer, a framework layer, and a hardware abstraction layer.
  • the electronic device 1300 also includes a hardware layer.
  • the electronic device 1300 can implement the audio transmission method shown in Figures 8 to 11 by combining the software architecture layer and the hardware layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as APP1, APP2, APP3, ..., APPn, etc.
  • APP1 and APP2 may be applications that can output audio, such as music, video, call, etc.
  • APP3, ..., APPn may be applications (also referred to as applications) such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the framework layer may include a media service module, an application window monitoring service module, a Bluetooth service module, and the like.
  • the media service module may include an audio flinger module for executing an audio policy.
  • the audio mixer in the audio flinger module may be used to mix the audio stream 1 and the audio stream 2 respectively input by APP1 and APP2 of the application layer according to the mixing logic specified by the application window monitoring service module, and send the mixed audio to the Bluetooth hardware abstraction layer module in the hardware abstraction layer (HAL).
  • HAL hardware abstraction layer
  • the application window monitoring service module can be used to monitor the position and status of the application window, that is, to monitor whether the application window is on the left, right or middle of the display screen, and to monitor whether the application window is a full-screen window, a floating window, or a split-screen window.
  • the application window monitoring service module can also be used to formulate mixing logic based on the application window position and state, and send the mixing logic to the audio mixer.
  • the audio mixer can choose whether to mix based on the mixing logic, and allocate the application's audio stream to the system pulse code modulation (PCM) audio stream channel 2 or the system PCM audio stream channel 1 based on the mixing logic.
  • PCM pulse code modulation
  • the audio mixer may allocate the audio stream of the application based on the mixing logic, including the following situations:
  • the mixing logic can be: the audio mixer does not need to perform mixing, and allocates the audio stream of APP1 to system PCM audio stream channel 1 and system PCM audio stream channel 2.
  • the application window monitoring service module detects that the electronic device has two APPs with audio output, such as APP1 and APP2, and the application window of APP1 is a full-screen window and the application window of APP2 is a floating window, the following mixing logics may exist:
  • the audio mixer does not need to perform mixing, and the audio stream of the floating window and the audio stream of the full-screen window are assigned to different system PCM audio stream channels. Specifically, if the floating window is on the left side of the display screen, the audio mixer assigns the audio stream of the floating window to system PCM audio stream channel 2; and assigns the audio stream of the full-screen window to another system PCM audio stream channel, namely, system PCM audio stream channel 1.
  • the audio mixer assigns the audio stream of the floating window on the right side of the display screen to system PCM audio stream channel 1; and assigns the audio stream of the full-screen window to another system audio PCM stream channel, namely, system PCM audio stream channel 2.
  • the audio mixer needs to mix the audio and send the mixed audio stream to one system PCM audio stream channel, and the unmixed audio stream of the full-screen window to another system PCM audio stream channel. Specifically, if the floating window is on the left side of the display screen, the audio mixer mixes the audio stream of the floating window and the audio stream of the full-screen window and assigns them to system PCM audio stream channel 2; and assigns the audio stream of the full-screen window to another system PCM audio stream channel, namely, system PCM audio stream channel 1.
  • the audio mixer mixes the audio stream of the floating window on the right side of the display screen and the audio stream of the full-screen window and assigns them to system PCM audio stream channel 1; and assigns the audio stream of the full-screen window to another system PCM audio stream channel, namely, system PCM audio stream channel 2.
  • the audio mixer needs to mix the audio and send the mixed audio stream to two system PCM audio stream channels. Specifically, when the floating window is in the middle of the display screen, the audio mixer mixes the audio stream of the floating window and the audio stream of the full-screen window and distributes them to system PCM audio stream channel 2 and system PCM audio stream channel 1.
  • the mixing logic can be: the audio mixer can choose not to mix, and based on the orientation of the application window, the audio stream of the application window on the left is assigned to the system PCM audio stream channel 2, and the audio stream of the application window on the right is assigned to the system PCM audio stream channel 1.
  • the application window monitoring service module can also be used to detect that two apps that output audio are opened in the electronic device 1300, and notify the earphone positioning service module in the Bluetooth service module to obtain the earphone position.
  • the Bluetooth service module may include a headset positioning service module.
  • the headset positioning service module may be used to start acquiring the headset position based on the instruction sent by the application window monitoring service module, or may be used to start acquiring the headset position when two pairs of wireless headsets are detected to be connected.
  • the headset positioning service module may also be used to send the acquired headset position information to the headset data stream allocation unit in the Bluetooth hardware abstraction layer module.
  • the hardware abstraction layer HAL may include a Bluetooth hardware abstraction layer module.
  • the headphone data stream distribution unit in the Bluetooth hardware abstraction layer module may receive audio data sent by the audio mixer through the system PCM audio stream channel 2 and the system PCM audio stream channel 1, as well as the headphone position information sent by the headphone positioning service module.
  • the headphone data stream distribution unit may distribute the audio data sent by the system PCM audio stream channel 2 and the system PCM audio stream channel 1 to the headphone based on the headphone position information.
  • the headphone data stream distribution unit may distribute the audio stream of the application in the system PCM audio stream channel 2 to the headphone located on the left, and distribute the audio stream of the application in the system PCM audio stream channel 1 to the headphone located on the right.
  • the audio stream of the application in the system PCM audio stream channel 2 may be the audio data of the APP located on the left side of the display screen of the electronic device 1300.
  • the headset data stream distribution unit can send the audio stream allocated to the headset 200 (for example, the audio stream in the system PCM audio stream path 2) to the Bluetooth chip in the hardware layer, and the Bluetooth chip sends the audio stream to the headset 200.
  • the headset data stream distribution unit can send the audio stream allocated to the headset 300 (for example, the audio stream in the system PCM audio stream path 1) to the Bluetooth chip in the hardware layer, and the Bluetooth chip sends the audio stream to the headset 300.
  • each module in the electronic device 1300 specifically distributes the audio streams of APP1 and APP2 to headphones 200 and headphones 300.
  • the mixing logic formulated by the application window monitoring service can be: if the floating window is on the left side of the display screen, the audio mixer does not need to mix. Then the audio mixer assigns the audio stream of the floating window to the system audio stream channel 2; and assigns the audio stream of the full-screen window to another audio stream channel, namely the system PCM audio stream channel 1.
  • the application window monitoring service can send the mixing logic and the monitored window display mode and position of APP1 and APP2 to the audio mixer. Based on the mixing logic and the window display mode and position of APP1 and APP2, the audio mixer determines that there is no need to mix the audio stream of APP1 and the audio stream of APP2. The audio mixer assigns the audio stream of APP2 to the system audio stream channel 2; and assigns the audio stream of APP1 to another audio stream channel, namely the system PCM audio stream channel 1.
  • the headset data stream distribution unit When the headset data stream distribution unit receives the headset orientation information that the headset 200 is on the left and the headset 300 is on the right, the headset data stream distribution unit distributes the audio stream of APP2 in the system audio stream channel 2 to the headset 200, and distributes the audio stream of APP1 in the system PCM audio stream channel 1 to the headset 300. In this way, the user of the headset 200 can listen to the audio data of APP2, and the user of the headset 300 can listen to the audio data of APP1.
  • the electronic device 1300 shown in FIG. 13 may be the tablet 100 or the electronic device involved in the above embodiments.
  • the embodiment of the present application also provides corresponding devices or equipment.
  • the embodiment of the present application can divide the functional modules of the electronic device and the wireless headset (such as headset 200, headset 300) according to the above method example.
  • each functional module can be divided according to each function, or two or more functions can be integrated into one processing module.
  • the above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
  • the electronic device described in the embodiment of the present application can be implemented with a general bus body structure.
  • FIG. 14 is a schematic diagram of the structure of a device 1400 provided in an embodiment of the present application.
  • the device 1400 may be the device 1400 of FIG. 1 to FIG. 6. And the tablet 100, or the electronic device involved in Figures 8-11, or the device therein.
  • the device 1400 may include an antenna array module 1401, a switch 1402, a short-range chip 1403, a processor 1404, and an audio decoder 1405.
  • the antenna array module 1401 can be used to receive a Bluetooth signal sent by a wireless headset, or send a Bluetooth signal to a wireless headset.
  • the switch 1402 can be used to switch multiple antennas in the antenna array module 1401.
  • the short-range chip 1403 can be used to perform angle detection and distance estimation based on the Bluetooth signal obtained by the antenna array module 1401.
  • the processor 1404 can be used to distribute the audio data of the two audio APPs to the corresponding wireless headsets based on the orientation of the application windows of the two audio output APPs in the display screen and the orientation of the wireless headset connected to the device 1400.
  • the audio decoder 1405 can be used to decode the audio output by the APP in the device 1400, and to package the audio data of each APP into a sequence according to different scenarios, or to package the audio data of each APP into multiple sequences.
  • the apparatus 1400 may be used to perform the functions of the tablet 100 or the electronic device in the aforementioned embodiments.
  • the earphone 200 or earphone 300 described in the embodiment of the present application can be implemented with a general bus body structure.
  • FIG. 15 is a schematic diagram of the structure of a device 1500 provided in an embodiment of the present application.
  • the device 1500 may be the earphone 200 or earphone 300 involved in the aforementioned embodiments, or a device in the earphone 200 or earphone 300.
  • the device 1500 may include a Bluetooth micro-control processing unit MCU chip 1501, a microphone 1502, an earpiece 1503, and a Bluetooth antenna 1504.
  • the Bluetooth micro-control processing unit MCU chip 1501 can be used to process the received audio signal, for example, digital-to-analog conversion, amplification, etc.
  • the microphone 1502 can be used to collect sound signals and convert the sound signals into electrical signals.
  • the earpiece 1503 can be used to play sound signals.
  • the Bluetooth antenna 1504 can be used to send and receive Bluetooth signals.
  • the apparatus 1500 may be used to perform the functions of the earphone 200 or the earphone 300 in the aforementioned embodiments.
  • the electronic device described in the embodiment of the present application can be implemented in the form of a software function module.
  • FIG. 16 is a schematic diagram of the structure of an apparatus 1600 provided in an embodiment of the present application.
  • the apparatus 1600 may be the tablet 100 involved in FIGS. 1 to 6 , or the electronic device involved in FIGS. 8 to 11 , or an apparatus therein.
  • the apparatus 1600 may include a communication module 1601, a display module 1602, and an audio distribution module 1603. Among them:
  • the communication module 1601 may be configured to establish a communication connection with a first audio device and a second audio device.
  • the display module 1602 is used to display a first window and a second window on the display screen in the device 1600, wherein the first window may be an application window of a first application, the first window plays first audio data, and the second window is an application window of a second application, the second window plays second audio data.
  • the first window and the second window may be any one of the video play window 101, the audio play window 102 or the call window 103 in the above-mentioned embodiment, respectively.
  • the audio distribution module 1603 can be used to send the first audio data to the first audio device and the second audio data to the second audio device according to the status of the first window and the second window on the display screen in the device 1600 and the orientation of the first audio device and the second audio device.
  • the apparatus 1600 may further include a device sensing module, which may be used to detect an angle between the first audio device and the apparatus 1600 (which may be referred to as the azimuth of the first audio device) and/or a distance between the first audio device and the apparatus 1600.
  • the device sensing module may also be used to detect an angle between the second audio device and the apparatus 1600 (which may be referred to as the azimuth of the second audio device) and/or a distance between the second audio device and the apparatus 1600.
  • the device 1600 may further include an application position monitoring module, which may be used to detect the display mode of the first window and the position of the first window on the display screen, and to detect the display mode of the second window and the position of the second window on the display screen.
  • an application position monitoring module which may be used to detect the display mode of the first window and the position of the first window on the display screen, and to detect the display mode of the second window and the position of the second window on the display screen.
  • device 1600 may also include an audio processing module, which can be used to determine whether to package the first audio data of the first window and the second audio data of the second window into one audio sequence, or package them into multiple audio sequences and send them to the first audio device and the second audio device at corresponding locations according to the display mode of the first window and the second window and the position of the first window and the second window on the display screen.
  • an audio processing module which can be used to determine whether to package the first audio data of the first window and the second audio data of the second window into one audio sequence, or package them into multiple audio sequences and send them to the first audio device and the second audio device at corresponding locations according to the display mode of the first window and the second window and the position of the first window and the second window on the display screen.
  • the apparatus 1600 may be used to perform the functions of the tablet 100 or the electronic device in the aforementioned embodiments.
  • the term "when" may be interpreted to mean “if" or “after" or “in response to determining" or “in response to detecting", depending on the context.
  • the phrase “when determining" or “if detecting (the stated condition or event)” may also be interpreted to mean “if" or “after" or “in response to determining" or “in response to detecting", depending on the context. “If it is determined that...” or “in response to determining that...” or “upon detection of (stated condition or event)” or “in response to detecting (stated condition or event)”.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
  • the computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration.
  • the available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
  • the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed, it can include the processes of the above-mentioned method embodiments.
  • the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Abstract

An audio transmission method and system, and a related apparatus. In the method, when audios of two applications are simultaneously played in an electronic device, the electronic device needs to choose to send, according to the states and orientations of windows of the two applications and the orientations of earphones, audio data of one of the two applications to an earphone 200 having the same orientation as the window of the application, and to send the audio data of the other application to an earphone 300 having the same orientation as the window of the application. By means of implementing the technical solution provided in the present application, a user wearing different earphones can listen to audio data of different applications in an electronic device.

Description

一种音频传输方法、系统以及相关装置AUDIO TRANSMISSION METHOD, SYSTEM AND RELATED DEVICE
本申请要求于2022年09月30日提交中国专利局、申请号为202211207452.8、申请名称为“一种音频传输方法、系统以及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the China Patent Office on September 30, 2022, with application number 202211207452.8 and application name “A method, system and related device for audio transmission”, the entire contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及终端及音频传输技术领域,尤其涉及一种音频传输方法、系统以及相关装置。The present application relates to the technical field of terminals and audio transmission, and in particular to an audio transmission method, system and related devices.
背景技术Background technique
当前,用户可以通过音频设备(例如,蓝牙耳机)收听手机、平板、电脑等电子设备中的播放的音频。随着电子设备的发展,部分电子设备已经可以支持连接多副无线耳机。这样,可以多个用户通过多副无线耳机同时收听同一个电子设备中播放的音频。但是,多个用户只能收听同一个电子设备中播放的相同的音频。多个用户无法通过多副无线耳机收听同一个电子设备中不同的音频。Currently, users can listen to audio played in electronic devices such as mobile phones, tablets, and computers through audio devices (for example, Bluetooth headsets). With the development of electronic devices, some electronic devices can already support the connection of multiple pairs of wireless headsets. In this way, multiple users can listen to the audio played in the same electronic device at the same time through multiple pairs of wireless headsets. However, multiple users can only listen to the same audio played in the same electronic device. Multiple users cannot listen to different audio in the same electronic device through multiple pairs of wireless headsets.
由此,多个用户如何通过多副无线耳机收听同一个电子设备中不同的音频是亟待解决的问题。Therefore, how multiple users can listen to different audios from the same electronic device through multiple pairs of wireless headphones is an urgent problem to be solved.
发明内容Summary of the invention
本申请提供了一种音频传输方法、系统以及相关装置,通过该音频传输方法,多个用户可以通过多副无线耳机收听同一个电子设备中不同的音频。The present application provides an audio transmission method, system and related devices, through which multiple users can listen to different audios in the same electronic device through multiple pairs of wireless headphones.
第一方面,本申请提供了一种音频传输方法,该方法可以包括:电子设备与第一音频设备和第二音频设备建立连接;电子设备在显示屏中显示第一窗口和第二窗口,其中,第一窗口为第一应用的应用窗口,第一窗口播放第一音频数据,第二窗口为第二应用的应用窗口,第二窗口播放第二音频数据;电子设备根据第一窗口、第二窗口在显示屏上的状态,以及第一音频设备的方位和第二音频设备的方位,将第一音频数据发送给第一音频设备,将第二音频数据发送给第二音频设备。In a first aspect, the present application provides an audio transmission method, which may include: an electronic device establishing a connection with a first audio device and a second audio device; the electronic device displays a first window and a second window on a display screen, wherein the first window is an application window of a first application, and the first window plays first audio data, and the second window is an application window of a second application, and the second window plays second audio data; the electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the status of the first window and the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device.
在一些可行的示例中,第一音频设备和第二音频设备可以是无线耳机。In some possible examples, the first audio device and the second audio device may be wireless headphones.
在一些可行的示例中,第一音频设备的方位以及第二音频设备的方位可以是具体的方位(例如,方位角),也可以是相对方位。In some feasible examples, the orientation of the first audio device and the orientation of the second audio device may be specific orientations (eg, azimuth angles) or relative orientations.
在一些可行的示例中,第一应用和第二应用是能够播放音频的应用。例如,第一应用可以是音频播放应用、视频播放应用、通话应用、即时通讯应用、浏览器应用中的任一种。第二应用也可以是音频播放应用、视频播放应用、通话应用、即时通讯应用、浏览器应用中的任一种。In some feasible examples, the first application and the second application are applications that can play audio. For example, the first application can be any one of an audio playback application, a video playback application, a call application, an instant messaging application, and a browser application. The second application can also be any one of an audio playback application, a video playback application, a call application, an instant messaging application, and a browser application.
在一些可行的示例中,电子设备可以是平板、手机、电脑、笔记本等具有显示屏,且能够播放音频的设备。In some feasible examples, the electronic device may be a tablet, a mobile phone, a computer, a notebook, or the like, which has a display screen and can play audio.
这样,第一音频设备的用户和第二音频设备的用户可以收听到不同的音频数据。In this way, the user of the first audio device and the user of the second audio device can listen to different audio data.
结合第一方面,在一种可能的实现方式中,第一窗口在显示屏上的状态包括第一窗口的显示方式和/或第一窗口在显示屏上的位置;第二窗口在显示屏上的状态包括第二窗口的显示方式和/或第二窗口在显示屏上的位置;其中,显示方式包括全屏显示、悬浮显示、分屏显示。In combination with the first aspect, in a possible implementation method, the state of the first window on the display screen includes the display mode of the first window and/or the position of the first window on the display screen; the state of the second window on the display screen includes the display mode of the second window and/or the position of the second window on the display screen; wherein the display mode includes full-screen display, floating display, and split-screen display.
在一些可行的示例中,悬浮显示和分屏显示也可以称为小窗显示。In some feasible examples, floating display and split-screen display may also be referred to as small window display.
结合第一方面,在一种可能的实现方式中,第一窗口的显示方式为全屏显示,第二窗口的显示方式为悬浮显示,电子设备根据第一窗口、第二窗口在显示屏上的状态,以及第一音频设备的方位和第二音频设备的方位,将第一音频数据发送给第一音频设备,将第二音频数据发送给第二音频设备,具体包括:电子设备根据第二窗口在显示屏上的位置,以及第一音频设备和第二音频设备的方位,将第二音频数据发送给第二音频设备,其中,第二窗口在显示屏上的位置与第二音频设备相对于第一音频设备的位置相匹配,第二音频设备相对于第一音频设备的位置由第一音频设备的方位和第二音频设备的方位确定。In combination with the first aspect, in a possible implementation method, the display mode of the first window is full-screen display, and the display mode of the second window is floating display. The electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the status of the first window and the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device. Specifically, the electronic device sends the second audio data to the second audio device according to the position of the second window on the display screen and the orientations of the first audio device and the second audio device, wherein the position of the second window on the display screen matches the position of the second audio device relative to the first audio device, and the position of the second audio device relative to the first audio device is determined by the orientation of the first audio device and the orientation of the second audio device.
这样,第二音频设备的用户可以收听到与第二音频设备的相对方位相匹配的应用窗口播放的音频数据。当第二音频设备的相对方位和应用窗口在显示屏上的位置相匹配时,能够便于第二音频设备的用户观看以及收听该应用窗口播放的内容。In this way, the user of the second audio device can listen to the audio data played by the application window that matches the relative position of the second audio device. When the relative position of the second audio device matches the position of the application window on the display screen, it is convenient for the user of the second audio device to watch and listen to the content played by the application window.
结合第一方面,在一种可能的实现方式中,第一窗口、第二窗口的显示方式为分屏显示,或第一窗口、第二窗口的显示方式为悬浮显示,电子设备根据第一窗口、第二窗口在显示屏上的状态,以及第一音频设备的方位和第二音频设备的方位,将第一音频数据发送给第一音频设备,将第二音频数据发送给第二音频设备,具体包括:电子设备根据第一窗口在显示屏上的位置,第二窗口在显示屏的位置,以及第一音频设备的方位和第二音频设备的方位,将第一音频数据发送给第一音频设备,将第二音频数据发送给第二音频设备,其中,第一窗口在显示屏上的位置与第一音频设备相对于第二音频设备的位置相匹配,第二窗口在 显示屏上的位置与第二音频设备相对于第一音频设备的位置相匹配,第一音频设备相对于第二音频设备的位置、第二音频设备相对于第一音频设备的位置由第一音频设备的方位和第二音频设备的方位确定。In combination with the first aspect, in a possible implementation method, the display mode of the first window and the second window is split-screen display, or the display mode of the first window and the second window is suspended display, and the electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the status of the first window and the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device. Specifically, the electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the position of the first window on the display screen, the position of the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device, wherein the position of the first window on the display screen matches the position of the first audio device relative to the second audio device, and the second window is The position on the display screen matches the position of the second audio device relative to the first audio device, and the position of the first audio device relative to the second audio device and the position of the second audio device relative to the first audio device are determined by the orientation of the first audio device and the orientation of the second audio device.
这样,第一音频设备的用户和第二音频设备的用户可以收听到与第二音频设备的相对方位相匹配的应用窗口播放的音频数据。当第一音频设备的相对方位和第一窗口在显示屏上的位置相匹配时,能够便于第一音频设备的用户观看以及收听该第一窗口播放的内容。当第二音频设备的相对方位和第二窗口在显示屏上的位置相匹配时,能够便于第二音频设备的用户观看以及收听该第二窗口播放的内容。In this way, the user of the first audio device and the user of the second audio device can listen to the audio data played by the application window that matches the relative position of the second audio device. When the relative position of the first audio device matches the position of the first window on the display screen, it is convenient for the user of the first audio device to watch and listen to the content played by the first window. When the relative position of the second audio device matches the position of the second window on the display screen, it is convenient for the user of the second audio device to watch and listen to the content played by the second window.
结合第一方面,在一种可能的实现方式中,第二窗口在显示屏上的位置与第二音频设备相对于第一音频设备的位置相匹配,包括:第二窗口在显示屏的左侧,第二音频设备相对于第一音频设备的位置为第二音频设备位于第一音频设备的左侧;或,第二窗口在显示屏的右侧,第二音频设备相对于第一音频设备的位置为第二音频设备位于第一音频设备的右侧。In combination with the first aspect, in a possible implementation, the position of the second window on the display screen matches the position of the second audio device relative to the first audio device, including: the second window is on the left side of the display screen, and the position of the second audio device relative to the first audio device is that the second audio device is located on the left side of the first audio device; or, the second window is on the right side of the display screen, and the position of the second audio device relative to the first audio device is that the second audio device is located on the right side of the first audio device.
结合第一方面,在一种可能的实现方式中,第一窗口在显示屏上的位置与第一音频设备相对于第二音频设备的位置相匹配,包括:第一窗口在显示屏的左侧,第一音频设备相对于第二音频设备的位置为第一音频设备位于第二音频设备的左侧;或,第一窗口在显示屏的右侧,第一音频设备相对于第二音频设备的位置为第一音频设备位于第二音频设备的右侧。In combination with the first aspect, in a possible implementation, the position of the first window on the display screen matches the position of the first audio device relative to the second audio device, including: the first window is on the left side of the display screen, and the position of the first audio device relative to the second audio device is that the first audio device is located on the left side of the second audio device; or, the first window is on the right side of the display screen, and the position of the first audio device relative to the second audio device is that the first audio device is located on the right side of the second audio device.
结合第一方面,在一种可能的实现方式中,电子设备根据第二窗口在显示屏上的位置,以及第一音频设备的方位和第二音频设备的方位,将第二窗口的音频数据发送给第二音频设备,具体包括:在第二窗口在所述显示屏中间区域的情况下,电子设备将第二音频数据同时发送给第一音频设备和第二音频设备。In combination with the first aspect, in a possible implementation method, the electronic device sends the audio data of the second window to the second audio device based on the position of the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device, specifically including: when the second window is in the middle area of the display screen, the electronic device sends the second audio data to the first audio device and the second audio device at the same time.
结合第一方面,在一种可能的实现方式中,该方法还可以包括:在第二窗口在显示屏中间区域的情况下,电子设备停止将第一音频数据发送给第一音频设备;或,电子设备将第一音频数据同时发送给第一音频设备和第二音频设备。In combination with the first aspect, in a possible implementation, the method may also include: when the second window is in the middle area of the display screen, the electronic device stops sending the first audio data to the first audio device; or, the electronic device sends the first audio data to the first audio device and the second audio device at the same time.
结合第一方面,在一种可能的实现方式中,第二窗口在所述显示屏的左侧,第二音频设备相对于第一音频设备的位置为第二音频设备位于第一音频设备的左侧,电子设备根据第二窗口在显示屏上的位置,以及第一音频设备和第二音频设备的方位,将第二窗口的音频数据发送给第二音频设备之后,该方法还可以包括:基于第一用户操作,电子设备将第二窗口从显示屏的左侧移动至显示屏的右侧;电子设备将第一音频数据发送给第二音频设备,并停止将第二音频数据发送给第二音频设备;电子设备将第二音频数据发送给第一音频设备,并停止将第一音频数据发送给第一音频设备。In combination with the first aspect, in a possible implementation, the second window is on the left side of the display screen, and the position of the second audio device relative to the first audio device is that the second audio device is located on the left side of the first audio device. After the electronic device sends the audio data of the second window to the second audio device according to the position of the second window on the display screen and the orientations of the first audio device and the second audio device, the method may also include: based on the first user operation, the electronic device moves the second window from the left side of the display screen to the right side of the display screen; the electronic device sends the first audio data to the second audio device and stops sending the second audio data to the second audio device; the electronic device sends the second audio data to the first audio device and stops sending the first audio data to the first audio device.
结合第一方面,在一种可能的实现方式中,第二窗口在显示屏的右侧,第二音频设备相对于第一音频设备的位置为第二音频设备位于第一音频设备的右侧,电子设备将第一音频数据发送给第二音频设备,并停止将第二音频数据发送给第二音频设备;电子设备将第二音频数据发送给第一音频设备,并停止将第二音频数据发送给所述第二音频设备之后,该方法还可以包括:In combination with the first aspect, in a possible implementation manner, the second window is on the right side of the display screen, the position of the second audio device relative to the first audio device is that the second audio device is located on the right side of the first audio device, the electronic device sends the first audio data to the second audio device, and stops sending the second audio data to the second audio device; after the electronic device sends the second audio data to the first audio device and stops sending the second audio data to the second audio device, the method may further include:
基于第二用户操作,电子设备将第二窗口从显示屏的左侧移动至所述显示屏的右侧;电子设备将第二音频数据发送给第二音频设备,并停止将第一音频数据发送给第二音频设备;电子设备将第一音频数据发送给第一音频设备,并停止将第二音频数据发送给第一音频设备。Based on the second user operation, the electronic device moves the second window from the left side of the display screen to the right side of the display screen; the electronic device sends the second audio data to the second audio device and stops sending the first audio data to the second audio device; the electronic device sends the first audio data to the first audio device and stops sending the second audio data to the first audio device.
这样,当第一音频设备的用户和第二音频设备的用户想要交换收听的内容时,用户只需要移动第一窗口和第二窗口在显示屏中的位置即可。这样,用户操作简单,可以提升用户体验。In this way, when the user of the first audio device and the user of the second audio device want to exchange the content they are listening to, the user only needs to move the positions of the first window and the second window on the display screen. In this way, the user operation is simple and the user experience can be improved.
可选地,在一种可能的实现方式中,当电子设备检测到第一音频设备相对于第二音频设备的位置发生变换,第一窗口、第二窗口在显示屏上的位置未改变时,第一音频设备和第二音频设备接收到的音频数据发生改变。Optionally, in a possible implementation, when the electronic device detects that the position of the first audio device relative to the second audio device changes and the positions of the first window and the second window on the display screen do not change, the audio data received by the first audio device and the second audio device changes.
进一步地,在一种可能的实现方式中,在第一窗口位于显示屏的左侧,第二窗口位于显示屏的右侧,第一音频设备相对于第二音频设备的位置从第一音频设备位于第二音频设备的左侧变换为第一音频设备位于第二音频设备的右侧的情况下,电子设备将第二音频数据发送给第一音频设备,并停止将第一音频数据发送给第一音频设备;电子设备将第一音频数据发送给第二音频设备,并停止将第二音频设备发送给第一音频设备。Furthermore, in a possible implementation, when the first window is located on the left side of the display screen and the second window is located on the right side of the display screen, and the position of the first audio device relative to the second audio device changes from the first audio device being located on the left side of the second audio device to the first audio device being located on the right side of the second audio device, the electronic device sends the second audio data to the first audio device and stops sending the first audio data to the first audio device; the electronic device sends the first audio data to the second audio device and stops sending the second audio device to the first audio device.
结合第一方面,在一种可能的实现方式中,第一音频设备的方位由电子设备基于接收到的第一音频设备发送的蓝牙信号计算得到;第二音频设备的方位由电子设备基于接收到的第二音频设备发送的蓝牙信号计算得到。In combination with the first aspect, in a possible implementation, the position of the first audio device is calculated by the electronic device based on a received Bluetooth signal sent by the first audio device; the position of the second audio device is calculated by the electronic device based on a received Bluetooth signal sent by the second audio device.
第二方面,提供一种音频传输系统,该音频传输系统可以包括电子设备、第一音频设备和第二音频设备,电子设备分别与第一音频设备和第二音频设备建立通信连接,电子设备、第一音频设备和第二音频设备用于执行上述第一方面中任一种可能的实现方式中的音频传输方法。 In a second aspect, an audio transmission system is provided. The audio transmission system may include an electronic device, a first audio device, and a second audio device. The electronic device establishes a communication connection with the first audio device and the second audio device, respectively. The electronic device, the first audio device, and the second audio device are used to execute the audio transmission method in any possible implementation of the first aspect above.
第三方面,提供一种电子设备,包括存储器和处理器、显示屏,存储器、显示屏和处理器电偶合,显示屏用于显示电子设备中用于播放音频数据的应用的应用窗口,存储器用于存储程序指令,处理器被配置用于调用存储器存储的全部或部分程序指令,以使得电子设备执行上述第一方面中任一种可能的实现方式中的音频传输方法。In a third aspect, an electronic device is provided, comprising a memory, a processor, and a display screen, wherein the memory, the display screen, and the processor are electrically coupled, the display screen is used to display an application window of an application for playing audio data in the electronic device, the memory is used to store program instructions, and the processor is configured to call all or part of the program instructions stored in the memory so that the electronic device executes the audio transmission method in any possible implementation of the first aspect above.
第四方面,提供一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面中任一种可能的实现方式中的音频传输方法。In a fourth aspect, a computer storage medium is provided, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the audio transmission method in any possible implementation of the first aspect.
第五方面,提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述任一方面任一项可能的实现方式中的音频传输方法。In a fifth aspect, a computer program product is provided. When the computer program product is run on an electronic device, the electronic device executes the audio transmission method in any possible implementation of any of the above aspects.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例提供一种音频传输系统示意图;FIG1 is a schematic diagram of an audio transmission system provided by an embodiment of the present application;
图2是本申请实施例提供的音频传输场景示意图;FIG2 is a schematic diagram of an audio transmission scenario provided in an embodiment of the present application;
图3A-图3B是本申请实施例提供的又一组音频传输场景示意图;3A-3B are schematic diagrams of another set of audio transmission scenarios provided in an embodiment of the present application;
图4A-图4D是本申请实施例提供的又一组音频传输场景示意图;4A-4D are schematic diagrams of another set of audio transmission scenarios provided in an embodiment of the present application;
图5是本申请实施例提供的平板100的中间区域示意图;FIG5 is a schematic diagram of the middle area of the tablet 100 provided in an embodiment of the present application;
图6是本申请实施例提供的平板100确定耳机200和耳机300的方位的示意图;FIG6 is a schematic diagram of the tablet 100 determining the orientation of the earphone 200 and the earphone 300 provided in an embodiment of the present application;
图7是本申请实施例提供的通过相位差模型确定耳机200的方位角的示意图;FIG7 is a schematic diagram of determining the azimuth angle of the earphone 200 by using a phase difference model provided in an embodiment of the present application;
图8是本申请实施例提供的一种音频传输方法的流程示意图;FIG8 is a flow chart of an audio transmission method provided in an embodiment of the present application;
图9是本申请实施例提供的一种音频传输方法的流程示意图;FIG9 is a schematic diagram of a flow chart of an audio transmission method provided in an embodiment of the present application;
图10是本申请实施例提供的一种音频传输方法的流程示意图;FIG10 is a schematic flow chart of an audio transmission method provided in an embodiment of the present application;
图11是本申请实施例提供的一种音频传输方法的流程示意图;FIG11 is a schematic flow chart of an audio transmission method provided in an embodiment of the present application;
图12是本申请实施例提供的一种电子设备的硬件结构示意图;FIG12 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
图13是本申请实施例提供的一种电子设备的框架示意图;FIG13 is a schematic diagram of a framework of an electronic device provided in an embodiment of the present application;
图14是本申请实施例提供的一种装置1400示意图;FIG14 is a schematic diagram of a device 1400 provided in an embodiment of the present application;
图15是本申请实施例提供的一种装置1500示意图;FIG15 is a schematic diagram of a device 1500 provided in an embodiment of the present application;
图16是本申请实施例提供的一种装置1600示意图。FIG. 16 is a schematic diagram of a device 1600 provided in an embodiment of the present application.
具体实施方式Detailed ways
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and/or" used in the present application refers to and includes any or all possible combinations of one or more listed items.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
当前,一个电子设备可以支持连接2副耳机,该电子设备可以同时向2副耳机传输音频数据。电子设备中也可以同时显示多个应用程序的窗口。但是,电子设备只能向2副耳机传输同样的音频数据,即多个应用程序的窗口中的一个应用程序的窗口输出的音频数据。在一些场景下,2副耳机的佩戴者希望在电子设备同时观看不同的应用程序的窗口,收听不同的音频。这样,现有技术无法满足用户的需求。Currently, an electronic device can support connecting two pairs of headphones, and the electronic device can transmit audio data to the two pairs of headphones at the same time. Multiple application windows can also be displayed simultaneously in the electronic device. However, the electronic device can only transmit the same audio data to the two pairs of headphones, that is, the audio data output by the window of one application among the multiple application windows. In some scenarios, the wearers of the two pairs of headphones want to watch the windows of different applications and listen to different audios on the electronic device at the same time. In this way, the existing technology cannot meet the needs of users.
为了使得多个用户通过多副无线耳机收听同一个电子设备中不同的音频,首先,本申请实施例提供一种音频传输系统10。该音频传输系统10中可以包括一个电子设备、以及多个(2个或以上)音频设备。该电子设备可以显示有两个可以播放音频的窗口。例如,窗口1可以播放音频数据1、窗口2可以播放音频数据2。该电子设备可以将窗口1播放的音频数据1传输给一个音频设备,将窗口2播放的音频数据传输给其他的音频设备。音频设备可以用于播放音频数据。示例性地,音频设备可以是无线耳机、音响等等。电子设备可以是平板、手机、电脑等等设备。本申请实施例电子设备以及音频设备具体是何种设备不作限定。下文以电子设备为平板100,音频设备为耳机200和耳机300为例进行说明。In order to enable multiple users to listen to different audios in the same electronic device through multiple pairs of wireless headphones, first, an embodiment of the present application provides an audio transmission system 10. The audio transmission system 10 may include an electronic device and multiple (2 or more) audio devices. The electronic device may display two windows that can play audio. For example, window 1 can play audio data 1, and window 2 can play audio data 2. The electronic device can transmit audio data 1 played by window 1 to an audio device, and transmit the audio data played by window 2 to other audio devices. The audio device can be used to play audio data. Exemplarily, the audio device can be a wireless headset, a speaker, etc. The electronic device can be a tablet, a mobile phone, a computer, etc. The specific type of electronic device and audio device in the embodiment of the present application is not limited. The following is an example in which the electronic device is a tablet 100 and the audio device is headphones 200 and headphones 300.
示例性地,本申请实施例提供的音频传输系统10可以如图1所示。该音频传输系统10中的电子设备可以是图1中示出的平板100。该音频传输系统10中包含的多副无线耳机可以包括图1中示出的耳机200和耳机300。其中: Exemplarily, the audio transmission system 10 provided in the embodiment of the present application may be as shown in FIG1 . The electronic device in the audio transmission system 10 may be the tablet 100 shown in FIG1 . The multiple pairs of wireless headphones included in the audio transmission system 10 may include the headphones 200 and the headphones 300 shown in FIG1 . Among them:
平板100的用户界面1000中可以显示视频播放窗口101和音频播放窗口102。A video play window 101 and an audio play window 102 may be displayed in the user interface 1000 of the tablet 100 .
耳机200与平板100建立有通信连接,耳机300与平板100建立有通信连接。在一些可行的示例中,耳机200与平板100可以通过蓝牙建立通信连接。耳机300与平板100可以通过蓝牙建立通信连接。本申请实施例对耳机200与平板100建立通信连接的方式、以及耳机300与平板100建立通信连接的方式不作限定。The headset 200 establishes a communication connection with the tablet 100, and the headset 300 establishes a communication connection with the tablet 100. In some feasible examples, the headset 200 and the tablet 100 can establish a communication connection via Bluetooth. The headset 300 and the tablet 100 can establish a communication connection via Bluetooth. The embodiment of the application does not limit the manner in which the headset 200 and the tablet 100 establish a communication connection, and the manner in which the headset 300 and the tablet 100 establish a communication connection.
平板100中该可以显示有两个可以播放音频的应用程序的窗口,如图1中示出的视频播放窗口101和音频播放窗口102。视频播放窗口101为平板100中视频播放APP的窗口。音频播放窗口102为平板100中音频播放APP的窗口。视频播放窗口101和音频播放窗口102可以悬浮在用户界面1000中。视频播放窗口101靠近平板100的显示屏的右侧,音频播放窗口102靠近平板100的显示屏的左侧。在一些实施例中,图1中示出的视频播放窗口101和音频播放窗口102可以称为悬浮窗口。可以理解的是,本申请实施例对平板100中显示的视频播放窗口101和音频播放窗口102在平板100中的状态不作限定。The tablet 100 may display two windows of application programs that can play audio, such as the video playback window 101 and the audio playback window 102 shown in FIG. 1. The video playback window 101 is a window of the video playback APP in the tablet 100. The audio playback window 102 is a window of the audio playback APP in the tablet 100. The video playback window 101 and the audio playback window 102 may be suspended in the user interface 1000. The video playback window 101 is close to the right side of the display screen of the tablet 100, and the audio playback window 102 is close to the left side of the display screen of the tablet 100. In some embodiments, the video playback window 101 and the audio playback window 102 shown in FIG. 1 may be referred to as floating windows. It is understood that the embodiment of the present application does not limit the state of the video playback window 101 and the audio playback window 102 displayed in the tablet 100 in the tablet 100.
视频播放窗口101和音频播放窗口102在平板100中的状态可以包括视频播放窗口101和音频播放窗口102在平板100中的显示方式(例如,悬浮显示、全屏显示、分屏显示等等)和/或视频播放窗口101和音频播放窗口102在平板100的显示屏上的位置(或方位)。The status of the video playback window 101 and the audio playback window 102 in the tablet 100 may include the display mode of the video playback window 101 and the audio playback window 102 in the tablet 100 (for example, floating display, full screen display, split screen display, etc.) and/or the position (or orientation) of the video playback window 101 and the audio playback window 102 on the display screen of the tablet 100.
如图1所示,耳机200处于耳机300的左侧。平板100可以将音频播放窗口102正在播放音频的音频数据1发送给耳机200。平板100可以将视频播放窗口101正在播放的视频的音频数据2发送给耳机300。As shown in Fig. 1, the earphone 200 is on the left side of the earphone 300. The tablet 100 can send the audio data 1 of the audio being played in the audio playing window 102 to the earphone 200. The tablet 100 can send the audio data 2 of the video being played in the video playing window 101 to the earphone 300.
可以理解的是,本申请实施例对音频播放窗口102当前播放音频的音频数据均称为音频数据1。该音频数据1并不限于音频播放窗口102在特定时间段内播放的特定音频的音频数据。在本申请实施例中描述的音频播放窗口102在第一时间段播放音频的音频数据1、和音频播放窗口102在第二时间段播放音频的音频数据1中音频内容可以不相同。It is understandable that in the embodiment of the present application, the audio data of the audio currently played by the audio playback window 102 is referred to as audio data 1. The audio data 1 is not limited to the audio data of the specific audio played by the audio playback window 102 in a specific time period. The audio content of the audio data 1 played by the audio playback window 102 in the first time period and the audio data 1 played by the audio playback window 102 in the second time period described in the embodiment of the present application may be different.
同样地,本申请实施例对视频播放窗口101当前播放音频的音频数据均称为音频数据2。该音频数据2并不限于视频播放窗口101在特定时间段内播放的特定视频的音频数据。在本申请实施例中描述的视频播放窗口101在第一时间段播放音频的音频数据2、和视频播放窗口101在第二时间段播放音频的音频数据2中音频内容可以不相同。Similarly, in the embodiment of the present application, the audio data of the audio currently played by the video playback window 101 is referred to as audio data 2. The audio data 2 is not limited to the audio data of a specific video played by the video playback window 101 in a specific time period. The audio content of the audio data 2 played by the video playback window 101 in the first time period and the audio data 2 played by the video playback window 101 in the second time period described in the embodiment of the present application may be different.
图1中示出的音频传输系统10中的平板100可以两个应用程序的窗口播放的音频数据分别发送给两副耳机。这样,佩戴耳机200的用户和佩戴耳机300的用户可以收听到平板100中不同的应用程序的窗口播放的音频。The tablet 100 in the audio transmission system 10 shown in FIG1 can send the audio data played in the windows of two application programs to two pairs of headphones respectively. In this way, the user wearing the headphones 200 and the user wearing the headphones 300 can listen to the audio played in the windows of different application programs in the tablet 100.
在一些可行的示例中,平板100可以基于耳机200和耳机300的相对方位,确定将音频播放窗口102正在播放音频的音频数据1发送给耳机200、以及将视频播放窗口101正在播放的视频的音频数据2发送给耳机300。In some feasible examples, tablet 100 can determine to send audio data 1 of the audio being played in audio playback window 102 to earphone 200 and to send audio data 2 of the video being played in video playback window 101 to earphone 300 based on the relative positions of earphone 200 and earphone 300 .
当耳机200和耳机300的相对方位变换后,平板100可以基于耳机200和耳机300当前的相对方位来决定如何分发音频播放窗口102正在播放音频的音频数据1、视频播放窗口101正在播放的视频的音频数据2给耳机200、和耳机300。When the relative positions of earphones 200 and 300 change, tablet 100 can decide how to distribute audio data 1 of the audio being played in audio playback window 102 and audio data 2 of the video being played in video playback window 101 to earphones 200 and 300 based on the current relative positions of earphones 200 and 300.
示例性地,如图2所示,相比于图1,耳机200和耳机300的相对方向变化了,耳机200从处于耳机300的左侧变到了处于耳机300的右侧。平板100可以将音频播放窗口102正在播放音频的音频数据1发送给耳机300。平板100可以将视频播放窗口101正在播放的视频的音频数据2发送给耳机200。For example, as shown in FIG2 , compared with FIG1 , the relative directions of the earphone 200 and the earphone 300 are changed, and the earphone 200 is changed from being on the left side of the earphone 300 to being on the right side of the earphone 300. The tablet 100 can send the audio data 1 of the audio being played in the audio playing window 102 to the earphone 300. The tablet 100 can send the audio data 2 of the video being played in the video playing window 101 to the earphone 200.
这样,当佩戴耳机200的用户想要收听视频播放APP播放的音频数据时,佩戴耳机200的用户可以和佩戴耳机300的用户互换位置。这样佩戴耳机200的用户可以收听到视频播放APP的音频数据,佩戴耳机300的用户可以收听到音频播放APP播放的音频数据。In this way, when the user wearing earphone 200 wants to listen to the audio data played by the video playback APP, the user wearing earphone 200 can exchange positions with the user wearing earphone 300. In this way, the user wearing earphone 200 can listen to the audio data of the video playback APP, and the user wearing earphone 300 can listen to the audio data played by the audio playback APP.
可以理解的是,在本申请实施例中,平板100可以基于耳机200和耳机300的相对位置、以及音频播放窗口102、视频播放窗口101在平板100的显示屏中的位置以及状态,确定将音频播放窗口102正在播放音频的音频数据1发送给耳机300、将视频播放窗口101正在播放的视频的音频数据2发送给耳机200,或将音频播放窗口102正在播放音频的音频数据1发送给耳机200,将视频播放窗口101正在播放的视频的音频数据2发送给耳机300。It can be understood that in the embodiment of the present application, the tablet 100 can determine to send audio data 1 of the audio being played in the audio playback window 102 to the earphone 300, and to send audio data 2 of the video being played in the video playback window 101 to the earphone 200, or to send audio data 1 of the audio being played in the audio playback window 102 to the earphone 200, and to send audio data 2 of the video being played in the video playback window 101 to the earphone 300 based on the relative positions of the earphone 200 and the earphone 300, and the positions and states of the audio playback window 102 and the video playback window 101 in the display screen of the tablet 100.
在本申请实施例,当一个窗口(窗口的中心线或者中点)离平板100的左边框的距离更近时,可以称该窗口处于平板100的显示屏的左侧。当一个窗口离平板100的右边框的距离更近时,可以称该窗口处于平板100的显示屏的右侧。在窗口1和窗口2都离平板100的左边框更近的情况下,若窗口1离平板100的左边框的距离小于窗口2离平板100的左边框的距离,那么可以称窗口1位于平板100的显示屏的左侧,窗口2位于平板100的显示屏的右侧。 In the embodiment of the present application, when a window (the center line or midpoint of the window) is closer to the left frame of the tablet 100, the window can be said to be on the left side of the display screen of the tablet 100. When a window is closer to the right frame of the tablet 100, the window can be said to be on the right side of the display screen of the tablet 100. In the case where both window 1 and window 2 are closer to the left frame of the tablet 100, if the distance between window 1 and the left frame of the tablet 100 is less than the distance between window 2 and the left frame of the tablet 100, then window 1 can be said to be on the left side of the display screen of the tablet 100, and window 2 can be said to be on the right side of the display screen of the tablet 100.
在一些可行的示例中,当平板100中音频播放窗口102和视频播放窗口101在显示屏中的位置变换了,平板100可以基于音频播放窗口102和视频播放窗口101变换后的位置、以及耳机200和耳机300的相对位置,确定将音频播放窗口102正在播放音频的音频数据1发送给耳机300、将视频播放窗口101正在播放的视频的音频数据2发送给耳机200,或将音频播放窗口102正在播放音频的音频数据1发送给耳机200,将视频播放窗口101正在播放的视频的音频数据2发送给耳机300。In some feasible examples, when the positions of the audio playback window 102 and the video playback window 101 in the tablet 100 on the display screen change, the tablet 100 can determine to send audio data 1 of the audio being played in the audio playback window 102 to the earphone 300, send audio data 2 of the video being played in the video playback window 101 to the earphone 200, or send audio data 1 of the audio being played in the audio playback window 102 to the earphone 200, and send audio data 2 of the video being played in the video playback window 101 to the earphone 300 based on the changed positions of the audio playback window 102 and the video playback window 101, and the relative positions of the earphone 200 and the earphone 300.
示例性地,如图3A所示,相比于图1,平板100中的视频播放窗口101和音频播放窗口102在显示屏中的位置变换了。具体地,平板100中的视频播放窗口101的位置从平板显示屏的右侧变换到了左侧。平板100中的音频播放窗口102的位置从平板显示屏的左侧变换到了右侧。耳机200和耳机300的相对方向不变。耳机200仍然处于耳机300的左侧。平板100基于视频播放窗口101和音频播放窗口102的位置,以及耳机200和耳机300的相对方向,将视频播放窗口101正在播放的视频的音频数据2发送给耳机200,以及将音频播放窗口102正在播放音频的音频数据1发送给耳机300。Exemplarily, as shown in FIG3A , compared with FIG1 , the positions of the video play window 101 and the audio play window 102 in the tablet 100 in the display screen are changed. Specifically, the position of the video play window 101 in the tablet 100 is changed from the right side to the left side of the tablet display screen. The position of the audio play window 102 in the tablet 100 is changed from the left side to the right side of the tablet display screen. The relative direction of the earphone 200 and the earphone 300 remains unchanged. The earphone 200 is still on the left side of the earphone 300. Based on the positions of the video play window 101 and the audio play window 102, and the relative direction of the earphone 200 and the earphone 300, the tablet 100 sends the audio data 2 of the video being played in the video play window 101 to the earphone 200, and sends the audio data 1 of the audio being played in the audio play window 102 to the earphone 300.
这样,当佩戴耳机200的用户想要收听到视频播放APP的音频数据,佩戴耳机300的用户想要收听到音频播放APP的音频数据时,只需要变换视频播放窗口101以及音频播放窗口102在平板100的显示屏中的方位,佩戴耳机200的用户就可以从收听音频播放APP的音频数据变为可以收听视频播放APP的音频数据;佩戴耳机300的用户就可以从收听视频播放APP的音频数据变为收听音频播放APP的音频数据了。In this way, when the user wearing headphones 200 wants to listen to the audio data of the video playback APP, and the user wearing headphones 300 wants to listen to the audio data of the audio playback APP, they only need to change the positions of the video playback window 101 and the audio playback window 102 in the display screen of the tablet 100, and the user wearing headphones 200 can change from listening to the audio data of the audio playback APP to listening to the audio data of the video playback APP; the user wearing headphones 300 can change from listening to the audio data of the video playback APP to listening to the audio data of the audio playback APP.
在一些可行的示例中,当平板中的两个应用程序的窗口分屏显示时,平板100可以基于两个应用程序的窗口的位置,以及耳机200和耳机300的相对方向,确定将音频播放窗口102正在播放音频的音频数据1发送给耳机300、将视频播放窗口101正在播放的视频的音频数据2发送给耳机200,或将音频播放窗口102正在播放音频的音频数据1发送给耳机200,将视频播放窗口101正在播放的视频的音频数据2发送给耳机300。In some feasible examples, when the windows of two applications in the tablet are displayed in split screen, the tablet 100 can determine, based on the positions of the windows of the two applications and the relative directions of the headphones 200 and the headphones 300, to send audio data 1 of the audio being played by the audio playback window 102 to the headphones 300, and to send audio data 2 of the video being played by the video playback window 101 to the headphones 200, or to send audio data 1 of the audio being played by the audio playback window 102 to the headphones 200, and to send audio data 2 of the video being played by the video playback window 101 to the headphones 300.
示例性地,如图3B所示,平板100中可以显示有两个分屏窗口,视频播放窗口101和音频播放窗口102。视频播放窗口101和音频播放窗口102可以将平板100的显示屏分成两个区域,区域1和区域2。视频播放窗口101可以显示在区域1中,音频播放窗口102可以显示在区域2中。区域1为四边形ABDE形成的区域,区域2为四边形BECF形成的区域。视频播放窗口101位于平板100的显示屏的左侧,音频播放窗口102位于平板100的显示屏的右侧。耳机200位于耳机300的左侧。平板100可以基于两个分屏窗口的位置,以及耳机200和耳机300的相对方向,确定将视频播放窗口101正在播放的视频的音频数据2发送给耳机200,将音频播放窗口102正在播放音频的音频数据1发送给耳机300。Exemplarily, as shown in FIG3B , two split-screen windows may be displayed in the tablet 100, namely, a video playback window 101 and an audio playback window 102. The video playback window 101 and the audio playback window 102 may divide the display screen of the tablet 100 into two areas, area 1 and area 2. The video playback window 101 may be displayed in area 1, and the audio playback window 102 may be displayed in area 2. Area 1 is an area formed by quadrilaterals ABDE, and area 2 is an area formed by quadrilaterals BECF. The video playback window 101 is located on the left side of the display screen of the tablet 100, and the audio playback window 102 is located on the right side of the display screen of the tablet 100. The earphone 200 is located on the left side of the earphone 300. The tablet 100 may determine to send the audio data 2 of the video being played in the video playback window 101 to the earphone 200, and to send the audio data 1 of the audio being played in the audio playback window 102 to the earphone 300, based on the positions of the two split-screen windows and the relative directions of the earphone 200 and the earphone 300.
可以理解的是,当平板100中两个分屏窗口的位置改变时,例如视频播放窗口101位于平板100的显示屏的右侧,音频播放窗口102位于平板100的显示屏的左侧。耳机200位于耳机300的左侧。平板100可以基于两个分屏窗口的位置,以及耳机200和耳机300的相对方向,确定将视频播放窗口101正在播放的视频的音频数据2发送给耳机300,将音频播放窗口102正在播放音频的音频数据1发送给耳机200。It is understandable that when the positions of the two split-screen windows in the tablet 100 are changed, for example, the video play window 101 is located on the right side of the display screen of the tablet 100, and the audio play window 102 is located on the left side of the display screen of the tablet 100. The earphone 200 is located on the left side of the earphone 300. The tablet 100 can determine to send the audio data 2 of the video being played in the video play window 101 to the earphone 300 and to send the audio data 1 of the audio being played in the audio play window 102 to the earphone 200 based on the positions of the two split-screen windows and the relative directions of the earphone 200 and the earphone 300.
可以理解的是,平板100中显示的两个分屏窗口也可以不占满平板100的整个显示屏。即两个分屏窗口可以平分平板100中的用户界面,该用户界面可以全屏显示,也可以小窗显示。本申请实施例对此不作限定。It is understandable that the two split-screen windows displayed in the tablet 100 may not occupy the entire display screen of the tablet 100. That is, the two split-screen windows may equally divide the user interface in the tablet 100, and the user interface may be displayed in full screen or in small windows. This embodiment of the present application does not limit this.
在一些可行的示例中,当平板100中显示有一个全屏窗口和一个悬浮窗口时,平板100可以基于悬浮窗口的位置、以及耳机200和耳机300的相对方向,来确定是否将全屏窗口的音频数据发送给耳机200或耳机300,以及是否将悬浮窗口的音频数据发送给耳机200或耳机300。In some feasible examples, when a full-screen window and a floating window are displayed on the tablet 100, the tablet 100 can determine whether to send the audio data of the full-screen window to the earphone 200 or the earphone 300, and whether to send the audio data of the floating window to the earphone 200 or the earphone 300 based on the position of the floating window and the relative directions of the earphone 200 and the earphone 300.
这样,佩戴耳机200的用户和佩戴耳机300的用户可以根据自己需求,选择收听视频播放APP的音频数据或音频播放APP的音频数据。In this way, the user wearing the earphone 200 and the user wearing the earphone 300 can choose to listen to the audio data of the video playback APP or the audio data of the audio playback APP according to their own needs.
在一种可能的实现方式中,平板100中显示有一个全屏窗口和一个悬浮窗口,悬浮窗口位于平板100的显示屏的右侧,耳机200位于耳机300的左侧。悬浮窗口在平板100显示屏中的方位于耳机300的相对方位(耳机300相对于耳机200的方位)一致。平板100可以基于悬浮窗口的位置,以及耳机200和耳机300的相对方向,将悬浮窗口正在播放的音频数据发送给耳机300,将全屏窗口正在播放的音频数据发送给耳机200。In a possible implementation, a full-screen window and a floating window are displayed on the tablet 100, the floating window is located on the right side of the display screen of the tablet 100, and the earphone 200 is located on the left side of the earphone 300. The position of the floating window on the display screen of the tablet 100 is consistent with the relative position of the earphone 300 (the position of the earphone 300 relative to the earphone 200). Based on the position of the floating window and the relative direction of the earphone 200 and the earphone 300, the tablet 100 can send the audio data being played in the floating window to the earphone 300, and send the audio data being played in the full-screen window to the earphone 200.
示例性地,如图4A所示,平板100中可以显示有全屏的视频播放窗口101、以及悬浮窗口,即通话窗口103。通话窗口103可以位于平板100显示屏的右侧。视频播放窗口101可以是平板100中视频APP的应用窗口。通话窗口103可以是平板100中通话APP的应用窗口。耳机200位于耳机300的左侧。平板100可以将视频播放窗口101正在播放的视频的音频数据2发送给耳机200,将通话窗口103中正在通话的音频数据3发送给耳机300。 Exemplarily, as shown in FIG4A , a full-screen video playback window 101 and a floating window, namely, a call window 103, may be displayed in the tablet 100. The call window 103 may be located on the right side of the display screen of the tablet 100. The video playback window 101 may be an application window of a video APP in the tablet 100. The call window 103 may be an application window of a call APP in the tablet 100. The earphone 200 is located on the left side of the earphone 300. The tablet 100 may send the audio data 2 of the video being played in the video playback window 101 to the earphone 200, and send the audio data 3 of the call being played in the call window 103 to the earphone 300.
这样,佩戴耳机300的用户在接听电话时,不影响佩戴耳机200的用户继续收听视频播放APP的音频数据。In this way, when the user wearing earphone 300 answers a call, it does not affect the user wearing earphone 200 to continue listening to the audio data of the video playback APP.
在一种可能的实现方式中,平板100中显示有一个全屏窗口和一个悬浮窗口,悬浮窗口位于平板100的显示屏的左侧,耳机200位于耳机300的左侧。悬浮窗口在平板100显示屏中的方位于耳机200的相对方位(耳机200相对于耳机300的方位)一致。平板100可以基于悬浮窗口的位置,以及耳机200和耳机300的相对方向,将悬浮窗口正在播放的音频数据发送给耳机200,将全屏窗口正在播放的音频数据发送给耳机300。In a possible implementation, a full-screen window and a floating window are displayed on the tablet 100, the floating window is located on the left side of the display screen of the tablet 100, and the earphone 200 is located on the left side of the earphone 300. The position of the floating window on the display screen of the tablet 100 is consistent with the relative position of the earphone 200 (the position of the earphone 200 relative to the earphone 300). Based on the position of the floating window and the relative direction of the earphone 200 and the earphone 300, the tablet 100 can send the audio data being played in the floating window to the earphone 200, and send the audio data being played in the full-screen window to the earphone 300.
示例性地,如图4B所示,平板100中可以显示有全屏的视频播放窗口101、以及悬浮窗口,即通话窗口103。通话窗口103可以位于平板100显示屏的左侧。视频播放窗口101可以是平板100中视频APP的应用窗口。通话窗口103可以是平板100中通话APP的应用窗口。耳机200位于耳机300的左侧。平板100可以将视频播放窗口101正在播放的视频的音频数据2发送给耳机300,将通话窗口103中正在通话的音频数据3发送给耳机200。Exemplarily, as shown in FIG. 4B , a full-screen video playback window 101 and a floating window, i.e., a call window 103, may be displayed in the tablet 100. The call window 103 may be located on the left side of the display screen of the tablet 100. The video playback window 101 may be an application window of a video APP in the tablet 100. The call window 103 may be an application window of a call APP in the tablet 100. The earphone 200 is located on the left side of the earphone 300. The tablet 100 may send the audio data 2 of the video being played in the video playback window 101 to the earphone 300, and send the audio data 3 of the call being made in the call window 103 to the earphone 200.
这样,当佩戴耳机200的用户需要进行通话时,只需要将该通话APP的应用窗口移动至与耳机200的方位相同。这样,佩戴耳机200的用户可以进行通话聊天,而佩戴耳机300的用户可以继续收听视频播放APP的音频数据。In this way, when the user wearing the headset 200 needs to make a call, he only needs to move the application window of the call APP to the same position as the headset 200. In this way, the user wearing the headset 200 can make a call and chat, while the user wearing the headset 300 can continue to listen to the audio data of the video playback APP.
在一种可能的实现方式中,平板100中显示有一个全屏窗口和一个悬浮窗口,悬浮窗口位于平板100的显示屏的中间区域。耳机200位于耳机300的左侧。平板100可以基于悬浮窗口的位置,只将悬浮窗口正在播放的音频数据发送给耳机200和耳机300。In a possible implementation, a full-screen window and a floating window are displayed on the tablet 100, and the floating window is located in the middle area of the display screen of the tablet 100. The earphone 200 is located on the left side of the earphone 300. The tablet 100 can send only the audio data being played in the floating window to the earphone 200 and the earphone 300 based on the position of the floating window.
示例性地,如图4C所示,平板100中可以显示有全屏的视频播放窗口101、以及悬浮窗口,即通话窗口103。通话窗口103可以位于平板100显示屏的中间。耳机200位于耳机300的左侧。平板100可以只将通话窗口103中正在通话的音频数据3发送给耳机200和耳机300。For example, as shown in FIG4C , the tablet 100 may display a full-screen video playback window 101 and a floating window, namely, a call window 103. The call window 103 may be located in the middle of the display screen of the tablet 100. The earphone 200 is located on the left side of the earphone 300. The tablet 100 may only send the audio data 3 of the call in the call window 103 to the earphone 200 and the earphone 300.
这样,佩戴耳机200的用户和佩戴耳机300的用户都想收听到通话APP中正在通话的通话内容时,只需要将通话窗口103移动至平板100显示屏的中间。In this way, when the user wearing the headset 200 and the user wearing the headset 300 both want to listen to the content of the ongoing call in the call APP, they only need to move the call window 103 to the middle of the display screen of the tablet 100.
可选地,正在另一种可能的实现方式中,平板100中显示有一个全屏窗口和一个悬浮窗口,悬浮窗口位于平板100的显示屏的中间区域。平板100可以基于悬浮窗口的位置,将悬浮窗口正在播放的音频数据和全屏窗口正在播放的音频数据发送给耳机200和耳机300。Optionally, in another possible implementation, a full-screen window and a floating window are displayed in the tablet 100, and the floating window is located in the middle area of the display screen of the tablet 100. The tablet 100 can send the audio data being played in the floating window and the audio data being played in the full-screen window to the earphones 200 and 300 based on the position of the floating window.
示例性地,如图4D所示,平板100中可以显示有全屏的视频播放窗口101、以及悬浮窗口,即通话窗口103。通话窗口103可以位于平板100显示屏的中间。耳机200位于耳机300的左侧。平板100可以将全屏窗口正在播放的音频数据2和通话窗口103中正在通话的音频数据3发送给耳机200和耳机300。For example, as shown in FIG4D , the tablet 100 may display a full-screen video playback window 101 and a floating window, namely, a call window 103. The call window 103 may be located in the middle of the display screen of the tablet 100. The earphone 200 is located on the left side of the earphone 300. The tablet 100 may send the audio data 2 being played in the full-screen window and the audio data 3 of the call being made in the call window 103 to the earphone 200 and the earphone 300.
这样,只需要将通话窗口103移动至平板100显示屏的中间,佩戴耳机200的用户和佩戴耳机300的用户既能收听到通话APP的通话内容,也可以收听视频播放APP播放的音频数据。In this way, it is only necessary to move the call window 103 to the middle of the display screen of the tablet 100, and the user wearing the earphones 200 and the user wearing the earphones 300 can listen to the call content of the call APP and the audio data played by the video playback APP.
示例性地,如图4C和图4D所示,通话窗口103的中轴线可以与平板100显示屏的中轴线重合。Exemplarily, as shown in FIG. 4C and FIG. 4D , the central axis of the call window 103 may coincide with the central axis of the display screen of the tablet 100 .
可以理解的是,在本申请实施例中,悬浮窗口位于平板100的中间区域并不限定于悬浮窗帘的中轴线与平板100显示屏的中轴线重合。悬浮窗口可以位于平板100的预设的中间区域内,该预设的中间区域大小和位置可以由用户设置,也可以由平板100默认配置。本申请实施例对平板100显示屏的预设的中间区域的大小和位置不作限定。It is understood that, in the embodiment of the present application, the floating window being located in the middle area of the tablet 100 is not limited to the central axis of the floating curtain coinciding with the central axis of the display screen of the tablet 100. The floating window can be located in a preset middle area of the tablet 100, and the size and position of the preset middle area can be set by the user or configured by default by the tablet 100. The embodiment of the present application does not limit the size and position of the preset middle area of the display screen of the tablet 100.
示例性地,如图5所示,平板100预设的中间区域可以是图5中示出的区域501。该区域501的大小和位置可以由用户设置,也可以由平板100默认配置。本申请实施例对该区域501的大小和位置不作限定。For example, as shown in Fig. 5, the preset middle area of the tablet 100 may be the area 501 shown in Fig. 5. The size and position of the area 501 may be set by the user or configured by default by the tablet 100. The embodiment of the present application does not limit the size and position of the area 501.
可选地,在一种可能的实现方式中,平板100中可以显示有两个或多个播放音频数据的窗口。平板100可以将用户选定的播放音频数据的窗口(手指点击的窗口)或者最近打开的播放音频数据的窗口作为焦点窗口。然后,平板100可以将该焦点窗口的音频数据发送给耳机200和耳机300。或者,平板100可以基于该焦点窗口在平板100中的方位,若焦点窗口位于平板100显示屏的左侧,则将该焦点窗口的音频数据发送给相对方位为左侧的耳机,若焦点窗口位于平板100显示屏的右侧,则将该焦点窗口的音频数据发送给相对方位为右侧的耳机。Optionally, in a possible implementation, two or more windows for playing audio data may be displayed in the tablet 100. The tablet 100 may use the window for playing audio data selected by the user (the window clicked by the finger) or the window for playing audio data that was recently opened as the focus window. Then, the tablet 100 may send the audio data of the focus window to the earphone 200 and the earphone 300. Alternatively, the tablet 100 may send the audio data of the focus window to the earphone with the relative position on the left side if the focus window is located on the left side of the tablet 100 display screen, and send the audio data of the focus window to the earphone with the relative position on the right side if the focus window is located on the right side of the tablet 100 display screen based on the position of the focus window in the tablet 100.
可选地,在一种可能的实现方式中,平板100中可以显示有两个或多个播放音频数据的窗口。平板100可以只将应用优先级最高的应用的窗口的音频数据发送给耳机200和耳机300。应用优先级可以由用户设置或者由平板系统配置,此处不作限定。Optionally, in a possible implementation, two or more windows for playing audio data may be displayed in the tablet 100. The tablet 100 may only send the audio data of the window of the application with the highest application priority to the earphone 200 and the earphone 300. The application priority may be set by the user or configured by the tablet system, which is not limited here.
可选地,在一种可能的实现方式中,平板100中可以显示有两个或多个播放音频数据的窗口。用户可以选择将两个或多个播放音频数据的窗口中的一个窗口的音频数据发送给耳机200,另一个窗口的音频数 据发送给耳机300。例如,当用户在平板100中打开两个或多个播放音频数据的窗口后,可以点击平板100的第一区域。响应于用户操作,平板100可以弹出用于设置窗口的音频数据分发给耳机的选项框。用户可以在该选项框中选择将一个窗口的音频数据发送给耳机200,将另一个窗口的音频数据发送给耳机300。或者,用户也可以在该选项框中选择将多个窗口的音频数据同时发送给耳机200或耳机300。第一区域可以是平板100的侧边栏,此处不作限定。Optionally, in a possible implementation, two or more windows for playing audio data may be displayed on the tablet 100. The user may choose to send the audio data of one of the two or more windows for playing audio data to the headset 200, and the audio data of the other window may be sent to the headset 200. The first area of the tablet 100 may be a sidebar of the tablet 100, which is not limited here.
可选地,在一种可能的实现方式中,平板100中显示有两个播放音频数据的窗口(窗口1和窗口2),窗口1可以位于平板100显示屏的左侧,窗口2可以位于平板100的右侧。基于用户操作,平板100可以再开启并显示一个播放音频数据的窗口3,若窗口3覆盖窗口1,则平板100将窗口3的音频数据发送给位于左侧的耳机,暂停将窗口1的音频数据发送给位于左侧的耳机。若窗口3覆盖窗口2,则平板100将窗口3的音频数据发送给位于右侧的耳机,暂停将窗口2的音频数据发送给位于右侧的耳机。这里,窗口3覆盖窗口1可以指,窗口3显示在窗口1之上,完全遮挡或者部分遮挡住窗口1。Optionally, in a possible implementation, two windows (window 1 and window 2) for playing audio data are displayed in the tablet 100, and window 1 can be located on the left side of the display screen of the tablet 100, and window 2 can be located on the right side of the tablet 100. Based on user operations, the tablet 100 can open and display a window 3 for playing audio data. If window 3 covers window 1, the tablet 100 sends the audio data of window 3 to the earphone on the left, and pauses sending the audio data of window 1 to the earphone on the left. If window 3 covers window 2, the tablet 100 sends the audio data of window 3 to the earphone on the right, and pauses sending the audio data of window 2 to the earphone on the right. Here, window 3 covering window 1 can mean that window 3 is displayed on window 1, completely blocking or partially blocking window 1.
在一些可行的示例中,悬浮窗口或者分屏窗口也可以称为小窗(或者小窗口)。In some feasible examples, a floating window or a split-screen window may also be referred to as a small window (or small window).
在本申请实施例中,耳机200可以称为第一音频设备,耳机300可以称为第二音频设备;或者,耳机200可以称为第二音频设备,耳机300可以称为第一音频设备。In the embodiment of the present application, the earphone 200 may be referred to as a first audio device, and the earphone 300 may be referred to as a second audio device; alternatively, the earphone 200 may be referred to as a second audio device, and the earphone 300 may be referred to as a first audio device.
可以理解的是,在本申请实施例中,平板100可以获取到耳机200和耳机300的方位,并确定耳机200和耳机300的相对方位。具体地,平板100可以通过超宽带(ultra wide band)定位方法、或者蓝牙定位方法等定位方法进行定位,获取到耳机200和耳机300的方位及距离,从而确定耳机200和耳机300的相对方位。本申请实施例对平板100具体使用何种定位方位对耳机200和耳机300进行定位不作限定。It is understandable that in the embodiment of the present application, the tablet 100 can obtain the position of the earphone 200 and the earphone 300, and determine the relative position of the earphone 200 and the earphone 300. Specifically, the tablet 100 can be positioned by an ultra wide band positioning method or a Bluetooth positioning method, and the position and distance of the earphone 200 and the earphone 300 can be obtained, thereby determining the relative position of the earphone 200 and the earphone 300. The embodiment of the present application does not limit the specific positioning position used by the tablet 100 to position the earphone 200 and the earphone 300.
示例性地,下文以平板100通过蓝牙定位方法对耳机200和耳机300进行定位为例进行阐述。Exemplarily, the following description takes the example of the tablet 100 positioning the earphones 200 and 300 by using the Bluetooth positioning method.
在一些可行的示例中,平板100中可以存在天线阵列模块,平板100可以通过该天线阵列模块收发蓝牙信号。该天线阵列模块可以接收到耳机200和耳机300发送的蓝牙信号。该蓝牙信号中可以携带有定位信息,例如到达角度(angel of arrival,AOA)数据包。平板100可以基于天线阵列模块接收到的耳机200发送的蓝牙信号,通过该蓝牙信号中的定位信息对耳机200进行定位。以及平板100基于天线阵列模块接收到的耳机300发送的蓝牙信号,通过该蓝牙信号中的定位信息对耳机300进行定位。In some feasible examples, the tablet 100 may have an antenna array module, and the tablet 100 may receive and send Bluetooth signals through the antenna array module. The antenna array module may receive Bluetooth signals sent by the earphone 200 and the earphone 300. The Bluetooth signal may carry positioning information, such as an angle of arrival (AOA) data packet. The tablet 100 may locate the earphone 200 based on the positioning information in the Bluetooth signal sent by the earphone 200 received by the antenna array module. And the tablet 100 may locate the earphone 300 based on the positioning information in the Bluetooth signal sent by the earphone 300 received by the antenna array module.
图6示例性地示出了平板100确定耳机200和耳机300的方位的示意图。如图6所示,平板100中可以存在天线阵列模块600。该天线阵列模块600中可以存在三个定位天线,该平板100可以通过切换开关选择天线阵列模块600中的两个定位天线对耳机200进行定位,确定耳机200的方位角为α1,该耳机200与天线阵列模块600的距离为d1。该平板100可以通过切换开关选择天线阵列模块600中的两个定位天线对耳机300进行定位,确定耳机300的方位角为α2,该耳机300与天线阵列模块600的距离为d2。FIG6 exemplarily shows a schematic diagram of the tablet 100 determining the orientation of the earphone 200 and the earphone 300. As shown in FIG6 , the tablet 100 may include an antenna array module 600. The antenna array module 600 may include three positioning antennas. The tablet 100 may select two positioning antennas in the antenna array module 600 through a switching switch to position the earphone 200, and determine that the orientation angle of the earphone 200 is α1, and the distance between the earphone 200 and the antenna array module 600 is d1. The tablet 100 may select two positioning antennas in the antenna array module 600 through a switching switch to position the earphone 300, and determine that the orientation angle of the earphone 300 is α2, and the distance between the earphone 300 and the antenna array module 600 is d2.
可以理解的是,该天线阵列模块600示出的定位天线的数量以及排列方式仅为示例,该天线阵列模块600中可以包括2个定位天线或者3个定位天线、或者更多定位天线。本申请实施例对天线阵列模块600中定位天线的数量以及排列方式不作限定。It is understandable that the number and arrangement of the positioning antennas shown in the antenna array module 600 are only examples, and the antenna array module 600 may include 2 positioning antennas or 3 positioning antennas, or more positioning antennas. The embodiment of the present application does not limit the number and arrangement of the positioning antennas in the antenna array module 600.
在一些可行的示例中,平板100可以通过天线阵列模块600中不同的天线单元接收到耳机200的蓝牙信号的相位差,来确定出耳机200的方位角。In some feasible examples, the tablet 100 can determine the azimuth angle of the headset 200 through the phase difference of the Bluetooth signal of the headset 200 received by different antenna units in the antenna array module 600.
示例性地,如图7所示,耳机200可以发射蓝牙信号。天线阵列模块600中的天线1与天线2可以接收到耳机200发射的蓝牙信号。平板100可以基于天线阵列模块600中的天线1与天线2的间距,以及耳机200发射的蓝牙信号的波长、以及天线1与天线2接收耳机200发射蓝牙信号的相位差,确定耳机200发射的蓝牙信号的入射角,即上述耳机200的方位角α1:
Exemplarily, as shown in FIG7 , the earphone 200 can transmit a Bluetooth signal. Antenna 1 and antenna 2 in the antenna array module 600 can receive the Bluetooth signal transmitted by the earphone 200. The tablet 100 can determine the incident angle of the Bluetooth signal transmitted by the earphone 200, that is, the azimuth angle α1 of the earphone 200, based on the distance between antenna 1 and antenna 2 in the antenna array module 600, the wavelength of the Bluetooth signal transmitted by the earphone 200, and the phase difference between antenna 1 and antenna 2 receiving the Bluetooth signal transmitted by the earphone 200:
上述公式1中,为天线阵列模块600中的天线1与天线2接收耳机200发射蓝牙信号的相位差,λ1为耳机200发射的蓝牙信号的波长,d为天线阵列模块600中的天线1与天线2的间距。In the above formula 1, is the phase difference between antenna 1 and antenna 2 in the antenna array module 600 when receiving the Bluetooth signal transmitted by the headset 200, λ1 is the wavelength of the Bluetooth signal transmitted by the headset 200, and d is the distance between antenna 1 and antenna 2 in the antenna array module 600.
在一些可行的示例中,平板100可以通过天线阵列模块600接收到耳机200发射蓝牙信号的时间、以及耳机200发射蓝牙信号的传播速度,确定耳机200与天线阵列模块600的距离为d1。In some feasible examples, the tablet 100 can determine that the distance between the earphone 200 and the antenna array module 600 is d1 by receiving the time when the earphone 200 transmits the Bluetooth signal and the propagation speed of the Bluetooth signal transmitted by the earphone 200 through the antenna array module 600.
在一些可行的示例中,平板100可以通过天线阵列模块600中不同的天线单元接收到耳机300的蓝牙信号的相位差,来确定出耳机300的方位角。In some feasible examples, the tablet 100 can determine the azimuth angle of the headset 300 through the phase difference of the Bluetooth signal of the headset 300 received by different antenna units in the antenna array module 600.
示例性地,参考上述图7,耳机300可以发射蓝牙信号。天线阵列模块600中的天线1与天线2可以接收到耳机300发射的蓝牙信号。平板100可以基于天线阵列模块600中的天线1与天线2的间距,以及耳机300发射的蓝牙信号的波长、以及天线1与天线2接收耳机300发射的蓝牙信号的相位差,确定耳机300发射的蓝牙信号的入射角,即上述耳机300的方位角α2:
Exemplarily, referring to FIG. 7 above, the earphone 300 can transmit a Bluetooth signal. Antenna 1 and antenna 2 in the antenna array module 600 can receive the Bluetooth signal transmitted by the earphone 300. The tablet 100 can determine the incident angle of the Bluetooth signal transmitted by the earphone 300, that is, the azimuth angle α2 of the earphone 300, based on the distance between antenna 1 and antenna 2 in the antenna array module 600, the wavelength of the Bluetooth signal transmitted by the earphone 300, and the phase difference between antenna 1 and antenna 2 receiving the Bluetooth signal transmitted by the earphone 300:
上述公式2中,为天线阵列模块600中的天线1与天线2接收耳机300发射蓝牙信号的相位差,λ2为耳机300发射的蓝牙信号的波长,d为天线阵列模块600中的天线1与天线2的间距。In the above formula 2, is the phase difference between antenna 1 and antenna 2 in the antenna array module 600 when receiving the Bluetooth signal transmitted by the headset 300, λ2 is the wavelength of the Bluetooth signal transmitted by the headset 300, and d is the distance between antenna 1 and antenna 2 in the antenna array module 600.
在一些可行的示例中,平板100可以通过天线阵列模块600接收到耳机300发射蓝牙信号的时间、以及耳机300发射蓝牙信号的传播速度,确定耳机300与天线阵列模块600的距离为d2。In some feasible examples, the tablet 100 can receive the time when the headset 300 transmits the Bluetooth signal and the propagation speed of the Bluetooth signal transmitted by the headset 300 through the antenna array module 600 to determine that the distance between the headset 300 and the antenna array module 600 is d2.
可以理解的是,本申请实施例对平板100具体通过何种方法或算法确定耳机200、耳机300的方位与距离不作限定。It is understandable that the embodiment of the present application does not limit the specific method or algorithm used by the tablet 100 to determine the orientation and distance of the earphones 200 and 300.
在一些可行的示例中,平板100可以通过耳机200的方位角α1和耳机300的方位角α2确定耳机200和耳机300的相对方位。示例性,若α1为-30°,α2为60°,则耳机200位于耳机300的左侧,耳机300位于耳机200的右侧。若α1为90°,α2为60°,则耳机200位于耳机300的右侧,耳机300位于耳机200的左侧。若α1为-90°,α2为-60°,则耳机200位于耳机300的左侧,耳机300位于耳机200的右侧。可以理解的,α1与α2的角度不限于0°到+180°,以及-180°到0°之间,也可以是0°到360°之间,本申请实施例对此不作限定。In some feasible examples, the tablet 100 can determine the relative orientation of the earphone 200 and the earphone 300 by the azimuth angle α1 of the earphone 200 and the azimuth angle α2 of the earphone 300. For example, if α1 is -30° and α2 is 60°, the earphone 200 is located on the left side of the earphone 300, and the earphone 300 is located on the right side of the earphone 200. If α1 is 90° and α2 is 60°, the earphone 200 is located on the right side of the earphone 300, and the earphone 300 is located on the left side of the earphone 200. If α1 is -90° and α2 is -60°, the earphone 200 is located on the left side of the earphone 300, and the earphone 300 is located on the right side of the earphone 200. It can be understood that the angles of α1 and α2 are not limited to 0° to +180° and -180° to 0°, and can also be between 0° and 360°, which is not limited in the embodiments of the present application.
在本申请实施例中,耳机200和耳机300的具体相对方位可以包括:耳机200位于耳机300的左侧、或者耳机200位于耳机300的右侧。或者,耳机200位于耳机300的左侧也可以称为耳机200位于左侧,耳机300位于右侧。耳机200位于耳机300的右侧也可以称为耳机200位于右侧,耳机300位于左侧。In the embodiment of the present application, the specific relative positions of the earphone 200 and the earphone 300 may include: the earphone 200 is located on the left side of the earphone 300, or the earphone 200 is located on the right side of the earphone 300. Alternatively, the earphone 200 being located on the left side of the earphone 300 may also be referred to as the earphone 200 being located on the left side and the earphone 300 being located on the right side. The earphone 200 being located on the right side of the earphone 300 may also be referred to as the earphone 200 being located on the right side and the earphone 300 being located on the left side.
可以理解的是,当在本申请实施例中描述耳机200位于左侧,并不限定耳机200位于平板100显示屏中轴线(参见图4C或图4D中示出的平板100显示屏的中轴线)的左侧。耳机200可以位于平板100显示屏中轴线的任一侧。当在本申请实施例中描述耳机300位于右侧时,不限定耳机300位于平板100显示屏中轴线的右侧。耳机300可以位于平板100显示屏中轴线的任一侧。It is to be understood that when the headset 200 is described as being located on the left side in the embodiment of the present application, it is not limited to the headset 200 being located on the left side of the central axis of the display screen of the tablet 100 (see the central axis of the display screen of the tablet 100 shown in FIG. 4C or FIG. 4D ). The headset 200 can be located on either side of the central axis of the display screen of the tablet 100. When the headset 300 is described as being located on the right side in the embodiment of the present application, it is not limited to the headset 300 being located on the right side of the central axis of the display screen of the tablet 100. The headset 300 can be located on either side of the central axis of the display screen of the tablet 100.
可选地,在另一些可行的示例中,平板100可以通过耳机200的方位角α1和耳机300的方位角α2、以及耳机200与平板100中天线阵列模块600的距离d1、耳机300与平板100中天线阵列模块600的距离d2,确定耳机200和耳机300的相对方位。Optionally, in other feasible examples, the tablet 100 can determine the relative orientation of the earphone 200 and the earphone 300 through the azimuth angle α1 of the earphone 200 and the azimuth angle α2 of the earphone 300, as well as the distance d1 between the earphone 200 and the antenna array module 600 in the tablet 100, and the distance d2 between the earphone 300 and the antenna array module 600 in the tablet 100.
基于上述介绍,本申请实施例接下来以电子设备中显示的两个可以播放音频的窗口分别为全屏窗口和悬浮窗口为例,详细介绍电子设备如何将两个窗口的音频分发给耳机200和耳机300。Based on the above introduction, the embodiment of the present application takes two windows that can play audio displayed in an electronic device as an example, which are a full-screen window and a floating window, respectively, to introduce in detail how the electronic device distributes the audio of the two windows to headphones 200 and headphones 300.
图8示例性地示出了本申请实施例提供的一种音频传输方法流程示意图。如图8所示,本申请实施例提供的一种音频传输方法可以包括如下步骤:FIG8 exemplarily shows a flow chart of an audio transmission method provided in an embodiment of the present application. As shown in FIG8 , an audio transmission method provided in an embodiment of the present application may include the following steps:
S800a、电子设备基于用户操作1,与耳机200建立蓝牙连接。S800a: The electronic device establishes a Bluetooth connection with the headset 200 based on user operation 1.
S800b、电子设备基于用户操作2,与耳机300建立蓝牙连接。S800b: The electronic device establishes a Bluetooth connection with the headset 300 based on user operation 2.
电子设备可以基于用户操作1和用户操作2,分别与耳机200和耳机300建立蓝牙连接。例如,用户可以点击电子设备的中用于开启蓝牙功能的控件,然后,用户可以将耳机200开机并调至处于可连接状态。然后,用户可以在电子设备中选择连接耳机200。最后,电子设备可以与耳机200建立蓝牙连接。同样地,当电子设备的蓝牙功能开启后,用户可以将耳机300开机并调至处于可连接状态,然后,用户可以在电子设备选择连接耳机300。最后,电子设备可以与耳机300建立蓝牙连接。The electronic device can establish a Bluetooth connection with the headset 200 and the headset 300 respectively based on user operation 1 and user operation 2. For example, the user can click on the control for turning on the Bluetooth function in the electronic device, and then the user can turn on the headset 200 and adjust it to a connectable state. Then, the user can choose to connect the headset 200 in the electronic device. Finally, the electronic device can establish a Bluetooth connection with the headset 200. Similarly, when the Bluetooth function of the electronic device is turned on, the user can turn on the headset 300 and adjust it to a connectable state, and then the user can choose to connect the headset 300 in the electronic device. Finally, the electronic device can establish a Bluetooth connection with the headset 300.
示例性地,用户操作1可以包括用户点击电子设备中用于开启蓝牙功能的控件的操作,以及点击用户开启耳机200的蓝牙功能的控件的操作,以及点击使耳机200处于可连接状态的控件的操作,以及在电子设备点击使得电子设备与耳机200建立蓝牙连接的控件的操作等等。可以理解的是,用户操作1可以使得电子设备与耳机200建立蓝牙连接。对于不同的电子设备或者不同用户不同的操作习惯,使电子设备与耳机200建立蓝牙连接的操作可能会不同。本申请实施例对具体的用户操作1不作限定。Exemplarily, user operation 1 may include an operation of a user clicking a control in an electronic device for turning on a Bluetooth function, an operation of a user clicking a control for turning on a Bluetooth function of the headset 200, an operation of clicking a control for placing the headset 200 in a connectable state, and an operation of clicking a control in an electronic device for establishing a Bluetooth connection between the electronic device and the headset 200, etc. It is understandable that user operation 1 may enable the electronic device to establish a Bluetooth connection with the headset 200. For different electronic devices or different operating habits of different users, the operation of establishing a Bluetooth connection between the electronic device and the headset 200 may be different. The embodiment of the present application does not limit the specific user operation 1.
示例性地,用户操作2可以包括用户点击电子设备中用于开启蓝牙功能的控件的操作,以及点击用户开启耳机300的蓝牙功能的控件的操作以及点击使耳机300处于可连接状态的控件的操作,以及在电子设备点击使得电子设备与耳机300建立蓝牙连接的控件的操作等等。可以理解的是,用户操作1可以使得电子设备与耳机300建立蓝牙连接。对于不同的电子设备或者不同用户不同的操作习惯,使电子设备与耳机300建立蓝牙连接的操作可能会不同。本申请实施例对具体的用户操作1不作限定。Exemplarily, user operation 2 may include an operation of a user clicking on a control in an electronic device for turning on a Bluetooth function, an operation of a user clicking on a control for turning on the Bluetooth function of the headset 300, an operation of clicking on a control for making the headset 300 connectable, and an operation of clicking on a control in an electronic device for establishing a Bluetooth connection between the electronic device and the headset 300, etc. It is understandable that user operation 1 may enable the electronic device to establish a Bluetooth connection with the headset 300. For different electronic devices or different operating habits of different users, the operation of establishing a Bluetooth connection between the electronic device and the headset 300 may be different. The embodiment of the present application does not limit the specific user operation 1.
可以理解的是,本申请实施例对电子设备与耳机200建立蓝牙连接、以及电子设备与耳机300建立蓝牙连接的先后顺序不作限定。即本申请实施例对步骤S800a、以及步骤S800b的执行顺序不作限定。电子设备可以先与耳机200建立蓝牙连接、然后再与耳机300建立蓝牙连接。或者电子设备也可以先与耳机300建立蓝牙连接、然后再与耳机200建立蓝牙连接。 It is understandable that the embodiment of the present application does not limit the order in which the electronic device establishes a Bluetooth connection with the headset 200, and the electronic device establishes a Bluetooth connection with the headset 300. That is, the embodiment of the present application does not limit the execution order of step S800a and step S800b. The electronic device may first establish a Bluetooth connection with the headset 200, and then establish a Bluetooth connection with the headset 300. Alternatively, the electronic device may first establish a Bluetooth connection with the headset 300, and then establish a Bluetooth connection with the headset 200.
可以理解的是,电子设备可以能够显示应用窗口、连接无线耳机的设备,例如手机、平板等设备。It is understandable that the electronic device may be able to display the application window and connect to the wireless headset, such as a mobile phone, a tablet and other devices.
S801、基于用户操作3,电子设备开启输出音频数据data1的全屏APP1。S801. Based on user operation 3, the electronic device starts a full-screen APP1 that outputs audio data data1.
电子设备可以基于用户操作3,开启全屏APP1,该全屏APP1可以输出音频数据data1。用户操作3可以是用户在电子设备的显示应用程序图标的主界面中点击全屏APP1的图标。用户操作3还可以是用户向电子设备输入开启全屏APP1的语音指令,或者在电子设备中点击用于开启全屏APP1的快捷键等等,本申请实施例对用户操作3不作限定。全屏APP1可以是能够播放音频的APP,例如,图4A中示出的视频APP。音频数据data1可以是全屏APP1中正在播放音频的音频数据。例如,图4A中示出的视频播放窗口101正在播放的音频数据2。可以理解的是,本申请实施例对全屏APP1具体是何种类型的APP不作限定,对全屏APP1播放的音频数据data1的具体内容也不作限定。The electronic device can open the full-screen APP1 based on the user operation 3, and the full-screen APP1 can output the audio data data1. The user operation 3 can be that the user clicks the icon of the full-screen APP1 in the main interface of the electronic device displaying the application icon. The user operation 3 can also be that the user inputs a voice command to the electronic device to open the full-screen APP1, or clicks the shortcut key for opening the full-screen APP1 in the electronic device, etc. The embodiment of the present application does not limit the user operation 3. The full-screen APP1 can be an APP that can play audio, for example, the video APP shown in Figure 4A. The audio data data1 can be the audio data that is playing audio in the full-screen APP1. For example, the audio data 2 that is being played in the video playback window 101 shown in Figure 4A. It can be understood that the embodiment of the present application does not limit what type of APP the full-screen APP1 is, nor does it limit the specific content of the audio data data1 played by the full-screen APP1.
S802a、电子设备将音频数据data1发送给耳机200。S802a : The electronic device sends the audio data data1 to the headset 200 .
S802b、电子设备将音频数据data1发送给耳机300。S802b : The electronic device sends the audio data data1 to the earphone 300 .
电子设备可以将音频数据data1发送给耳机200和耳机300。可以理解的是,当电子设备只开启可一个播放音频的APP,即全屏APP1时,电子设备可以同时将该APP播放的音频数据发送给与电子设备连接的多个耳机,即耳机200和耳机300。The electronic device can send audio data data1 to earphones 200 and 300. It is understandable that when the electronic device only opens one APP that can play audio, that is, full-screen APP1, the electronic device can simultaneously send the audio data played by the APP to multiple earphones connected to the electronic device, that is, earphones 200 and 300.
S803、基于用户操作4,电子设备开启输出音频数据data2的悬浮APP2,并将悬浮APP2显示在电子设备的显示屏中的第一区域。S803. Based on user operation 4, the electronic device starts the floating APP2 that outputs the audio data data2, and displays the floating APP2 in the first area of the display screen of the electronic device.
电子设备可以基于用户操作4,开启悬浮APP2,该悬浮APP2可以输出音频数据data2。用户操作4可以是用户在电子设备的显示应用程序图标的主界面中点击悬浮APP2的图标,并将该悬浮APP2的应用窗口调至悬浮显示在电子设备的显示屏中的第一区域。用户操作4还可以是用户向电子设备输入开启悬浮APP2的语音指令,并将该悬浮APP2的应用窗口调至悬浮显示在电子设备的显示屏中的第一区域。本申请实施例对用户操作4不作限定。悬浮APP2可以是能够播放音频的APP,例如,如图4A中示出的通话窗口103对应的通话APP。音频数据data2可以是悬浮APP2正在播放的音频数据,例如该音频数据data2可以是图4A中示出的通话窗口103的通话音频数据3。可以理解的是,本申请实施例对悬浮APP2具体是何种类型的APP不作限定,对悬浮APP2播放的音频数据data2的具体内容也不作限定。The electronic device can open the floating APP2 based on the user operation 4, and the floating APP2 can output the audio data data2. The user operation 4 can be that the user clicks the icon of the floating APP2 in the main interface of the electronic device displaying the application icon, and adjusts the application window of the floating APP2 to the first area of the display screen of the electronic device for floating display. The user operation 4 can also be that the user inputs a voice command to the electronic device to open the floating APP2, and adjusts the application window of the floating APP2 to the first area of the display screen of the electronic device for floating display. The embodiment of the present application does not limit the user operation 4. The floating APP2 can be an APP that can play audio, for example, a call APP corresponding to the call window 103 shown in FIG. 4A. The audio data data2 can be the audio data being played by the floating APP2, for example, the audio data data2 can be the call audio data 3 of the call window 103 shown in FIG. 4A. It can be understood that the embodiment of the present application does not limit what type of APP the floating APP2 is, nor does it limit the specific content of the audio data data2 played by the floating APP2.
可以理解的是,本申请实施例中的全屏APP1并不是在所有场景中都全屏显示,该全屏APP1在一些场景中,也可以基于用户操作,悬浮显示或者分屏显示等等,本申请实施例对此不作限定。同样地,本申请实施例中的悬浮APP2也不是在所有场景中都悬浮显示,该悬浮APP2在一些场景中,也可以基于用户操作,全屏显示或者分屏显示等等,本申请实施例对此不作限定。It is understandable that the full-screen APP1 in the embodiment of the present application is not displayed in full screen in all scenarios. The full-screen APP1 can also be displayed in a suspended state or in a split screen based on user operations in some scenarios, and the embodiment of the present application does not limit this. Similarly, the floating APP2 in the embodiment of the present application is not displayed in a suspended state in all scenarios. The floating APP2 can also be displayed in a full screen or in a split screen based on user operations in some scenarios, and the embodiment of the present application does not limit this.
S804a、电子设备监测耳机200的方位。S804a: The electronic device monitors the position of the earphone 200.
S804b、电子设备监测耳机300的方位。S804b: The electronic device monitors the position of the earphone 300.
电子设备可以检测耳机200以及耳机300的方位,例如,耳机200的方位角、和/或距离,耳机300的方位角、和/或距离。示例性地,电子设备可以基于上述图6中示出的天线阵列模块600监测耳机200和耳机300的方位。具体地,电子设备如何检测耳机200以及耳机300的方位可以参考上述图6、图7中的描述,此处不再赘述。The electronic device can detect the position of the earphone 200 and the earphone 300, for example, the azimuth and/or distance of the earphone 200, and the azimuth and/or distance of the earphone 300. Exemplarily, the electronic device can monitor the position of the earphone 200 and the earphone 300 based on the antenna array module 600 shown in FIG. 6. Specifically, how the electronic device detects the position of the earphone 200 and the earphone 300 can refer to the description in FIG. 6 and FIG. 7, which will not be repeated here.
S805、电子设备确定耳机200位于方位d1,耳机300位于方位d2,方位d1与第一区域在显示屏中的方位相同。S805: The electronic device determines that the earphone 200 is located at the position d1, and the earphone 300 is located at the position d2, and the position d1 is the same as the position of the first area in the display screen.
电子设备可以根据监测到的耳机200的方位、以及监测到的耳机300的方位,确定耳机200位于方位d1,耳机300位于方位d2。具体地,耳机200位于方位d1可以表示,耳机200方位角为α1;耳机300位于方位d2可以表示,耳机300的方位角为α2。The electronic device can determine that the earphone 200 is located at the position d1 and the earphone 300 is located at the position d2 according to the monitored position of the earphone 200 and the monitored position of the earphone 300. Specifically, the earphone 200 being located at the position d1 can indicate that the earphone 200 has an azimuth angle of α1; the earphone 300 being located at the position d2 can indicate that the earphone 300 has an azimuth angle of α2.
电子设备可以根据耳机200的方位d1和耳机300的方位d2可以确定出耳机200与耳机300的相对方位。The electronic device can determine the relative positions of the earphone 200 and the earphone 300 according to the position d1 of the earphone 200 and the position d2 of the earphone 300 .
可选地,方位d1和方位d2可以是相对方位,方位d1和方位d2不相同。例如,方位d1可以是左侧,即耳机200位于耳机300的左侧。方位d2可以是右侧,即耳机300位于耳机200的右侧。本申请实施例对方位d1具体不作限定。Optionally, the orientation d1 and the orientation d2 may be relative orientations, and the orientation d1 and the orientation d2 are different. For example, the orientation d1 may be the left side, that is, the earphone 200 is located on the left side of the earphone 300. The orientation d2 may be the right side, that is, the earphone 300 is located on the right side of the earphone 200. The embodiment of the present application does not specifically limit the orientation d1.
电子设备可以确定第一区域在显示屏中的方位。第一区域在显示屏中的方位可以与方位d1相同。例如,方位d1为左侧,第一区域位于电子设备显示屏的左侧。The electronic device may determine the position of the first area in the display screen. The position of the first area in the display screen may be the same as the position d1. For example, the position d1 is the left side, and the first area is located on the left side of the display screen of the electronic device.
在一些实施例中,当方位d1和方位d2指示耳机200位于耳机300的左侧,第一区域位于电子设备显示屏的左侧时,可以称耳机200的方位与第一区域的方位(或者悬浮APP2的窗口的方位)匹配或者相同。当方位d1和方位d2指示耳机200位于耳机300的右侧,第一区域位于电子设备显示屏的右侧时,也可以 称耳机200的方位与第一区域的方位(或者悬浮APP2的窗口的方位)匹配或者相同。In some embodiments, when the orientation d1 and the orientation d2 indicate that the earphone 200 is located on the left side of the earphone 300 and the first area is located on the left side of the electronic device display screen, the orientation of the earphone 200 can be said to match or be the same as the orientation of the first area (or the orientation of the window of the suspended APP2). When the orientation d1 and the orientation d2 indicate that the earphone 200 is located on the right side of the earphone 300 and the first area is located on the right side of the electronic device display screen, it can also be said that the orientation of the earphone 200 matches or is the same as the orientation of the first area (or the orientation of the window of the suspended APP2). It is said that the orientation of the earphone 200 matches or is the same as the orientation of the first area (or the orientation of the window of the floating APP2).
S806、电子设备停止将音频数据data1发送给耳机200,将音频数据data2发送给耳机200。S806 : The electronic device stops sending the audio data data1 to the earphone 200 , and sends the audio data data2 to the earphone 200 .
当电子设备确定悬浮APP2所在的第一区域与耳机200的方位d1相同时,电子设备可以停止向耳机200发送全屏APP1的音频数据data1,而是将该悬浮APP2的音频数据data2发送给耳机200。When the electronic device determines that the first area where the floating APP2 is located is the same as the orientation d1 of the headset 200 , the electronic device can stop sending the audio data data1 of the full-screen APP1 to the headset 200 and send the audio data data2 of the floating APP2 to the headset 200 instead.
S807、电子设备基于用户操作5,将悬浮APP2显示在显示屏的第二区域,确定第二区域在显示屏中的方位与方位d2相同。S807: Based on user operation 5, the electronic device displays the floating APP2 in the second area of the display screen, and determines that the position of the second area in the display screen is the same as the position d2.
用户操作5可以是用户将悬浮APP2的应用窗口从显示屏的第一区域移动至第二区域。即用户可以将悬浮APP2的应用窗口移动至电子设备显示屏的第二区域,响应于该用户操作,电子设备可以将悬浮APP2显示在显示屏的第二区域。本申请实施例对用户操作5具体不作限定。User operation 5 may be that the user moves the application window of the floating APP2 from the first area of the display screen to the second area. That is, the user may move the application window of the floating APP2 to the second area of the electronic device display screen, and in response to the user operation, the electronic device may display the floating APP2 in the second area of the display screen. The embodiment of the present application does not specifically limit user operation 5.
第二区域在显示屏中的方位与第一区域在显示屏中的方位不同。第二区域在显示屏中的方位可以与方位d2相同。例如,第二区域在显示屏中的右侧,方位d2也可以是右侧(即耳机300位于耳机200的右侧)。The orientation of the second area in the display screen is different from the orientation of the first area in the display screen. The orientation of the second area in the display screen may be the same as the orientation d2. For example, the second area is on the right side of the display screen, and the orientation d2 may also be on the right side (i.e., the earphone 300 is on the right side of the earphone 200).
S808a、电子设备停止将音频数据data2发送给耳机200,将音频数据data1发送给耳机200。S808a: The electronic device stops sending the audio data data2 to the earphone 200, and sends the audio data data1 to the earphone 200.
S808b、电子设备停止将音频数据data1发送给耳机300,将音频数据data2发送给耳机300。S808b: The electronic device stops sending the audio data data1 to the earphone 300, and sends the audio data data2 to the earphone 300.
当电子设备监测到悬浮APP在显示屏中的方位与耳机300的方位一致,即第二区域在显示屏中的方位与方位d2相同时,电子设备可以停止向悬浮APP2的音频数据data2发送给耳机200,而是将全屏APP1的音频数据data1发送给耳机200;以及停止将全屏APP1的音频数据data1发送给耳机300,而是将悬浮APP2的音频数据data2发送给耳机300。When the electronic device detects that the position of the floating APP in the display screen is consistent with the position of the earphone 300, that is, the position of the second area in the display screen is the same as the position d2, the electronic device can stop sending the audio data data2 of the floating APP2 to the earphone 200, and instead send the audio data data1 of the full-screen APP1 to the earphone 200; and stop sending the audio data data1 of the full-screen APP1 to the earphone 300, and instead send the audio data data2 of the floating APP2 to the earphone 300.
可选地,在一种可能的实现方式中,在步骤S805中,用户也可以先将悬浮APP2在显示屏中的方位调整至与耳机300的方位相同。即该悬浮APP2也可以先位于第二区域,再由第二区域移动至第一区域。当该悬浮APP2位于第二区域时,电子设备可以将该悬浮APP2的音频数据data2发送至与悬浮APP2的方位相同的耳机300。例如,如图4A所示,当通话APP的通话窗口103位于显示屏的右侧时,电子设备可以将该通话窗口103的音频数据3发送给与通话窗口103方位一致的耳机300。之后,用户可以将悬浮APP2从第二区域移动至第一区域,当该悬浮APP2位于第一区域时,电子设备可以将该悬浮APP2的音频数据data2发送至与悬浮APP2的方位相同的耳机200。例如,如图4B所示,当通话APP的通话窗口103位于显示屏的左侧时,电子设备可以将该通话窗口103的音频数据3发送给与通话窗口103方位一致的耳机200。Optionally, in a possible implementation, in step S805, the user may also adjust the position of the floating APP2 in the display screen to be the same as the position of the earphone 300. That is, the floating APP2 may also be located in the second area first, and then moved from the second area to the first area. When the floating APP2 is located in the second area, the electronic device may send the audio data data2 of the floating APP2 to the earphone 300 with the same position as the floating APP2. For example, as shown in FIG4A, when the call window 103 of the call APP is located on the right side of the display screen, the electronic device may send the audio data 3 of the call window 103 to the earphone 300 with the same position as the call window 103. Afterwards, the user may move the floating APP2 from the second area to the first area, and when the floating APP2 is located in the first area, the electronic device may send the audio data data2 of the floating APP2 to the earphone 200 with the same position as the floating APP2. For example, as shown in FIG4B, when the call window 103 of the call APP is located on the left side of the display screen, the electronic device may send the audio data 3 of the call window 103 to the earphone 200 with the same position as the call window 103.
可以理解的是,电子设备是基于悬浮APP2在显示屏中的方位,以及耳机200的方位和耳机300的方位,将悬浮APP2的音频数据data2发送给与悬浮APP2的方位一致的耳机(耳机200或耳机300)。It can be understood that the electronic device sends the audio data data2 of the suspended APP2 to the earphone (earphone 200 or earphone 300) consistent with the position of the suspended APP2 based on the position of the suspended APP2 in the display screen, the position of the earphone 200 and the position of the earphone 300.
可以理解的是,在本申请实施例中,悬浮APP2显示在显示屏中的第一区域,即是悬浮APP2的应用窗口(或者称为用户界面)显示在显示屏中的第一区域。悬浮APP2显示在显示屏中的第二区域,即是悬浮APP2的应用窗口(或者称为用户界面)显示在显示屏中的第二区域。It can be understood that in the embodiment of the present application, the first area where the floating APP2 is displayed on the display screen is the first area where the application window (or user interface) of the floating APP2 is displayed on the display screen. The second area where the floating APP2 is displayed on the display screen is the second area where the application window (or user interface) of the floating APP2 is displayed on the display screen.
S809、电子设备基于用户操作6,将悬浮APP2显示在显示屏中的第三区域。S809: Based on user operation 6, the electronic device displays the floating APP 2 in the third area of the display screen.
用户操作6可以是用户将悬浮APP2移动至显示屏在第三区域,本申请实施例对用户操作6具体不作限定。电子设备可以基于用户操作6,将悬浮APP2显示在显示屏中的第三区域。该第三区域可以是电子设备显示屏的中间区域,例如,图5中示出的区域501。本申请实施例对第三区域具体在显示屏中的位置以及第三区域的具体大小不作限定。User operation 6 may be that the user moves the floating APP2 to the third area of the display screen. The embodiment of the present application does not specifically limit user operation 6. The electronic device may display the floating APP2 in the third area of the display screen based on user operation 6. The third area may be the middle area of the electronic device display screen, for example, area 501 shown in FIG. 5. The embodiment of the present application does not limit the specific position of the third area in the display screen and the specific size of the third area.
可以立即的是,本申请实施例中涉及的用户将悬浮APP2移动至显示屏的第一区域、或者从第一区域移动至第二区域,以及移动至第三区域,是指用户将悬浮APP2的应用窗口(或者称为用户界面)移动至显示屏的第一区域、或者从第一区域移动至第二区域,以及移动至第三区域。It can be immediately understood that the user involved in the embodiment of the present application moves the floating APP2 to the first area of the display screen, or from the first area to the second area, and to the third area, which means that the user moves the application window (or user interface) of the floating APP2 to the first area of the display screen, or from the first area to the second area, and to the third area.
S810a、电子设备将音频数据data1和音频数据data2发送给耳机200。S810a : The electronic device sends the audio data data1 and the audio data data2 to the headset 200 .
S810b、电子设备将音频数据data1和音频数据data2发送给耳机300。S810b: The electronic device sends the audio data data1 and the audio data data2 to the headset 300.
当电子设备检测到悬浮APP2位于显示屏的第三区域,例如中间区域,电子设备可以将音频数据data1和音频数据data2发送给耳机200,以及将音频数据data1和音频数据data2发送给耳机300。即耳机200和耳机300可以同时接收到音频数据data1和音频数据data2。例如,图4D中的通话窗口103处于平板100的显示屏的中间区域时,平板100将通话窗口103的音频数据3和视频播放窗口101的音频数据2发送给耳机200,以及将通话窗口103的音频数据3和视频播放窗口101的音频数据2发送给耳机300。When the electronic device detects that the floating APP2 is located in the third area of the display screen, such as the middle area, the electronic device can send the audio data data1 and the audio data data2 to the earphone 200, and send the audio data data1 and the audio data data2 to the earphone 300. That is, the earphone 200 and the earphone 300 can receive the audio data data1 and the audio data data2 at the same time. For example, when the call window 103 in FIG. 4D is in the middle area of the display screen of the tablet 100, the tablet 100 sends the audio data 3 of the call window 103 and the audio data 2 of the video playback window 101 to the earphone 200, and sends the audio data 3 of the call window 103 and the audio data 2 of the video playback window 101 to the earphone 300.
可选地,在一种可能的实现方式中,当电子设备检测到悬浮APP2位于显示屏的第三区域,电子设备可以将悬浮APP2的音频数据data2同时发送给耳机200和耳机300。例如,图4C中的通话窗口103处于平板100的显示屏的中间区域时,平板100将通话窗口103的音频数据3发给耳机200和耳机300。Optionally, in a possible implementation, when the electronic device detects that the floating APP2 is located in the third area of the display screen, the electronic device can send the audio data data2 of the floating APP2 to the earphone 200 and the earphone 300 at the same time. For example, when the call window 103 in FIG4C is in the middle area of the display screen of the tablet 100, the tablet 100 sends the audio data 3 of the call window 103 to the earphone 200 and the earphone 300.
S811、电子设备基于用户操作7,退出悬浮APP2。 S811. The electronic device exits the floating APP2 based on the user operation 7.
可选地,用户还可以点击用于关闭该悬浮APP的控件,响应于该用户操作,电子设备可以退出悬浮APP2,即电子设备关闭该悬浮APP2。Optionally, the user may also click on a control for closing the floating APP. In response to the user operation, the electronic device may exit the floating APP2, that is, the electronic device closes the floating APP2.
S812a、电子设备将音频数据data1发送给耳机200。S812a : The electronic device sends the audio data data1 to the earphone 200 .
S812b、电子设备将音频数据data1发送给耳机200。S812b: The electronic device sends the audio data data1 to the headset 200.
电子设备关闭该悬浮APP2后,电子设备可以只将全屏APP1的音频数据data1发送给耳机200和耳机300。After the electronic device closes the floating APP2, the electronic device may only send the audio data data1 of the full-screen APP1 to the earphone 200 and the earphone 300.
在一些可行的示例中,当用户点击暂停播放悬浮APP2的音频数据data2的控件时,响应于该用户操作,电子设备暂停将音频数据data2发送给耳机200或耳机300,将音频数据data1发送给耳机200和耳机300。In some feasible examples, when the user clicks the control to pause the playing of the audio data data2 of the floating APP2, in response to the user operation, the electronic device pauses sending the audio data data2 to the earphone 200 or the earphone 300, and sends the audio data data1 to the earphone 200 and the earphone 300.
在一些可行的示例中,当用户点击暂停播放全屏APP1的音频数据data1的控件时,响应于该用户操作,电子设备暂停将音频数据data1发送给耳机200或耳机300,将音频数据data2发送给耳机200和耳机300。In some feasible examples, when the user clicks the control to pause playing the audio data data1 of the full-screen APP1, in response to the user operation, the electronic device pauses sending the audio data data1 to the earphone 200 or the earphone 300, and sends the audio data data2 to the earphone 200 and the earphone 300.
在本申请实施例中,当电子设备只播放一个应用的音频时,电子设备可以将该应用的音频数据同时发送给耳机200和耳机300。当该应用悬浮显示在电子设备中时,电子设备无需考虑该应用在显示屏中的方位,仍然将该应用的音频数据发送给耳机200和耳机300。当电子设备中同时播放两个应用的音频时,电子设备需要根据两个应用的状态以及方位来选择将两个应用中一个应用的音频数据一个发送给耳机200,另一个应用的音频数据发送给耳机300;或者将两个应用的音频数据同时发送给耳机200和耳机300,或者将两个应用中的一个应用的音频数据同时发送给耳机200和耳机300。In the embodiment of the present application, when the electronic device plays the audio of only one application, the electronic device can send the audio data of the application to the earphone 200 and the earphone 300 at the same time. When the application is displayed in a floating manner in the electronic device, the electronic device does not need to consider the position of the application in the display screen, and still sends the audio data of the application to the earphone 200 and the earphone 300. When the audio of two applications is played simultaneously in the electronic device, the electronic device needs to choose to send the audio data of one application of the two applications to the earphone 200 and the audio data of the other application to the earphone 300 according to the status and position of the two applications; or send the audio data of the two applications to the earphone 200 and the earphone 300 at the same time, or send the audio data of one application of the two applications to the earphone 200 and the earphone 300 at the same time.
图9示出了本申请实施例提供的一种音频传输方法。FIG. 9 shows an audio transmission method provided in an embodiment of the present application.
在一些场景中,当电子设备确定电子设备连接有2副耳机,且电子设备中开启两个输出音频的APP时,电子设备才会开始检测APP的窗口状态以及监测耳机方位。In some scenarios, when the electronic device determines that two pairs of headphones are connected to the electronic device and two apps that output audio are opened in the electronic device, the electronic device will start to detect the window status of the apps and monitor the position of the headphones.
如图9所示,本申请实施例提供的一种音频传输方法可以包括如下步骤:As shown in FIG. 9 , an audio transmission method provided in an embodiment of the present application may include the following steps:
S901、电子设备是否连接有两幅无线耳机,若是,则执行步骤S902a,若否,则执行S902b。S901: Whether the electronic device is connected to two wireless headphones, if so, execute step S902a, if not, execute S902b.
电子设备可以连接有多副耳机,当电子设备至少连接有两幅耳机,例如上文中的耳机200和耳机300时,电子设备可以判断是否开启有两个输出音频的APP,即执行下述步骤S902a。The electronic device can be connected to multiple pairs of headphones. When the electronic device is connected to at least two pairs of headphones, such as the headphones 200 and 300 mentioned above, the electronic device can determine whether an APP with two output audios is turned on, that is, execute the following step S902a.
当电子设备未连接无线耳机或者只连接有一副无线耳机时,电子设备可以停止对检测耳机方位,即执行步骤S902b。When the electronic device is not connected to a wireless headset or is only connected to a pair of wireless headsets, the electronic device may stop detecting the position of the headset, that is, execute step S902b.
在一种可能的实现方式中,电子设备持续的监测电子设备是否连接有2副无线耳机,当电子设备先确定电子设备连接有2副无线耳机,在监测2副无线耳机的方位时,若电子设备监测到2副耳机中任一副耳机与电子设备断开连接,电子设备会停止对2副耳机进行方位监测。In one possible implementation, the electronic device continuously monitors whether two pairs of wireless headphones are connected to the electronic device. When the electronic device first determines that the electronic device is connected to two pairs of wireless headphones, while monitoring the positions of the two pairs of wireless headphones, if the electronic device detects that any one of the two pairs of headphones is disconnected from the electronic device, the electronic device stops monitoring the positions of the two pairs of headphones.
在一些场景中,当电子设备确定未连接有两幅无线耳机时,电子可以持续的监测是否连接有2副无线耳机,即持续地执行步骤S901。In some scenarios, when the electronic device determines that two pairs of wireless headphones are not connected, the electronic device may continuously monitor whether two pairs of wireless headphones are connected, that is, continuously execute step S901.
S902a、电子设备判断是否开启两个输出音频的APP,若是,则执行步骤S903,若否,则继续执行S902a。S902a, the electronic device determines whether two apps that output audio are turned on, if so, executes step S903, if not, continues to execute S902a.
当电子设备确定连接有两幅无线耳机之后,电子设备还可以确定是否开启有两个输出音频的APP:输出音频的APP11和输出音频的APP22。例如,APP11和APP22可以是图4A-图4D中的视频APP、通话APP、或者是图8中涉及的全屏APP1和悬浮APP2。本申请实施例对APP11和APP22具体是何种类型、何种名称的APP不作限定。当电子设备确定已开启有两个输出音频的APP时,电子设备可以执行下述步骤S903。当电子设备确定未开启两个输出音频的APP(即只开启有一个输出音频的APP或未开启输出音频的APP)时,电子设备可以继续检测电子设备中是否开启有两个输出音频的APP,即继续执行步骤S902。After the electronic device determines that two wireless headphones are connected, the electronic device can also determine whether two APPs with audio output are turned on: APP11 with audio output and APP22 with audio output. For example, APP11 and APP22 can be the video APP, call APP in Figures 4A-4D, or the full-screen APP1 and floating APP2 involved in Figure 8. The embodiment of the present application does not limit the specific type and name of APP11 and APP22. When the electronic device determines that two APPs with audio output are turned on, the electronic device can perform the following step S903. When the electronic device determines that two APPs with audio output are not turned on (that is, only one APP with audio output is turned on or the APP with audio output is not turned on), the electronic device can continue to detect whether two APPs with audio output are turned on in the electronic device, that is, continue to execute step S902.
S902b、电子设备停止对耳机的方位监测。S902b. The electronic device stops monitoring the position of the earphone.
当电子设备已经开始对耳机进行方位监测,电子设备从连接有两幅耳机变为未连接两幅耳机时,电子设备可以停止对耳机的方位监测。When the electronic device has started to monitor the position of the earphones and the electronic device changes from being connected to two pairs of earphones to not being connected to two pairs of earphones, the electronic device can stop monitoring the position of the earphones.
S903、电子设备监测APP窗口状态。S903. The electronic device monitors the APP window status.
当电子设备确定开启有两个输出音频的APP,即APP11和APP22时,电子设备可以监测APP11的应用窗口和APP22的应用窗口的状态。APP11以及APP22的状态可以是全屏显示、悬浮显示或者分屏显示等等。When the electronic device determines to open two APPs with output audio, namely APP11 and APP22, the electronic device can monitor the status of the application window of APP11 and the application window of APP22. The status of APP11 and APP22 can be full screen display, floating display or split screen display, etc.
具体地,电子设备可以通过电子设备中的应用窗口监控服务模块来监测APP11的窗口和APP2的窗口状态。关于应用窗口监控服务模块可以参考下文中对图12的描述,此处先不赘述。 Specifically, the electronic device can monitor the window status of APP11 and APP2 through the application window monitoring service module in the electronic device. For the application window monitoring service module, please refer to the description of FIG. 12 below, which will not be repeated here.
S904、电子设备监测耳机方位。S904. The electronic device monitors the position of the earphone.
当电子设备确定连接有2副无线耳机,且开启了两个输出音频的APP时,电子设备可以开始监测耳机方位。电子设备如何检测耳机方位可以参考上述图6、图7中的描述,此处不再赘述。When the electronic device determines that two pairs of wireless headphones are connected and two apps that output audio are turned on, the electronic device can start monitoring the position of the headphones. How the electronic device detects the position of the headphones can refer to the description in Figures 6 and 7 above, which will not be repeated here.
电子设备通过监测耳机方位可以实时确定连接的2副无线耳机所处的方位,以及2副无线耳机所处的相对方位。By monitoring the positions of the earphones, the electronic device can determine in real time the positions of the two connected wireless earphones and the relative positions of the two wireless earphones.
S905、电子设备确定悬浮APP的方位是否和某一幅耳机的方位相同,若是,则执行步骤S906、若否,则执行步骤S903。S905. The electronic device determines whether the position of the floating APP is the same as the position of a pair of headphones. If so, execute step S906; if not, execute step S903.
电子设备若确定两个输出音频的APP11和APP22中的APP11或APP22为悬浮APP(下文以APP11为悬浮APP为例),则电子设备需要确定悬浮APP,例如APP11的方位和2副无线耳机中的哪一副耳机的方位相同。若电子设备确定该APP11的方位和2副无线耳机中某一幅耳机的方位相同,则执行步骤S906;若否,则电子设备可以继续监测APP窗口状态,即执行步骤S903。If the electronic device determines that APP11 or APP22 of the two APP11 and APP22 that output audio is a floating APP (hereinafter, APP11 is taken as an example of a floating APP), the electronic device needs to determine the floating APP, for example, the position of APP11 is the same as the position of one of the two pairs of wireless headphones. If the electronic device determines that the position of APP11 is the same as the position of one of the two pairs of wireless headphones, step S906 is executed; if not, the electronic device can continue to monitor the APP window status, that is, step S903 is executed.
S906、电子设备将两个输出音频的APP的音频数据按照方位发送给对应的耳机。S906: The electronic device sends the audio data of the two audio-output APPs to the corresponding earphones according to the directions.
电子设备可以根据两个输出音频的APP的窗口状态,以及两个输出音频的APP的应用窗口在显示屏中的方位,将两个输出音频的APP的音频数据发送给对应的耳机。由于两个输出音频的APP的窗口状态可以分为多种情况,下面将按照不同的情况描述电子设备具体如何将两个输出音频的APP的音频数据发送给对应的耳机。The electronic device can send the audio data of the two audio-output APPs to the corresponding headphones according to the window status of the two audio-output APPs and the orientation of the application windows of the two audio-output APPs in the display screen. Since the window status of the two audio-output APPs can be divided into multiple situations, the following will describe how the electronic device specifically sends the audio data of the two audio-output APPs to the corresponding headphones according to different situations.
在本申请实施例中,APP11当前可以是全屏APP或悬浮APP、或者分屏APP。APP2当前也可以是全屏APP或悬浮APP、或者分屏APP。In the embodiment of the present application, APP11 may be a full-screen APP, a floating APP, or a split-screen APP. APP2 may also be a full-screen APP, a floating APP, or a split-screen APP.
可以理解的是,本申请实施例中当一个APP的应用窗口的当前显示状态为全屏显示(也即是一个APP的应用窗口当前为全屏窗口)时,可以称该APP为全屏APP。当一个APP的应用窗口的当前显示状态为分屏显示(也即是一个APP的应用窗口当前为分屏窗口)时,可以称该APP为分屏APP。当一个APP的应用窗口的当前显示状态为悬浮显示(也即是一个APP的应用窗口当前为悬浮窗口)时,可以称该APP为悬浮APP。It is understandable that in the embodiment of the present application, when the current display state of an application window of an APP is full-screen display (that is, an application window of an APP is currently a full-screen window), the APP can be called a full-screen APP. When the current display state of an application window of an APP is split-screen display (that is, an application window of an APP is currently a split-screen window), the APP can be called a split-screen APP. When the current display state of an application window of an APP is suspended display (that is, an application window of an APP is currently a suspended window), the APP can be called a suspended APP.
情况1:APP11为悬浮APP,APP22为全屏APPCase 1: APP11 is a floating APP, APP22 is a full-screen APP
APP11可以为悬浮APP,即APP11的应用窗口为悬浮窗口。APP22可以为全屏APP,即APP22的应用窗口为全屏窗口。可以理解的是,即APP11的应用窗口悬浮显示在APP22的应用窗口之上。例如,图4A中示出的视频播放APP的视频播放窗口101为全屏窗口,通话APP的通话窗口103为悬浮窗口。该通话窗口103悬浮显示在视频播放窗口101之上。APP11 can be a floating APP, that is, the application window of APP11 is a floating window. APP22 can be a full-screen APP, that is, the application window of APP22 is a full-screen window. It can be understood that the application window of APP11 is displayed floatingly above the application window of APP22. For example, the video playback window 101 of the video playback APP shown in FIG. 4A is a full-screen window, and the call window 103 of the call APP is a floating window. The call window 103 is displayed floatingly above the video playback window 101.
当电子设备确定悬浮APP的应用窗口的方位和2副无线耳机中任一副耳机的方位相同时,电子设备可以将两个输出音频的APP的音频数据按照方位发送给对应的耳机。例如,当APP11的应用窗口的方位与2副无线耳机(例如耳机200和耳机300)中的耳机200的方位相同时,电子设备可以将APP11的音频数据发送给耳机200,将APP22的音频数据发送给耳机300;当APP11的应用窗口的方位与耳机300的方位相同时,电子设备可以将APP11的音频数据发送给耳机300,将APP22的音频数据发送给耳机200。When the electronic device determines that the orientation of the application window of the floating APP is the same as the orientation of any one of the two pairs of wireless headphones, the electronic device can send the audio data of the two audio-output APPs to the corresponding headphones according to the orientation. For example, when the orientation of the application window of APP11 is the same as the orientation of earphone 200 in two pairs of wireless headphones (such as earphone 200 and earphone 300), the electronic device can send the audio data of APP11 to earphone 200 and the audio data of APP22 to earphone 300; when the orientation of the application window of APP11 is the same as the orientation of earphone 300, the electronic device can send the audio data of APP11 to earphone 300 and the audio data of APP22 to earphone 200.
在一些可行的示例中,若电子设备确定该APP11的应用窗口的方位和2副无线耳机的方位均不相同,例如APP11的应用窗口处于电子设备的显示屏的中间区域(例如,图4C示出的通话窗口103位于平板100的显示屏的中轴线上,或者图5中示出的区域501),电子设备可以将该APP11的音频数据发送给耳机200和耳机300。In some feasible examples, if the electronic device determines that the orientation of the application window of APP11 is different from the orientation of the two pairs of wireless headphones, for example, the application window of APP11 is in the middle area of the display screen of the electronic device (for example, the call window 103 shown in Figure 4C is located on the central axis of the display screen of the tablet 100, or the area 501 shown in Figure 5), the electronic device can send the audio data of APP11 to headphones 200 and headphones 300.
可选地,在另一些可行的示例中,若电子设备确定该APP11的应用窗口的方位和2副无线耳机的方位均不相同,例如APP11处于电子设备的显示屏的中间区域(例如,图4D示出的通话窗口103位于平板100的显示屏的中轴线上,或者图5中示出的区域501),电子设备可以将APP11的音频数据、APP22的音频数据发送给耳机200,以及将APP11的音频数据和APP22的音频数据发送给耳机300。Optionally, in other feasible examples, if the electronic device determines that the orientation of the application window of APP11 and the orientation of the two pairs of wireless headphones are different, for example, APP11 is in the middle area of the display screen of the electronic device (for example, the call window 103 shown in Figure 4D is located on the central axis of the display screen of the tablet 100, or the area 501 shown in Figure 5), the electronic device can send the audio data of APP11 and the audio data of APP22 to the headset 200, and send the audio data of APP11 and the audio data of APP22 to the headset 300.
情况2:APP11为悬浮APP、APP22为悬浮APPCase 2: APP11 is a floating APP, APP22 is a floating APP
APP11可以为悬浮APP,即APP11的应用窗口为悬浮窗口。APP22也可以是悬浮APP,即APP22的应用窗口为悬浮窗口。例如,图3A中示出的视频播放APP的视频播放窗口101为悬浮窗口,音频播放APP的音频播放窗口102也是悬浮窗口。该视频播放窗口101和音频播放窗口102可以悬浮显示在电子设备的主界面或者其他应用程序的全屏窗口之上。APP11 can be a floating APP, that is, the application window of APP11 is a floating window. APP22 can also be a floating APP, that is, the application window of APP22 is a floating window. For example, the video playback window 101 of the video playback APP shown in FIG. 3A is a floating window, and the audio playback window 102 of the audio playback APP is also a floating window. The video playback window 101 and the audio playback window 102 can be displayed in a floating manner on the main interface of the electronic device or the full-screen window of other applications.
电子设备可以基于两个输出音频的APP的应用窗口的方位,将两个输出音频的APP的音频数据发送给方位相同的耳机。例如,当电子设备确定APP11的应用窗口的方位与耳机200的方位相同,APP22的应用窗口的方位与耳机300的方位相同时,电子设备将APP11的音频数据发送给耳机200,将APP22的音频 数据发送给耳机300。当电子设备确定APP11的应用窗口的方位与耳机300的方位相同,APP22的应用窗口的方位与耳机200的方位相同时,电子设备将APP11的音频数据发送给耳机300,将APP22的音频数据发送给耳机200。The electronic device can send the audio data of two audio-outputting APPs to the earphones with the same orientation based on the orientation of the application windows of the two audio-outputting APPs. For example, when the electronic device determines that the orientation of the application window of APP11 is the same as the orientation of earphone 200, and the orientation of the application window of APP22 is the same as the orientation of earphone 300, the electronic device sends the audio data of APP11 to earphone 200 and the audio data of APP22 to earphone 300. The data is sent to the headset 300. When the electronic device determines that the orientation of the application window of APP11 is the same as the orientation of the headset 300 and the orientation of the application window of APP22 is the same as the orientation of the headset 200, the electronic device sends the audio data of APP11 to the headset 300 and sends the audio data of APP22 to the headset 200.
情况3:APP11为分屏APP、APP22为分屏APPCase 3: APP11 is a split-screen APP, APP22 is a split-screen APP
APP11和APP22可以为分屏APP,即APP11的应用窗口和APP22的应用窗口可以分屏显示在电子设备中。例如,图3B中示出的音频播放APP的视频播放窗口101和音频播放APP的音频播放窗口102分屏显示在平板100中。APP11 and APP22 can be split-screen APPs, that is, the application window of APP11 and the application window of APP22 can be split-screen displayed in the electronic device. For example, the video playback window 101 of the audio playback APP and the audio playback window 102 of the audio playback APP shown in FIG. 3B are split-screen displayed in the tablet 100.
电子设备可以基于两个输出音频的APP的应用窗口的方位,将两个输出音频的APP的音频数据发送给方位相同的耳机。例如,当电子设备确定APP11的应用窗口的方位与耳机200的方位相同,APP22的应用窗口的方位与耳机300的方位相同时,电子设备将APP11的音频数据发送给耳机200,将APP22的音频数据发送给耳机300。当电子设备确定APP11的应用窗口的方位与耳机300的方位相同,APP22的应用窗口的方位与耳机200的方位相同时,电子设备将APP11的音频数据发送给耳机300,将APP22的音频数据发送给耳机200。The electronic device can send the audio data of two audio-outputting APPs to the earphones with the same orientation based on the orientation of the application windows of the two audio-outputting APPs. For example, when the electronic device determines that the orientation of the application window of APP11 is the same as the orientation of the earphone 200, and the orientation of the application window of APP22 is the same as the orientation of the earphone 300, the electronic device sends the audio data of APP11 to the earphone 200, and sends the audio data of APP22 to the earphone 300. When the electronic device determines that the orientation of the application window of APP11 is the same as the orientation of the earphone 300, and the orientation of the application window of APP22 is the same as the orientation of the earphone 200, the electronic device sends the audio data of APP11 to the earphone 300, and sends the audio data of APP22 to the earphone 200.
在本申请实施例中,电子设备可以基于两个输出音频的APP的应用窗口的状态以及方位,将两个输出音频的APP的音频数据分别发送给方位相同的耳机。这样,佩戴耳机200的用户和佩戴耳机300的用户基于用户需求,可以选择让耳机与两个输出音频APP中的其中一个APP的应用窗口的方位保持相同,从而收听到想要收听的音频APP的音频数据。而且,佩戴耳机200的用户还可以和佩戴耳机300的用户收听到不同音频APP的音频数据。In an embodiment of the present application, the electronic device can send the audio data of the two audio output APPs to the headphones with the same orientation based on the status and orientation of the application windows of the two audio output APPs. In this way, the user wearing the headphones 200 and the user wearing the headphones 300 can choose to keep the orientation of the headphones and the application window of one of the two audio output APPs the same based on user needs, so as to listen to the audio data of the audio APP they want to listen to. Moreover, the user wearing the headphones 200 can also listen to the audio data of different audio APPs with the user wearing the headphones 300.
上述图8和图9提供的一种音频传输方法中,电子设备在确定电子设备开启了两个输出音频的APP后,再开始检测耳机的方位。这样,可以节约电子设备的功耗。在一些场景,为了缩短电子设备将两个APP的音频数据发送给不同耳机的等待时间。电子设备可以在电子设备连接有两幅无线耳机后,立即监测两幅耳机的方位。示例性地,图10提供了一种音频传输方法,在该方法中,电子设备连接2副无线耳机后,监测2副无线耳机的方位。然后,在电子设备开启有两个输出音频的APP后,按照两个输出音频的APP的应用窗口的方位,将两个输出音频的APP的音频数据分别发送给不同的耳机。In an audio transmission method provided in the above-mentioned Figures 8 and 9, the electronic device starts to detect the position of the earphone after determining that the electronic device has opened two APPs that output audio. In this way, the power consumption of the electronic device can be saved. In some scenarios, in order to shorten the waiting time for the electronic device to send the audio data of the two APPs to different earphones. The electronic device can monitor the position of the two earphones immediately after the electronic device is connected to two wireless earphones. Exemplarily, Figure 10 provides an audio transmission method, in which the electronic device monitors the position of the two pairs of wireless earphones after connecting them. Then, after the electronic device opens two APPs that output audio, the audio data of the two APPs that output audio are sent to different earphones respectively according to the position of the application windows of the two APPs that output audio.
如图10所示,本申请实施例提供的一种音频传输方法具体可以包括如下步骤:As shown in FIG. 10 , an audio transmission method provided in an embodiment of the present application may specifically include the following steps:
S1000a、电子设备基于用户操作1,与耳机200建立蓝牙连接。S1000a: The electronic device establishes a Bluetooth connection with the headset 200 based on user operation 1.
S1000b、电子设备基于用户操作2,与耳机300建立蓝牙连接。S1000b: The electronic device establishes a Bluetooth connection with the headset 300 based on user operation 2.
步骤S1000a可以参考上述步骤S800a中的描述,此处不再赘述。步骤S1000b可以参考上述步骤S800b中的描述,此处不再赘述。Step S1000a may refer to the description in the above step S800a, which will not be described in detail here. Step S1000b may refer to the description in the above step S800b, which will not be described in detail here.
S1001a、电子设备监测耳机200的方位。S1001a, the electronic device monitors the position of the earphone 200.
S1001b、电子设备监测耳机300的方位。S1001b, the electronic device monitors the position of the earphone 300.
当电子设备连接耳机200和耳机300后,电子设备可以开始监测耳机200的方位以及耳机300的方位。具体地,该步骤S1001a可以参考步骤S804a中的描述,此处不再赘述。该步骤S1001b可以参考上述步骤S804b中的描述,此处不再赘述。After the electronic device connects the earphone 200 and the earphone 300, the electronic device may start to monitor the position of the earphone 200 and the position of the earphone 300. Specifically, the description of step S1001a may refer to the description of step S804a, which will not be repeated here. The description of step S1001b may refer to the description of step S804b, which will not be repeated here.
S1002、基于用户操作3,电子设备开启输出音频数据data1的全屏APP1。S1002 . Based on user operation 3 , the electronic device starts a full-screen APP1 that outputs audio data data1 .
步骤S1002参考上述步骤S801的描述,此处不再赘述。The description of step S1002 refers to the above step S801 and will not be repeated here.
S1003a、电子设备将音频数据data1发送给耳机200。S1003a : The electronic device sends the audio data data1 to the earphone 200 .
S1003b、电子设备将音频数据data1发送给耳机300。S1003b : The electronic device sends the audio data data1 to the earphone 300 .
步骤S1003a可以参考上述步骤S802a中的描述,此处赘述。S1003b可以参考上述步骤S802b中的描述,此处赘述。Step S1003a may refer to the description in the above step S802a, which is not repeated here. Step S1003b may refer to the description in the above step S802b, which is not repeated here.
S1004、基于用户操作4,电子设备开启输出音频数据data2的悬浮APP2,并将悬浮APP2显示在电子设备的显示屏中的第一区域。S1004. Based on user operation 4, the electronic device starts the floating APP2 that outputs the audio data data2, and displays the floating APP2 in the first area of the display screen of the electronic device.
步骤S1004可以参考步骤S804的描述,此处不再赘述。The description of step S1004 may refer to step S804 and will not be repeated here.
S1005、电子设备确定耳机200位于方位d1,耳机300位于方位d2,方位d1与第一区域在显示屏中的方位相同。S1005: The electronic device determines that the earphone 200 is located at the position d1, and the earphone 300 is located at the position d2, and the position d1 is the same as the position of the first area in the display screen.
步骤S1005可以参考步骤S805中的描述,此处不再赘述。The description of step S1005 may refer to that of step S805 and will not be repeated here.
S1006、电子设备停止将音频数据data1发送给耳机200,将音频数据data2发送给耳机200。S1006 : The electronic device stops sending the audio data data1 to the earphone 200 , and sends the audio data data2 to the earphone 200 .
步骤S1006可以参考步骤S806中的描述,此处不再赘述。 The description of step S1006 may refer to that of step S806 and will not be repeated here.
S1007、电子设备基于用户操作5,将悬浮APP2显示在显示屏的第二区域,确定第二区域在显示屏中的方位与方位d2相同。S1007. Based on user operation 5, the electronic device displays the floating APP2 in the second area of the display screen, and determines that the position of the second area in the display screen is the same as the position d2.
步骤S1007可以参考步骤S807中的描述,此处不再赘述。For step S1007, reference may be made to the description in step S807, which will not be repeated here.
S1008a、电子设备停止将音频数据data2发送给耳机200,将音频数据data1发送给耳机200。S1008a: The electronic device stops sending the audio data data2 to the earphone 200, and sends the audio data data1 to the earphone 200.
S1008b、电子设备停止将音频数据data1发送给耳机300,将音频数据data2发送给耳机300。S1008b: The electronic device stops sending the audio data data1 to the earphone 300, and sends the audio data data2 to the earphone 300.
步骤S1008a和步骤S1008b可以参考上述步骤S808a和步骤S808b中的描述,此处不再赘述。Step S1008a and step S1008b may refer to the description of the above-mentioned step S808a and step S808b, which will not be repeated here.
S1009、电子设备基于用户操作6,将悬浮APP2显示在显示屏中的第三区域。S1009: Based on user operation 6, the electronic device displays the floating APP 2 in the third area of the display screen.
步骤S1009可以参考上述步骤S809中的描述,此处不再赘述。Step S1009 may refer to the description of the above step S809 and will not be repeated here.
S1010a、电子设备将音频数据data1和音频数据data2发送给耳机200。S1010a : The electronic device sends the audio data data1 and the audio data data2 to the headset 200 .
S1010b、电子设备将音频数据data1和音频数据data2发送给耳机300。S1010b : The electronic device sends the audio data data1 and the audio data data2 to the headset 300 .
步骤S1010a和步骤S1010b可以参考上述步骤S810a和步骤S810b中的描述,此处不再赘述。Step S1010a and step S1010b may refer to the description of the above-mentioned step S810a and step S810b, which will not be repeated here.
S1011、电子设备基于用户操作7,退出悬浮APP2。S1011. The electronic device exits the floating APP2 based on the user operation 7.
步骤S1011可以参考上述步骤S811中的描述,此处不再赘述。Step S1011 may refer to the description of the above step S811 and will not be repeated here.
S1012a、电子设备将音频数据data1发送给耳机200。S1012a : The electronic device sends the audio data data1 to the headset 200 .
S1012b、电子设备将音频数据data1发送给耳机200。S1012b : The electronic device sends the audio data data1 to the headset 200 .
步骤S1012a和步骤S1012b可以参考上述步骤S812a和步骤S812b中的描述,此处不再赘述。Step S1012a and step S1012b may refer to the description of the above-mentioned step S812a and step S812b, which will not be repeated here.
图11示出了本申请实施例提供的一种音频传输方法。FIG. 11 shows an audio transmission method provided in an embodiment of the present application.
在一些场景中,当电子设备确定电子设备连接有2副耳机时,电子设备开始检测耳机方位。这样,当电子设备中开启了两个输出音频的APP时,电子设备可以无需等待确定耳机方位,快速确定将两个APP的音频数据按照耳机方位分别发送给对应的耳机。In some scenarios, when the electronic device determines that two pairs of headphones are connected to the electronic device, the electronic device starts to detect the position of the headphones. In this way, when two apps that output audio are opened in the electronic device, the electronic device can quickly determine to send the audio data of the two apps to the corresponding headphones according to the position of the headphones without waiting to determine the position of the headphones.
如图11所示,本申请实施例提供的一种音频传输方法可以包括如下步骤:As shown in FIG. 11 , an audio transmission method provided in an embodiment of the present application may include the following steps:
S1101、电子设备是否连接有两幅无线耳机,若是,则执行步骤S1102a,若否,则执行S1102b。S1101: Is the electronic device connected to two wireless headphones? If so, execute step S1102a; if not, execute step S1102b.
电子设备可以连接有多副耳机,当电子设备至少连接有两幅耳机,例如上文中的耳机200和耳机300时,电子设备可以开始监测耳机方位,即执行下述步骤S1102a。The electronic device may be connected to multiple pairs of headphones. When the electronic device is connected to at least two pairs of headphones, such as the headphones 200 and 300 mentioned above, the electronic device may start to monitor the position of the headphones, that is, execute the following step S1102a.
当电子设备未连接无线耳机或者只连接有一副无线耳机时,电子设备可以停止对检测耳机方位,即执行步骤S1102b。When the electronic device is not connected to a wireless headset or is only connected to a pair of wireless headsets, the electronic device may stop detecting the orientation of the headset, ie, execute step S1102b.
在一种可能的实现方式中,电子设备持续的监测电子设备是否连接有2副无线耳机,当电子设备先确定电子设备连接有2副无线耳机,在监测2副无线耳机的方位时,若电子设备监测到2副耳机中任一副耳机与电子设备断开连接,电子设备会停止对2副耳机进行方位监测。In one possible implementation, the electronic device continuously monitors whether two pairs of wireless headphones are connected to the electronic device. When the electronic device first determines that the electronic device is connected to two pairs of wireless headphones, while monitoring the positions of the two pairs of wireless headphones, if the electronic device detects that any one of the two pairs of headphones is disconnected from the electronic device, the electronic device stops monitoring the positions of the two pairs of headphones.
在一些场景中,当电子设备确定未连接有两幅无线耳机时,电子可以持续的监测是否连接有2副无线耳机,即持续地执行步骤S1101。In some scenarios, when the electronic device determines that two pairs of wireless headphones are not connected, the electronic device may continuously monitor whether two pairs of wireless headphones are connected, that is, continuously execute step S1101.
S1102a、电子设备监测耳机方位。S1102a. The electronic device monitors the position of the earphone.
当电子设备确定连接有2副无线耳机,电子设备可以开始监测耳机方位。电子设备如何检测耳机方位可以参考上述图6、图7中的描述,此处不再赘述。When the electronic device determines that two pairs of wireless headphones are connected, the electronic device can start to monitor the position of the headphones. How the electronic device detects the position of the headphones can refer to the description in Figures 6 and 7 above, which will not be repeated here.
电子设备通过监测耳机方位可以实时确定连接的2副无线耳机所处的方位,以及2副无线耳机所处的相对方位。By monitoring the positions of the earphones, the electronic device can determine in real time the positions of the two connected wireless earphones and the relative positions of the two wireless earphones.
S1102b、电子设备停止对耳机的方位监测。S1102b. The electronic device stops monitoring the position of the earphone.
当电子设备已经开始对耳机进行方位监测,电子设备从连接有两幅耳机变为未连接两幅耳机时,电子设备可以停止对耳机的方位监测。When the electronic device has started to monitor the position of the earphones and the electronic device changes from being connected to two pairs of earphones to not being connected to two pairs of earphones, the electronic device can stop monitoring the position of the earphones.
S1103、电子设备确定是否开启两个输出音频的APP,若是,则执行步骤S1104,若否,则继续执行步骤S1103。S1103: The electronic device determines whether two apps that output audio are turned on. If so, step S1104 is executed. If not, step S1103 is continued.
当电子设备确定开启了两个输出音频的APP:输出音频的APP11和输出音频的APP22时,电子设备可以检测两个APP的窗口状态。例如,APP11和APP22可以是图4A-图4D中的视频APP、通话APP、或者是图8中涉及的全屏APP1和悬浮APP2。本申请实施例对APP11和APP22具体是何种类型、何种名称的APP不作限定。当电子设备确定已开启有两个输出音频的APP时,电子设备可以执行下述步骤S1104。When the electronic device determines that two APPs that output audio are turned on: APP11 that outputs audio and APP22 that outputs audio, the electronic device can detect the window status of the two APPs. For example, APP11 and APP22 can be the video APPs, call APPs in Figures 4A-4D, or the full-screen APP1 and floating APP2 involved in Figure 8. The embodiment of the present application does not limit the specific type and name of APP11 and APP22. When the electronic device determines that two APPs with audio output are turned on, the electronic device can execute the following step S1104.
S1104、电子设备监测APP窗口状态。S1104. The electronic device monitors the APP window status.
当电子设备确定开启有两个输出音频的APP,即APP11和APP22时,电子设备可以监测APP11的应 用窗口和APP22的应用窗口的状态。APP11以及APP22的状态可以是全屏显示、悬浮显示或者分屏显示等等。When the electronic device determines to start two APPs that output audio, namely APP11 and APP22, the electronic device can monitor the application of APP11. The status of the application window of APP11 and APP22. The status of APP11 and APP22 can be full screen display, floating display or split screen display, etc.
具体地,电子设备可以通过电子设备中的应用窗口监控服务模块来监测APP11的窗口和APP2的窗口状态。关于应用窗口监控服务模块可以参考下文中对图12的描述,此处先不赘述。Specifically, the electronic device can monitor the window status of APP11 and APP2 through the application window monitoring service module in the electronic device. For the application window monitoring service module, please refer to the description of FIG. 12 below, which will not be repeated here.
S1105、电子设备确定悬浮APP的方位是否和两幅耳机中的一副耳机的方位相同,若是,则执行步骤S1106,若否,则继续执行步骤S1104。S1105. The electronic device determines whether the position of the floating APP is the same as the position of one of the two headphones. If so, execute step S1106; if not, continue to execute step S1104.
电子设备若确定两个输出音频的APP11和APP22中的APP11或APP22为悬浮APP(下文以APP11为悬浮APP为例),则电子设备需要确定悬浮APP,例如APP11的方位和2副无线耳机中的哪一副耳机的方位相同。若电子设备确定该APP11的方位和2副无线耳机中某一幅耳机的方位相同,则执行步骤S1106;若否,则电子设备可以继续监测APP窗口状态,即执行步骤S1104。If the electronic device determines that APP11 or APP22 of the two APP11 and APP22 that output audio is a floating APP (hereinafter, APP11 is taken as an example of a floating APP), the electronic device needs to determine the floating APP, for example, the position of APP11 is the same as the position of one of the two pairs of wireless headphones. If the electronic device determines that the position of APP11 is the same as the position of one of the two pairs of wireless headphones, step S1106 is executed; if not, the electronic device can continue to monitor the APP window status, that is, step S1104 is executed.
S1106、电子设备将两个输出音频的APP的音频数据按照方位发送给对应的耳机。S1106. The electronic device sends the audio data of the two audio-output APPs to the corresponding earphones according to the directions.
电子设备可以根据两个输出音频的APP的窗口状态,以及两个输出音频的APP的应用窗口在显示屏中的方位,将两个输出音频的APP的音频数据发送给对应的耳机。具体可以参考步骤S906中的描述,此处不再赘述。The electronic device can send the audio data of the two audio output APPs to the corresponding headphones according to the window states of the two audio output APPs and the positions of the application windows of the two audio output APPs on the display screen. For details, please refer to the description in step S906, which will not be repeated here.
在本申请实施例中,电子设备可以基于两个输出音频的APP的应用窗口的状态以及方位,将两个输出音频的APP的音频数据分别发送给方位相同的耳机。这样,佩戴耳机200的用户和佩戴耳机300的用户基于用户需求,可以选择让耳机与两个输出音频APP中的其中一个APP的应用窗口的方位保持相同,从而收听到想要收听的音频APP的音频数据。而且,佩戴耳机200的用户还可以和佩戴耳机300的用户收听到不同音频APP的音频数据。In an embodiment of the present application, the electronic device can send the audio data of the two audio output APPs to the headphones with the same orientation based on the status and orientation of the application windows of the two audio output APPs. In this way, the user wearing the headphones 200 and the user wearing the headphones 300 can choose to keep the headphones in the same orientation as the application window of one of the two audio output APPs based on user needs, so as to listen to the audio data of the audio APP they want to listen to. Moreover, the user wearing the headphones 200 can also listen to the audio data of different audio APPs with the user wearing the headphones 300.
并且,电子设备可以在连接有两副耳机时,开始对耳机方位的监测。这样,电子设备可以及时将两个输出音频的APP的音频数据分别发送给方位相同的耳机。Furthermore, the electronic device can start monitoring the position of the earphones when two pairs of earphones are connected. In this way, the electronic device can timely send the audio data of the two audio output APPs to the earphones with the same position.
下面介绍本申请实施例提供的示例性电子设备1200。The following introduces an exemplary electronic device 1200 provided in an embodiment of the present application.
图12是本申请实施例提供的电子设备1200的结构示意图。FIG. 12 is a schematic diagram of the structure of an electronic device 1200 provided in an embodiment of the present application.
下面以电子设备1200为例对实施例进行具体说明。应该理解的是,电子设备1200可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。The embodiment is described in detail below by taking the electronic device 1200 as an example. It should be understood that the electronic device 1200 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
电子设备1200可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 1200 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194 and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备1200的具体限定。在本申请另一些实施例中,电子设备1200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 1200. In other embodiments of the present application, the electronic device 1200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated in one or more processors.
其中,控制器可以是电子设备1200的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 1200. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。 The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备1200的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 1200.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备1200的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备1200的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 1200. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 1200.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
SIM接口可以被用于与SIM卡接口195通信,实现传送数据到SIM卡或读取SIM卡中数据的功能。The SIM interface can be used to communicate with the SIM card interface 195 to implement the function of transmitting data to the SIM card or reading data in the SIM card.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备1200充电,也可以用于电子设备1200与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with USB standard specifications, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 1200, and can also be used to transmit data between the electronic device 1200 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备1200的结构限定。在本申请另一些实施例中,电子设备1200也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 1200. In other embodiments of the present application, the electronic device 1200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
电子设备1200的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 1200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备1200中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 1200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备1200上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA) 等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 1200. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), Etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, and filter, amplify and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 can be set in the same device as at least some modules of the processor 110.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备1200上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied to the electronic device 1200. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
在一些实施例中,电子设备1200的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备1200可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 1200 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 1200 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
电子设备1200通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 1200 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备1200可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 1200 may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备1200可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 1200 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,颜色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备1200可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 1200 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如, 当电子设备1200在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals. For example, When the electronic device 1200 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
视频编解码器用于对数字视频压缩或解压缩。电子设备1200可以支持一种或多种视频编解码器。这样,电子设备1200可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital videos. The electronic device 1200 may support one or more video codecs. Thus, the electronic device 1200 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备1200的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural network (NN) computing processor, which can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain. NPU can realize applications such as intelligent cognition of electronic device 1200, such as image recognition, face recognition, voice recognition, text understanding, etc.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备1200的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 1200. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备1200的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用(比如人脸识别功能,指纹识别功能、移动支付功能等)等。存储数据区可存储电子设备1200使用过程中所创建的数据(比如人脸信息模板数据,指纹信息模板等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 1200 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, applications required for at least one function (such as face recognition function, fingerprint recognition function, mobile payment function, etc.), etc. The data storage area may store data created during the use of the electronic device 1200 (such as face information template data, fingerprint information template, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
电子设备1200可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 1200 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备1200可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 1200 can listen to music or listen to a hands-free call through the speaker 170A.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备1200接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 1200 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备1200可以设置至少一个麦克风170C。在另一些实施例中,电子设备1200可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备1200还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 1200 can be provided with at least one microphone 170C. In other embodiments, the electronic device 1200 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 1200 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D may be the USB interface 130, or may be a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。The pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals.
陀螺仪传感器180B可以用于确定电子设备1200的运动姿态。The gyro sensor 180B may be used to determine the motion posture of the electronic device 1200 .
气压传感器180C用于测量气压。在一些实施例中,电子设备1200通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 1200 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备1200可以利用磁传感器180D检测翻盖皮套的开合。The magnetic sensor 180D includes a Hall sensor, and the electronic device 1200 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
加速度传感器180E可检测电子设备1200在各个方向上(一般为三轴)加速度的大小。当电子设备1200静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 1200 in all directions (generally three axes). When the electronic device 1200 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
距离传感器180F,用于测量距离。电子设备1200可以通过红外或激光测量距离。The distance sensor 180F is used to measure the distance. The electronic device 1200 can measure the distance by infrared or laser.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备1200通过发光二极管向外发射红外光。电子设备1200使用光电二极管检测来自附近物体的红外反射光。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 1200 emits infrared light outward through the light emitting diode. The electronic device 1200 uses the photodiode to detect infrared reflected light from nearby objects.
环境光传感器180L用于感知环境光亮度。电子设备1200可以根据感知的环境光亮度自适应调节显示屏194亮度。The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device 1200 can adaptively adjust the brightness of the display screen 194 according to the sensed brightness of the ambient light.
指纹传感器180H用于采集指纹。The fingerprint sensor 180H is used to collect fingerprints.
温度传感器180J用于检测温度。 The temperature sensor 180J is used to detect the temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备1200可以接收按键输入,产生与电子设备1200的用户设置以及功能控制有关的键信号输入。The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 1200 may receive key input and generate key signal input related to user settings and function control of the electronic device 1200.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
SIM卡接口195用于连接SIM卡。电子设备1200通过SIM卡和网络交互,实现通话以及数据通信等功能。The SIM card interface 195 is used to connect a SIM card. The electronic device 1200 interacts with the network through the SIM card to implement functions such as calls and data communications.
可以理解的是,图12中示出的电子设备1200可以是上述实施例中涉及的平板100或者电子设备。It can be understood that the electronic device 1200 shown in FIG. 12 may be the tablet 100 or the electronic device involved in the above embodiments.
图13是本申请实施例的电子设备1300的软硬件结构框图。FIG. 13 is a block diagram of the software and hardware structure of an electronic device 1300 according to an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将电子设备1300的系统分为应用程序层,框架层,硬件抽象层。另外,电子设备1300中还包括硬件层。电子设备1300可以通过软件架构层和硬件层结合,实现上述图8-图11示出的音频传输方法。The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system of the electronic device 1300 is divided into an application layer, a framework layer, and a hardware abstraction layer. In addition, the electronic device 1300 also includes a hardware layer. The electronic device 1300 can implement the audio transmission method shown in Figures 8 to 11 by combining the software architecture layer and the hardware layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图13所示,应用程序包可以包括APP1、APP2、APP3、…、APPn等应用程序。其中APP1、APP2可以是能够输出音频的应用程序,例如音乐、视频、通话等应用程序。APP3、…、APPn可以是相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序(也可以称为应用)。As shown in FIG. 13 , the application package may include applications such as APP1, APP2, APP3, …, APPn, etc. Among them, APP1 and APP2 may be applications that can output audio, such as music, video, call, etc. APP3, …, APPn may be applications (also referred to as applications) such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
如图13所示,框架层可以包括媒体服务模块、应用窗口监控服务模块以及蓝牙服务模块等等。As shown in FIG. 13 , the framework layer may include a media service module, an application window monitoring service module, a Bluetooth service module, and the like.
媒体服务模块中可以包括音频策略执行audio flinger模块。该音频策略执行模块中的音频混合器audio mixer可以用于根据应用窗口监控服务模块指定的混音逻辑,将应用层的APP1和APP2分别输入的音频流1和音频流2进行混音,并将混音后的音频发送给硬件抽象层(Hardware Abstraction Layer,HAL)中的蓝牙硬件抽象层模块。The media service module may include an audio flinger module for executing an audio policy. The audio mixer in the audio flinger module may be used to mix the audio stream 1 and the audio stream 2 respectively input by APP1 and APP2 of the application layer according to the mixing logic specified by the application window monitoring service module, and send the mixed audio to the Bluetooth hardware abstraction layer module in the hardware abstraction layer (HAL).
应用窗口监控服务模块可以用于监控应用窗口位置和状态,即用于监控应用窗口在显示屏的左侧、右侧或者中间,以及用于监控应用窗口为全屏窗口、或者悬浮窗口、或者分屏窗口。The application window monitoring service module can be used to monitor the position and status of the application window, that is, to monitor whether the application window is on the left, right or middle of the display screen, and to monitor whether the application window is a full-screen window, a floating window, or a split-screen window.
应用窗口监控服务模块还可以用于基于应用窗位置和状态,制定混音逻辑,并将混音逻辑发送给音频混合器。The application window monitoring service module can also be used to formulate mixing logic based on the application window position and state, and send the mixing logic to the audio mixer.
音频混合器可以基于混音逻辑选择是否混音,以及基于混音逻辑将应用的音频流分配到系统脉冲编码调制(pulse code modulation,PCM)音频流通道2或者系统PCM音频流通道1。The audio mixer can choose whether to mix based on the mixing logic, and allocate the application's audio stream to the system pulse code modulation (PCM) audio stream channel 2 or the system PCM audio stream channel 1 based on the mixing logic.
具体地,音频混合器可以基于混音逻辑具体分配应用的音频流可以包括如下几种情况:Specifically, the audio mixer may allocate the audio stream of the application based on the mixing logic, including the following situations:
1.当应用窗口监控服务模块监测到电子设备开启有一个输出音频的APP,例如APP1,混音逻辑可以为:音频混合器无需进行混音,并将APP1的音频流分配给系统PCM音频流通道1和系统PCM音频流通道2。1. When the application window monitoring service module detects that the electronic device opens an APP that outputs audio, such as APP1, the mixing logic can be: the audio mixer does not need to perform mixing, and allocates the audio stream of APP1 to system PCM audio stream channel 1 and system PCM audio stream channel 2.
2.当应用窗口监控服务模块监测到电子设备开启有两个输出音频的APP,例如APP1和APP2,且APP1的应用窗口为全屏窗口,APP2的应用窗口为悬浮窗口可以存在以下几种混音逻辑:2. When the application window monitoring service module detects that the electronic device has two APPs with audio output, such as APP1 and APP2, and the application window of APP1 is a full-screen window and the application window of APP2 is a floating window, the following mixing logics may exist:
A:当悬浮窗口处于显示屏的左侧或者右侧时,音频混合器无需进行混音,将悬浮窗口的音频流和全屏窗口的音频流分配到不同的系统PCM音频流通道。具体地,若悬浮窗口在显示屏左侧,则音频混合器将悬浮窗口的音频流分配到系统PCM音频流通道2;并将全屏窗口的音频流分配到另一个系统PCM音频流通道,即系统PCM音频流通道1。若悬浮窗口在右侧,则音频混合器将处于显示屏右侧的悬浮窗口的音频流分配到系统PCM音频流通道1;并将全屏窗口的音频流分配到另一个系统音频PCM流通道,即系统PCM音频流通道2。A: When the floating window is on the left or right side of the display screen, the audio mixer does not need to perform mixing, and the audio stream of the floating window and the audio stream of the full-screen window are assigned to different system PCM audio stream channels. Specifically, if the floating window is on the left side of the display screen, the audio mixer assigns the audio stream of the floating window to system PCM audio stream channel 2; and assigns the audio stream of the full-screen window to another system PCM audio stream channel, namely, system PCM audio stream channel 1. If the floating window is on the right side, the audio mixer assigns the audio stream of the floating window on the right side of the display screen to system PCM audio stream channel 1; and assigns the audio stream of the full-screen window to another system audio PCM stream channel, namely, system PCM audio stream channel 2.
B:当悬浮窗口处于显示屏的左侧或者右侧时,音频混合器需要进行混音,并将混音后的音频流发送给一个系统PCM音频流通道,未混音的全屏窗口的音频流发送给另一个系统PCM音频流通道。具体地,若悬浮窗口在显示屏左侧,则音频混合器将悬浮窗口的音频流和全屏窗口的音频流进行混音后分配到系统PCM音频流通道2;并将全屏窗口的音频流分配到另一个系统PCM音频流通道,即系统PCM音频流通道1。若悬浮窗口在右侧,则音频混合器将处于显示屏右侧的悬浮窗口的音频流和全屏窗口的音频流混音后分配到系统PCM音频流通道1;并将全屏窗口的音频流分配到另一个系统PCM音频流通道,即系统PCM音频流通道2。 B: When the floating window is on the left or right side of the display screen, the audio mixer needs to mix the audio and send the mixed audio stream to one system PCM audio stream channel, and the unmixed audio stream of the full-screen window to another system PCM audio stream channel. Specifically, if the floating window is on the left side of the display screen, the audio mixer mixes the audio stream of the floating window and the audio stream of the full-screen window and assigns them to system PCM audio stream channel 2; and assigns the audio stream of the full-screen window to another system PCM audio stream channel, namely, system PCM audio stream channel 1. If the floating window is on the right side, the audio mixer mixes the audio stream of the floating window on the right side of the display screen and the audio stream of the full-screen window and assigns them to system PCM audio stream channel 1; and assigns the audio stream of the full-screen window to another system PCM audio stream channel, namely, system PCM audio stream channel 2.
C:当悬浮窗口处于显示屏的中间时,音频混合器需要进行混音,并将混音后的音频流发送到两个系统PCM音频流通道。具体地,当悬浮窗口处于显示屏的中间时,音频混合器将悬浮窗口的音频流和全屏窗口的音频流进行混音后分配到系统PCM音频流通道2和系统PCM音频流通道1。C: When the floating window is in the middle of the display screen, the audio mixer needs to mix the audio and send the mixed audio stream to two system PCM audio stream channels. Specifically, when the floating window is in the middle of the display screen, the audio mixer mixes the audio stream of the floating window and the audio stream of the full-screen window and distributes them to system PCM audio stream channel 2 and system PCM audio stream channel 1.
3.当应用窗口监控服务模块监测到电子设备开启有两个输出音频的APP,例如APP1和APP2,且APP1的应用窗口和APP2的应用窗口为悬浮窗口或分屏窗口时,混音逻辑可以为:音频混合器可以选择不进行混音,基于应用窗口的方位将处于左侧的应用窗口的音频流分配到系统PCM音频流通道2,将处于右侧的应用窗口的音频流分配到系统PCM音频流通道1。3. When the application window monitoring service module detects that the electronic device has opened two APPs with output audio, such as APP1 and APP2, and the application window of APP1 and the application window of APP2 are floating windows or split-screen windows, the mixing logic can be: the audio mixer can choose not to mix, and based on the orientation of the application window, the audio stream of the application window on the left is assigned to the system PCM audio stream channel 2, and the audio stream of the application window on the right is assigned to the system PCM audio stream channel 1.
应用窗口监控服务模块还可以用于检测到电子设备1300中开启了两个输出音频的APP时,通知蓝牙服务模块中的耳机定位服务模块获取耳机方位。The application window monitoring service module can also be used to detect that two apps that output audio are opened in the electronic device 1300, and notify the earphone positioning service module in the Bluetooth service module to obtain the earphone position.
蓝牙服务模块中可以包括耳机定位服务模块。耳机定位服务模块可以用于基于应用窗口监控服务模块发送的指示开始获取耳机方位,或者可以用于在检测到连接有两副无线耳机时,开始获取耳机方位。耳机定位服务模块还可以用于将获取到的耳机方位信息发送给蓝牙硬件抽象层模块中的耳机数据流分配单元。The Bluetooth service module may include a headset positioning service module. The headset positioning service module may be used to start acquiring the headset position based on the instruction sent by the application window monitoring service module, or may be used to start acquiring the headset position when two pairs of wireless headsets are detected to be connected. The headset positioning service module may also be used to send the acquired headset position information to the headset data stream allocation unit in the Bluetooth hardware abstraction layer module.
硬件抽象层HAL中可以包括蓝牙硬件抽象层模块。蓝牙硬件抽象层模块中的耳机数据流分配单元可以接收到音频混合器通过系统PCM音频流通路2和系统PCM音频流通路1发送的音频数据,以及耳机定位服务模块发送的耳机方位信息。耳机数据流分配单元可以基于耳机方位信息将系统PCM音频流通路2和系统PCM音频流通路1发送的音频数据分配给耳机。示例性地,耳机数据流分配单元可以将系统PCM音频流通路2中的应用的音频流分配给位于左侧的耳机,将系统PCM音频流通路1中应用的音频流分配给位于右侧的耳机。该系统PCM音频流通路2中的应用的音频流可以是位于电子设备1300的显示屏左侧的APP的音频数据。The hardware abstraction layer HAL may include a Bluetooth hardware abstraction layer module. The headphone data stream distribution unit in the Bluetooth hardware abstraction layer module may receive audio data sent by the audio mixer through the system PCM audio stream channel 2 and the system PCM audio stream channel 1, as well as the headphone position information sent by the headphone positioning service module. The headphone data stream distribution unit may distribute the audio data sent by the system PCM audio stream channel 2 and the system PCM audio stream channel 1 to the headphone based on the headphone position information. Exemplarily, the headphone data stream distribution unit may distribute the audio stream of the application in the system PCM audio stream channel 2 to the headphone located on the left, and distribute the audio stream of the application in the system PCM audio stream channel 1 to the headphone located on the right. The audio stream of the application in the system PCM audio stream channel 2 may be the audio data of the APP located on the left side of the display screen of the electronic device 1300.
耳机数据流分配单元可以将分配给耳机200的音频流(例如,系统PCM音频流通路2中的音频流)发送给硬件层中的蓝牙芯片,由蓝牙芯片将该音频流发送给耳机200。耳机数据流分配单元可以将分配给耳机300的音频流(例如,系统PCM音频流通路1中的音频流)发送给硬件层中的蓝牙芯片,由蓝牙芯片将该音频流发送给耳机300。The headset data stream distribution unit can send the audio stream allocated to the headset 200 (for example, the audio stream in the system PCM audio stream path 2) to the Bluetooth chip in the hardware layer, and the Bluetooth chip sends the audio stream to the headset 200. The headset data stream distribution unit can send the audio stream allocated to the headset 300 (for example, the audio stream in the system PCM audio stream path 1) to the Bluetooth chip in the hardware layer, and the Bluetooth chip sends the audio stream to the headset 300.
示例性地,以APP1的应用窗口为全屏窗口,APP2的应用窗口为悬浮窗口,APP2的应用窗口在显示屏的左侧为例阐述电子设备1300中的各个模块具体如何将APP1、APP2的音频流分配到耳机200、耳机300。Exemplarily, taking the application window of APP1 as a full-screen window, the application window of APP2 as a floating window, and the application window of APP2 on the left side of the display screen as an example, it is explained how each module in the electronic device 1300 specifically distributes the audio streams of APP1 and APP2 to headphones 200 and headphones 300.
当电子设备1300的应用窗口监控服务监测到APP1的应用窗口为全屏窗口,APP2的应用窗口为悬浮窗口,且APP2的应用窗口处于显示屏的左侧时,应用窗口监控服务制定的混音逻辑可以为:若悬浮窗口在显示屏左侧,音频混合器无需进行混音。则音频混合器将悬浮窗口的音频流分配到系统音频流通道2;并将全屏窗口的音频流分配到另一个音频流通道,即系统PCM音频流通道1。When the application window monitoring service of the electronic device 1300 detects that the application window of APP1 is a full-screen window, the application window of APP2 is a floating window, and the application window of APP2 is on the left side of the display screen, the mixing logic formulated by the application window monitoring service can be: if the floating window is on the left side of the display screen, the audio mixer does not need to mix. Then the audio mixer assigns the audio stream of the floating window to the system audio stream channel 2; and assigns the audio stream of the full-screen window to another audio stream channel, namely the system PCM audio stream channel 1.
该应用窗口监控服务可以将混音逻辑以及监测到的APP1和APP2的窗口显示方式以及位置发送给音频混合器。音频混合器基于混音逻辑,以及APP1和APP2的窗口显示方式以及位置,确定无需将APP1的音频流和APP2的音频流进行混音,音频混合器将APP2的音频流分配到系统音频流通道2;并将APP1的音频流分配到另一个音频流通道,即系统PCM音频流通道1。The application window monitoring service can send the mixing logic and the monitored window display mode and position of APP1 and APP2 to the audio mixer. Based on the mixing logic and the window display mode and position of APP1 and APP2, the audio mixer determines that there is no need to mix the audio stream of APP1 and the audio stream of APP2. The audio mixer assigns the audio stream of APP2 to the system audio stream channel 2; and assigns the audio stream of APP1 to another audio stream channel, namely the system PCM audio stream channel 1.
当耳机数据流分配单元接收到的耳机方位信息为耳机200处于左侧,耳机300处于右侧时,耳机数据流分配单元将系统音频流通道2中的APP2的音频流分配给耳机200,将系统PCM音频流通道1中的APP1的音频流分配给耳机300。这样,耳机200的用户可以收听到APP2的音频数据,耳机300的用户可以收听到APP1的音频数据。When the headset data stream distribution unit receives the headset orientation information that the headset 200 is on the left and the headset 300 is on the right, the headset data stream distribution unit distributes the audio stream of APP2 in the system audio stream channel 2 to the headset 200, and distributes the audio stream of APP1 in the system PCM audio stream channel 1 to the headset 300. In this way, the user of the headset 200 can listen to the audio data of APP2, and the user of the headset 300 can listen to the audio data of APP1.
可以理解的是,图13中示出的电子设备1300可以是上述实施例中涉及的平板100或者电子设备。It can be understood that the electronic device 1300 shown in FIG. 13 may be the tablet 100 or the electronic device involved in the above embodiments.
上述内容详细阐述了本申请提供的方法,为了便于更好地实施本申请实施例的上述方案,本申请实施例还提供了相应的装置或设备。The above content elaborates on the method provided by the present application. In order to facilitate better implementation of the above scheme of the embodiment of the present application, the embodiment of the present application also provides corresponding devices or equipment.
本申请实施例可以根据上述方法示例对电子设备和无线耳机(例如耳机200、耳机300)进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can divide the functional modules of the electronic device and the wireless headset (such as headset 200, headset 300) according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
作为一种可能的产品形态,本申请实施例所述的电子设备,可以有一般性的总线体结构来实现。As a possible product form, the electronic device described in the embodiment of the present application can be implemented with a general bus body structure.
参见图14,图14是本申请实施例提供的装置1400的结构示意图。该装置1400可以是图1-图6中涉 及的平板100,或者是图8-图11中涉及的电子设备,或其中的装置。如图14所示,该装置1400可以包括天线阵列模块1401、切换开关1402、短距芯片1403、处理器1404以及音频解码器1405。其中,天线阵列模块1401可以用于接收无线耳机发送的蓝牙信号,或者向无线耳机发送蓝牙信号。切换开关1402可以用于切换天线阵列模块1401中的多个天线。短距芯片1403可以用于基于天线阵列模块1401获取的蓝牙信号进行角度检测和距离估算。处理器1404可以用于基于两个输出音频的APP的应用窗口在显示屏中的方位,以及与装置1400相连接的无线耳机的方位,将两个音频的APP的音频数据分发给对应无线耳机。音频解码器1405可以用于装置1400中APP输出的音频进行解码、以及按照不同的场景将各个APP的音频数据打包成一个序列、或者将各个APP的音频数据打包成多个序列。Referring to FIG. 14, FIG. 14 is a schematic diagram of the structure of a device 1400 provided in an embodiment of the present application. The device 1400 may be the device 1400 of FIG. 1 to FIG. 6. And the tablet 100, or the electronic device involved in Figures 8-11, or the device therein. As shown in Figure 14, the device 1400 may include an antenna array module 1401, a switch 1402, a short-range chip 1403, a processor 1404, and an audio decoder 1405. Among them, the antenna array module 1401 can be used to receive a Bluetooth signal sent by a wireless headset, or send a Bluetooth signal to a wireless headset. The switch 1402 can be used to switch multiple antennas in the antenna array module 1401. The short-range chip 1403 can be used to perform angle detection and distance estimation based on the Bluetooth signal obtained by the antenna array module 1401. The processor 1404 can be used to distribute the audio data of the two audio APPs to the corresponding wireless headsets based on the orientation of the application windows of the two audio output APPs in the display screen and the orientation of the wireless headset connected to the device 1400. The audio decoder 1405 can be used to decode the audio output by the APP in the device 1400, and to package the audio data of each APP into a sequence according to different scenarios, or to package the audio data of each APP into multiple sequences.
一种设计中,装置1400可以用于执行前述实施例中平板100或者电子设备的功能。In one design, the apparatus 1400 may be used to perform the functions of the tablet 100 or the electronic device in the aforementioned embodiments.
作为一种可能的产品形态,本申请实施例所述的耳机200或耳机300,可以有一般性的总线体结构来实现。As a possible product form, the earphone 200 or earphone 300 described in the embodiment of the present application can be implemented with a general bus body structure.
参见图15,图15是本申请实施例提供的装置1500的结构示意图。该装置1500可以是前述实施例中涉及的耳机200或耳机300,或耳机200、耳机300中的装置。如图15所示,该装置1500可以包括蓝牙微控处理单元MCU芯片1501、麦克风1502、听筒1503以及蓝牙天线1504。其中,蓝牙微控处理单元MCU芯片1501可以用于对接收到的音频信号进行处理,例如,数模转换、放大等等。麦克风1502可以用于采集声音信号,并将声音信号转换为电信号。听筒1503可以用于播放声音信号。蓝牙天线1504可以用于收发蓝牙信号。Referring to FIG. 15 , FIG. 15 is a schematic diagram of the structure of a device 1500 provided in an embodiment of the present application. The device 1500 may be the earphone 200 or earphone 300 involved in the aforementioned embodiments, or a device in the earphone 200 or earphone 300. As shown in FIG. 15 , the device 1500 may include a Bluetooth micro-control processing unit MCU chip 1501, a microphone 1502, an earpiece 1503, and a Bluetooth antenna 1504. Among them, the Bluetooth micro-control processing unit MCU chip 1501 can be used to process the received audio signal, for example, digital-to-analog conversion, amplification, etc. The microphone 1502 can be used to collect sound signals and convert the sound signals into electrical signals. The earpiece 1503 can be used to play sound signals. The Bluetooth antenna 1504 can be used to send and receive Bluetooth signals.
一种设计中,装置1500可以用于执行前述实施例中耳机200或耳机300的功能。In one design, the apparatus 1500 may be used to perform the functions of the earphone 200 or the earphone 300 in the aforementioned embodiments.
作为一种可能的产品形态,本申请实施例所述的电子设备,可以采用软件功能模块的形式实现。As a possible product form, the electronic device described in the embodiment of the present application can be implemented in the form of a software function module.
参见图16,图16是本申请实施例提供的装置1600的结构示意图。该装置1600可以是图1-图6中涉及的平板100,或者是图8-图11中涉及的电子设备,或其中的装置。如图16所示,该装置1600可以包括通信模块1601、显示模块1602、以及音频分配模块1603。其中:Referring to FIG. 16 , FIG. 16 is a schematic diagram of the structure of an apparatus 1600 provided in an embodiment of the present application. The apparatus 1600 may be the tablet 100 involved in FIGS. 1 to 6 , or the electronic device involved in FIGS. 8 to 11 , or an apparatus therein. As shown in FIG. 16 , the apparatus 1600 may include a communication module 1601, a display module 1602, and an audio distribution module 1603. Among them:
通信模块1601可以用于与第一音频设备以及第二音频设备建立通信连接。The communication module 1601 may be configured to establish a communication connection with a first audio device and a second audio device.
显示模块1602用于在装置1600中的显示屏上显示第一窗口和第二窗口,其中第一窗口可以是第一应用的应用窗口,第一窗口播放第一音频数据,第二窗口为第二应用的应用窗口,第二窗口播放第二音频数据。The display module 1602 is used to display a first window and a second window on the display screen in the device 1600, wherein the first window may be an application window of a first application, the first window plays first audio data, and the second window is an application window of a second application, the second window plays second audio data.
第一窗口和第二窗口可以分别是上述实施例中的视频播放窗口101、音频播放窗口102或者通话窗口103中的任一个。The first window and the second window may be any one of the video play window 101, the audio play window 102 or the call window 103 in the above-mentioned embodiment, respectively.
音频分配模块1603可以用于根据第一窗口、第二窗口在装置1600中的显示屏上的状态,以及第一音频设备和第二音频设备的方位,将第一音频数据发送给第一音频设备,将第二音频数据发送给第二音频设备。The audio distribution module 1603 can be used to send the first audio data to the first audio device and the second audio data to the second audio device according to the status of the first window and the second window on the display screen in the device 1600 and the orientation of the first audio device and the second audio device.
可选地,装置1600还可以包括设备感知模块,该设备感知模块可以用于检测第一音频设备与装置1600之间的角度(可以称为第一音频设备的方位角)和/或第一音频设备与装置1600之间的距离。该设备感知模块还可以用于检测第二音频设备与装置1600之间的角度(可以称为第二音频设备的方位角)和/或第二音频设备与装置1600之间的距离。Optionally, the apparatus 1600 may further include a device sensing module, which may be used to detect an angle between the first audio device and the apparatus 1600 (which may be referred to as the azimuth of the first audio device) and/or a distance between the first audio device and the apparatus 1600. The device sensing module may also be used to detect an angle between the second audio device and the apparatus 1600 (which may be referred to as the azimuth of the second audio device) and/or a distance between the second audio device and the apparatus 1600.
可选地,装置1600还可以包括应用位置监测模块,该应用位置监测模块可以用于检测第一窗口的显示方式以及第一窗口在显示屏上的位置,和用于检测第二窗口的显示方式以及第二窗口在显示屏上的位置。Optionally, the device 1600 may further include an application position monitoring module, which may be used to detect the display mode of the first window and the position of the first window on the display screen, and to detect the display mode of the second window and the position of the second window on the display screen.
可选地,装置1600还可以包括音频处理模块,该音频处理模块可以用于根据第一窗口、第二窗口的显示方式以及第一窗口、第二窗口在显示屏上的位置确定是否将第一窗口的第一音频数据和第二窗口的第二音频数据打包成一个音频序列,或者打包成多个音频序列发送给对应方位的第一音频设备和第二音频设备。Optionally, device 1600 may also include an audio processing module, which can be used to determine whether to package the first audio data of the first window and the second audio data of the second window into one audio sequence, or package them into multiple audio sequences and send them to the first audio device and the second audio device at corresponding locations according to the display mode of the first window and the second window and the position of the first window and the second window on the display screen.
一种设计中,装置1600可以用于执行前述实施例中平板100或者电子设备的功能。In one design, the apparatus 1600 may be used to perform the functions of the tablet 100 or the electronic device in the aforementioned embodiments.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事 件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrase "when determining..." or "if detecting (the stated condition or event)" may also be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. “If it is determined that…” or “in response to determining that…” or “upon detection of (stated condition or event)” or “in response to detecting (stated condition or event)”.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。 A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims (13)

  1. 一种音频传输方法,其特征在于,包括:An audio transmission method, characterized by comprising:
    电子设备与第一音频设备和第二音频设备建立连接;The electronic device establishes a connection with the first audio device and the second audio device;
    所述电子设备在显示屏中显示第一窗口和第二窗口,其中,所述第一窗口为所述第一应用的应用窗口,所述第一窗口播放第一音频数据,所述第二窗口为所述第二应用的应用窗口,所述第二窗口播放第二音频数据;The electronic device displays a first window and a second window on a display screen, wherein the first window is an application window of the first application, the first window plays first audio data, and the second window is an application window of the second application, the second window plays second audio data;
    所述电子设备根据所述第一窗口、所述第二窗口在所述显示屏上的状态,以及所述第一音频设备的方位和所述第二音频设备的方位,将所述第一音频数据发送给所述第一音频设备,将所述第二音频数据发送给所述第二音频设备。The electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the status of the first window and the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device.
  2. 根据权利要求1所述的方法,其特征在于,所述第一窗口在所述显示屏上的状态包括所述第一窗口的显示方式和/或所述第一窗口在所述显示屏上的位置;所述第二窗口在所述显示屏上的状态包括所述第二窗口的显示方式和/或所述第二窗口在所述显示屏上的位置;其中,所述显示方式包括全屏显示、悬浮显示、分屏显示。The method according to claim 1 is characterized in that the state of the first window on the display screen includes the display mode of the first window and/or the position of the first window on the display screen; the state of the second window on the display screen includes the display mode of the second window and/or the position of the second window on the display screen; wherein the display mode includes full-screen display, floating display, and split-screen display.
  3. 根据权利要求2所述的方法,其特征在于,所述第一窗口的显示方式为全屏显示,所述第二窗口的显示方式为悬浮显示,所述电子设备根据所述第一窗口、所述第二窗口在所述显示屏上的状态,以及所述第一音频设备的方位和所述第二音频设备的方位,将所述第一音频数据发送给所述第一音频设备,将所述第二音频数据发送给所述第二音频设备,具体包括:The method according to claim 2 is characterized in that the display mode of the first window is full screen display, the display mode of the second window is floating display, and the electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the status of the first window and the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device, specifically comprising:
    所述电子设备根据所述第二窗口在所述显示屏上的位置,以及所述第一音频设备和所述第二音频设备的方位,将所述第二音频数据发送给所述第二音频设备,其中,所述第二窗口在所述显示屏上的位置与所述第二音频设备相对于所述第一音频设备的位置相匹配,所述第二音频设备相对于所述第一音频设备的位置由所述第一音频设备的方位和所述第二音频设备的方位确定。The electronic device sends the second audio data to the second audio device based on the position of the second window on the display screen and the orientations of the first audio device and the second audio device, wherein the position of the second window on the display screen matches the position of the second audio device relative to the first audio device, and the position of the second audio device relative to the first audio device is determined by the orientations of the first audio device and the orientation of the second audio device.
  4. 根据权利要求2所述的方法,其特征在于,所述第一窗口、所述第二窗口的显示方式为分屏显示,或所述第一窗口、所述第二窗口的显示方式为悬浮显示,所述电子设备根据所述第一窗口、所述第二窗口在所述显示屏上的状态,以及所述第一音频设备的方位和所述第二音频设备的方位,将所述第一音频数据发送给所述第一音频设备,将所述第二音频数据发送给所述第二音频设备,具体包括:The method according to claim 2 is characterized in that the display mode of the first window and the second window is split-screen display, or the display mode of the first window and the second window is suspended display, and the electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device according to the state of the first window and the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device, specifically comprising:
    所述电子设备根据所述第一窗口在所述显示屏上的位置,所述第二窗口在所述显示屏的位置,以及所述第一音频设备的方位和所述第二音频设备的方位,将所述第一音频数据发送给所述第一音频设备,将所述第二音频数据发送给所述第二音频设备,其中,所述第一窗口在所述显示屏上的位置与所述第一音频设备相对于所述第二音频设备的位置相匹配,所述第二窗口在所述显示屏上的位置与所述第二音频设备相对于所述第一音频设备的位置相匹配,所述第一音频设备相对于所述第二音频设备的位置、所述第二音频设备相对于所述第一音频设备的位置由所述第一音频设备的方位和所述第二音频设备的方位确定。The electronic device sends the first audio data to the first audio device and sends the second audio data to the second audio device based on the position of the first window on the display screen, the position of the second window on the display screen, and the orientation of the first audio device and the orientation of the second audio device, wherein the position of the first window on the display screen matches the position of the first audio device relative to the second audio device, the position of the second window on the display screen matches the position of the second audio device relative to the first audio device, and the position of the first audio device relative to the second audio device and the position of the second audio device relative to the first audio device are determined by the orientation of the first audio device and the orientation of the second audio device.
  5. 根据权利要求3或4任一项所述的方法,其特征在于,所述第二窗口在所述显示屏上的位置与所述第二音频设备相对于所述第一音频设备的位置相匹配,包括:The method according to any one of claims 3 or 4, characterized in that the position of the second window on the display screen matches the position of the second audio device relative to the first audio device, comprising:
    所述第二窗口在所述显示屏的左侧,所述第二音频设备相对于所述第一音频设备的位置为所述第二音频设备位于所述第一音频设备的左侧;或,The second window is on the left side of the display screen, and the position of the second audio device relative to the first audio device is that the second audio device is located on the left side of the first audio device; or,
    所述第二窗口在所述显示屏的右侧,所述第二音频设备相对于所述第一音频设备的位置为所述第二音频设备位于所述第一音频设备的右侧。The second window is on the right side of the display screen, and the position of the second audio device relative to the first audio device is that the second audio device is located on the right side of the first audio device.
  6. 根据权利要求4所述的方法,其特征在于,所述第一窗口在所述显示屏上的位置与所述第一音频设备相对于所述第二音频设备的位置相匹配,包括:The method according to claim 4, wherein the position of the first window on the display screen matches the position of the first audio device relative to the second audio device, comprising:
    所述第一窗口在所述显示屏的左侧,所述第一音频设备相对于所述第二音频设备的位置为所述第一音频设备位于所述第二音频设备的左侧;或,The first window is on the left side of the display screen, and the position of the first audio device relative to the second audio device is that the first audio device is on the left side of the second audio device; or,
    所述第一窗口在所述显示屏的右侧,所述第一音频设备相对于所述第二音频设备的位置为所述第一音频设备位于所述第二音频设备的右侧。 The first window is on the right side of the display screen, and the position of the first audio device relative to the second audio device is that the first audio device is located on the right side of the second audio device.
  7. 根据权利要求3所述的方法,其特征在于,所述电子设备根据所述第二窗口在所述显示屏上的位置,以及所述第一音频设备的方位和所述第二音频设备的方位,将所述第二窗口的音频数据发送给所述第二音频设备,具体包括:The method according to claim 3, characterized in that the electronic device sends the audio data of the second window to the second audio device according to the position of the second window on the display screen, the orientation of the first audio device and the orientation of the second audio device, specifically comprising:
    在所述第二窗口在所述显示屏中间区域的情况下,所述电子设备将所述第二音频数据同时发送给所述第一音频设备和所述第二音频设备。When the second window is in the middle area of the display screen, the electronic device sends the second audio data to the first audio device and the second audio device simultaneously.
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:The method according to claim 7, characterized in that the method further comprises:
    在所述第二窗口在所述显示屏中间区域的情况下,所述电子设备停止将所述第一音频数据发送给所述第一音频设备;或,所述电子设备将所述第一音频数据同时发送给所述第一音频设备和所述第二音频设备。When the second window is in the middle area of the display screen, the electronic device stops sending the first audio data to the first audio device; or, the electronic device sends the first audio data to the first audio device and the second audio device at the same time.
  9. 根据权利要求5或6所述的方法,其特征在于,所述第二窗口在所述显示屏的左侧,所述第二音频设备相对于所述第一音频设备的位置为所述第二音频设备位于所述第一音频设备的左侧,所述电子设备根据所述第二窗口在所述显示屏上的位置,以及所述第一音频设备和所述第二音频设备的方位,将所述第二窗口的音频数据发送给所述第二音频设备之后,所述方法还包括:The method according to claim 5 or 6 is characterized in that the second window is on the left side of the display screen, and the position of the second audio device relative to the first audio device is that the second audio device is on the left side of the first audio device, and after the electronic device sends the audio data of the second window to the second audio device according to the position of the second window on the display screen and the orientations of the first audio device and the second audio device, the method further comprises:
    基于第一用户操作,所述电子设备将所述第二窗口从所述显示屏的左侧移动至所述显示屏的右侧;Based on a first user operation, the electronic device moves the second window from a left side of the display screen to a right side of the display screen;
    所述电子设备将所述第一音频数据发送给所述第二音频设备,并停止将所述第二音频数据发送给所述第二音频设备;所述电子设备将所述第二音频数据发送给所述第一音频设备,并停止将所述第一音频数据发送给所述第一音频设备。The electronic device sends the first audio data to the second audio device and stops sending the second audio data to the second audio device; the electronic device sends the second audio data to the first audio device and stops sending the first audio data to the first audio device.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述第一音频设备的方位由所述电子设备基于接收到的所述第一音频设备发送的蓝牙信号计算得到;所述第二音频设备的方位由所述电子设备基于接收到的所述第二音频设备发送的蓝牙信号计算得到。The method according to any one of claims 1-9 is characterized in that the position of the first audio device is calculated by the electronic device based on the received Bluetooth signal sent by the first audio device; the position of the second audio device is calculated by the electronic device based on the received Bluetooth signal sent by the second audio device.
  11. 一种音频传输系统,其特征在于所述音频传输系统包括电子设备和第一音频设备、第二音频设备,所述电子设备分别与所述第一音频设备、所述第二音频设备建立通信连接,所述电子设备、所述第一音频设备、所述第二音频设备用于执行权利要求1-10任一项所述的音频传输方法。An audio transmission system, characterized in that the audio transmission system includes an electronic device and a first audio device and a second audio device, the electronic device establishes a communication connection with the first audio device and the second audio device respectively, and the electronic device, the first audio device, and the second audio device are used to execute the audio transmission method described in any one of claims 1-10.
  12. 一种电子设备,其特征在于,包括存储器和处理器、显示屏,所述存储器、所述显示屏和所述处理器电偶合,所述显示屏用于显示所述电子设备中用于播放音频数据的应用的应用窗口,所述存储器用于存储程序指令,所述处理器被配置用于调用所述存储器存储的全部或部分程序指令,以使得所述电子设备执行如权利要求1-10任一项所述的方法。An electronic device, characterized in that it includes a memory, a processor, and a display screen, wherein the memory, the display screen, and the processor are electrically coupled, the display screen is used to display an application window of an application for playing audio data in the electronic device, the memory is used to store program instructions, and the processor is configured to call all or part of the program instructions stored in the memory so that the electronic device executes the method according to any one of claims 1 to 10.
  13. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-10任一项所述的方法。 A computer storage medium, characterized in that it includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 10.
PCT/CN2023/120907 2022-09-30 2023-09-23 Audio transmission method and system, and related apparatus WO2024067432A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211207452.8 2022-09-30
CN202211207452.8A CN117857963A (en) 2022-09-30 2022-09-30 Audio transmission method, system and related device

Publications (1)

Publication Number Publication Date
WO2024067432A1 true WO2024067432A1 (en) 2024-04-04

Family

ID=90476130

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/120907 WO2024067432A1 (en) 2022-09-30 2023-09-23 Audio transmission method and system, and related apparatus

Country Status (2)

Country Link
CN (1) CN117857963A (en)
WO (1) WO2024067432A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180035072A1 (en) * 2016-07-26 2018-02-01 The Directv Group, Inc. Method and Apparatus To Present Multiple Audio Content
US20200186926A1 (en) * 2017-09-08 2020-06-11 Samsung Electronics Co., Ltd. Method for controlling audio output by application through earphones and electronic device implementing same
WO2021085902A1 (en) * 2019-11-01 2021-05-06 삼성전자 주식회사 Electronic device for outputting audio data of plurality of applications, and method for operating same
CN112835549A (en) * 2019-11-25 2021-05-25 华为技术有限公司 Method and device for switching audio output device
CN116033304A (en) * 2022-08-31 2023-04-28 荣耀终端有限公司 Audio output method, electronic equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180035072A1 (en) * 2016-07-26 2018-02-01 The Directv Group, Inc. Method and Apparatus To Present Multiple Audio Content
US20200186926A1 (en) * 2017-09-08 2020-06-11 Samsung Electronics Co., Ltd. Method for controlling audio output by application through earphones and electronic device implementing same
WO2021085902A1 (en) * 2019-11-01 2021-05-06 삼성전자 주식회사 Electronic device for outputting audio data of plurality of applications, and method for operating same
CN112835549A (en) * 2019-11-25 2021-05-25 华为技术有限公司 Method and device for switching audio output device
CN116033304A (en) * 2022-08-31 2023-04-28 荣耀终端有限公司 Audio output method, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN117857963A (en) 2024-04-09

Similar Documents

Publication Publication Date Title
WO2020244623A1 (en) Air-mouse mode implementation method and related device
US20220148608A1 (en) Method for Automatically Switching Bluetooth Audio Coding Scheme and Electronic Device
US20220070247A1 (en) Wireless Short-Range Audio Sharing Method and Electronic Device
WO2022100610A1 (en) Screen projection method and apparatus, and electronic device and computer-readable storage medium
WO2021023035A1 (en) Lens switching method and apparatus
US20230189366A1 (en) Bluetooth Communication Method, Terminal Device, and Computer-Readable Storage Medium
WO2021023046A1 (en) Electronic device control method and electronic device
CN113169915B (en) Wireless audio system, audio communication method and equipment
US11665274B2 (en) Call method and apparatus
WO2020056684A1 (en) Method and device employing multiple tws earpieces connected in relay mode to realize automatic interpretation
CN114079892A (en) Bluetooth communication method, wearable device and system
US20230125956A1 (en) Wireless Communication System and Method
CN116233300A (en) Method for controlling communication service state, terminal device and readable storage medium
WO2022262492A1 (en) Data downloading method and apparatus, and terminal device
CN114205336A (en) Cross-device audio playing method, mobile terminal, electronic device and storage medium
US20230350629A1 (en) Double-Channel Screen Mirroring Method and Electronic Device
CN114125789A (en) Communication method, terminal device and storage medium
CN114398020A (en) Audio playing method and related equipment
WO2021052408A1 (en) Electronic device display method and electronic device
WO2024067432A1 (en) Audio transmission method and system, and related apparatus
CN114554012A (en) Incoming call answering method, electronic equipment and storage medium
WO2020062308A1 (en) Location information processing method and related device
US11973895B2 (en) Call method and apparatus
EP4290360A1 (en) Screen projection method, electronic device, and system
WO2023134672A1 (en) Method and apparatus for determining occurrence of radio link failure in sidelink, and terminal device