CN115529379A - Method for preventing Bluetooth audio Track from jittering, electronic equipment and storage medium - Google Patents

Method for preventing Bluetooth audio Track from jittering, electronic equipment and storage medium Download PDF

Info

Publication number
CN115529379A
CN115529379A CN202210289300.0A CN202210289300A CN115529379A CN 115529379 A CN115529379 A CN 115529379A CN 202210289300 A CN202210289300 A CN 202210289300A CN 115529379 A CN115529379 A CN 115529379A
Authority
CN
China
Prior art keywords
audio
track
bluetooth
playing
audio data
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202210289300.0A
Other languages
Chinese (zh)
Other versions
CN115529379B (en
Inventor
董吉阳
王福凯
胡晓慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210289300.0A priority Critical patent/CN115529379B/en
Priority to CN202310706107.7A priority patent/CN116915896A/en
Publication of CN115529379A publication Critical patent/CN115529379A/en
Application granted granted Critical
Publication of CN115529379B publication Critical patent/CN115529379B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application relates to a method for preventing Track jitter of a Bluetooth audio Track, an electronic device and a storage medium. The electronic equipment plays audio data and obtains the number of Track tracks of the audio data. When the number of the Track tracks is changed from 1 to 0, the electronic equipment sends a pause instruction to the Bluetooth equipment through an audio/video remote control specification after delaying for a preset time; and when the electronic equipment determines that the number of the Track tracks is changed from 0 to 1, sending a playing instruction to the Bluetooth equipment through the audio/video remote control specification. The method and the device can avoid the problem that the playing of the Bluetooth equipment is unstable due to the change of the state of the transient Track audio Track caused by Track audio Track jitter, and can keep the playing state of the AVRCP synchronous with the playing state of the AVDTP.

Description

Method for preventing Bluetooth audio Track from jittering, electronic equipment and storage medium
Technical Field
The present application relates to the field of bluetooth communication, and in particular, to a method, an electronic device, and a storage medium for preventing a bluetooth audio Track from jittering.
Background
An audio Application (APP) or video application may enable the playing of audio data by creating a Track. The audio or video application will send a play (playing) status to the bluetooth device after creating the Track and a Pause (Pause) status to the bluetooth device when deleting the Track. However, when an audio application or a video application plays a scene with different audio contents, the Track is created after the Track is played, and the Track is shaken. Jitter in the Track can cause the bluetooth device to be unable to play audio data stably.
Disclosure of Invention
In view of the above, it is desirable to provide a method, an electronic device and a storage medium for preventing jitter of a bluetooth audio Track to solve the problem that the jitter of the Track causes the bluetooth device to be unable to play audio data stably.
In a first aspect, an embodiment of the present application provides a method for preventing a bluetooth audio Track from jittering, where the method is applied in an electronic device, and the electronic device is in communication connection with a bluetooth device, and the method includes: the electronic equipment plays audio data and acquires the number of Track tracks of the audio data; when the number of the Track tracks is changed from 1 to 0, the electronic equipment sends a pause instruction to the Bluetooth equipment through an audio/video remote control specification after delaying for a preset time; and when the number of the Track tracks is changed from 0 to 1, the electronic equipment sends a playing instruction to the Bluetooth equipment through the audio/video remote control specification. According to the technical scheme, when the number of Track tracks is determined to be changed from 1 to 0, the electronic equipment sends a pause instruction to the Bluetooth equipment 200 through the AVRCP after the electronic equipment delays for the preset time, so that the problem of unstable playing of the Bluetooth equipment caused by the change of the state of the transient Track tracks caused by Track jitter can be avoided, and the playing state of the AVRCP and the playing state of the AVDTP can be kept synchronous.
In one embodiment, the electronic device playing audio data and acquiring the number of Track tracks of the audio data comprises: the application of the application program layer of the electronic equipment acquires and plays the audio data according to the playing command; and an audio manager of an audio frame layer of the electronic equipment acquires a playing command from the application, creates Track tracks according to the playing command and determines the number of the Track tracks. According to the technical scheme, the audio manager in the electronic equipment creates the Track audio Track according to the playing command and determines the Track audio Track.
In an embodiment, the method further comprises: the audio manager acquires a pause command from the application; the audio manager deletes Track tracks according to the pause command and determines the number of Track tracks. According to the technical scheme, the audio manager in the electronic equipment realizes the deletion of the Track according to the pause command.
In one embodiment, when it is determined that the number of Track tracks changes from 1 to 0, the electronic device sending a pause instruction to the bluetooth device through the audio/video remote control profile after delaying for the preset time comprises: a hardware abstraction layer of the electronic device obtains the number of Track tracks from the audio manager; and when the hardware abstraction layer determines that the number of the Track tracks is changed from 1 to 0, the Bluetooth protocol stack of the hardware abstraction layer sends the pause instruction to the Bluetooth equipment through the audio/video remote control specification after delaying the preset time. According to the technical scheme, when the number of the Track tracks is determined to be changed from 1 to 0, the Bluetooth protocol stack of the hardware abstraction layer sends a pause instruction to the Bluetooth device 200 through the AVRCP after the preset time is delayed, and the problem that the playing of the Bluetooth device is unstable due to the fact that the status of the transient Track tracks is changed due to Track shaking can be solved.
In one embodiment, when it is determined that the number of Track tracks changes from 0 to 1, the electronic device sending a play instruction to the bluetooth device through the audio/video remote control profile includes: a hardware abstraction layer of the electronic equipment acquires the number of Track tracks from the audio manager; and when the hardware abstraction layer determines that the number of the Track tracks is changed from 0 to 1, the Bluetooth protocol stack of the hardware abstraction layer sends the playing instruction to the Bluetooth equipment through an audio/video remote control specification. According to the technical scheme, the Bluetooth protocol stack of the hardware abstraction layer can send the playing instruction to the Bluetooth equipment through an audio/video remote control specification.
In one embodiment, the sending, by the bluetooth protocol stack of the hardware abstraction layer, the pause instruction to the bluetooth device through the audio/video remote control specification after the preset time is postponed comprises: the hardware abstraction layer starts a timer to time; in the process that the time counted by the timer reaches the preset time, when the audio framework layer is determined not to create the Track tracks and the number of the Track tracks is not changed from 0 to 1, the hardware abstraction layer ends the timer, and the Bluetooth protocol stack sends the pause instruction to the Bluetooth device through an audio/video remote control specification; and in the process that the time counted by the timer reaches the preset time, when the audio frame layer is determined to create the Track audio tracks and the number of the Track audio tracks is changed from 0 to 1, the hardware abstraction layer judges whether the timer exists, when the timer exists, the hardware abstraction layer finishes the timer, the Bluetooth protocol stack sends the playing instruction to the Bluetooth equipment through an audio/video remote control specification, and when the timer does not exist, the Bluetooth protocol stack sends the playing instruction to the Bluetooth equipment through the audio/video remote control specification. According to the technical scheme, whether the timing time reaches the preset time or not is determined by starting the timer, the Track tracks are established and the number of the Track tracks is changed from 0 to 1 in the process that the time counted by the timer reaches the preset time, and the hardware abstraction layer sends a playing instruction to the Bluetooth equipment through the audio/video remote control specification, so that the problem of Track jitter is avoided.
In one embodiment, said determining the number of Track tracks from the audio data comprises: the audio manager deletes the Track upon determining that the audio data playback is complete. According to the technical scheme, the Track can be deleted when the audio data is played.
In one embodiment, said determining the number of Track tracks from the audio data comprises: in response to an operation of switching audio data of a first playing scene of the application to audio data of a second playing scene, the audio manager deletes a Track of the audio data of the first playing scene and creates a Track of the audio data of the second playing scene, wherein the audio data of the first playing scene is not continuous with the audio data of the second playing scene. According to the technical scheme, when the user switches the audio data of the first playing scene to the audio data of the second playing scene, the Track of the audio data of the first playing scene can be deleted, and the Track of the audio data of the second playing scene can be created.
In one embodiment, the application includes a music player, and the obtaining and playing the audio data according to the playing command by the application of the application layer of the electronic device includes: the music player responds to the operation that a user clicks a play/pause button on a music play interface of the music player, generates a play command or a pause command, and acquires and plays the audio data according to the play command or pauses the playing of the audio data according to the pause command. According to the technical scheme, after the user clicks the music playing interface and clicks the playing/pausing button, the audio data can be played or paused, and the operation of the user is facilitated.
In one embodiment, the obtaining and playing the audio data according to the playing command by the application of the application layer of the electronic device includes: and the audio manager responds to the operation that a user clicks the previous button or the next button on a music playing interface of the music player, deletes the Track of the audio data of the music currently played by the music player and creates the Track of the audio data of the music of the previous button or the next button. According to the technical scheme, when a user clicks the previous button or the next button, deletion of a Track of audio data of music currently played by the music player and creation of the Track of the audio data of the music of the previous button or the next button can be achieved.
In an embodiment, the application comprises an audio application or a video application.
In one embodiment, the predetermined time is 3 seconds.
In a second aspect, an embodiment of the present application provides an electronic device, including a processor, a memory; wherein the processor is coupled with the memory; the memory to store program instructions; the processor is used for reading the program instructions stored in the memory to realize the method for preventing the audio Track jitter of the Bluetooth audio Track.
In a third aspect, embodiments of the present application provide a computer readable storage medium storing program instructions that, when executed by a processor, perform the above method for preventing a bluetooth audio Track from jittering.
In addition, the technical effects brought by the second aspect to the third aspect can be referred to the description related to the methods designed in the above methods, and are not repeated herein.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic diagram illustrating an audio data stream and an audio playing status of an electronic device according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a control command for playing audio data according to an embodiment of the present application.
Fig. 3 is a block diagram of a software structure of an electronic device according to an embodiment of the present application.
FIG. 4 is a diagram of an application environment of a method for preventing Track jitter in a Bluetooth Audio Track in an embodiment of the present application.
FIG. 5 is a flowchart of a method for preventing Track jitter in a Bluetooth Audio Track in accordance with an embodiment of the present invention.
FIG. 6 is a diagram illustrating an embodiment of a music player acquiring audio data.
FIG. 7 is a diagram illustrating the determination of Track tracks in an embodiment of the present application.
Fig. 8 is a flowchart illustrating a method for sending a pause command to a bluetooth device via an audio/video remote control profile according to an embodiment of the present application.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the application.
Detailed Description
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or illustrations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that in this application, "/" means "or" means "unless otherwise indicated. For example, A/B may represent A or B. In the present application, "and/or" is only one kind of association relation describing an associated object, and means that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. "at least one" means one or more. "plurality" means two or more than two. For example, at least one of a, b, or c, may represent: a, b, c, a and b, a and c, b and c, and a, b and c.
For the convenience of describing the embodiments below, a User Interface (UI) referred to in the embodiments of the present application will be briefly described. The UI is a medium interface for interaction and information exchange between an application program or an operating system and a user, and can realize conversion between an internal form of information and a form acceptable by the user. The user interface of the application program is a source code written by a specific computer language such as JAVA (JAVA), extensible markup language (XML), and the like, and the interface source code is analyzed and rendered on the electronic device, and finally presented as content that can be recognized by a user, such as controls such as pictures, words, buttons, and the like. A control (control) is a basic element of a user interface, and typical controls include a button (button), a widget (widget), a toolbar (toolbar), a menu bar (menu bar), a text box (text box), a scroll bar (scrollbar), a picture (image), and a text (text). The properties and contents of the controls in the interface are defined by tags or nodes, such as XML defining the controls contained by the interface by nodes < Textview >, < ImgView >, < VideoView >, and the like. A node corresponds to a control or attribute in the interface, and the node is rendered as user-viewable content after parsing and rendering. In addition, many applications, such as hybrid applications (hybrid applications), typically include web pages in their interfaces. A web page, also called a page, can be understood as a special control embedded in an application program interface, the web page is a source code written by a specific computer language, such as hypertext markup language (HTML), cascading Style Sheets (CSS), JAVA scripts (JavaScript, JS), etc., and the web page source code can be loaded and displayed as a content recognizable to a user by a browser or a web page display component similar to a browser function. The specific content contained in the web page is also defined by tags or nodes in the source code of the web page, such as HTML, which defines elements and attributes of the web page by < p >, < img >, < video >, < canvas >.
A commonly used presentation form of the user interface is a Graphical User Interface (GUI), which refers to a user interface related to computer operations and displayed in a graphical manner. It may be an interface element such as an icon, window, control, etc. displayed in the display screen of the electronic device.
When an audio application or a video application plays audio data, a Track is created in the audio management system in the audio framework layer. The number of Track tracks can be controlled by the audio application or the video application. Fig. 1 is a schematic diagram illustrating an audio data stream played by an electronic device and an audio playing status according to an embodiment of the present application. When the audio application or the video application plays audio data of different scenes in the application, one Track audio Track is deleted quickly after being played, and then the other Track audio Track is created. When the Audio management system creates a Track, it will send a play instruction T1 to the bluetooth device through an Audio/Video Remote Control Profile (AVRCP) and set the bluetooth device in a play state, and when the Track is deleted, it will send a pause instruction T2 to the bluetooth device through the AVRCP and set the bluetooth device in a pause state, thus causing Track jitter (see the block in fig. 1). Track jitter causes transient Track conditions to change, which can cause unstable audio playback by bluetooth devices.
Fig. 2 is a schematic diagram of a control command of an electronic device during playing audio data according to an embodiment of the present application. Specifically, the control instruction is an AVRCP control instruction and an AVDTP control instruction when the electronic device plays an AUDIO data stream of a PROTOCOL (AUDIO/video transmission PROTOCOL, AVDTP) for transmitting AUDIO/video between bluetooth devices. Because the AVDTP has a standby mechanism, in the AVDTP, when an Android audio management system in the electronic device deletes a Track, the electronic device does not immediately send a pause instruction to the bluetooth device, but starts the standby mechanism, and the standby mechanism causes the electronic device to delay a preset time (for example, 3 seconds) to send the pause instruction to the bluetooth device and set the bluetooth device in a pause state. It should be noted that the AVRCP has no standby mechanism, and in the AVRCP, when the Android audio management system deletes a Track, the electronic device immediately sends a pause instruction to the bluetooth device and sets the bluetooth device in a pause state. The method can cause short jump of the playing state of the audio application or the video application on the AVRCP, but the playing state of the audio application or the video application on the AVDTP is not changed, so that the playing state on the AVRCP is asynchronous with the playing state on the AVDTP.
In view of the above, the present application provides a method for preventing the Track jitter of bluetooth audio Track. The method for preventing the Track jitter of the Bluetooth audio Track is applied to the electronic equipment 100. Referring to fig. 3, a block diagram of a software structure of the electronic device 100 according to an embodiment of the present application is shown. The layered architecture divides the software into an application Layer, an application framework Layer, a Hardware Abstraction Layer (HAL), and a kernel Layer from top to bottom.
The application layer may include a series of application packages. As shown in fig. 2, the application package may include an audio application or a video application.
The Application framework layer provides an Application Programming Interface (API) and a Programming framework for the Application programs of the Application layer. The application framework layer includes a number of predefined functions. As shown in fig. 1, the application framework layer may include a bluetooth architecture and an audio architecture. The audio architecture includes an audio framework layer.
The hardware abstraction layer provides a uniform access interface for different hardware devices. As shown in fig. 3, the HAL may comprise a bluetooth protocol stack.
The kernel layer is a layer between hardware and software. The kernel layer includes at least various drivers, including, for example, the bluetooth driver shown in fig. 3.
Referring to fig. 4, a diagram of an application environment of the method for preventing Track jitter in bluetooth audio Track according to an embodiment of the present application is shown. The method for preventing the Track jitter of the Bluetooth audio Track is applied to the electronic equipment 100. The electronic device 100 is in communication connection with the bluetooth device 200 through a bluetooth communication module. In an embodiment, the electronic device 100 includes, but is not limited to, a smart phone, a laptop device, a desktop device, a handheld PC, a personal Digital assistant, an embedded Processor, a Digital Signal Processor (DSP), a graphics device, a video game device, a set-top box, a microcontroller, a cellular phone, a portable media player, a handheld device, a wearable device (e.g., display glasses or goggles, head-Mounted Display (HMD), a watch, a Head-Mounted device, an arm band, jewelry, etc.), a Virtual Reality (VR) and/or Augmented Reality (AR) device, an Internet of Things (IoT) device, a smart audio system, an in-vehicle infotainment device, a streaming media client device, an e-book reading device, a POS machine, a control system for an electric vehicle, and various other electronic devices. In one embodiment, the bluetooth device 200 includes a bluetooth headset, a bluetooth speaker, and other bluetooth devices having bluetooth audio playback capabilities.
Please refer to fig. 5, which is a flowchart illustrating a method for preventing Track jitter in a bluetooth audio Track according to an embodiment of the present invention. The method comprises the following steps.
In step S501, the application in the application layer obtains and plays the audio data according to the play command.
In this embodiment, the application of the application layer includes an audio application or a video application. For convenience of description, the following application takes a music player as an example, the electronic device 100 takes a mobile phone as an example, and the bluetooth device 200 takes a bluetooth headset as an example, and the method for preventing the Track jitter of the bluetooth audio Track provided by the embodiment of the present application is described.
Referring to fig. 6, when a user clicks a play/pause button 61 on a music play interface 60 of a music player of a mobile phone, the music player generates a play command/pause command in response to the user's operation of clicking the play/pause button 61 on the music play interface 60. The music player acquires and plays the audio data according to the playing command, or pauses the playing of the audio data according to the pause command.
Step S502, the audio manager of the audio framework layer obtains the playing command from the application and determines the number of Track tracks according to the playing command.
In this embodiment, determining the number of Track tracks according to the play command includes: the audio manager creates Track tracks according to the play command and determines the number of Track tracks. In this embodiment, the audio manager creates a Track of audio data when acquiring a play command; and deleting the Track upon determining that the playing of the audio data is finished. For example, when a music player of a mobile phone acquires audio data of a song, an audio manager of an audio framework layer creates a Track of the audio data, and when it is determined that the music player has finished playing the audio data of the song, the audio manager of the audio framework layer deletes the Track.
In an embodiment, the method further comprises: the audio manager acquires a pause command from the application; the audio manager deletes Track tracks according to the pause command and determines the number of Track tracks.
In one embodiment, determining the number of Track tracks from the audio data comprises: in response to an operation of switching audio data of a first playing scene of an audio application or a video application to audio data of a second playing scene, the audio manager deletes a Track of the audio data of the first playing scene and creates a Track of the audio data of the second playing scene, wherein the audio data of the first playing scene is not continuous with the audio data of the second playing scene.
For example, referring to fig. 7, the music playing interface 60 includes a previous button 62 and a next button 63, where the audio data of the currently played music is the audio data of the first playing scene, and the audio data of the music of the previous button 62 or the next button 63 is the audio data of the second playing scene. The user clicks the previous button 62 or the next button 63 on the music playing interface 60 of the music player of the mobile phone, and the audio manager responds to the operation that the user clicks the previous button 62 or the next button 63 on the music playing interface 60, deletes the Track of the audio data of the currently played music and creates the Track of the audio data of the music of the previous button 62 or the next button 63. Wherein the audio data of the currently played music is not consecutive to the audio data of the music of the previous button 62 or the next button 63.
The audio manager reports the number of tracks to the Hal layer each time it is determined that there is a change in the number of Track tracks.
In step S503, the Hal layer acquires the number of Track tracks from the audio frame layer.
In step S504, when it is determined that the number of Track tracks is changed from 1 to 0, the bluetooth protocol stack in the hal layer transmits a pause (pause) instruction to the bluetooth apparatus 200 through the audio/video remote control profile (AVRCP) after a delay of a preset time. Wherein, the bluetooth apparatus 200 sets the audio playing state of the bluetooth apparatus 200 to the pause state according to the pause instruction.
When it is determined that the number of Track tracks is changed from 0 to 1, the bluetooth protocol stack transmits a play (Playing) instruction to the bluetooth device 200 through the audio/video remote control profile S505. Wherein, the bluetooth apparatus 200 sets the audio playing status of the bluetooth apparatus 200 to the playing status according to the playing instruction.
According to the method and the device, after the Bluetooth protocol stack in the layer that the number of Track tracks is changed from 1 to 0,Hal is determined, the pause instruction is sent to the Bluetooth device 200 through the AVRCP after the preset time is delayed, the problem that the playing of the Bluetooth device is unstable due to the fact that the Track tracks shake to cause transient change of the state of the Track tracks can be avoided, and the playing state of the AVRCP and the playing state of the AVDTP can be kept synchronous.
Referring to fig. 8, a flowchart of a method for the bluetooth protocol stack to send a pause instruction to the bluetooth device 200 through the audio/video remote control profile after delaying a preset time according to an embodiment of the present application is shown. The method comprises the following steps.
In step S801, when the Hal layer detects that the Track is deleted by the audio framework layer, it is determined whether the number of Track tracks is changed from 1 to 0. Wherein, when determining that the number of Track tracks is changed from 1 to 0, step S802 is executed, otherwise, when determining that the number of Track tracks is not changed from 1 to 0, step S808 is executed.
Step S802, the Hal layer starts a timer to time.
In step S803, the Hal layer determines whether it is detected that a Track is created in the audio framework layer and the number of Track tracks is changed from 0 to 1 when the time counted by the timer reaches a preset time. In the process that the time counted by the timer reaches the preset time, if it is determined that no Track is created in the audio frame layer and the number of the Track tracks is not changed from 0 to 1, executing step S804; otherwise, if it is determined that the audio frame layer creates Track tracks and the number of Track tracks is changed from 0 to 1, step S805 is performed.
Step S804, the Hal layer ends the timer, and the bluetooth protocol stack sends a pause instruction to the bluetooth device 200 through the audio/video remote control specification.
In step S805, the Hal layer determines whether the timer exists. If the timer exists, step S806 is executed, otherwise, if the timer does not exist, step S807 is executed.
In step S806, the Hal layer ends the timer, and the bluetooth protocol stack sends a play command to the bluetooth device 200 through the audio/video remote control specification.
In step S807, the bluetooth protocol stack sends a play instruction to the bluetooth device 200 through the audio/video remote control profile.
S808: the bluetooth protocol stack does not respond.
In this embodiment, the bluetooth protocol stack does not respond, that is, the bluetooth protocol stack does not send a play instruction or a pause instruction to the bluetooth device 200.
Whether the timing time reaches the preset time or not is determined by starting the timer, the time timed by the timer reaches the preset time, the number of Track tracks which are created is determined to be changed from 0 to 1 in the process of the preset time, and the Hal layer sends a playing instruction to the Bluetooth equipment through an audio/video remote control specification, so that the problem of Track jitter is avoided.
The following describes an electronic device 100 according to an embodiment of the present application. Referring to fig. 9, a hardware structure diagram of an electronic device 100 according to an embodiment of the present application is shown. The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and/or a smart city device, and some embodiments of the present application do not particularly limit the specific type of the electronic device 100. In other embodiments, the electronic device 100 includes the calling terminal 10 and/or the called terminal 20.
In this embodiment, the electronic device 100 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, a Subscriber Identity Module (SIM) card interface 195, and the like. 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, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the time sequence signal to finish the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (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.
The I2C interface is a bidirectional synchronous serial bus including a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets 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, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of answering a call through a bluetooth headset.
The PCM interface may 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 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to implement the function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 with peripheral devices such as the display screen 194, the camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may 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, and the like. The GPIO interface may also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices 100, such as AR devices and the like.
It should be understood that the connection relationship between the modules illustrated in the embodiment of the present application is only an exemplary illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
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 charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. 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 (time-division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. 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).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an 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 alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may 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 transmits the electrical signal to the ISP to be converted into a digital image signal. And 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 and other formats. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor, which processes input information quickly by referring to a biological neural network structure, for example, by referring to a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The internal memory 121 may include one or more Random Access Memories (RAMs) and one or more non-volatile memories (NVMs).
The random access memory may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), such as fifth generation DDR SDRAM generally referred to as DDR5 SDRAM, and the like;
the nonvolatile memory may include a magnetic disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, may include single-level cells (SLC), multi-level cells (MLC), three-level cells (TLC), four-level cells (QLC), etc. according to the level order of the memory cells, and may include universal FLASH memory (UFS), embedded multimedia memory cards (eMMC), etc. according to the storage specification.
The random access memory may be read and written directly by the processor 110, may be used to store executable programs (e.g., machine instructions) of an operating system or other programs in operation, and may also be used to store data of users and applications, etc.
The nonvolatile memory may also store executable programs, data of users and application programs, and the like, and may be loaded in advance into the random access memory for the processor 110 to directly read and write.
The external memory interface 120 may be used to connect an external nonvolatile memory, so as to expand the storage capability of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are saved in an external nonvolatile memory.
The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. One or more computer programs are configured to be executed by the processor 110. The one or more computer programs include instructions which, when executed by the processor 110, implement the method of preventing bluetooth audio Track jitter on the electronic device 100 in the above-described embodiments to implement the function of preventing bluetooth audio Track jitter.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into a sound signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into a sound signal. When the electronic apparatus 100 receives a call or voice information, it is possible to receive voice by placing the receiver 170B close to the human ear.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking near the microphone 170C through the mouth. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be an Open Mobile Terminal Platform (OMTP) standard interface of 3.5mm, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a variety of types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The method can also be used for identifying the posture of the electronic equipment 100, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device 100 may utilize the distance sensor 180F to range to achieve fast focus.
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 apparatus 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint characteristics to unlock a fingerprint, access an application lock, photograph a fingerprint, answer an incoming call with a fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The present embodiment also provides a computer storage medium having stored therein computer instructions that, when run on the electronic device 100, cause the electronic device 100 to perform the above-described related method steps to implement the functionality of preventing the jitter of the bluetooth audio Track in the above-described embodiments.
The present embodiment also provides a computer program product, which when running on a computer, causes the computer to execute the relevant steps described above, so as to implement the method for preventing the Track jitter of the bluetooth audio Track in the above embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory, so that the chip can execute the method for preventing the Bluetooth audio Track from jittering in the various method embodiments.
The electronic device 100, the computer storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding methods provided above, and therefore, the beneficial effects that can be achieved by the electronic device 100, the computer storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding methods provided above, and are not described herein again.
Through the description of the foregoing embodiments, it will be clear to those skilled in the art that, for convenience and simplicity of description, only the division of the functional modules is illustrated, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the apparatus may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the module or unit is only one type of logical function division, and other division manners may be available in actual implementation, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application, or portions of the technical solutions that substantially contribute to the prior art, or all or portions of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Although the present application has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the spirit and scope of the present application.

Claims (12)

1. A method for preventing jitter in a bluetooth audio Track in an electronic device communicatively coupled to a bluetooth device, the method comprising:
the electronic equipment plays audio data and acquires the number of Track tracks of the audio data;
when the number of the Track tracks is changed from 1 to 0, the electronic equipment sends a pause instruction to the Bluetooth equipment through an audio/video remote control specification after delaying for a preset time; and
when the number of the Track tracks is changed from 0 to 1, the electronic equipment sends a playing instruction to the Bluetooth equipment through the audio/video remote control specification.
2. The method of claim 1, wherein the electronic device playing audio data and obtaining the number of Track tracks of the audio data comprises:
the application of the application program layer of the electronic equipment acquires and plays the audio data according to the playing command;
and an audio manager of an audio frame layer of the electronic equipment acquires the playing command from the application, creates Track tracks according to the playing command and determines the number of the Track tracks.
3. The method of preventing Bluetooth Audio Track jitter according to claim 2, wherein said method further comprises:
the audio manager acquires a pause command from the application;
the audio manager deletes Track tracks according to the pause command and determines the number of Track tracks.
4. The method of claim 2, wherein when it is determined that the number of Track tracks changes from 1 to 0, the electronic device sending a pause instruction to the bluetooth device via the audio/video remote control profile after a predetermined time delay comprises:
a hardware abstraction layer of the electronic device obtains the number of Track tracks from the audio manager;
when the hardware abstraction layer determines that the number of the Track tracks is changed from 1 to 0, the Bluetooth protocol stack of the hardware abstraction layer sends the pause instruction to the Bluetooth device through the audio/video remote control specification after delaying the preset time.
5. The method of claim 2 wherein when it is determined that the number of Track tracks has changed from 0 to 1, the electronic device sending a play instruction to the bluetooth device via the audio/video remote control profile comprises:
a hardware abstraction layer of the electronic equipment acquires the number of Track tracks from the audio manager;
and when the hardware abstraction layer determines that the number of the Track tracks is changed from 0 to 1, the Bluetooth protocol stack of the hardware abstraction layer sends the playing instruction to the Bluetooth equipment through an audio/video remote control specification.
6. The method of claim 4, wherein the Bluetooth protocol stack of the hardware abstraction layer sending a pause instruction to the Bluetooth device through the audio/video remote control specification after a preset time is postponed comprises:
the hardware abstraction layer starts a timer to time;
in the process that the time counted by the timer reaches the preset time, when the audio framework layer is determined not to create the Track tracks and the number of the Track tracks is not changed from 0 to 1, the hardware abstraction layer finishes the timer, and the Bluetooth protocol stack sends the pause instruction to the Bluetooth device through an audio/video remote control specification; and
when it is determined that the Track tracks are created by the audio framework layer and the number of the Track tracks is changed from 0 to 1 in the process that the time counted by the timer reaches the preset time, the hardware abstraction layer judges whether the timer exists or not,
when the timer exists, the hardware abstraction layer finishes the timer, and the Bluetooth protocol stack sends the playing instruction to the Bluetooth device through an audio/video remote control specification,
and when the timer does not exist, the Bluetooth protocol stack sends the playing instruction to the Bluetooth equipment through an audio/video remote control specification.
7. The method of preventing bluetooth audio Track jitter according to claim 2 wherein said determining the number of Track tracks from the audio data comprises:
the audio manager deletes the Track upon determining that playback of the audio data is complete.
8. The method of preventing bluetooth audio Track jitter according to claim 2 wherein said determining the number of Track tracks from the audio data comprises:
in response to an operation of switching audio data of a first playing scene of the application to audio data of a second playing scene, the audio manager deletes a Track of the audio data of the first playing scene and creates a Track of the audio data of the second playing scene, wherein the audio data of the first playing scene is not continuous with the audio data of the second playing scene.
9. The method of preventing bluetooth audio Track jitter according to claim 2, wherein the application comprises a music player, wherein the obtaining and playing audio data by an application of an application layer of the electronic device according to a play command comprises:
the music player responds to the operation that a user clicks a play/pause button on a music play interface of the music player, generates a play command or a pause command, and acquires and plays the audio data according to the play command or pauses to play the audio data according to the pause command.
10. The method of claim 2, wherein the application comprises a music player, wherein the obtaining and playing audio data by an application of an application layer of the electronic device according to a play command comprises:
and the audio manager responds to the operation that a user clicks the previous button or the next button on a music playing interface of the music player, deletes the Track of the audio data of the music currently played by the music player and creates the Track of the audio data of the music of the previous button or the next button.
11. An electronic device comprising a processor, a memory; wherein the processor is coupled with the memory;
the memory to store program instructions;
the processor for reading the program instructions stored in the memory to implement the method of preventing bluetooth audio Track jitter as claimed in any one of claims 1 to 10.
12. A computer readable storage medium, characterized in that it stores program instructions which, when executed by a processor, implement the method of preventing bluetooth audio Track jitter according to any of claims 1 to 10.
CN202210289300.0A 2022-03-22 2022-03-22 Method for preventing Bluetooth audio Track jitter, electronic equipment and storage medium Active CN115529379B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210289300.0A CN115529379B (en) 2022-03-22 2022-03-22 Method for preventing Bluetooth audio Track jitter, electronic equipment and storage medium
CN202310706107.7A CN116915896A (en) 2022-03-22 2022-03-22 Method for preventing Bluetooth audio Track from shaking and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210289300.0A CN115529379B (en) 2022-03-22 2022-03-22 Method for preventing Bluetooth audio Track jitter, electronic equipment and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202310706107.7A Division CN116915896A (en) 2022-03-22 2022-03-22 Method for preventing Bluetooth audio Track from shaking and related equipment

Publications (2)

Publication Number Publication Date
CN115529379A true CN115529379A (en) 2022-12-27
CN115529379B CN115529379B (en) 2023-06-20

Family

ID=84693616

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310706107.7A Pending CN116915896A (en) 2022-03-22 2022-03-22 Method for preventing Bluetooth audio Track from shaking and related equipment
CN202210289300.0A Active CN115529379B (en) 2022-03-22 2022-03-22 Method for preventing Bluetooth audio Track jitter, electronic equipment and storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202310706107.7A Pending CN116915896A (en) 2022-03-22 2022-03-22 Method for preventing Bluetooth audio Track from shaking and related equipment

Country Status (1)

Country Link
CN (2) CN116915896A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102339626A (en) * 2010-07-14 2012-02-01 阿迪达斯股份公司 Methods, systems, and program products for controlling the playback of music
US20180035232A1 (en) * 2015-02-05 2018-02-01 Augmented Acoustics Appliance for receiving and reading audio signals and live sound system
CN109559763A (en) * 2017-09-26 2019-04-02 华为技术有限公司 A kind of method and device of real time digital audio signal audio mixing
CN110634511A (en) * 2019-09-27 2019-12-31 北京西山居互动娱乐科技有限公司 Audio data processing method and device
CN111615729A (en) * 2017-08-29 2020-09-01 英特尔利特然有限公司 Apparatus, system and method for recording and rendering multimedia
CN113542765A (en) * 2021-07-13 2021-10-22 海信电子科技(深圳)有限公司 Media data jumping continuous playing method and display equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2506404B (en) * 2012-09-28 2015-03-18 Memeplex Ltd Automatic audio mixing
CN106888169A (en) * 2017-01-06 2017-06-23 腾讯科技(深圳)有限公司 Video broadcasting method and device
CN111078448B (en) * 2019-08-06 2022-04-05 华为技术有限公司 Method for processing audio abnormity and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102339626A (en) * 2010-07-14 2012-02-01 阿迪达斯股份公司 Methods, systems, and program products for controlling the playback of music
US20180035232A1 (en) * 2015-02-05 2018-02-01 Augmented Acoustics Appliance for receiving and reading audio signals and live sound system
CN111615729A (en) * 2017-08-29 2020-09-01 英特尔利特然有限公司 Apparatus, system and method for recording and rendering multimedia
CN109559763A (en) * 2017-09-26 2019-04-02 华为技术有限公司 A kind of method and device of real time digital audio signal audio mixing
CN110634511A (en) * 2019-09-27 2019-12-31 北京西山居互动娱乐科技有限公司 Audio data processing method and device
CN113542765A (en) * 2021-07-13 2021-10-22 海信电子科技(深圳)有限公司 Media data jumping continuous playing method and display equipment

Also Published As

Publication number Publication date
CN116915896A (en) 2023-10-20
CN115529379B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
WO2021052263A1 (en) Voice assistant display method and device
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2021017889A1 (en) Display method of video call appliced to electronic device and related apparatus
CN113704014B (en) Log acquisition system, method, electronic device and storage medium
WO2021000807A1 (en) Processing method and apparatus for waiting scenario in application
CN109559270B (en) Image processing method and electronic equipment
WO2021036770A1 (en) Split-screen processing method and terminal device
CN114089933B (en) Display parameter adjusting method, electronic device, chip and readable storage medium
WO2021258814A1 (en) Video synthesis method and apparatus, electronic device, and storage medium
WO2021052139A1 (en) Gesture input method and electronic device
WO2021082815A1 (en) Display element display method and electronic device
CN111522425A (en) Power consumption control method of electronic equipment and electronic equipment
CN113448482A (en) Sliding response control method and device of touch screen and electronic equipment
CN114461057A (en) VR display control method, electronic device and computer readable storage medium
WO2022170856A1 (en) Method for establishing connection, and electronic device
WO2023179123A1 (en) Bluetooth audio playback method, electronic device, and storage medium
CN113593567A (en) Method for converting video and sound into text and related equipment
CN112437341B (en) Video stream processing method and electronic equipment
CN114006698B (en) token refreshing method and device, electronic equipment and readable storage medium
CN116939559A (en) Bluetooth audio coding data distribution method, electronic equipment and storage medium
CN113986369B (en) Internet of things equipment control method and system, electronic equipment and storage medium
CN115022982B (en) Multi-screen cooperative non-inductive access method, electronic equipment and storage medium
WO2022170854A1 (en) Video call method and related device
CN113590346B (en) Method and electronic equipment for processing service request
CN115529379B (en) Method for preventing Bluetooth audio Track jitter, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant