WO2022048371A1 - 跨设备音频播放方法、移动终端、电子设备及存储介质 - Google Patents

跨设备音频播放方法、移动终端、电子设备及存储介质 Download PDF

Info

Publication number
WO2022048371A1
WO2022048371A1 PCT/CN2021/110177 CN2021110177W WO2022048371A1 WO 2022048371 A1 WO2022048371 A1 WO 2022048371A1 CN 2021110177 W CN2021110177 W CN 2021110177W WO 2022048371 A1 WO2022048371 A1 WO 2022048371A1
Authority
WO
WIPO (PCT)
Prior art keywords
type
audio data
data stream
audio
preset
Prior art date
Application number
PCT/CN2021/110177
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to EP21863439.2A priority Critical patent/EP4199422A1/en
Publication of WO2022048371A1 publication Critical patent/WO2022048371A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/167Audio streaming, i.e. formatting and decoding of an encoded audio signal representation into a data stream for transmission or storage purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/612Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/756Media network packet handling adapting media to device capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/764Media network packet handling at the destination 

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a method for playing cross-device audio, a mobile terminal, an electronic device, and a storage medium.
  • Embodiments of the present application provide a cross-device audio playback method, a mobile terminal, an electronic device, and a storage medium, so as to provide a cross-device audio sharing method, which can realize lossless cross-device audio playback, ensure the sound quality of audio playback, and improve the user experience.
  • an embodiment of the present application provides a cross-device audio playback method, which is applied to a mobile terminal, including:
  • the audio capability information sent by the first device is received; specifically, the first device may be an electronic device with an audio playback capability and a wireless communication function. It should be noted that the first device may also be a mobile terminal.
  • the audio capability information is used to identify which type of audio the first device supports, for example, low-latency audio or normal audio.
  • the first-type audio data stream may be a normal audio data stream
  • the second-type audio data stream may be low-latency audio data flow.
  • the created audio data stream can be determined according to the currently created audio application. For example, if a game application is created, a corresponding second type of audio data stream can be created, and if a music application is created, a corresponding first type of audio data stream can be created. For audio data streams, if a game and a music application are created at the same time, the first type of audio data stream and the second type of audio data stream can be created at the same time.
  • the device plays the audio data stream of the first type and/or the audio data stream of the second type based on the identified type.
  • the type identifier can be used to identify the type of audio data stream, so that the first device can play according to the type. It can be played at a time interval of 20ms per frame.
  • sending the identified audio data stream of the first type and/or the audio data stream of the second type to the first device includes:
  • the current transmission conditions of the network where the mobile terminal is located may include information such as the current network transmission delay and network transmission load of the mobile terminal.
  • the first strategy may be an audio data stream sending strategy. For example, it may be to send one low-latency audio data frame to the first device every 5ms, or it may be to send two low-latency audio data frames to the first device every 10ms. .
  • the first type of audio data stream and/or the second type of audio data stream is sent to the first device according to the preset second policy.
  • creating the first type of audio data stream and/or the second type of audio data stream based on the audio capability information includes:
  • Parse the audio type in the audio capability information specifically, the audio type is used to identify the type of the audio data stream supported by the first device, and the audio type may include the first type and the second type.
  • the first type of audio data frames are sequentially created based on the preset first time interval; specifically, the preset first time interval corresponds to the first type, for example, the first type of audio data stream
  • the preset first time interval may be 20ms.
  • the type of the current audio application is determined; specifically, the audio application is used to identify the audio application currently opened by the user, for example, the audio application may be a game, music, or the like.
  • the first type of audio data frames are sequentially created based on the preset first time interval
  • the second type of audio data frames are sequentially created based on the preset second time interval.
  • the second type of audio data stream is a low-latency audio data stream, therefore, the preset second time interval may be 5ms.
  • the first type of audio data stream and/or the second type of audio data stream is sent to the first device according to the preset first policy, include:
  • the network transmission delay is less than or equal to the preset first time threshold and greater than the preset second time threshold, the first type of audio data stream is sent to the the first device;
  • the network transmission delay is less than or equal to the preset second time threshold, sending the first type of audio data stream to the first device based on the first preset time interval corresponding to the first type of audio data stream;
  • sending the audio data stream of the first type and/or the audio data stream of the second type to the first device according to the preset second strategy including:
  • the first type of audio data stream and/or the second type of audio data stream is sent to the first device based on a time interval corresponding to the third time threshold.
  • the embodiment of the present application also provides a cross-device audio playback method, applied to the first device, including:
  • the audio capability information includes the first type and/or the second type
  • the second type of audio data stream is played based on a second preset time interval corresponding to the second type of audio data stream.
  • an embodiment of the present application provides a cross-device audio playback device, including:
  • a receiving module configured to receive the audio capability information sent by the first device
  • a creation module for creating a first-type audio data stream and/or a second-type audio data stream based on the audio capability information
  • a sending module configured to perform type identification on the first type audio data stream and/or the second type audio data stream, and send the first type audio data stream and/or the second type audio data stream after the type identification to the first type of audio data stream and/or the second type audio data stream.
  • the first device plays the audio data stream of the first type and/or the audio data stream of the second type based on the identified type.
  • the above-mentioned sending module further includes:
  • an acquisition unit used to acquire the current transmission conditions of the network where the mobile terminal is located
  • the comparison unit is used to compare the current transmission condition with the preset transmission condition; if the current transmission condition satisfies the preset transmission condition, the first type of audio data stream and/or the second type of audio data stream according to the preset first strategy is compared.
  • the data stream is sent to the first device; if the current transmission condition does not meet the preset transmission condition, the first type of audio data stream and/or the second type of audio data stream is sent to the first device according to the preset second policy.
  • the above creation module further includes:
  • a judgment unit configured to sequentially create audio data frames of the first type based on the preset first time interval if the audio capability information includes the first type; if the audio capability information includes the second type, then determine the type of the current audio application; If the type of the audio application corresponds to the first type, the first type of audio data frames are created in sequence based on the preset first time interval; if the type of the audio application corresponds to the second type, the audio data frames are sequentially created based on the preset second time interval Create a second type of audio data frame.
  • the above-mentioned comparison unit is also used for
  • the network transmission delay is less than or equal to the preset first time threshold and greater than the preset second time threshold, the first type of audio data stream is sent to the the first device;
  • the network transmission delay is less than or equal to the preset second time threshold, sending the first type of audio data stream to the first device based on the first preset time interval corresponding to the first type of audio data stream;
  • the first type of audio data stream and/or the second type of audio data stream is sent to the first device based on a time interval corresponding to the third time threshold.
  • the above-mentioned device further includes:
  • the query module is configured to send a query request to the first device, so that the first device sends audio capability information based on the query request.
  • the embodiment of the present application also provides a cross-device audio playback device, including:
  • an acquisition module configured to acquire audio capability information, and send the audio capability information to the mobile terminal; wherein the audio capability information includes the first type and/or the second type;
  • a receiving module for receiving the audio data stream sent by the mobile terminal
  • the identification module is used for type identification of the audio data stream
  • a playback module configured to play the audio data stream of the first type based on the first preset time interval corresponding to the audio data stream of the first type if the type of the audio data stream is the first type; if the type of the audio data stream is the second type , playing the second type of audio data stream based on a second preset time interval corresponding to the second type of audio data stream.
  • an embodiment of the present application provides a mobile terminal, including:
  • Memory the memory is used to store computer program code, and the computer program code includes instructions, when the mobile terminal reads the instructions from the memory, so that the mobile terminal performs the following steps:
  • the device plays the audio data stream of the first type and/or the audio data stream of the second type based on the identified type.
  • the mobile terminal when the instruction is executed by the mobile terminal, the mobile terminal is caused to perform the step of sending the identified first type audio data stream and/or the second type audio data stream to the first device, including:
  • the first type of audio data stream and/or the second type of audio data stream is sent to the first device according to the preset second policy.
  • the mobile terminal when the instruction is executed by the mobile terminal, the mobile terminal is caused to perform the step of creating the first type audio data stream and/or the second type audio data stream based on the audio capability information, including:
  • the first type of audio data frames are sequentially created based on the preset first time interval;
  • the audio capability information includes the second type, then determine the type of the current audio application
  • the first type of audio data frames are sequentially created based on the preset first time interval
  • the second type of audio data frames are sequentially created based on the preset second time interval.
  • the mobile terminal executes the audio data stream of the first type and/or the audio data stream of the second type according to the preset first policy if the current transmission condition satisfies the preset transmission condition.
  • the step of sending the audio data stream to the first device includes:
  • the network transmission delay is less than or equal to the preset first time threshold and greater than the preset second time threshold, the first type of audio data stream is sent to the the first device;
  • the network transmission delay is less than or equal to the preset second time threshold, sending the first type of audio data stream to the first device based on the first preset time interval corresponding to the first type of audio data stream;
  • Making the mobile terminal perform the step of sending the first type of audio data stream and/or the second type of audio data stream to the first device according to the preset second strategy if the current transmission condition does not meet the preset transmission condition, including:
  • the first type of audio data stream and/or the second type of audio data stream is sent to the first device based on a time interval corresponding to a third time threshold.
  • a query request is sent to the first device, so that the first device sends audio capability information based on the query request.
  • the embodiment of the present application also provides a first device, including:
  • Memory the memory is used to store computer program code, and the computer program code includes instructions, when the above-mentioned device reads the above-mentioned instructions from the above-mentioned memory, so that the above-mentioned device performs the following steps:
  • the audio capability information includes the first type and/or the second type
  • the second type of audio data stream is played based on a second preset time interval corresponding to the second type of audio data stream.
  • an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, causes the computer to execute the method described in the first aspect.
  • an embodiment of the present application provides a computer program, which is used to execute the method described in the first aspect when the computer program is executed by a computer.
  • the program in the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, and may also be stored in part or in part in a memory not packaged with the processor.
  • FIG. 1 is a schematic diagram of an embodiment of an application scenario provided by an embodiment of the present application
  • FIG. 2 is a flowchart of an embodiment of a cross-device audio playback method provided by the present application
  • FIG. 3 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an embodiment of a cross-device audio playback device provided by the application.
  • FIG. 5 is a schematic structural diagram of another embodiment of a cross-device audio playback device provided by the application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • plural means two or more.
  • a mobile terminal when playing local audio, a mobile terminal supports two audio types: normal audio and low-latency video.
  • ordinary audio has higher requirements on sound effects, so it is necessary to perform sound mixing and sound effect processing on ordinary audio, so that the time interval between two ordinary audio frames can be set to be slightly longer, for example, between two audio frames
  • the time interval can be set to 20ms.
  • low-latency audio requires higher real-time performance. Therefore, it is not necessary to perform sound mixing and sound effect processing on low-latency audio, so that the time interval between two low-latency audio frames can be set to a shorter time. For example, The time interval between two low-latency audio frames can be set to 5ms.
  • the mobile terminal When a piece of audio data is shared across devices, for example, when the mobile terminal sends the local audio to the shared device (such as a TV) for playback, since the mobile terminal cannot obtain the audio playback capability of the shared device, the mobile terminal Only ordinary audio can be created and sent to a shared device for playback, which makes it impossible to meet the requirements of low-latency audio during audio sharing.
  • the shared device such as a TV
  • an embodiment of the present application proposes a cross-device audio playback method, which can realize lossless cross-device audio playback and improve user experience.
  • the embodiments of the present application may be applied to a mobile terminal; wherein, the mobile terminal may also be referred to as terminal equipment, user equipment (User Equipment, UE), access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote station Terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user equipment.
  • terminal equipment user equipment
  • UE User Equipment
  • access terminal subscriber unit, subscriber station, mobile station, mobile station, remote station, remote station Terminal
  • mobile device user terminal, terminal, wireless communication device, user agent or user equipment.
  • the mobile terminal may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (Session Initiation Protocol, SIP) phone, a Wireless Local Loop (WLL) station, a personal digital processing (Personal Digital Assistant, PDA) devices, handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, connected car terminals, computers, laptop computers, handheld communication devices, handheld Computing equipment, satellite wireless equipment, wireless modem cards, Set Top Box (STB), Customer Premise Equipment (CPE) and/or other equipment for communicating over wireless systems and next generation communication systems
  • PLMN Public Land Mobile Network
  • the mobile terminal 100 may communicate with the first device 200 through wireless communication (eg, Bluetooth, WIFI, etc.).
  • the first device 200 may be a device with a wireless communication function and an audio playback function, such as a smart speaker, a mobile phone, a TV, a tablet, and the like.
  • This embodiment of the present application does not limit the specific form of the first device 200 .
  • a schematic flowchart of an embodiment of a cross-device audio playback method provided by the present application may include:
  • Step 101 the first device 200 acquires audio capability information, and sends the audio capability information to the mobile terminal 100 .
  • the audio capability information is used to identify the audio capability of the first device 200, and the audio capability information may include the first type and the second type.
  • the first type may be used to identify normal audio capabilities, and the second type may be used to identify low latency audio capabilities.
  • the audio capability information of the first device 200 may be preset in the first device 200, for example, may be set when the first device 200 is shipped from the factory.
  • the audio capability information of the first device 200 can also be automatically generated by collecting hardware information in the first device 200, for example, judging the audio hardware information in the first device 200 to determine whether the first device 200 supports the first type and/or The second type of audio.
  • Step 102 the first device 200 sends the audio capability information to the mobile terminal 100 .
  • the first device 200 can send the audio capability information to the mobile terminal 100, so that the audio capability information can be shared across devices.
  • the first device 200 may also send audio capability information to the mobile terminal 100 after receiving the query request from the mobile terminal 100 .
  • the query request may be used to query the audio capability information of the first device 200 .
  • Step 103 the mobile terminal 100 receives the audio capability information of the first device 200 .
  • the mobile terminal 100 parses the audio capability information to obtain the type (eg, the first type and/or the second type) in the audio capability information.
  • Step 104 detecting a first operation of the user for starting the audio application, and the mobile terminal 100 creates an audio data stream based on the audio capability information.
  • the user may operate on the mobile terminal 100 to start an audio application, for example, the user may open a game application or a calling application in the mobile terminal 100 by clicking an icon of the application.
  • the mobile terminal 100 may create an audio data stream based on the audio capability information.
  • the mobile terminal 100 may determine the type in the audio capability information.
  • the mobile terminal 100 creates an audio data stream based on the first type. For example, the mobile terminal 100 may create a common audio data stream.
  • the mobile terminal 100 may create audio data streams of the first type and/or the second type, respectively.
  • the mobile terminal 100 may create a normal audio data stream and/or a low-latency audio data stream according to the type of the audio application. For example, if the audio application is a game or a call type, the mobile terminal 100 may create a low-latency audio stream. data flow. If the audio application is music or the like, the mobile terminal 100 can create a common audio data stream.
  • Step 105 the mobile terminal 100 marks the audio data stream.
  • the mobile terminal 100 can also be identified, so that the first-type audio data stream and/or the second-type audio data stream can be identified to Identification occurs at device 200 .
  • the mobile terminal 100 may identify the first type of audio data stream as the first type, and the mobile terminal 100 may further identify the second type of audio data stream as the second type.
  • Step 106 the mobile terminal 100 sends the audio data stream to the first device 200 .
  • the first-type audio data stream can be sent to the first device 200; if the mobile terminal 100 generates a second-type audio data stream, the second-type audio data stream can be sent to the first device 200.
  • the type audio data stream is sent to the first device 200; if the mobile terminal 100 generates the first type audio data stream and the second type audio data stream, the first type audio data stream and the second type audio data stream can be sent to the first type audio data stream.
  • a device 200 is if the mobile terminal 100 generates the first type audio data stream and the second type audio data stream, the first type audio data stream and the second type audio data stream can be sent to the first type audio data stream.
  • the mobile terminal 100 may also acquire status information of the current network environment.
  • the state information of the network environment may include delay and load.
  • the mobile terminal 100 may identify the delay and load information of the current network environment based on a network transmission protocol, for example, Transmission Control Protocol (TCP).
  • TCP Transmission Control Protocol
  • TCP network packets support round-trip delay (Round-Trip Time, RTT) and acknowledgment (ACK) packets.
  • RTT Round-Trip Time
  • ACK acknowledgment
  • the network transmission delay can be obtained through the RTT packet, and the network loss can be calculated through the ACK packet.
  • Packets that is, the load information of the network can be calculated.
  • the mobile terminal 100 may also determine the sending policy based on the state information of the network environment.
  • the sending strategy may be to package and send the audio data stream of the first type and/or the audio data stream of the second type based on the level of delay and load in the state information of the network environment.
  • the mobile terminal 100 may calculate the delay in a preset historical time period, if the average delay in the preset historical time period is less than the first threshold (for example, , 10ms), the time can be considered small and stable.
  • the mobile terminal may package and send the first type audio data stream and/or the second type audio data stream.
  • the mobile terminal 100 may send two frames of the second type audio data (for example, low-latency audio data) every 10 ms. data), and/or sending an audio data stream to the first device 200 in a manner of sending one frame of first type audio data (eg, common audio data) every 20 ms.
  • the mobile terminal may send a frame of the second type audio data (for example, low-latency audio data) every 5ms, and/or send a frame of the first type every 20ms
  • the audio data stream is sent to the first device 200 in the form of audio data (eg, normal audio data).
  • the mobile terminal 100 may transmit the audio data stream to the first device 200 by transmitting four frames of the second type audio data and/or one frame of the first type audio data every 20 ms.
  • Step 107 the first device 200 receives the audio data stream sent by the mobile terminal 100, and plays the audio data stream.
  • the first device 200 can determine the type of the audio data stream.
  • the first device 200 determines that the video data stream is of the first type (for example, a common audio data stream)
  • the video data stream is played according to a time interval (for example, 20 ms) corresponding to the audio data stream of the first type.
  • the video data stream is played according to a time interval (eg, 5 ms) corresponding to the second type of audio data stream.
  • a time interval eg, 5 ms
  • the mobile terminal 100 includes an application program module 310 , an audio data stream processing module 320 and an audio data stream sending module 330 .
  • the application program module 310 is used to start a corresponding application program, so that the application program can generate a corresponding audio data stream.
  • the application program module 310 may include one or more application programs.
  • the application program module 310 includes an application program 311 And application 312, for example, application 311 may be a game, and application 312 may be music.
  • the application 311 can generate the second type of audio data stream, and the application 312 can generate The first type of audio data stream.
  • the audio data stream processing module 320 can be used to process the audio data stream generated by the application program module 310.
  • the audio data stream can be sent to the audio data stream sending module 330 according to preset time intervals.
  • the stream processing module 320 can perform processing such as mixing and sound effects on the first type audio data stream, and send the first type audio data stream to the audio data stream sending module 330 according to the time interval of one frame of the first type audio data every 20ms, and The second-type audio data stream is sent to the audio data stream sending module 330 every 5 ms at a time interval of one frame of the second-type audio data.
  • the audio data stream sending module 330 After receiving the audio data stream sent by the audio data stream processing module 320, the audio data stream sending module 330 sends the audio data stream to the first device 200 based on the current sending policy.
  • the current sending policy may be determined based on current network environment information (eg, time delay). It can be understood that the audio data stream processing module 320 can also identify the audio data stream before sending the audio data stream, for example, the first type of audio data stream is identified as the first type, and the second type of audio data stream is identified. for the second type.
  • the first device 200 includes an audio data stream receiving module 340 , an audio data stream processing module 350 and an audio data stream playing module 360 .
  • the audio data stream receiving module 340 is configured to receive the audio data stream sent by the audio data stream sending module 330 in the mobile terminal 100 . After receiving the audio data stream, the audio data stream receiving module 340 can identify the type of the audio data stream, thereby distinguishing whether the audio data stream is of the first type or the second type, and sending the audio data stream to the audio data stream Processing module 350 . After receiving the audio data stream sent by the audio data stream receiving module 340, the audio data stream processing module 350 performs sound mixing and sound effect processing on the first type of audio data stream, and divides the first type of audio data stream according to the time of one frame per 20ms.
  • the audio data stream is sent to the audio data stream playing module 360 at intervals, and the second type of audio data stream is sent to the audio data stream playing module 360 at a time interval of one frame every 5 ms.
  • the audio data stream playing module 360 plays the first type audio data stream at a time interval of one frame every 20ms, and plays the second type audio data stream at a time interval of one frame every 5ms.
  • the frames are played at time intervals, thereby completing the audio sharing between the mobile terminal 100 and the first device 200, and realizing lossless transmission of the audio data stream, ensuring the sound quality of the audio data stream, and improving user experience.
  • FIG. 4 is a schematic structural diagram of an embodiment of a cross-device audio playback device of the present application.
  • the above-mentioned cross-device audio playback device 40 may include: a receiving module 41, a creating module 42, and a sending module 43;
  • a receiving module 41 configured to receive audio capability information sent by the first device
  • a creation module 42 for creating a first type audio data stream and/or a second type audio data stream based on the audio capability information
  • the sending module 43 is used to perform type identification on the first type audio data stream and/or the second type audio data stream, and send the first type audio data stream and/or the second type audio data stream after the type identification to the first type audio data stream.
  • the above-mentioned sending module 43 further includes: an acquisition unit 431 and a comparison unit 432;
  • an obtaining unit 431, configured to obtain the current transmission conditions of the network where the mobile terminal is located;
  • the comparison unit 432 is used to compare the current transmission condition with the preset transmission condition; if the current transmission condition satisfies the preset transmission condition, according to the preset first strategy, the first type audio data stream and/or the second type audio data stream is compared.
  • the audio data stream is sent to the first device; if the current transmission condition does not meet the preset transmission condition, the first type of audio data stream and/or the second type of audio data stream is sent to the first device according to the preset second policy.
  • the above-mentioned creation module 42 further includes: a parsing unit 421 and a judging unit 422;
  • the judging unit 422 is configured to sequentially create audio data frames of the first type based on the preset first time interval if the audio capability information includes the first type; if the audio capability information includes the second type, then determine the type of the current audio application ; If the type of audio application corresponds to the first type, then create the first type audio data frame based on the preset first time interval in turn; if the type of audio application corresponds to the second type, then based on the preset second time interval A second type of audio data frame is sequentially created.
  • the above-mentioned comparison unit 432 is further configured to, if the network transmission delay is less than or equal to the preset first time threshold, and greater than the preset second time threshold, based on the audio data stream of the first type The corresponding first preset time interval sends the first type of audio data stream to the first device;
  • the network transmission delay is less than or equal to the preset second time threshold, sending the first type of audio data stream to the first device based on the first preset time interval corresponding to the first type of audio data stream;
  • the first type of audio data stream and/or the second type of audio data stream is sent to the first device based on a time interval corresponding to the third time threshold.
  • the above-mentioned apparatus 40 further includes: a query module 44;
  • the query module 44 is configured to send a query request to the first device, so that the first device sends audio capability information based on the query request.
  • the above-mentioned cross-device audio playback device 50 may include: an acquisition module 51, a receiving module 52, an identification module 53, and a playback module 54;
  • an acquisition module 51 configured to acquire audio capability information, and send the audio capability information to the mobile terminal; wherein, the audio capability information includes the first type and/or the second type;
  • the receiving module 52 is used for receiving the audio data stream sent by the mobile terminal
  • the identification module 53 is used for type identification of the audio data stream
  • the playing module 54 is used for playing the first type audio data stream based on the first preset time interval corresponding to the first type audio data stream if the type of the audio data stream is the first type; if the type of the audio data stream is the second type type, the second type of audio data stream is played based on a second preset time interval corresponding to the second type of audio data stream.
  • each module of the cross-device audio playback device shown in FIG. 4 and FIG. 5 is only a division of a logical function, and can be fully or partially integrated into a physical entity during actual implementation, or can be physically separated.
  • these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in hardware.
  • the detection module may be a separately established processing element, or may be integrated in a certain chip of the electronic device.
  • the implementation of other modules is similar.
  • all or part of these modules can be integrated together, and can also be implemented independently.
  • each step of the above-mentioned method or each of the above-mentioned modules can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (Application Specific Integrated Circuit; hereinafter referred to as: ASIC), or, one or more microprocessors Digital Singnal Processor (hereinafter referred to as: DSP), or, one or more Field Programmable Gate Array (Field Programmable Gate Array; hereinafter referred to as: FPGA), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Singnal Processor
  • FPGA Field Programmable Gate Array
  • these modules can be integrated together and implemented in the form of a system-on-a-chip (System-On-a-Chip; hereinafter referred to as: SOC).
  • FIG. 6 is a schematic structural diagram of an electronic device 600 , wherein the mobile terminal 100 and the first device 200 may be the electronic device 600 described above.
  • the device can be used to execute the functions/steps in the methods provided by the embodiments shown in FIG. 1 to FIG. 3 of the present application.
  • the electronic device 600 may include a processor 610 , an external memory interface 620 , an internal memory 621 , a universal serial bus (USB) interface 630 , a charge management module 640 , a power management module 641 , and a battery 642 , Antenna 1, wireless communication module 660, audio module 670, speaker 670A, microphone 670C, headphone jack 670D, sensor module 680, buttons 690, motor 691, indicator 692, camera 693 and display screen 694, etc.
  • the sensor module 680 may include a temperature sensor 680J, a touch sensor 680K, an ambient light sensor 680L, and the like.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 600 .
  • the electronic device 600 may include more or less components than shown, or some components are combined, or some components are separated, or different components are arranged.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 610 may include one or more processing units, for example, the processor 610 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • a memory may also be provided in the processor 610 for storing instructions and data.
  • the memory in processor 610 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 610 . If the processor 610 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the waiting time of the processor 610 is reduced, thereby increasing the efficiency of the system.
  • the processor 610 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • 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 that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 610 may contain multiple sets of I2C buses.
  • the processor 610 can be respectively coupled to the touch sensor 680K, the charger, the flash, the camera 693, etc. through different I2C bus interfaces.
  • the processor 610 can couple the touch sensor 680K through the I2C interface, so that the processor 610 and the touch sensor 680K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 600 .
  • the I2S interface can be used for audio communication.
  • the processor 610 may contain multiple sets of I2S buses.
  • the processor 610 may be coupled with the audio module 670 through an I2S bus to implement communication between the processor 610 and the audio module 670 .
  • the audio module 670 can transmit an audio signal to the wireless communication module 660 through the I2S interface, so as to realize the function of keeping the call during screen sharing.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • audio module 670 and wireless communication module 660 may be coupled through a PCM bus interface.
  • the audio module 670 can also transmit audio signals to the wireless communication module 660 through the PCM interface, so as to realize the function of keeping the call during screen sharing. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 610 with the wireless communication module 660 .
  • the processor 610 communicates with the wireless communication module 660 through the UART interface, so as to realize the function of video encoding data transmission.
  • the MIPI interface can be used to connect the processor 610 with peripheral devices such as the display screen 694 and the camera 693 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 610 communicates with the camera 693 through a CSI interface to implement the photographing function of the electronic device 600 .
  • the processor 610 communicates with the display screen 694 through the DSI interface to implement the display function of the electronic device 600 .
  • 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 may be used to connect the processor 610 with the camera 693, the display screen 694, the wireless communication module 660, the audio module 670, the sensor module 680, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 630 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 630 can be used to connect a charger to charge the electronic device 600, and can also be used to transmit data between the electronic device 600 and peripheral devices. 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 augmented reality (AR) devices.
  • AR augmented reality
  • 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 of the electronic device 600 .
  • the electronic device 600 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 640 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 640 may receive charging input from the wired charger through the USB interface 630 .
  • the charging management module 640 may receive wireless charging input through a wireless charging coil of the electronic device 600 . While the charging management module 640 is charging the battery 642 , it can also supply power to the electronic device through the power management module 641 .
  • the power management module 641 is used to connect the battery 642 , the charging management module 640 and the processor 610 .
  • the power management module 641 receives input from the battery 642 and/or the charging management module 640, and supplies power to the processor 610, the internal memory 621, the display screen 694, the camera 693, and the wireless communication module 660.
  • the power management module 641 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 641 may also be provided in the processor 610 .
  • the power management module 641 and the charging management module 640 may also be provided in the same device.
  • the wireless communication function of the electronic device 600 may be implemented by the antenna 1 and the wireless communication module 660 and the like.
  • the antenna 1 is used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 600 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the wireless communication module 660 can provide applications on the electronic device 600 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 660 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 660 receives electromagnetic waves via the antenna 1 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 610 .
  • the wireless communication module 660 can also receive the signal to be sent from the processor 610, perform frequency modulation on it, amplify it, and radiate it into electromagnetic waves through the antenna 1.
  • the antenna 1 of the electronic device 600 is coupled with the wireless communication module 660, so that the electronic device 600 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include BT, GNSS, WLAN, NFC, FM, and/or IR technology, among others.
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • the electronic device 600 implements a display function through a GPU, a display screen 694, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 694 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 610 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 694 is used to display images, videos, and the like.
  • Display screen 694 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 (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 600 may include 1 or N display screens 694, where N is a positive integer greater than 1.
  • the electronic device 600 can realize the shooting function through the ISP, the camera 693, the video codec, the GPU, the display screen 694 and the application processor.
  • the ISP is used to process the data fed back by the camera 693 .
  • the shutter is opened, 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 the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 693 .
  • Camera 693 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may 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 transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 600 may include 1 or N cameras 693 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 600 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
  • Video codecs are used to compress or decompress digital video.
  • Electronic device 600 may support one or more video codecs.
  • the electronic device 600 can play or record videos in various encoding formats, such as: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 600 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 620 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 600 .
  • the external memory card communicates with the processor 610 through the external memory interface 620 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 621 may be used to store computer executable program code, which includes instructions.
  • the internal memory 621 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 600 and the like.
  • the internal memory 621 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 610 executes various functional applications and data processing of the electronic device 600 by executing the instructions stored in the internal memory 621 and/or the instructions stored in the memory provided in the processor.
  • the electronic device 600 may implement audio functions through an audio module 670, a speaker 670A, a microphone 670C, an earphone interface 670D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 670 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 670 may also be used to encode and decode audio signals. In some embodiments, the audio module 670 may be provided in the processor 610 , or some functional modules of the audio module 670 may be provided in the processor 610 .
  • Speaker 670A also referred to as "horn" is used to convert audio electrical signals into sound signals.
  • the electronic device 600 can listen to music through the speaker 670A, or listen to a hands-free call.
  • Microphone 670C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 670C through the human mouth, and input the sound signal into the microphone 670C.
  • the electronic device 600 may be provided with at least one microphone 670C. In other embodiments, the electronic device 600 may be provided with two microphones 670C, which may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 600 may further be provided with three, four or more microphones 670C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the headphone jack 670D is used to connect wired headphones.
  • the earphone interface 670D can be a USB interface 630, or can be a 3.5mm open mobile terminal platform (OMTP) standard interface, 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 ambient light sensor 680L is used to sense ambient light brightness.
  • the electronic device 600 can adaptively adjust the brightness of the display screen 694 according to the perceived ambient light brightness.
  • the ambient light sensor 680L can also be used to automatically adjust white balance when shooting.
  • the temperature sensor 680J is used to detect the temperature.
  • the electronic device 600 utilizes the temperature detected by the temperature sensor 680J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 680J exceeds a threshold value, the electronic device 600 performs performance reduction of the processor located near the temperature sensor 680J in order to reduce power consumption and implement thermal protection.
  • the electronic device 600 when the temperature is lower than another threshold, the electronic device 600 heats the battery 642 to avoid abnormal shutdown of the electronic device 600 caused by the low temperature.
  • the electronic device 600 boosts the output voltage of the battery 642 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 680K also known as "touch device”.
  • the touch sensor 680K may be disposed on the display screen 694, and the touch sensor 680K and the display screen 694 form a touch screen, also called a "touch screen”.
  • the touch sensor 680K is used to detect touch operations on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 694 .
  • the touch sensor 680K may also be disposed on the surface of the electronic device 600 at a different location than the display screen 694 .
  • the keys 690 include a power-on key, a volume key, and the like. Keys 690 may be mechanical keys. It can also be a touch key.
  • the electronic device 600 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 600 .
  • Motor 691 can generate vibrating cues.
  • the motor 691 can be used for incoming call vibration alerts, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 691 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 694 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 692 can be an indicator light, which can be used to indicate the charging status, the change of power, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the electronic device 600 shown in FIG. 6 may be a smart electronic device such as a mobile phone, a TV, a smart screen, a tablet computer, a notebook computer, or a PC, and the form of the electronic device 600 is not limited in this embodiment.
  • the electronic device 600 can be used to execute the functions/steps in the methods provided by the embodiments of the present application. For details, refer to the descriptions in the method embodiments of the present application. To avoid repetition, detailed descriptions are appropriately omitted here.
  • the present application also provides an electronic device, the device includes a storage medium and a central processing unit, the storage medium may be a non-volatile storage medium, and a computer-executable program is stored in the storage medium, and the central processing unit is connected to the central processing unit.
  • the non-volatile storage medium is connected, and the computer-executable program is executed to implement the method provided by the embodiments shown in FIG. 1 to FIG. 4 of the present application.
  • the involved processors may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural-network process unit (Neural-network Process Units; hereinafter referred to as: NPU) and Image signal processor (Image Signal Processing; hereinafter referred to as: ISP), the processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application circuit, etc. Furthermore, the processor may have the function of operating one or more software programs, which may be stored in a storage medium.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (Read-Only Memory; hereinafter referred to as: ROM), Random Access Memory (Random Access Memory; hereinafter referred to as: RAM), magnetic disk or optical disk and other various A medium on which program code can be stored.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • magnetic disk or optical disk and other various A medium on which program code can be stored.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请实施例提供一种跨设备音频播放方法、移动终端、电子设备及存储介质,涉及通信技术领域,该方法包括:接收第一设备发送的音频能力信息;基于所述音频能力信息创建第一类型音频数据流和/或第二类型音频数据流;对所述第一类型音频数据流和/或第二类型音频数据流进行类型标识,并将类型标识后的所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备,使得所述第一设备基于标识的类型播放所述第一类型音频数据流和/或第二类型音频数据流。本申请实施例提供的方法,能够实现无损的跨设备音频播放,保证音频播放的音质,提高用户的体验。

Description

跨设备音频播放方法、移动终端、电子设备及存储介质
本申请要求于2020年09月01日提交中国专利局、申请号为202010903800.X、申请名称为“跨设备音频播放方法、移动终端、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,尤其涉及一种跨设备音频播放方法、移动终端、电子设备及存储介质。
背景技术
随着多屏协同技术的不断发展,多个终端设备之间可以实现跨设备的资源共享、投屏以及协同操作。例如,用户可以将手机上的屏幕画面、声音等信息共享在平板、电视等设备上。
发明内容
本申请实施例提供了一种跨设备音频播放方法、移动终端、电子设备及存储介质,以提供一种跨设备的音频共享方式,能够实现无损的跨设备音频播放,保证音频播放的音质,提高用户的体验。
第一方面,本申请实施例提供了一种跨设备音频播放方法,应用于移动终端,包括:
接收第一设备发送的音频能力信息;具体地,第一设备可以是具有音频播放能力,且具有无线通信功能的电子设备。需要说明的是,该第一设备也可以是移动终端。该音频能力信息用于标识第一设备支持哪种类型的音频,例如,低时延音频或普通音频等。
基于音频能力信息创建第一类型音频数据流和/或第二类型音频数据流;具体地,第一类型音频数据流可以是普通音频数据流,第二类型类型音频数据流可以是低时延音频数据流。其中,创建的音频数据流可以根据当前创建的音频应用确定,例如,如果创建了游戏应用,则可以创建对应的第二类型音频数据流,若创建了音乐应用,则可以创建对应的第一类型音频数据流,若同时创建了游戏和音乐应用,则可以同时创建第一类型音频数据流和第二类型音频数据流。
对第一类型音频数据流和/或第二类型音频数据流进行类型标识,并将类型标识后的第一类型音频数据流和/或第二类型音频数据流发送给第一设备,使得第一设备基于标识的类型播放第一类型音频数据流和/或第二类型音频数据流。具体地,该类型标识可以用于标识音频数据流的类型,使得第一设备可以根据该类型进行播放,例如,低 时延音频数据流可以按照5ms一帧的时间间隔进行播放,普通音频数据流可以按照20ms一帧的时间间隔进行播放。
其中一种可能的实现方式中,将标识后的第一类型音频数据流和/或第二类型音频数据流发送给第一设备包括:
获取移动终端所处网络的当前传输条件;具体地,移动终端所处网络的当前传输条件可以包括移动终端当前的网络传输时延和网络传输负载等信息。
将当前传输条件与预设传输条件进行比对;
若当前传输条件满足预设传输条件时,根据预设第一策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备;具体地的,预设传输条件可以根据音频数据流的时间属性进行设定,例如,低时延音频数据流中每两个音频数据帧之间的时间间隔为5ms,则可以将当前的网络传输时延和5ms进行比较。第一策略可以是音频数据流的发送策略,例如,可以是每5ms发送一帧低时延音频数据帧给第一设备,也可以是每10ms发送两帧低时延音频数据帧给第一设备。
若当前传输条件不满足预设传输条件时,根据预设第二策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备。
其中一种可能的实现方式中,基于音频能力信息创建第一类型音频数据流和/或第二类型音频数据流包括:
解析音频能力信息中的音频类型;具体地,音频类型用于标识第一设备支持的音频数据流的类型,音频类型可以包括第一类型和第二类型。
若音频能力信息中包含第一类型,则基于预设第一时间间隔依次创建第一类型音频数据帧;具体地,预设第一时间间隔与第一类型对应,例如,第一类型音频数据流为普通音频数据流,则预设第一时间间隔可以为20ms。
若音频能力信息中包含第二类型,则判断当前音频应用的类型;具体地,音频应用用于标识用户当前打开的音频应用程序,例如,音频应用可以是游戏、音乐等。
若音频应用的类型与第一类型对应,则基于预设第一时间间隔依次创建第一类型音频数据帧;
若音频应用的类型与第二类型对应,则基于预设第二时间间隔依次创建第二类型音频数据帧。具体地,第二类型音频数据流为低时延音频数据流,因此,预设第二时间间隔可以是5ms。
其中一种可能的实现方式中,若当前传输条件满足所述预设传输条件时,根据预设第一策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备,包括:
若网络传输时延小于或等于预设第一时间阈值,且大于预设第二时间阈值,则基于与第一类型音频数据流对应的第一预设时间间隔将第一类型音频数据流发送给第一设备;
和/或基于与第一时间阈值对应的时间间隔将第二类型音频数据流发送给第一设备;
若网络传输时延小于或等于预设第二时间阈值,则基于与第一类型音频数据流对应的第一预设时间间隔将第一类型音频数据流发送给第一设备;
和/或基于与第二时间阈值对应的时间间隔将第二类型音频数据流发送给第一设 备;
所述若当前传输条件不满足预设传输条件时,根据预设第二策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备,包括:
若网络传输时延大于预设第三时间阈值;
基于与第三时间阈值对应的时间间隔将第一类型音频数据流和/或第二类型音频数据流发送给第一设备。
本申请实施例还提供了一种跨设备音频播放方法,应用于第一设备,包括:
获取音频能力信息,将音频能力信息发送给移动终端;其中,音频能力信息包括第一类型和/或第二类型;
接收移动终端发送的音频数据流;
对音频数据流进行类型识别;
若音频数据流的类型为第一类型,基于与第一类型音频数据流对应的第一预设时间间隔播放第一类型音频数据流;
若音频数据流的类型为第二类型,基于与第二类型音频数据流对应的第二预设时间间隔播放第二类型音频数据流。
第二方面,本申请实施例提供一种跨设备音频播放装置,包括:
接收模块,用于接收第一设备发送的音频能力信息;
创建模块,用于基于音频能力信息创建第一类型音频数据流和/或第二类型音频数据流;
发送模块,用于对第一类型音频数据流和/或第二类型音频数据流进行类型标识,并将类型标识后的第一类型音频数据流和/或第二类型音频数据流发送给第一设备,使得第一设备基于标识的类型播放第一类型音频数据流和/或第二类型音频数据流。
其中一种可能的实现方式中,上述发送模块还包括:
获取单元,用于获取移动终端所处网络的当前传输条件;
比对单元,用于将当前传输条件与预设传输条件进行比对;若当前传输条件满足预设传输条件时,根据预设第一策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备;若当前传输条件不满足预设传输条件时,根据预设第二策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备。
其中一种可能的实现方式中,上述创建模块还包括:
解析单元,用于解析音频能力信息中的音频类型;
判断单元,用于若音频能力信息中包含第一类型,则基于预设第一时间间隔依次创建第一类型音频数据帧;若音频能力信息中包含第二类型,则判断当前音频应用的类型;若音频应用的类型与所述第一类型对应,则基于预设第一时间间隔依次创建第一类型音频数据帧;若音频应用的类型与第二类型对应,则基于预设第二时间间隔依次创建第二类型音频数据帧。
其中一种可能的实现方式中,上述比对单元还用于
若网络传输时延小于或等于预设第一时间阈值,且大于预设第二时间阈值,则基于与第一类型音频数据流对应的第一预设时间间隔将第一类型音频数据流发送给第一设备;
和/或基于与第一时间阈值对应的时间间隔将第二类型音频数据流发送给第一设备;
若网络传输时延小于或等于预设第二时间阈值,则基于与第一类型音频数据流对应的第一预设时间间隔将第一类型音频数据流发送给第一设备;
和/或基于与第二时间阈值对应的时间间隔将第二类型音频数据流发送给第一设备;
若网络传输时延大于预设第三时间阈值;
基于与第三时间阈值对应的时间间隔将第一类型音频数据流和/或第二类型音频数据流发送给第一设备。
其中一种可能的实现方式中,上述装置还包括:
查询模块,用于向第一设备发送查询请求,使得第一设备基于查询请求发送音频能力信息。
本申请实施例还提供一种跨设备音频播放装置,包括:
获取模块,用于获取音频能力信息,将音频能力信息发送给移动终端;其中,音频能力信息包括第一类型和/或第二类型;
接收模块,用于接收移动终端发送的音频数据流;
识别模块,用于对音频数据流进行类型识别;
播放模块,用于若音频数据流的类型为第一类型,基于与第一类型音频数据流对应的第一预设时间间隔播放第一类型音频数据流;若音频数据流的类型为第二类型,基于与第二类型音频数据流对应的第二预设时间间隔播放第二类型音频数据流。
第三方面,本申请实施例提供一种移动终端,包括:
存储器,上述存储器用于存储计算机程序代码,上述计算机程序代码包括指令,当移动终端从上述存储器中读取上述指令,以使得移动终端执行以下步骤:
接收第一设备发送的音频能力信息;
基于音频能力信息创建第一类型音频数据流和/或第二类型音频数据流;
对第一类型音频数据流和/或第二类型音频数据流进行类型标识,并将类型标识后的第一类型音频数据流和/或第二类型音频数据流发送给第一设备,使得第一设备基于标识的类型播放第一类型音频数据流和/或第二类型音频数据流。
其中一种可能的实现方式中,指令被移动终端执行时,使得移动终端执行将标识后的第一类型音频数据流和/或第二类型音频数据流发送给第一设备的步骤,包括:
获取移动终端所处网络的当前传输条件;
将当前传输条件与预设传输条件进行比对;
若当前传输条件满足预设传输条件时,根据预设第一策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备;
若当前传输条件不满足预设传输条件时,根据预设第二策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备。
其中一种可能的实现方式中,指令被移动终端执行时,使得移动终端执行基于音频能力信息创建第一类型音频数据流和/或第二类型音频数据流的步骤,包括:
解析音频能力信息中的音频类型;
若音频能力信息中包含第一类型,则基于预设第一时间间隔依次创建第一类型音频数据帧;
若音频能力信息中包含第二类型,则判断当前音频应用的类型;
若音频应用的类型与第一类型对应,则基于预设第一时间间隔依次创建第一类型音频数据帧;
若音频应用的类型与第二类型对应,则基于预设第二时间间隔依次创建第二类型音频数据帧。
其中一种可能的实现方式中,指令被移动终端执行时,使得移动终端执行若当前传输条件满足预设传输条件时,根据预设第一策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备的步骤,包括:
若网络传输时延小于或等于预设第一时间阈值,且大于预设第二时间阈值,则基于与第一类型音频数据流对应的第一预设时间间隔将第一类型音频数据流发送给第一设备;
和/或基于与第一时间阈值对应的时间间隔将第二类型音频数据流发送给第一设备;
若网络传输时延小于或等于预设第二时间阈值,则基于与第一类型音频数据流对应的第一预设时间间隔将第一类型音频数据流发送给第一设备;
和/或基于与第二时间阈值对应的时间间隔将第二类型音频数据流发送给第一设备;
使得移动终端执行若当前传输条件不满足预设传输条件时,根据预设第二策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备的步骤,包括:
若网络传输时延大于预设第三时间阈值;
基于与第三时间阈值对应的时间间隔将第一类型音频数据流和/或所述第二类型音频数据流发送给第一设备。
其中一种可能的实现方式中,指令被移动终端执行时,还执行以下步骤:
向第一设备发送查询请求,使得第一设备基于查询请求发送音频能力信息。
本申请实施例还提供一种第一设备,包括:
存储器,上述存储器用于存储计算机程序代码,上述计算机程序代码包括指令,当上述设备从上述存储器中读取上述指令,以使得上述设备执行以下步骤:
获取音频能力信息,将音频能力信息发送给移动终端;其中,音频能力信息包括第一类型和/或第二类型;
接收移动终端发送的音频数据流;
对音频数据流进行类型识别;
若音频数据流的类型为第一类型,基于与第一类型音频数据流对应的第一预设时间间隔播放第一类型音频数据流;
若音频数据流的类型为第二类型,基于与第二类型音频数据流对应的第二预设时间间隔播放第二类型音频数据流。
第四方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如第一方面所述的方 法。
第五方面,本申请实施例提供一种计算机程序,当上述计算机程序被计算机执行时,用于执行第一方面所述的方法。
在一种可能的设计中,第五方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上。
附图说明
图1为本申请实施例提供的应用场景一个实施例的示意图;
图2为本申请提供的跨设备音频播放方法一个实施例的流程图;
图3为本申请实施例提供的系统架构示意图;
图4为本申请提供的跨设备音频播放装置一个实施例的结构示意图;
图5为本申请提供的跨设备音频播放装置另一个实施例的结构示意图;
图6为本申请实施例提供的电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
目前,移动终端在播放本地音频时,支持两种音频类型:普通音频及低时延视频。其中,普通音频对音效要求较高,因此,需要对普通音频进行混音和音效处理,由此可以将两个普通音频帧之间的时间间隔设置的稍长,例如,两个音频帧之间的时间间隔可以设置为20ms。而低时延音频对实时性要求较高,因此,无需对低时延音频进行混音和音效处理,由此可以将两个低时延音频帧之间的时间间隔设置的较短,例如,两个低时延音频帧之间的时间间隔可以设置为5ms。
当对一段音频数据在跨设备之间进行共享时,例如,移动终端将本地的音频发送到共享设备(例如,电视)上播放时,由于移动终端无法获取共享设备的音频播放能力,因此移动终端只能创建普通音频,并将普通音频发送到共享设备进行播放,由此导致音频共享时无法满足低时延音频的要求。
基于上述问题,本申请实施例提出了一种跨设备音频播放方法,能够实现无损的跨设备音频播放,提高用户的体验。
本申请实施例可以应用于移动终端;其中,移动终端也可以称为终端设备、用户设备(User Equipment,UE)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。 移动终端可以是WLAN中的站点(STAION,ST),可以是蜂窝电话、无绳电话、会话启动协议(Session Initiation Protocol,SIP)电话、无线本地环路(Wireless Local Loop,WLL)站、个人数字处理(Personal Digital Assistant,PDA)设备、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、车联网终端、电脑、膝上型计算机、手持式通信设备、手持式计算设备、卫星无线设备、无线调制解调器卡、电视机顶盒(Set Top Box,STB)、用户驻地设备(Customer Premise Equipment,CPE)和/或用于在无线系统上进行通信的其它设备以及下一代通信系统,例如,5G网络中的移动终端或者未来演进的公共陆地移动网络(Public Land Mobile Network,PLMN)网络中的移动终端等。
本申请实施例对执行该技术方案的移动终端的具体形式不做特殊限制。
现结合图1-图3对本申请实施例提供的跨设备音频播放方法进行说明。
如图1所示,为本申请提供的跨设备音频播放方法的应用场景一个实施例的架构图。参考图1,移动终端100可以通过无线通讯方式(例如,蓝牙、WIFI等)与第一设备200进行通讯。其中,第一设备200可以是具有无线通讯功能及音频播放功能的设备,例如,智能音箱、手机、电视、平板等。本申请实施例对第一设备200的具体形式不作限定。
如图2所示,为本申请提供的跨设备音频播放方法一个实施例的流程示意图,可以包括:
步骤101,第一设备200获取音频能力信息,将音频能力信息发送给移动终端100。
具体地,音频能力信息用于标识第一设备200的音频能力,音频能力信息可以包括第一类型及第二类型。第一类型可以用于标识普通音频的能力,第二类型可以用于标识低时延音频的能力。
其中,第一设备200的音频能力信息可以在第一设备200中预先设置,例如,可以在第一设备200出厂时设置。第一设备200的音频能力信息也可以通过收集第一设备200中的硬件信息自动生成,例如,判断第一设备200中的音频硬件信息,以确定第一设备200是否支持第一类型和/或第二类型音频。
步骤102,第一设备200将音频能力信息发送给移动终端100。
当移动终端100与第一设备200建立连接(例如,蓝牙连接或WIFI连接等)后,第一设备200可以将音频能力信息发送给移动终端100,使得跨设备之间可以共享音频能力信息。
可选地,第一设备200还可以在收到移动终端100的查询请求后,发送音频能力信息给移动终端100。其中,查询请求可以用于查询第一设备200的音频能力信息。
步骤103,移动终端100接收第一设备200的音频能力信息。
具体地,当移动终端100接收第一设备200的音频能力信息后,解析音频能力信息,获取音频能力信息中的类型(例如,第一类型和/或第二类型)。
步骤104,检测到用户用于启动音频应用的第一操作,移动终端100基于音频能力信息创建音频数据流。
具体地,用户可以在移动终端100上进行操作,以启动音频应用,例如,用户可以在移动终端100中通过点击应用程序的图标打开游戏应用或通话应用等。响应于接 收到的用户启动音频应用的操作,移动终端100可以基于音频能力信息创建音频数据流。
示例性的,移动终端100可以判断音频能力信息中的类型。
若判断音频能力信息中包含第一类型,移动终端100建立基于第一类型的音频数据流,例如,移动终端100可以创建普通音频数据流。
若判断音频能力信息中包含第一类型和第二类型,移动终端100可以分别建立第一类型和/或第二类型的音频数据流。示例性的,移动终端100可以根据音频应用的类型创建普通音频数据流和/或低时延音频数据流,例如,若音频应用为游戏或通话等类型,则移动终端100可以建立低时延音频数据流。若音频应用为音乐等类型,则移动终端100可以建立普通音频数据流。
步骤105,移动终端100将音频数据流进行标记。
具体地,当移动终端100创建第一类型音频数据流和/或第二类型音频数据流之后,还可以对第一类型音频数据流和/或第二类型音频数据流进行标识,以在第一设备200处进行识别。在具体实现时,移动终端100可以将第一类型音频数据流标识为第一类型,移动终端100还可以将第二类型音频数据流标识为第二类型。
步骤106,移动终端100将音频数据流发送给第一设备200。
具体地,若移动终端100生成第一类型音频数据流,则可以将该第一类型音频数据流发送给第一设备200;若移动终端100生成第二类型音频数据流,则可以将该第二类型音频数据流发送给第一设备200;若移动终端100生成第一类型音频数据流和第二类型音频数据流,则可以将该第一类型音频数据流和第二类型音频数据流发送给第一设备200。
进一步地,移动终端100还可以获取当前网络环境的状态信息。其中,网络环境的状态信息可以包括时延及负载。在具体实现时,移动终端100可以基于网络传输协议,例如,传输控制协议(Transmission Control Protocol,TCP),识别出当前网络环境的时延及负载信息。示例性的,TCP网络报文中支持往返时延(Round-Trip Time,RTT)及确认(ACK)报文,通过RTT报文可以获取到网络传输时延,通过ACK报文可以计算出网络丢包,也就是说,可以计算出网络的负载信息。
进一步地,移动终端100还可以基于网络环境的状态信息确定发送策略。其中,发送策略可以是,基于网络环境的状态信息中时延和负载的高低将第一类型音频数据流和/或第二类型音频数据流进行打包发送。
示例性的,若移动终端100判断时延较小且稳定,例如,移动终端可以计算预设历史时间段内的时延,若该预设历史时间段内的时延均值小于第一阈值(例如,10ms),则可以认为时间较小且稳定。此时,移动终端可以将第一类型音频数据流和/或第二类型音频数据流进行打包发送,例如,移动终端100可以通过每10ms发送两帧第二类型音频数据(例如,低时延音频数据),和/或每20ms发送一帧第一类型音频数据(例如,普通音频数据)的方式向第一设备200发送音频数据流。若时延均值小于第二阈值(例如,5ms),则移动终端可以通过每5ms发送一帧第二类型音频数据(例如,低时延音频数据),和/或每20ms发送一帧第一类型音频数据(例如,普通音频数据)的方式向第一设备200发送音频数据流。
若移动终端100判断时延较差且不稳定,例如,若时延大于第三阈值(例如,20ms),此时,移动终端100如果每5ms发送一帧第二类型音频数据,则第一设备200无法稳定的收到音频数据,由此导致播放也不连续。因此,移动终端100可以通过每20ms发送四帧第二类型音频数据和/或一帧第一类型音频数据的方式向第一设备200发送音频数据流。
步骤107,第一设备200接收移动终端100发送的音频数据流,并播放音频数据流。
具体的,第一设备200接收到移动终端100发送的音频数据流后,可以判断该音频数据流的类型。
若第一设备200判断该视频数据流为第一类型(例如,普通音频数据流),则根据与第一类型音频数据流对应的的时间间隔(例如,20ms)进行播放。
若第一设备200判断该视频数据流为第二类型(例如,低时延音频数据流),则根据与第二类型音频数据流对应的的时间间隔(例如,5ms)进行播放。
现结合图3对本申请跨设备音频播放方法进行说明。如图3所示,移动终端100包含应用程序模块310、音频数据流处理模块320及音频数据流发送模块330。其中,应用程序模块310用于启动相应的应用程序,使得应用程序可以生成相应的音频数据流,应用程序模块310可以包括一个或多个应用程序,示例性的,应用程序模块310包括应用程序311及应用程序312,例如,应用程序311可以是游戏,应用程序312可以是音乐。当用户点击应用程序的图标,以启动应用程序后,例如,用户启动应用程序311和应用程序312后,响应于用户的操作,应用程序311可以生成第二类型音频数据流,应用程序312可以生成第一类型音频数据流。音频数据流处理模块320可以用于对应用程序模块310生成的音频数据流进行处理,例如,可以将音频数据流按照预设的时间间隔向音频数据流发送模块330发送,示例性的,音频数据流处理模块320可以对第一类型音频数据流进行混音及音效等处理,并按照每20ms一帧第一类型音频数据的时间间隔向音频数据流发送模块330发送第一类型音频数据流,以及每5ms一帧第二类型音频数据的时间间隔向音频数据流发送模块330发送第二类型音频数据流。音频数据流发送模块330接收到音频数据流处理模块320发送的音频数据流后,基于当前的发送策略向第一设备200发送音频数据流。其中,当前的发送策略可以基于当前的网络环境信息(例如,时延)确定。可以理解的是,音频数据流处理模块320在发送音频数据流之前,还可以对音频数据流进行标识,例如,将第一类型音频数据流标识为第一类型,将第二类型音频数据流标识为第二类型。
第一设备200包括音频数据流接收模块340、音频数据流处理模块350及音频数据流播放模块360。音频数据流接收模块340用于接收移动终端100中音频数据流发送模块330发送的音频数据流。当音频数据流接收模块340接收到音频数据流后,可以对音频数据流的类型进行识别,由此可以区分音频数据流是第一类型或第二类型,并将音频数据流发送给音频数据流处理模块350。音频数据流处理模块350接收到音频数据流接收模块340发送的音频数据流后,对第一类型音频数据流进行混音及音效处理,并将第一类型音频数据流按照每20ms一帧的时间间隔向音频数据流播放模块360发送,以及将第二类型音频数据流按照每5ms一帧的时间间隔向音频数据流播放 模块360发送。音频数据流播放模块360接收到频数据流处理模块350发送的音频数据流后,将第一类型音频数据流按照每20ms一帧的时间间隔进行播放,将第二类型音频数据流按照每5ms一帧的时间间隔进行播放,由此可以完成移动终端100与第一设备200之间的音频共享,并可以实现音频数据流的无损传输,保证音频数据流的音质,提高用户的体验。
图4为本申请跨设备音频播放装置一个实施例的结构示意图,如图4所示,上述跨设备音频播放装置40可以包括:接收模块41、创建模块42及发送模块43;
接收模块41,用于接收第一设备发送的音频能力信息;
创建模块42,用于基于音频能力信息创建第一类型音频数据流和/或第二类型音频数据流;
发送模块43,用于对第一类型音频数据流和/或第二类型音频数据流进行类型标识,并将类型标识后的第一类型音频数据流和/或第二类型音频数据流发送给第一设备,使得第一设备基于标识的类型播放第一类型音频数据流和/或第二类型音频数据流。
在一种可能的实现方式中,上述发送模块43还包括:获取单元431及比对单元432;
获取单元431,用于获取移动终端所处网络的当前传输条件;
比对单元432,用于将当前传输条件与预设传输条件进行比对;若当前传输条件满足预设传输条件时,根据预设第一策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备;若当前传输条件不满足预设传输条件时,根据预设第二策略将第一类型音频数据流和/或第二类型音频数据流发送给第一设备。
在一种可能的实现方式中,上述创建模块42还包括:解析单元421及判断单元422;
解析单元421,用于解析音频能力信息中的音频类型;
判断单元422,用于若音频能力信息中包含第一类型,则基于预设第一时间间隔依次创建第一类型音频数据帧;若音频能力信息中包含第二类型,则判断当前音频应用的类型;若音频应用的类型与所述第一类型对应,则基于预设第一时间间隔依次创建第一类型音频数据帧;若音频应用的类型与第二类型对应,则基于预设第二时间间隔依次创建第二类型音频数据帧。
在一种可能的实现方式中,上述比对单元432还用于若网络传输时延小于或等于预设第一时间阈值,且大于预设第二时间阈值,则基于与第一类型音频数据流对应的第一预设时间间隔将第一类型音频数据流发送给第一设备;
和/或基于与第一时间阈值对应的时间间隔将第二类型音频数据流发送给第一设备;
若网络传输时延小于或等于预设第二时间阈值,则基于与第一类型音频数据流对应的第一预设时间间隔将第一类型音频数据流发送给第一设备;
和/或基于与第二时间阈值对应的时间间隔将第二类型音频数据流发送给第一设备;
若网络传输时延大于预设第三时间阈值;
基于与第三时间阈值对应的时间间隔将第一类型音频数据流和/或第二类型音频 数据流发送给第一设备。
在一种可能的实现方式中,上述装置40还包括:查询模块44;
查询模块44,用于向第一设备发送查询请求,使得第一设备基于查询请求发送音频能力信息。
图5为本申请跨设备音频播放装置另一个实施例的结构示意图,如图5所示,上述跨设备音频播放装置50可以包括:获取模块51、接收模块52、识别模块53及播放模块54;
获取模块51,用于获取音频能力信息,将音频能力信息发送给移动终端;其中,音频能力信息包括第一类型和/或第二类型;
接收模块52,用于接收移动终端发送的音频数据流;
识别模块53,用于对音频数据流进行类型识别;
播放模块54,用于若音频数据流的类型为第一类型,基于与第一类型音频数据流对应的第一预设时间间隔播放第一类型音频数据流;若音频数据流的类型为第二类型,基于与第二类型音频数据流对应的第二预设时间间隔播放第二类型音频数据流。
应理解,以上图4和图5所示的跨设备音频播放装置的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块以软件通过处理元件调用的形式实现,部分模块通过硬件的形式实现。例如,检测模块可以为单独设立的处理元件,也可以集成在电子设备的某一个芯片中实现。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit;以下简称:ASIC),或,一个或多个微处理器(Digital Singnal Processor;以下简称:DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array;以下简称:FPGA)等。再如,这些模块可以集成在一起,以片上系统(System-On-a-Chip;以下简称:SOC)的形式实现
图6为电子设备600的结构示意图,其中,移动终端100和第一设备200可以是上述电子设备600。该设备可以用于执行本申请图1~图3所示实施例提供的方法中的功能/步骤。
如图6所示,电子设备600可以包括处理器610,外部存储器接口620,内部存储器621,通用串行总线(universal serial bus,USB)接口630,充电管理模块640,电源管理模块641,电池642,天线1,无线通信模块660,音频模块670,扬声器670A,麦克风670C,耳机接口670D,传感器模块680,按键690,马达691,指示器692,摄像头693和显示屏694等。其中传感器模块680可以包括温度传感器680J,触摸传感器680K,环境光传感器680L等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备600的具体限定。在本申请另一些实施例中,电子设备600可以包括比图示更多或更少的部件,或者组 合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器610可以包括一个或多个处理单元,例如:处理器610可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
处理器610中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器610中的存储器为高速缓冲存储器。该存储器可以保存处理器610刚用过或循环使用的指令或数据。如果处理器610需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器610的等待时间,因而提高了系统的效率。
在一些实施例中,处理器610可以包括一个或多个接口。接口可以包括集成电路(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)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器610可以包含多组I2C总线。处理器610可以通过不同的I2C总线接口分别耦合触摸传感器680K,充电器,闪光灯,摄像头693等。例如:处理器610可以通过I2C接口耦合触摸传感器680K,使处理器610与触摸传感器680K通过I2C总线接口通信,实现电子设备600的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器610可以包含多组I2S总线。处理器610可以通过I2S总线与音频模块670耦合,实现处理器610与音频模块670之间的通信。在一些实施例中,音频模块670可以通过I2S接口向无线通信模块660传递音频信号,实现屏幕共享时保持通话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块670与无线通信模块660可以通过PCM总线接口耦合。在一些实施例中,音频模块670也可以通过PCM接口向无线通信模块660传递音频信号,实现屏幕共享时保持通话的的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器610与无线通信模块660。例如:处理器610通过UART接口与无线通信模块660通信,实现视频编码数据传输的功能。
MIPI接口可以被用于连接处理器610与显示屏694,摄像头693等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial  interface,DSI)等。在一些实施例中,处理器610和摄像头693通过CSI接口通信,实现电子设备600的拍摄功能。处理器610和显示屏694通过DSI接口通信,实现电子设备600的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器610与摄像头693,显示屏694,无线通信模块660,音频模块670,传感器模块680等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口630是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口630可以用于连接充电器为电子设备600充电,也可以用于电子设备600与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如:增强现实(augmented reality,AR)设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备600的结构限定。在本申请另一些实施例中,电子设备600也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块640用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块640可以通过USB接口630接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块640可以通过电子设备600的无线充电线圈接收无线充电输入。充电管理模块640为电池642充电的同时,还可以通过电源管理模块641为电子设备供电。
电源管理模块641用于连接电池642,充电管理模块640与处理器610。电源管理模块641接收电池642和/或充电管理模块640的输入,为处理器610,内部存储器621,显示屏694,摄像头693,和无线通信模块660等供电。电源管理模块641还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块641也可以设置于处理器610中。在另一些实施例中,电源管理模块641和充电管理模块640也可以设置于同一个器件中。
电子设备600的无线通信功能可以通过天线1和无线通信模块660等实现。
天线1用于发射和接收电磁波信号。电子设备600中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
无线通信模块660可以提供应用在电子设备600上的包括无线局域网(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)等无线通信的解决方案。无线通信模块660可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块660经由天线1接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器610。无线通信模块660还可以从处理器610接收待发送的信号,对其进行调频,放大,经天线1转为电磁波 辐射出去,。
在一些实施例中,电子设备600的天线1和无线通信模块660耦合,使得电子设备600可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括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)。
电子设备600通过GPU,显示屏694,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏694和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器610可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏694用于显示图像,视频等。显示屏694包括显示面板。显示面板可以采用液晶显示屏(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)等。在一些实施例中,电子设备600可以包括1个或N个显示屏694,N为大于1的正整数。
电子设备600可以通过ISP,摄像头693,视频编解码器,GPU,显示屏694以及应用处理器等实现拍摄功能。
ISP用于处理摄像头693反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头693中。
摄像头693用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备600可以包括1个或N个摄像头693,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备600在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备600可以支持一种或多种视频编解码器。这样,电子设备600可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备600的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口620可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备600的存储能力。外部存储卡通过外部存储器接口620与处理器610通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器621可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器621可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备600使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器621可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器610通过运行存储在内部存储器621的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备600的各种功能应用以及数据处理。
电子设备600可以通过音频模块670,扬声器670A,麦克风670C,耳机接口670D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块670用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块670还可以用于对音频信号编码和解码。在一些实施例中,音频模块670可以设置于处理器610中,或将音频模块670的部分功能模块设置于处理器610中。
扬声器670A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备600可以通过扬声器670A收听音乐,或收听免提通话。
麦克风670C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风670C发声,将声音信号输入到麦克风670C。电子设备600可以设置至少一个麦克风670C。在另一些实施例中,电子设备600可以设置两个麦克风670C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备600还可以设置三个,四个或更多麦克风670C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口670D用于连接有线耳机。耳机接口670D可以是USB接口630,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
环境光传感器680L用于感知环境光亮度。电子设备600可以根据感知的环境光亮度自适应调节显示屏694亮度。环境光传感器680L也可用于拍摄时自动调节白平衡。
温度传感器680J用于检测温度。在一些实施例中,电子设备600利用温度传感器680J检测的温度,执行温度处理策略。例如,当温度传感器680J上报的温度超过阈值,电子设备600执行降低位于温度传感器680J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备600对电池642加热, 以避免低温导致电子设备600异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备600对电池642的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器680K,也称“触控器件”。触摸传感器680K可以设置于显示屏694,由触摸传感器680K与显示屏694组成触摸屏,也称“触控屏”。触摸传感器680K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏694提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器680K也可以设置于电子设备600的表面,与显示屏694所处的位置不同。
按键690包括开机键,音量键等。按键690可以是机械按键。也可以是触摸式按键。电子设备600可以接收按键输入,产生与电子设备600的用户设置以及功能控制有关的键信号输入。
马达691可以产生振动提示。马达691可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍摄,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏694不同区域的触摸操作,马达691也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器692可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
图6所示的电子设备600可以为手机、电视、智慧屏、平板电脑、笔记本电脑或PC等智能电子设备,本实施例对上述电子设备600的形态不作限定。该电子设备600可以用于执行本申请实施例提供的方法中的功能/步骤,具体可参见本申请方法实施例中的描述,为避免重复,此处适当省略详细描述。
本申请还提供一种电子设备,所述设备包括存储介质和中央处理器,所述存储介质可以是非易失性存储介质,所述存储介质中存储有计算机可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述计算机可执行程序以实现本申请图1~图4所示实施例提供的方法。
以上各实施例中,涉及的处理器可以例如包括CPU、DSP、微控制器或数字信号处理器,还可包括GPU、嵌入式神经网络处理器(Neural-network Process Units;以下简称:NPU)和图像信号处理器(Image Signal Processing;以下简称:ISP),该处理器还可包括必要的硬件加速器或逻辑处理硬件电路,如ASIC,或一个或多个用于控制本申请技术方案程序执行的集成电路等。此外,处理器可以具有操作一个或多个软件程序的功能,软件程序可以存储在存储介质中。
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的 理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory;以下简称:ROM)、随机存取存储器(Random Access Memory;以下简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。

Claims (15)

  1. 一种跨设备音频播放方法,应用于移动终端,其特征在于,所述方法包括:
    接收第一设备发送的音频能力信息;
    基于所述音频能力信息创建第一类型音频数据流和/或第二类型音频数据流;
    对所述第一类型音频数据流和/或第二类型音频数据流进行类型标识,并将类型标识后的所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备,使得所述第一设备基于标识的类型播放所述第一类型音频数据流和/或第二类型音频数据流。
  2. 根据权利要求1所述的方法,其特征在于,所述将标识后的所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备包括:
    获取所述移动终端所处网络的当前传输条件;
    将所述当前传输条件与预设传输条件进行比对;
    若所述当前传输条件满足所述预设传输条件时,根据预设第一策略将所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备;
    若所述当前传输条件不满足所述预设传输条件时,根据预设第二策略将所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备。
  3. 根据权利要求1所述的方法,其特征在于,所述基于所述音频能力信息创建第一类型音频数据流和/或第二类型音频数据流包括:
    解析所述音频能力信息中的音频类型;
    若所述音频能力信息中包含第一类型,则基于预设第一时间间隔依次创建第一类型音频数据帧;
    若所述音频能力信息中包含第二类型,则判断当前音频应用的类型;
    若所述音频应用的类型与所述第一类型对应,则基于预设第一时间间隔依次创建第一类型音频数据帧;
    若所述音频应用的类型与所述第二类型对应,则基于预设第二时间间隔依次创建第二类型音频数据帧。
  4. 根据权利要求2所述的方法,其特征在于,所述若所述当前传输条件满足所述预设传输条件时,根据预设第一策略将所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备,包括:
    若网络传输时延小于或等于预设第一时间阈值,且大于预设第二时间阈值,则基于与所述第一类型音频数据流对应的第一预设时间间隔将所述第一类型音频数据流发送给所述第一设备;
    和/或基于与所述第一时间阈值对应的时间间隔将所述第二类型音频数据流发送给所述第一设备;
    若网络传输时延小于或等于预设第二时间阈值,则基于与所述第一类型音频数据流对应的第一预设时间间隔将所述第一类型音频数据流发送给所述第一设备;
    和/或基于与所述第二时间阈值对应的时间间隔将所述第二类型音频数据流发送给所述第一设备;
    所述若所述当前传输条件不满足所述预设传输条件时,根据预设第二策略将所述 第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备,包括:
    若网络传输时延大于预设第三时间阈值;
    基于与所述第三时间阈值对应的时间间隔将所述第一类型音频数据流和/或所述第二类型音频数据流发送给所述第一设备。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:
    向所述第一设备发送查询请求,使得所述第一设备基于所述查询请求发送音频能力信息。
  6. 一种跨设备音频播放方法,应用于第一设备,其特征在于,所述方法包括:
    获取音频能力信息,将所述音频能力信息发送给移动终端;其中,所述音频能力信息包括第一类型和/或第二类型;
    接收所述移动终端发送的音频数据流;
    对所述音频数据流进行类型识别;
    若所述音频数据流的类型为第一类型,基于与所述第一类型音频数据流对应的第一预设时间间隔播放所述第一类型音频数据流;
    若所述音频数据流的类型为第二类型,基于与所述第二类型音频数据流对应的第二预设时间间隔播放所述第二类型音频数据流。
  7. 一种移动终端,其特征在于,包括:存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述移动终端从所述存储器中读取所述指令,以使得所述移动终端执行以下步骤:
    接收第一设备发送的音频能力信息;
    基于所述音频能力信息创建第一类型音频数据流和/或第二类型音频数据流;
    对所述第一类型音频数据流和/或第二类型音频数据流进行类型标识,并将类型标识后的所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备,使得所述第一设备基于标识的类型播放所述第一类型音频数据流和/或第二类型音频数据流。
  8. 根据权利要求7所述的移动终端,其特征在于,所述指令被所述移动终端执行时,使得所述移动终端执行将标识后的所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备的步骤,包括:
    获取所述移动终端所处网络的当前传输条件;
    将所述当前传输条件与预设传输条件进行比对;
    若所述当前传输条件满足所述预设传输条件时,根据预设第一策略将所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备;
    若所述当前传输条件不满足所述预设传输条件时,根据预设第二策略将所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备。
  9. 根据权利要求7所述的移动终端,其特征在于,所述指令被所述移动终端执行时,使得所述移动终端执行基于所述音频能力信息创建第一类型音频数据流和/或第二类型音频数据流的步骤,包括:
    解析所述音频能力信息中的音频类型;
    若所述音频能力信息中包含第一类型,则基于预设第一时间间隔依次创建第一类 型音频数据帧;
    若所述音频能力信息中包含第二类型,则判断当前音频应用的类型;
    若所述音频应用的类型与所述第一类型对应,则基于预设第一时间间隔依次创建第一类型音频数据帧;
    若所述音频应用的类型与所述第二类型对应,则基于预设第二时间间隔依次创建第二类型音频数据帧。
  10. 根据权利要求8所述的移动终端,其特征在于,所述指令被所述移动终端执行时,使得所述移动终端执行若所述当前传输条件满足所述预设传输条件时,根据预设第一策略将所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备的步骤,包括:
    若网络传输时延小于或等于预设第一时间阈值,且大于预设第二时间阈值,则基于与所述第一类型音频数据流对应的第一预设时间间隔将所述第一类型音频数据流发送给所述第一设备;
    和/或基于与所述第一时间阈值对应的时间间隔将所述第二类型音频数据流发送给所述第一设备;
    若网络传输时延小于或等于预设第二时间阈值,则基于与所述第一类型音频数据流对应的第一预设时间间隔将所述第一类型音频数据流发送给所述第一设备;
    和/或基于与所述第二时间阈值对应的时间间隔将所述第二类型音频数据流发送给所述第一设备;
    使得所述移动终端执行若所述当前传输条件不满足所述预设传输条件时,根据预设第二策略将所述第一类型音频数据流和/或第二类型音频数据流发送给所述第一设备的步骤,包括:
    若网络传输时延大于预设第三时间阈值;
    基于与所述第三时间阈值对应的时间间隔将所述第一类型音频数据流和/或所述第二类型音频数据流发送给所述第一设备。
  11. 根据权利要求7-10任一项所述的移动终端,其特征在于,所述指令被所述移动终端执行时,还执行以下步骤:
    向所述第一设备发送查询请求,使得所述第一设备基于所述查询请求发送音频能力信息。
  12. 一种第一设备,其特征在于,包括:存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述设备从所述存储器中读取所述指令,以使得所述设备执行以下步骤:
    获取音频能力信息,将所述音频能力信息发送给移动终端;其中,所述音频能力信息包括第一类型和/或第二类型;
    接收所述移动终端发送的音频数据流;
    对所述音频数据流进行类型识别;
    若所述音频数据流的类型为第一类型,基于与所述第一类型音频数据流对应的第一预设时间间隔播放所述第一类型音频数据流;
    若所述音频数据流的类型为第二类型,基于与所述第二类型音频数据流对应的第 二预设时间间隔播放所述第二类型音频数据流。
  13. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在所述移动终端上运行时,使得所述移动终端执行如权利要求1-5中任一项所述的方法。
  14. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在所述第一设备上运行时,使得所述设备执行如权利要求6所述的方法。
  15. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-6中任一项所述的方法。
PCT/CN2021/110177 2020-09-01 2021-08-03 跨设备音频播放方法、移动终端、电子设备及存储介质 WO2022048371A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP21863439.2A EP4199422A1 (en) 2020-09-01 2021-08-03 Cross-device audio playing method, mobile terminal, electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010903800.X 2020-09-01
CN202010903800.XA CN114205336A (zh) 2020-09-01 2020-09-01 跨设备音频播放方法、移动终端、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022048371A1 true WO2022048371A1 (zh) 2022-03-10

Family

ID=80492148

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/110177 WO2022048371A1 (zh) 2020-09-01 2021-08-03 跨设备音频播放方法、移动终端、电子设备及存储介质

Country Status (3)

Country Link
EP (1) EP4199422A1 (zh)
CN (1) CN114205336A (zh)
WO (1) WO2022048371A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721678A (zh) * 2022-09-29 2023-09-08 荣耀终端有限公司 音频数据的监测方法、电子设备以及介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115132213A (zh) * 2022-06-27 2022-09-30 哲库科技(上海)有限公司 音频数据传输方法、装置、芯片、电子设备及存储介质
CN117692886A (zh) * 2022-08-30 2024-03-12 Oppo广东移动通信有限公司 设备的连接方法、装置、电子设备以及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011115130A1 (ja) * 2010-03-15 2011-09-22 シャープ株式会社 表示装置、テレビジョン受像機、音声信号供給方法、音声信号供給システム、プログラムおよび記録媒体
CN104053047A (zh) * 2014-06-24 2014-09-17 深圳市九洲电器有限公司 一种音频输出调整装置及调整方法
CN108513165A (zh) * 2017-02-28 2018-09-07 三星电子株式会社 共享内容的方法和支持该方法的电子设备
CN109273017A (zh) * 2018-08-14 2019-01-25 Oppo广东移动通信有限公司 编码控制方法、装置以及电子设备
CN111182342A (zh) * 2019-12-24 2020-05-19 腾讯科技(深圳)有限公司 基于dlna的媒体数据播放方法、装置、设备以及存储介质
CN112995963A (zh) * 2019-12-17 2021-06-18 中兴通讯股份有限公司 蓝牙音频传输方法、装置、终端和可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011115130A1 (ja) * 2010-03-15 2011-09-22 シャープ株式会社 表示装置、テレビジョン受像機、音声信号供給方法、音声信号供給システム、プログラムおよび記録媒体
CN104053047A (zh) * 2014-06-24 2014-09-17 深圳市九洲电器有限公司 一种音频输出调整装置及调整方法
CN108513165A (zh) * 2017-02-28 2018-09-07 三星电子株式会社 共享内容的方法和支持该方法的电子设备
CN109273017A (zh) * 2018-08-14 2019-01-25 Oppo广东移动通信有限公司 编码控制方法、装置以及电子设备
CN112995963A (zh) * 2019-12-17 2021-06-18 中兴通讯股份有限公司 蓝牙音频传输方法、装置、终端和可读存储介质
CN111182342A (zh) * 2019-12-24 2020-05-19 腾讯科技(深圳)有限公司 基于dlna的媒体数据播放方法、装置、设备以及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721678A (zh) * 2022-09-29 2023-09-08 荣耀终端有限公司 音频数据的监测方法、电子设备以及介质

Also Published As

Publication number Publication date
CN114205336A (zh) 2022-03-18
EP4199422A1 (en) 2023-06-21

Similar Documents

Publication Publication Date Title
WO2021004381A1 (zh) 一种投屏显示方法及电子设备
WO2020244623A1 (zh) 一种空鼠模式实现方法及相关设备
WO2020098437A1 (zh) 一种播放多媒体数据的方法及电子设备
US20220394794A1 (en) Bluetooth connection method and related apparatus
WO2022048371A1 (zh) 跨设备音频播放方法、移动终端、电子设备及存储介质
WO2020133183A1 (zh) 音频数据的同步方法及设备
US11683850B2 (en) Bluetooth reconnection method and related apparatus
WO2020143380A1 (zh) 一种数据传输方法及电子设备
JP7468830B2 (ja) エネルギー効率の良い表示処理方法およびデバイス
WO2021043219A1 (zh) 一种蓝牙回连方法及相关装置
WO2021175268A1 (zh) 移动网络热点的共享方法、装置和热点共享设备
WO2021023046A1 (zh) 一种电子设备控制方法及一种电子设备
WO2021175300A1 (zh) 数据传输方法、装置、电子设备和可读存储介质
WO2021143314A1 (zh) 一种降低移动终端功耗的方法及移动终端
WO2022062809A1 (zh) 投屏控制方法和装置
KR20210019105A (ko) 데이터 송신 방법 및 전자 기기
US20220368754A1 (en) Bluetooth communication method and related apparatus
US20230335081A1 (en) Display Synchronization Method, Electronic Device, and Readable Storage Medium
WO2022267974A1 (zh) 一种投屏方法及相关装置
WO2022007750A1 (zh) 屏幕共享方法、终端和存储介质
WO2022174746A1 (zh) 事件通知方法、蓝牙设备以及蓝牙系统
WO2022135254A1 (zh) 一种编辑文本的方法、电子设备和系统
WO2022068486A1 (zh) 数据发送方法、电子设备、芯片系统及存储介质
US20230045631A1 (en) Text to Speech Processing Method, Terminal, and Server
US9124756B2 (en) Method and apparatus for data communication using digital image processing

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021863439

Country of ref document: EP

Effective date: 20230313

NENP Non-entry into the national phase

Ref country code: DE