CN106445458B - Playing control method, device and terminal - Google Patents

Playing control method, device and terminal Download PDF

Info

Publication number
CN106445458B
CN106445458B CN201610882953.4A CN201610882953A CN106445458B CN 106445458 B CN106445458 B CN 106445458B CN 201610882953 A CN201610882953 A CN 201610882953A CN 106445458 B CN106445458 B CN 106445458B
Authority
CN
China
Prior art keywords
playing
data packet
command
data
delay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610882953.4A
Other languages
Chinese (zh)
Other versions
CN106445458A (en
Inventor
林尚波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610882953.4A priority Critical patent/CN106445458B/en
Publication of CN106445458A publication Critical patent/CN106445458A/en
Application granted granted Critical
Publication of CN106445458B publication Critical patent/CN106445458B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10009Improvement or modification of read or write signals
    • G11B20/10222Improvement or modification of read or write signals clock-related aspects, e.g. phase or frequency adjustment or bit synchronisation
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B2020/10935Digital recording or reproducing wherein a time constraint must be met
    • G11B2020/10953Concurrent recording or playback of different streams or files

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a playing control method, a device and a terminal, wherein the method comprises the steps of acquiring audio data; splitting the audio data into a plurality of data packets, wherein the data packets comprise data packet identifications; sending the data packet to a playing device; and sending a playing command to the playing device, wherein the playing command is associated with the data packet identifier to indicate that the data packet corresponding to the data packet identifier is played. According to the scheme, the playing command associated with the data packet identifier is sent to the playing devices, so that after the playing commands are received by the plurality of playing devices, the playing of the data packets corresponding to the data packet identifier can be started at the same time, and the synchronism among the plurality of playing devices can be improved compared with the prior art.

Description

Playing control method, device and terminal
Technical Field
The invention relates to the technical field of electronic equipment, in particular to a playing control method, a playing control device and a terminal.
Background
With the improvement of living standard, audio and video equipment plays an important role in the life of people. Currently, a plurality of music playing devices (e.g., speakers, players, mobile phones, etc.) and a control device are connected to each other through a wired or wireless network to form a playing system, so as to synchronously play the same music, which has been widely used.
In the above-mentioned playback system, each device has an independent clock system. Each playing device plays music according to its own clock system. However, the clock systems of the individual playback devices and of the control device are not always synchronized. The individual playback devices and the control device may have slight time differences with respect to each other. When a plurality of playback devices play the same music, the above-mentioned slight time difference causes inconsistency in the playback progress of the respective playback devices, thereby causing low synchronization among the plurality of playback devices.
Disclosure of Invention
The embodiment of the invention provides a playing control method, a playing control device and a terminal, which can improve the synchronism among a plurality of playing devices.
The embodiment of the invention provides a play control method, which comprises the following steps:
acquiring audio data;
splitting the audio data into a plurality of data packets, wherein the data packets comprise data packet identifications;
sending the data packet to a playing device;
and sending a playing command to the playing device, wherein the playing command is associated with the data packet identifier to indicate that the data packet corresponding to the data packet identifier is played.
Correspondingly, an embodiment of the present invention further provides a playback control apparatus, including:
the data acquisition module is used for acquiring audio data;
the splitting module is used for splitting the audio data into a plurality of data packets, and the data packets comprise data packet identifiers;
the data sending module is used for sending the data packet to the playing equipment;
and the command sending module is used for sending a playing command to the playing device, and the playing command is associated with the data packet identifier to indicate that the data packet corresponding to the data packet identifier is played.
Correspondingly, an embodiment of the present invention further provides a terminal, including:
the touch screen is used for receiving touch operation of a user;
a memory storing executable program code;
a processor coupled to the memory;
the processor calls the executable program code stored in the memory to execute the play control method.
The embodiment of the invention adopts the steps of obtaining audio data; splitting the audio data into a plurality of data packets, wherein the data packets comprise data packet identifications; sending the data packet to a playing device; and sending a playing command to the playing device, wherein the playing command is associated with the data packet identifier to indicate that the data packet corresponding to the data packet identifier is played. According to the scheme, the playing command associated with the data packet identifier is sent to the playing devices, so that after the playing command is received by a plurality of playing devices, the playing of the data packet corresponding to the data packet identifier can be started simultaneously, a clock system of each playing device does not need to be calibrated, a good synchronous playing effect can be achieved among the plurality of playing devices, and the synchronism among the plurality of playing devices can be improved compared with the prior art.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a flowchart illustrating a play control method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a playing system according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a play control method according to a second embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a first playback control apparatus according to a third embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a second play control device according to a third embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a third playback control apparatus according to a third embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a first terminal according to a fourth embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a second terminal according to a fourth embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so described are interchangeable under appropriate circumstances. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, or apparatus, terminal, system comprising a list of steps is not necessarily limited to those steps or modules or elements expressly listed, and may include other steps or modules or elements not expressly listed, or inherent to such process, method, apparatus, terminal, or system.
Embodiments of the present invention provide a method, an apparatus, and a terminal for controlling playback, which will be described in detail below.
Example one
The embodiment will be described from the perspective of a play control apparatus, which may be specifically integrated in a terminal, where the terminal may be a smart phone, a tablet computer, or the like.
A playback control method, comprising: acquiring audio data; splitting the audio data into a plurality of data packets, wherein the data packets comprise data packet identifications; sending the data packet to a playing device; and sending a playing command to the playing device, wherein the playing command is associated with the data packet identifier to indicate that the data packet corresponding to the data packet identifier is played.
As shown in fig. 1, the specific process of the play control method may include:
s101, audio data are obtained.
In a specific application, the playback control apparatus may obtain the audio data through a variety of ways. For example, the playback control apparatus may acquire audio data from a server via a wired network, may acquire audio data from another terminal via a wireless network such as bluetooth, or may acquire audio data from a storage medium such as an optical disc. The Audio data includes, but is not limited to, Audio data in formats such as CD, WAV, MP3(Moving Picture Experts Group Audio Layer III), WMA (Windows Media Audio), etc.
S102, the audio data is divided into a plurality of data packets, and the data packets comprise data packet identifications.
Specifically, after the playback control apparatus acquires the audio data, the playback control apparatus splits the audio data into a plurality of data packets. Preferably, the audio data may be split into a plurality of packets of equal length. For example, the audio data is divided into a plurality of packets having an audio length of 100 ms. When the data packet is split into a plurality of data packets, the data packet identifier may be set in each data packet. The packet identifier is a unique identifier that distinguishes each packet from other packets and can be used to mark the position of the packet in the audio data. The packet identification may be, for example, a sequence number of the packet. Setting a data packet identifier to be 1 in the first split data packet, setting a data packet identifier to be 2 in the second split data packet, and the like.
And S103, sending the data packet to the playing device.
Specifically, after the playing control device splits the plurality of data packets, the playing control device sequentially sends the plurality of data packets to the playing device. In practical applications, the transmission may be performed in a wired manner, or may be performed in a Wireless manner such as WiFi (Wireless Fidelity) or bluetooth.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a composition of a playing system in the present embodiment. The playback system is composed of a server 105, a playback control apparatus 106, and a plurality of playback devices 107. The server 105 may be a server located on a network. The playback control apparatus 106 may be an electronic apparatus integrated in the terminal, or may be a playback device having a data processing function. The playing device 107 may be a sound box, a music player, or other devices with an audio playing function. The playback control apparatus 106 performs data communication with the server 105 via the internet so that the playback control apparatus 106 can acquire audio data from the server 105. Meanwhile, the playback control apparatus 106 performs data communication with a plurality of playback devices 107 by a wireless communication method (for example, WiFi) so that the playback control apparatus 106 can transmit data packets to the playback devices 107.
S104, sending a playing command to the playing device, wherein the playing command is associated with the data packet identifier to instruct to play the data packet corresponding to the data packet identifier.
Specifically, the playback control apparatus may send a playback command to the playback device when receiving a playback command from a user. The playing command received by the playing control device may be a playing command input by the user through a key or a screen, or a timing playing command set by the user. The play command sent by the play control means to the playing device may be associated with the data packet identification. The association means that there is a corresponding relationship between the play command and the data packet identifier, that is, it can be determined which data packet or data packets corresponding to the data packet identifier are played according to the play command. For example, the play command may include a sequence number of the data packet to instruct the playing device to start playing the data packet corresponding to the sequence number after receiving the play command. The play command may also include a plurality of packet sequence numbers. For example, the playing command includes packet sequence numbers 8, 9, and 10 to indicate that the packet 8, the packet 9, and the packet 10 are played in sequence.
In some embodiments, after sending the play command to the playing device, the play control method may further include the following steps:
acquiring delay time;
and sending a delay command to the playing device, wherein the delay command indicates that the playing command is received and the data packet corresponding to the data packet identifier is played after the delay time.
Specifically, the delay time period may be a time value that is set in advance by the user and stored in the memory of the play control apparatus. The playing control device obtains the delay time length from the memory and then sends a delay command to the playing equipment. The delay command indicates that the playing device plays the data packet corresponding to the data packet identifier after the delay time length after receiving the playing command. For example, the data packet identifier associated with the play command is data packet serial number 8, and the delay time is 200 ms. The playback device starts playing the data packet 8 after 200ms after receiving the playback command.
In some embodiments, the delay time duration may be obtained by calculation. The obtaining of the delay time may specifically include the following steps:
acquiring a preset time length;
acquiring network delay between the playing device and the playing device;
and calculating the delay time length according to the preset time length and the network delay.
Specifically, the preset time period may be a time value that is preset by the user and stored in the memory of the play control apparatus. The playing control device obtains the preset time length by calling the time value in the memory. Due to the influence of the communication distance between the playback control apparatus and the playback device, or the influence of other factors such as electromagnetic interference, a certain network delay usually exists between the playback control apparatus and the playback device. The playback control apparatus can acquire the network delay with the playback device by monitoring the network communication state. And after the preset time length and the network delay are obtained, calculating the delay time length according to the preset time length and the network delay.
In some embodiments, calculating the delay duration according to the preset duration and the network delay may specifically include the following steps:
calculating a difference between the preset time length and the network delay;
the difference is used as the delay time length.
Specifically, the difference between the preset time length and the network delay may be calculated, and the difference may be used as the delay time length. For example, if the preset duration is 500ms and the network delay is 100ms, the difference between the preset duration and the network delay can be calculated to be 400 ms. Then, 400ms is used as the delay time.
In some embodiments, the playback device may include multiple playback devices, and the obtaining the preset duration may specifically include the following steps:
acquiring a plurality of network delays between the playing equipment and the playing equipment;
setting a maximum one of the plurality of network delays to a preset duration.
Specifically, the playback device in the playback system may include a plurality of playback devices. The playing control device can monitor the network communication state with the plurality of playing devices respectively to acquire a plurality of network delays with the plurality of playing devices. Then, the plurality of network delays are compared, one of the network delays with the largest network delay is determined, and the largest network delay is set as a preset time length. For example, the playback apparatus includes 3 stations. The network delays between the playback control apparatus and the 3 playback devices are respectively 500ms, 400ms, and 300ms, and it can be determined that the maximum one of the 3 network delays is 500 ms. Subsequently, the preset time period is set to 500 ms.
After the delay command is sent to the playing device, the influence caused by network delay between the playing control device and the playing device can be reduced, and the playing synchronization among a plurality of playing devices can be further improved.
In particular, the present invention is not limited by the execution sequence of the steps, and some steps may be performed in other sequences or simultaneously without conflict.
As can be seen from the above, the play control method provided in the embodiment of the present invention adopts the steps of obtaining audio data; splitting the audio data into a plurality of data packets, wherein the data packets comprise data packet identifications; sending the data packet to a playing device; and sending a playing command to the playing device, wherein the playing command is associated with the data packet identifier to indicate that the data packet corresponding to the data packet identifier is played. According to the scheme, the playing command associated with the data packet identifier is sent to the playing devices, so that after the playing command is received by a plurality of playing devices, the playing of the data packet corresponding to the data packet identifier can be started simultaneously, a clock system of each playing device does not need to be calibrated, a good synchronous playing effect can be achieved among the plurality of playing devices, and the synchronism among the plurality of playing devices can be improved compared with the prior art.
Example two
The playback control method according to the first embodiment will be described in further detail below by way of example.
In this embodiment, the playback control apparatus is specifically integrated in the smart phone, and a playback control method of the playback control apparatus in the smart phone is taken as an example to be described in detail.
As shown in fig. 3, the specific flow of the play control method may be as follows:
s201, the smart phone acquires audio data.
In specific applications, the smart phone may obtain audio data through a variety of ways. For example, the smart phone may obtain the audio data from the server through a wired network, and may also obtain the audio data from other terminals such as smart phones and personal computers through a wireless network such as bluetooth.
S202, the smart phone splits the audio data into a plurality of data packets, and the data packets comprise data packet identifiers.
Specifically, after the smart phone acquires the audio data, the audio data is split into a plurality of data packets. Preferably, the audio data may be split into a plurality of packets of equal length. For example, the audio data is divided into a plurality of packets having an audio length of 100 ms. When the data packet is split into a plurality of data packets, the data packet identifier may be set in each data packet. The packet identification may be a sequence number of the packet. For example, a packet identifier is set to 1 in the first split packet, a packet identifier is set to 2 in the second split packet, and so on.
And S203, the smart phone sends the data packet to the playing equipment.
Specifically, after the smart phone splits into a plurality of data packets, the plurality of data packets are sequentially sent to a plurality of playing devices. In practical applications, the transmission may be performed in a wired manner, or may be performed in a Wireless manner such as WiFi (Wireless Fidelity) or bluetooth. The plurality of playing devices may be devices with audio playing functions, such as a sound box, a music player, and the like.
S204, the smart phone sends a playing command to the playing device, and the playing command is associated with the data packet identifier to indicate that the data packet corresponding to the data packet identifier is played.
Specifically, the smart phone may send a play command to the plurality of play devices when receiving the play command of the user. The playing command received by the smart phone can be a playing command input by the user through a key or a screen, or a timing playing command set by the user. The play command sent by the smartphone to the playing device may be associated with the data packet identification. The association means that there is a corresponding relationship between the play command and the data packet identifier, that is, it can be determined which data packet or data packets corresponding to the data packet identifier are played according to the play command. For example, the play command may include a sequence number of the data packet to instruct the playing device to start playing the data packet corresponding to the sequence number after receiving the play command. The play command may also include a plurality of packet sequence numbers. For example, the playing command includes packet sequence numbers 8, 9, and 10 to indicate that the packet 8, the packet 9, and the packet 10 are played in sequence.
S205, the smart phone acquires a plurality of network delays between the smart phone and a plurality of playing devices.
Specifically, due to the influence of the communication distance between the smart phone and the playback device, or the influence of other factors such as electromagnetic interference, a certain network delay usually exists between the smart phone and the playback device. The smart phone can monitor the network communication state between the smart phone and the plurality of playing devices in real time to acquire a plurality of network delays between the smart phone and the plurality of playing devices.
S206, the smartphone sets the largest one of the plurality of network delays as a preset duration.
Specifically, after acquiring a plurality of network delays between the smart phone and a plurality of playing devices, the smart phone compares the plurality of network delays to determine one of the network delays with the largest network delay, and then sets the largest network delay as a preset time length. For example, the playback apparatus includes 3 stations. Network delays between the 3 pieces of playing equipment acquired by the smart phone are respectively 500ms, 400ms and 300ms, and then it can be determined that the maximum one of the 3 network delays is 500 ms. Subsequently, the preset time period is set to 500 ms.
And S207, the smart phone acquires the network delay with the playing equipment.
Specifically, the smart phone may monitor a network communication state with each playback device in real time to obtain a network delay with each playback device. Since the network delay is dynamically changed, the network delays acquired in S205 are used to set the preset time length, and at this time, the network delay with each playing device is acquired again, so that the time length of the delay time required by each playing device can be calculated more accurately.
When the requirement on the synchronicity between the multiple playback devices is not high, step S207 may also be omitted, and the multiple network delays with the multiple playback devices acquired in step S205 are used as the network delays between the smart phone and each playback device.
And S208, the smart phone calculates the difference between the preset time length and the network delay.
Specifically, after the network delay between the smart phone and each playing device is obtained, a difference between the preset time length and each obtained network delay is calculated. For example, the playback apparatus includes 3 stations. The network delays between the 3 playing devices and the smart phone are respectively 450ms, 350ms and 300 ms. The difference between the preset duration and the network delay of the 3 pieces of playing devices can be calculated to be 50ms, 150ms, and 200ms, respectively.
And S209, the smart phone takes the difference value as the delay time length.
Specifically, after calculating a plurality of difference values between a preset time length and a plurality of acquired network delays, the smart phone sets the plurality of difference values as delay time lengths required by the plurality of playing devices respectively. For example, the delay time of a playback device with a network delay of 450ms is set to 50ms, the delay time of a playback device with a network delay of 350ms is set to 150ms, and the delay time of a playback device with a network delay of 300ms is set to 200 ms.
S210, the smart phone sends a delay command to the plurality of playing devices, wherein the delay command indicates that the playing command is received and the data packet corresponding to the data packet identifier is played after the delay time.
Specifically, after the delay time length of each playing device is set, the smart phone sends a delay command to each playing device respectively to instruct the playing device to play the data packet corresponding to the data packet identifier associated with the playing command after receiving the playing command and after the delay time length. For example, a delay command sent to a playback device with a network delay of 450ms indicates that the playback device receives a playback command and starts playing a corresponding data packet after 50 ms; a delay command sent to the playing device with the network delay of 350ms indicates that the playing device receives the playing command and starts playing the corresponding data packet after 150 ms; the delay command sent to the playing device with network delay of 300ms indicates that the playing device receives the playing command and starts playing the corresponding data packet after 200 ms. For the playing device with larger network delay, the smaller the delay time length in the delay command sent by the smart phone to the playing device is; for the playing device with smaller network delay, the longer the delay time in the delay command sent by the smart phone to the playing device is. Therefore, when a plurality of playback devices receive a playback command, the plurality of playback devices can be controlled to have the same actual playback time of the same data packet.
In particular, the present invention is not limited by the execution sequence of the steps, and some steps may be performed in other sequences or simultaneously without conflict.
As can be seen from the above, the play control method provided in the embodiment of the present invention adopts the steps of obtaining audio data; splitting the audio data into a plurality of data packets, wherein the data packets comprise data packet identifications; sending the data packet to a playing device; sending a playing command to the playing device, wherein the playing command is associated with the data packet identifier to indicate that a data packet corresponding to the data packet identifier is played; acquiring a plurality of network delays between the player and a plurality of playing devices; calculating and setting the delay time of the plurality of playing devices; and sending a delay command to the plurality of playing devices, wherein the delay command indicates that the playing command is received and the data packet corresponding to the data packet identifier is played after the delay time. According to the scheme, after the playing command is sent to the plurality of playing devices, the delay command is sent to the plurality of playing devices immediately so as to indicate that each playing device receives the playing command and plays the corresponding data packet after the delay time, so that the influence caused by network delay between the smart phone and the playing devices can be reduced, the actual playing time of the same data packet by the plurality of playing devices is the same, and the synchronism among the plurality of playing devices can be improved compared with the prior art.
EXAMPLE III
In order to better implement the method, an embodiment of the present invention further provides a play control apparatus, which may be integrated in a terminal, where the terminal may be a smart phone, a tablet computer, or the like.
As shown in fig. 4, the playback control apparatus 300 may include: the data acquisition module 301, the splitting module 302, the data sending module 303, and the command sending module 304 are described in detail as follows:
the data acquisition module 301 is configured to acquire audio data;
the splitting module 302 is configured to split the audio data into a plurality of data packets, where each data packet includes a data packet identifier;
the data sending module 303 is configured to send the data packet to a playing device;
the command sending module 304 is configured to send a play command to the playing device, where the play command is associated with the data packet identifier to instruct to play the data packet corresponding to the data packet identifier.
Preferably, as shown in fig. 5, the playback control apparatus 300 further includes: the duration obtaining module 305 specifically includes:
the duration obtaining module 305 is configured to obtain a delay duration;
the command sending module 304 is further configured to send a delay command to the playback device, where the delay command indicates that the data packet corresponding to the data packet identifier is played back after the delay time length elapses after the playback command is received.
Preferably, as shown in fig. 6, the duration obtaining module 305 includes: the first obtaining sub-module 3051, the second obtaining sub-module 3052 and the calculating sub-module 3053 are as follows:
the first obtaining submodule 3051 is configured to obtain a preset duration;
the second obtaining sub-module 3052 is configured to obtain a network delay with the playback device;
the calculating submodule 3053 is configured to calculate a delay time according to the preset time and the network delay.
Preferably, the calculation submodule 3053 is specifically configured to:
calculating a difference between the preset time length and the network delay;
the difference is used as the delay time length.
Preferably, the playing device includes multiple playing devices, and the first obtaining sub-module 3051 is specifically configured to:
acquiring a plurality of network delays between the playing equipment and the playing equipment;
setting a maximum one of the plurality of network delays to a preset duration.
In specific implementation, the modules may be implemented as independent entities, or may be combined arbitrarily and implemented as one or several entities. The specific implementation of each module can refer to the foregoing method embodiments, and is not described herein again.
As can be seen from the above, in the play control apparatus 300 according to the embodiment of the present invention, the data obtaining module 301 obtains the audio data; the splitting module 302 splits the audio data into a plurality of data packets, the data packets including a data packet identification; the data sending module 303 sends the data packet to the playing device; the command sending module 304 sends a play command to the playing device, where the play command is associated with the data packet identifier to instruct playing of the data packet corresponding to the data packet identifier. According to the scheme, the playing command associated with the data packet identifier is sent to the playing devices, so that after the playing command is received by a plurality of playing devices, the playing of the data packet corresponding to the data packet identifier can be started simultaneously, a clock system of each playing device does not need to be calibrated, a good synchronous playing effect can be achieved among the plurality of playing devices, and the synchronism among the plurality of playing devices can be improved compared with the prior art.
Example four
The embodiment of the invention also provides a terminal which can be equipment such as a smart phone and a tablet personal computer.
As shown in fig. 7, the terminal 400 may include: the data acquisition module 401, the splitting module 402, the data sending module 403, and the command sending module 404 are described in detail as follows:
the data obtaining module 401 is configured to obtain audio data;
the splitting module 402 is configured to split the audio data into a plurality of data packets, where each data packet includes a data packet identifier;
the data sending module 403 is configured to send the data packet to a playing device;
the command sending module 404 is configured to send a play command to the playing device, where the play command is associated with the data packet identifier to instruct to play the data packet corresponding to the data packet identifier.
Preferably, the terminal 400 further includes: the duration obtaining module is specifically as follows:
the time length obtaining module is used for obtaining time length of delay;
the command sending module 404 is further configured to send a delay command to the playback device, where the delay command indicates that the data packet corresponding to the data packet identifier is played back after the delay time length elapses after the playback command is received.
Preferably, the duration obtaining module includes: the system comprises a first obtaining submodule, a second obtaining submodule and a calculating submodule, and specifically comprises the following steps:
the first obtaining submodule is used for obtaining preset duration;
the second obtaining submodule is used for obtaining the network delay between the second obtaining submodule and the playing device;
the calculating submodule is used for calculating the delay time length according to the preset time length and the network delay.
Preferably, the calculation submodule is specifically configured to:
calculating a difference between the preset time length and the network delay;
the difference is used as the delay time length.
Preferably, the playing device includes a plurality of playing devices, and the first obtaining sub-module is specifically configured to:
acquiring a plurality of network delays between the playing equipment and the playing equipment;
setting a maximum one of the plurality of network delays to a preset duration.
The above operations can be referred to the foregoing method embodiments, and are not described herein again.
Another terminal according to an embodiment of the present invention is provided, as shown in fig. 8, the terminal 500 may include a Radio Frequency (RF) circuit 501, a memory 502 including one or more computer-readable storage media, an input unit 503, a display unit 504, a sensor 505, an audio circuit 506, a Wireless Fidelity (WiFi) module 507, a processor 508 including one or more processing cores, and a power supply 509. Those skilled in the art will appreciate that the terminal structure shown in fig. 8 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The rf circuit 501 may be used for receiving and transmitting information, or receiving and transmitting signals during a call, and in particular, receives downlink information of a base station and then sends the received downlink information to one or more processors 508 for processing; in addition, data relating to uplink is transmitted to the base station. In general, radio frequency circuit 501 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the radio frequency circuit 501 may also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
The memory 502 may be used to store applications and data. The memory 502 stores applications containing executable program code. The application programs may constitute various functional modules. The processor 508 executes various functional applications and data processing by executing application programs stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, the memory 502 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, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 508 and the input unit 503 access to the memory 502.
The input unit 503 may be used to receive input numbers, character information, or user characteristic information (such as a fingerprint), and generate a keyboard, mouse, joystick, optical, or trackball signal input related to user setting and function control. Specifically, the input unit 503 may include a fingerprint recognition module. In some embodiments, the input unit 503 may also include a touch-sensitive surface. The touch-sensitive surface, also referred to as a touch screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 508, and can receive and execute commands sent by the processor 508. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 503 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 504 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof. The display unit 504 may include a display panel. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 508 to determine the type of touch event, and then the processor 508 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 8 the touch sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement input and output functions.
The terminal may also include at least one sensor 505, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal, detailed description is omitted here.
The audio circuit 506 may provide an audio interface between the user and the terminal through a speaker, microphone. The audio circuit 506 can convert the received audio data into an electrical signal, transmit the electrical signal to a speaker, and convert the electrical signal into a sound signal to output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 506 and converted into audio data, which is then processed by the audio data output processor 508 and then sent to, for example, another terminal via the rf circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earbud jack to provide communication of peripheral headphones with the terminal.
Wireless fidelity (WiFi) belongs to short-distance wireless transmission technology, and the terminal can help the user to receive and send e-mail, browse web pages, access streaming media and the like through a wireless fidelity module 507, and provides wireless broadband internet access for the user. Although fig. 8 shows the wireless fidelity module 507, it is understood that it does not belong to the essential constitution of the terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 508 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, performs various functions of the terminal and processes data by running or executing an application program stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the terminal. Optionally, processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 508.
The terminal also includes a power supply 509 (such as a battery) for powering the various components. Preferably, the power source may be logically connected to the processor 508 through a power management system, so that the power management system may manage charging, discharging, and power consumption management functions. The power supply 509 may also include any component such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown in fig. 8, the terminal may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
Specifically, in this embodiment, the processor 508 in the terminal loads the executable program code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 508 runs the application program stored in the memory 502, thereby implementing various functions:
acquiring audio data; splitting the audio data into a plurality of data packets, wherein the data packets comprise data packet identifications; sending the data packet to a playing device; and sending a playing command to the playing device, wherein the playing command is associated with the data packet identifier to indicate that the data packet corresponding to the data packet identifier is played.
Preferably, the processor 508 has a data acquisition module, a splitting module, a data sending module, and a command sending module, which are described in detail as follows:
the processor 508 is configured to obtain audio data through the data obtaining module;
the processor 508 is configured to split the audio data into a plurality of data packets by the splitting module, where the data packets include a data packet identifier;
the processor 508 is configured to send the data packet to the playback device through the data sending module;
the processor 508 is configured to send a play command to the playing device through the command sending module, where the play command is associated with the data packet identifier to instruct to play the data packet corresponding to the data packet identifier.
The above operations can be referred to the foregoing method embodiments, and are not described herein again.
As can be seen from the above, the embodiment of the present invention provides a terminal, which obtains audio data; splitting the audio data into a plurality of data packets, wherein the data packets comprise data packet identifications; sending the data packet to a playing device; and sending a playing command to the playing device, wherein the playing command is associated with the data packet identifier to indicate that the data packet corresponding to the data packet identifier is played. According to the scheme, the playing command associated with the data packet identifier is sent to the playing devices, so that after the playing command is received by a plurality of playing devices, the playing of the data packet corresponding to the data packet identifier can be started simultaneously, a clock system of each playing device does not need to be calibrated, a good synchronous playing effect can be achieved among the plurality of playing devices, and the synchronism among the plurality of playing devices can be improved compared with the prior art.
It should be noted that, as one of ordinary skill in the art would understand, all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, where the program may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The foregoing detailed description is directed to a play control method, apparatus, and terminal provided in the embodiments of the present invention, and a specific example is applied in the detailed description to explain the principles and embodiments of the present invention, and the description of the foregoing embodiments is only used to help understand the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. A playback control method, comprising:
acquiring audio data;
splitting the audio data into a plurality of data packets with equal length, and setting a data packet identifier in each data packet for marking the position of the data packet in the audio data;
sending the data packet to a plurality of playing devices;
sending a playing command to the plurality of playing devices, wherein the playing command is associated with the data packet identifier to indicate that a data packet corresponding to the data packet identifier is played;
acquiring a preset time length;
acquiring network delay between the playing device and the playing device by monitoring the network communication state;
calculating delay time according to the preset time and the network delay;
and sending a delay command to the playing device, wherein the delay command indicates that the playing command is received and the data packet corresponding to the data packet identifier is played after the delay time.
2. The playback control method according to claim 1, wherein the step of calculating the delay time duration according to the preset time duration and the network delay specifically comprises:
calculating a difference between the preset duration and the network delay;
and taking the difference as the delay time length.
3. The playback control method according to claim 1, wherein the playback device includes multiple playback devices, and the step of obtaining the preset duration specifically includes:
acquiring a plurality of network delays between the playing equipment and the playing equipment;
setting a maximum one of the plurality of network delays to a preset duration.
4. A playback control apparatus, comprising:
the data acquisition module is used for acquiring audio data;
the splitting module is used for splitting the audio data into a plurality of data packets with equal length, and setting a data packet identifier in each data packet for marking the position of the data packet in the audio data;
the data sending module is used for sending the data packet to a plurality of playing devices;
a command sending module, configured to send a play command to the multiple playing devices, where the play command is associated with the data packet identifier to instruct to play a data packet corresponding to the data packet identifier;
the time length obtaining module is used for obtaining preset time length; acquiring network delay between the playing device and the playing device by monitoring the network communication state; calculating delay time according to the preset time and the network delay;
the command sending module is further configured to send a delay command to the playback device, where the delay command indicates that the data packet corresponding to the data packet identifier is played back after the playback command is received and the delay time elapses.
5. The playback control apparatus according to claim 4, wherein the duration obtaining module is specifically configured to:
calculating a difference between the preset duration and the network delay;
and taking the difference as the delay time length.
6. The playback control apparatus according to claim 4, wherein the playback device includes a plurality of playback devices, and the duration acquisition module is specifically configured to:
acquiring a plurality of network delays between the playing equipment and the playing equipment;
setting a maximum one of the plurality of network delays to a preset duration.
7. A terminal, comprising:
the touch screen is used for receiving touch operation of a user;
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the play control method according to any one of claims 1 to 3.
8. A computer-readable storage medium, in which a computer program is stored, the computer program causing a computer to perform the method according to any one of claims 1 to 3.
CN201610882953.4A 2016-10-08 2016-10-08 Playing control method, device and terminal Active CN106445458B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610882953.4A CN106445458B (en) 2016-10-08 2016-10-08 Playing control method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610882953.4A CN106445458B (en) 2016-10-08 2016-10-08 Playing control method, device and terminal

Publications (2)

Publication Number Publication Date
CN106445458A CN106445458A (en) 2017-02-22
CN106445458B true CN106445458B (en) 2020-01-14

Family

ID=58172759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610882953.4A Active CN106445458B (en) 2016-10-08 2016-10-08 Playing control method, device and terminal

Country Status (1)

Country Link
CN (1) CN106445458B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108271095A (en) * 2017-12-20 2018-07-10 建荣半导体(深圳)有限公司 A kind of major and minor Bluetooth audio equipment and its synchronous playing system and method
CN110677710A (en) * 2019-10-16 2020-01-10 江苏网进科技股份有限公司 Synchronous control method and terminal control system of multimedia terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905876A (en) * 2014-03-13 2014-07-02 北京奇艺世纪科技有限公司 Video data and audio data synchronized playing method and device and equipment
CN104616675A (en) * 2013-11-05 2015-05-13 华为终端有限公司 Method for switching playing equipment and mobile terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739661B (en) * 2012-06-18 2015-07-15 深圳市云动创想科技有限公司 Method and system for network audio sync output on basis of data statistics
CN104133652B (en) * 2014-06-10 2016-02-17 腾讯科技(深圳)有限公司 A kind of audio play control method, and terminal
CN105992025B (en) * 2015-02-15 2019-09-27 湖南汇德电子有限公司 System time calibration method, audio sync playback method and the device played based on audio sync
CN104867513B (en) * 2015-04-20 2017-09-29 广东欧珀移动通信有限公司 A kind of control method for playing back and equipment
CN105611381A (en) * 2015-12-29 2016-05-25 深圳市民展科技开发有限公司 Multi-device audio synchronous playing system and method based on wireless network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104616675A (en) * 2013-11-05 2015-05-13 华为终端有限公司 Method for switching playing equipment and mobile terminal
CN103905876A (en) * 2014-03-13 2014-07-02 北京奇艺世纪科技有限公司 Video data and audio data synchronized playing method and device and equipment

Also Published As

Publication number Publication date
CN106445458A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106782600B (en) Scoring method and device for audio files
CN106411448B (en) Control method for playing back, device and terminal
CN105208056B (en) Information interaction method and terminal
CN106203235B (en) Living body identification method and apparatus
CN106847307B (en) Signal detection method and device
CN107507628B (en) Singing scoring method, singing scoring device and terminal
CN107786424B (en) Audio and video communication method, terminal and server
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN108958629B (en) Split screen quitting method and device, storage medium and electronic equipment
CN105094501B (en) Method, device and system for displaying messages in mobile terminal
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
CN106452643B (en) Control method for playing back, device, terminal and play system
CN106506437B (en) Audio data processing method and device
CN106791916B (en) Method, device and system for recommending audio data
CN106448714A (en) Synchronous playing method of playing devices, apparatus and system thereof
CN106411447B (en) Control method for playing back, device and terminal
CN111081283A (en) Music playing method and device, storage medium and terminal equipment
WO2017215615A1 (en) Sound effect processing method and mobile terminal
CN106445458B (en) Playing control method, device and terminal
CN106303616B (en) Play control method, device and terminal
CN105159655B (en) Behavior event playing method and device
CN111083285A (en) Mobile terminal call positioning system and method
CN106210325B (en) Method, device and terminal for setting incoming call ringtone of social application
CN106454420B (en) A kind of clock synchronizing method and device
CN106547400B (en) Method, device and terminal for reporting information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant