CN109451339A - Audio frequency transmission method, device, equipment and readable storage medium storing program for executing - Google Patents
Audio frequency transmission method, device, equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN109451339A CN109451339A CN201811631310.8A CN201811631310A CN109451339A CN 109451339 A CN109451339 A CN 109451339A CN 201811631310 A CN201811631310 A CN 201811631310A CN 109451339 A CN109451339 A CN 109451339A
- Authority
- CN
- China
- Prior art keywords
- wifi
- wifi speaker
- audio
- speaker
- sent
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/4302—Content synchronisation processes, e.g. decoder synchronisation
- H04N21/4307—Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/436—Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
- H04N21/43615—Interfacing a Home Network, e.g. for connecting the client to a plurality of peripherals
Abstract
The invention discloses a kind of audio frequency transmission methods, the following steps are included: when playing video, the PCM data packet of the audio/video flow sound intermediate frequency data of the video is obtained in real time, and the PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment, then detect whether the WiFi speaker is in work ready state, if the last WiFi speaker is in work ready state, preset sound delay value is then sent to WiFi speaker, so that local equipment is when playing the video pictures of the video, the WiFi speaker carries out delays time to control according to output time of the sound delay value to the PCM data packet, and then realize that video pictures audio data corresponding with the PCM data packet is synchronous.The invention also discloses a kind of audio transmission device, equipment and readable storage medium storing program for executing.Sound draws nonsynchronous problem caused by the invention avoids bring sound delay is transmitted because of WiFi, so that improving sound draws synchronous efficiency.
Description
Technical field
The present invention relates to audio transmission field more particularly to a kind of audio frequency transmission method, device, equipment and readable storage mediums
Matter.
Background technique
As the transmission performance and stability of WIFI are constantly promoted and WIFI speaker is compared to the 2.4G such as bluetooth speaker institute
A pair of of the multi-connection having designs the advantages such as superpower transmittability shirtsleeve operation, and WIFI speaker is in voice frequency terminal product market
Will more and more attention has been paid to and welcome, and center of the TV as home audio-visual devices, WIFI speaker is likely to become indispensability
Peripheral audio shares the device listened to.
Currently, smart television generally has WIFI linkage function, and the use of TV WIFI is connected to family WIFI
On router, WIFI speaker need to be only also connected to WIFI router by user, allow itself and TV in the same family WiFi local
In net, interception and transmission by TV software system to television video sound intermediate frequency data are finally broadcast at WIFI speaker end
It puts, this is the transmission architecture of currently all intellectual product collocation WIFI speaker.But the transmission architecture of this audio transmission is maximum
The problem of be exactly WiFi transmission (television audio data must be forwarded by WiFi router) bring sound delay, especially exist
WiFi disturbed condition is bigger or family WiFi by excessive loads in use, the sound picture of smart television cannot synchronize.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill
Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of audio frequency transmission method, device, equipment and readable storage medium storing program for executing, it is intended to
Solve the problems, such as that existing audio frequency transmission method WiFi transmission is that bring sound delay time causes smart television to be unable to sound picture synchronization.
To achieve the above object, the present invention provides a kind of audio frequency transmission method, the described method comprises the following steps:
When playing video, the PCM data packet of the audio/video flow sound intermediate frequency data of the video is obtained in real time, and will be described
PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment;
Detect whether the WiFi speaker is in work ready state;
If the WiFi speaker is in work ready state, preset sound delay value is sent to WiFi speaker, with
Make local equipment when playing the video pictures of the video, the WiFi speaker is according to the sound delay value to the PCM
The output time of data packet carries out delays time to control, and then realizes video pictures audio number corresponding with the PCM data packet
According to synchronization.
Optionally, described when playing video, the PCM data of the audio/video flow sound intermediate frequency data of the video is obtained in real time
Packet, and the step of PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment includes:
When playing video, obtained in the IP and the audio/video flow of the WiFi speaker in real time not by audio driver
The PCM data of delay process;
The PCM data is encapsulated to obtain PCM data packet, and the PCM data packet is sent to WiFi router,
In, the PCM data is sent to the WiFi speaker by the WiFi router.
Optionally, described to detect that the step of whether the WiFi speaker is in work ready state includes:
Broadcast data packet is sent to the WiFi speaker, monitors whether to receive the confirmation letter that the WiFi speaker returns
Breath;
If receiving the confirmation message that the WiFi speaker returns, determine that the WiFi speaker has been in the ready shape of work
State.
Optionally, if the WiFi speaker is in work ready state, preset sound delay value is sent to
The step of WiFi speaker includes:
If the WiFi speaker is in work ready state, the variable condition of television information source is obtained, is based on the variation
State determine the television information source whether switching signal mode;
If television information source switching signal mode, the current demand signal mode of the television information source is obtained, and by institute
It states the corresponding sound delay value of current demand signal mode and is sent to WiFi speaker.
Optionally, if television information source switching signal mode, obtains the current demand signal of the television information source
Mode, and after the step of corresponding sound delay value of the current demand signal mode is sent to WiFi speaker, the audio passes
Transmission method further include:
Determine whether to receive the confirmation message that the WiFi speaker is sent within a preset period of time;
If receiving the confirmation message that the WiFi speaker is sent within a preset period of time, executes and obtain television information source
The step of variable condition.
Optionally, the step for determining whether to receive the confirmation message that the WiFi speaker is sent within a preset period of time
After rapid, the audio frequency transmission method includes:
If not receiving the confirmation message that the WiFi speaker is sent within a preset period of time, repeat to the WiFi sound
Case sends sound delay value, and whether the transmission times for detecting transmission sound delay value reaches preset times;
If the transmission times reaches the preset times, executing the detection WiFi speaker, whether to be in work ready
The step of state.
Optionally, if the confirmation message for not receiving the WiFi speaker within a preset period of time and sending, continues
Confirmation message is sent to the WiFi speaker, and after detecting the step of whether transmission times reaches preset times, it is described
Audio frequency transmission method further include:
If the transmission times is not up to the preset times, the corresponding sound of the current demand signal mode is prolonged in execution
Duration is sent to the step of WiFi speaker.
In addition, to achieve the above object, the present invention also provides a kind of audio transmission device, the audio transmission device packet
It includes:
Module is obtained, for obtaining the PCM number of the audio/video flow sound intermediate frequency data of the video in real time when playing video
According to packet, and the PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment;
Detection module, for detecting whether the WiFi speaker is in work ready state;
Sending module sends preset sound delay value if being in work ready state for the WiFi speaker
To WiFi speaker, so that local equipment is when playing the video pictures of the video, the WiFi speaker prolongs according to the sound
Duration carries out delays time to control to the output time of the PCM data packet, and then realizes the video pictures and the PCM data packet
Corresponding audio data is synchronous.
In addition, to achieve the above object, the present invention also provides a kind of voiceband facility, the voiceband facility includes
Processor, memory and it is stored in the audio transmission program that can be executed on the memory and by the processor, wherein institute
When stating audio transmission program and being executed by the processor, realize such as the step of above-mentioned audio frequency transmission method.
In addition, to achieve the above object, the present invention also provides a kind of readable storage medium storing program for executing, being deposited on the readable storage medium storing program for executing
Audio transmission program is contained, wherein realizing such as above-mentioned audio frequency transmission method when the audio transmission program is executed by processor
The step of.
The present invention proposes a kind of audio frequency transmission method, unit and readable storage medium storing program for executing, by when playing video,
It obtains the PCM data packet of the audio/video flow sound intermediate frequency data of the video in real time, and the PCM data packet is sent to and the machine
The WiFi speaker that equipment is wirelessly connected, then detects whether the WiFi speaker is in work ready state, if last described
WiFi speaker is in work ready state, then preset sound delay value is sent to WiFi speaker, so that local equipment is being broadcast
When putting the video pictures of the video, the WiFi speaker according to the sound delay value to the output of the PCM data packet when
Between carry out delays time to control, and then realize that video pictures audio data corresponding with the PCM data packet is synchronous;It realizes and keeps away
Exempt from sound caused by transmitting bring sound delay because of WiFi and draw nonsynchronous problem, so that improving sound draws synchronous efficiency.
Detailed description of the invention
Fig. 1 is that the structure for the affiliated terminal of hardware running environment sound intermediate frequency transmitting device that the embodiment of the present invention is related to is shown
It is intended to;
Fig. 2 is the flow diagram of audio frequency transmission method first embodiment of the present invention;
Fig. 3 is audio frequency transmission method second embodiment flow diagram of the present invention;
Fig. 4 is the functional block diagram of audio frequency transmission method first embodiment of the present invention;
Fig. 5 is the schematic diagram of data packet format in audio frequency transmission method of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in Figure 1, Fig. 1 be belonging to hardware running environment sound intermediate frequency transmission device that the embodiment of the present invention is related to eventually
The structural schematic diagram at end.
The terminal of that embodiment of the invention can be PC.As shown in Figure 1, the terminal may include: processor 1001, such as CPU,
Network interface 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing this
Connection communication between a little components.User interface 1003 may include display screen (Display), input unit such as keyboard
(Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 is optional
May include standard wireline interface and wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory,
It is also possible to stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally may be used also
To be independently of the storage device of aforementioned processor 1001.
Optionally, terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio
Circuit, WiFi module etc..Wherein, sensor such as optical sensor, motion sensor and other sensors.Specifically, light
Sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can according to the light and shade of ambient light come
The brightness of display screen is adjusted, proximity sensor can close display screen and/or backlight when mobile terminal is moved in one's ear.As
One kind of motion sensor, gravity accelerometer can detect the size of (generally three axis) acceleration on direction, when static
Size and the direction that can detect that gravity can be used to identify application (such as the horizontal/vertical screen switching, related trip of mobile terminal posture
Play, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, mobile terminal can also configure
The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap
It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include operation server, network in a kind of memory 1005 of computer storage medium
Communication module, Subscriber Interface Module SIM and audio transmission program.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, carries out with background server
Data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client;And processor
1001 can be used for calling the audio transmission program stored in memory 1005.
In the present embodiment, voiceband facility includes: memory 1005, processor 1001 and is stored in the memory
On 1005 and the audio transmission program that can be run on the processor 1001, wherein processor 1001 calls memory 1005
When the audio transmission program of middle storage, following operation is executed:
When playing video, the PCM data packet of the audio/video flow sound intermediate frequency data of the video is obtained in real time, and will be described
PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment;
Detect whether the WiFi speaker is in work ready state;
If the WiFi speaker is in work ready state, preset sound delay value is sent to WiFi speaker, with
Make local equipment when playing the video pictures of the video, the WiFi speaker is according to the sound delay value to the PCM
The output time of data packet carries out delays time to control, and then realizes video pictures audio number corresponding with the PCM data packet
According to synchronization.
Further, processor 1001 can call the audio transmission program stored in memory 1005, also execute following
Operation:
When playing video, obtained in the IP and the audio/video flow of the WiFi speaker in real time not by audio driver
The PCM data of delay process;
The PCM data is encapsulated to obtain PCM data packet, and the PCM data packet is sent to WiFi router,
In, the PCM data is sent to the WiFi speaker by the WiFi router.
Further, processor 1001 can call the audio transmission program stored in memory 1005, also execute following
Operation:
Broadcast data packet is sent to the WiFi speaker, monitors whether to receive the confirmation letter that the WiFi speaker returns
Breath;
If receiving the confirmation message that the WiFi speaker returns, determine that the WiFi speaker has been in the ready shape of work
State.
Further, processor 1001 can call the audio transmission program stored in memory 1005, also execute following
Operation:
If the WiFi speaker is in work ready state, the variable condition of television information source is obtained, is based on the variation
State determine the television information source whether switching signal mode;
If television information source switching signal mode, the current demand signal mode of the television information source is obtained, and by institute
It states the corresponding sound delay value of current demand signal mode and is sent to WiFi speaker.
Further, processor 1001 can call the audio transmission program stored in memory 1005, also execute following
Operation:
Determine whether to receive the confirmation message that the WiFi speaker is sent within a preset period of time;
If receiving the confirmation message that the WiFi speaker is sent within a preset period of time, executes and obtain television information source
The step of variable condition.
Further, processor 1001 can call the audio transmission program stored in memory 1005, also execute following
Operation:
If not receiving the confirmation message that the WiFi speaker is sent within a preset period of time, repeat to the WiFi sound
Case sends sound delay value, and whether the transmission times for detecting transmission sound delay value reaches preset times;
If the transmission times reaches the preset times, executing the detection WiFi speaker, whether to be in work ready
The step of state.
Further, processor 1001 can call the audio transmission program stored in memory 1005, also execute following
Operation:
If the transmission times is not up to the preset times, the corresponding sound of the current demand signal mode is prolonged in execution
Duration is sent to the step of WiFi speaker.
The present invention further provides a kind of audio frequency transmission methods.It is audio frequency transmission method first of the present invention referring to Fig. 2, Fig. 2
The flow diagram of embodiment.
In the present embodiment, executing subject of the invention is audio frequency parameter equipment, and the present invention passes through in TV software system
The Audio_Handle module of one running background of middle creation, the Audio_Handle module include Handle_Data thread
Module and Handle_Control thread submodule, wherein the Handle_Data thread submodule is used in audio driver
Before handling the synchronous sound delay processing of sound picture, PCM data just is grabbed from the PCM node of sound card, is sent to TV WiFi network
The PCM data is sent to WiFi router by the WiFi network interface card of TV, is then forwarded to WiFi by WiFi router by interface
Speaker end, Handle_Control thread are used for after WiFi speaker connects upper WiFi router, and dynamic sends the current institute of TV
The corresponding sound delay value of the television information source at place is to WiFi speaker end, thus at WiFi speaker end when sound delay value reaches
Between carry out sound output when putting, synchronize, avoided because WiFi transmits bring sound to realize that the really necessary sound of TV is drawn
Sound caused by delay draws nonsynchronous problem.
The audio frequency transmission method the following steps are included:
Step S10 obtains the PCM data packet of the audio/video flow sound intermediate frequency data of the video when playing video in real time,
And the PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment;
In the present embodiment, the Handle_Data thread submodule in voiceband facility takes audio fluxion in real time
PCM (pulse code modulation Pulse Code Modulation) data packet of sound intermediate frequency data, and the PCM data that will acquire
Packet is sent to WiFi speaker.
Wherein, described when playing video, the PCM data of the audio/video flow sound intermediate frequency data of the video is obtained in real time
Packet, and the step of PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment includes:
Step S11 obtains the PCM data packet of audio/video flow sound intermediate frequency data, and will be described when playing video in real time
PCM data packet is sent to WiFi speaker;
In the present embodiment, voiceband facility sends broadcast to WiFi speaker and seeks request, and WiFi speaker receives this
When request is sought in broadcast, the IP of WiFi speaker is obtained, which is that Handle_Data thread sends PCM data to WiFi sound in real time
The formulation address of case intercepts not from TV software system local side or network-side audio/video flow by audio driver in real time
To the PCM data of sound delay processing, for example, by alsa drive the api interface on upper layer to the PCM node of sound card intercept not by
The PCM data that audio driver handles sound delay.
Wherein, WiFi audio is transmitted as UDP unicast packet, so needing and UDP letter is formulated at WIFI speaker end together
Packet exchange format is ceased, the present embodiment proposes four kinds of information types of UDP packet exchange format, and referring to Fig. 5, Fig. 5 is data packet
The schematic diagram of format, Probe_IP, Check_WiFi_Status, Set_Latency, PCM_Send, wherein the Probe_IP
It is used to refer to the IP that the request of television software obtains WiFi speaker and returns to one after WiFi speaker end receives this information type
TV Handle_Data thread submodule is given in the UDP unicast packet that Data field has added IP address value.
Step S12 encapsulates the PCM data to obtain PCM data packet, and the PCM data is sent to WiFi routing
Device, wherein the PCM data is sent to the WiFi speaker by the WiFi router.
In the present embodiment, the PCM data is packaged with the format of UDP packet, so that PCM data packet is obtained, and
The PCM data packet is sent to WiFi router, the PCM data packet after encapsulation is sent to WiFi speaker by WiFi router.
Wherein, encapsulation PCM data can be such that in the method for obtaining PCM data packet
The PCM data exists in voice data stream with unicast packet, by the IP of WiFi speaker be added in get
IP be added in the UDP Header (data head of UDP format) of unicast packet, and the PCM data being truncated to is added to
The Data field of UDP payload (payload of UDP format), thus the PCM data packet after being encapsulated.
Step S20, detects whether the WiFi speaker is in work ready state;
In the present embodiment, Handle_Control thread submodule is able to detect the working condition of WiFi speaker, determines
Whether WiFi speaker is in work ready state.Specifically, whether the detection WiFi speaker is in work ready state
Step includes:
Step S21, Xiang Suoshu WiFi speaker sends broadcast data packet, monitors whether to receive what the WiFi speaker returned
Confirmation message;
Step S22 determines that the WiFi speaker has been in work if receiving the confirmation message that the WiFi speaker returns
Make ready state.
In the present embodiment, Handle_Control thread submodule sends the broadcast data packet of UDP format to WiFi sound
Case end, type of message can be Check_WiFi_Status, when WiFi speaker receives the broadcast data packet of the type of message,
A unicast data will be returned to Handle_Control thread submodule, wherein the unicast data of return includes containing confirmation
The Data field of information.If Handle_Control thread submodule receives the confirmation message, then it represents that WiFi speaker is in
Work ready state, if Handle_Control thread submodule is not received by the confirmation message, WiFi speaker is not in
Work ready state, and Handle_Control thread submodule is by the working condition of real-time monitoring WiFi speaker.
Preset sound delay value is sent to WiFi if the WiFi speaker is in work ready state by step S30
Speaker, so that local equipment is when playing the video pictures of the video, the WiFi speaker is according to the sound delay value pair
The output time of the PCM data packet carries out delays time to control, and then realizes that the video pictures are corresponding with the PCM data packet
Audio data is synchronous.
In the present embodiment, the work of the Handle_Control thread submodule monitoring WiFi speaker of voiceband facility
State, if monitoring, the WiFi speaker is in work ready state, and preset sound delay value is sent to WiFi speaker,
WiFi speaker carries out delays time to control to output time of the PCM data packet according to the sound delay value, to allow video pictures
Audio data corresponding with PCM packet is synchronous, realizes that sound is drawn and synchronizes, this time is longer, can handle WiFi packet loss and buffered
Time is also more, and the transmission of WiFi audio is also more stable and more continuous.
The audio frequency transmission method that the present embodiment proposes, by obtaining the audio-video of the video in real time when playing video
The PCM data packet of sound intermediate frequency data is flowed, and the PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment,
Then detect whether the WiFi speaker is in work ready state, if the last WiFi speaker is in work ready state,
Preset sound delay value is then sent to WiFi speaker, so that local equipment is when playing the video pictures of the video, institute
It states WiFi speaker and delays time to control is carried out according to output time of the sound delay value to the PCM data packet, and then realize institute
It is synchronous to state video pictures audio data corresponding with the PCM data packet;It realizes and avoids because WiFi transmits bring sound
Sound caused by delay draws nonsynchronous problem, so that improving sound draws synchronous efficiency.
Based on first embodiment, the second embodiment of audio frequency transmission method of the present invention is proposed, in the present embodiment, step S30
Include:
Step S31 obtains the variable condition of television information source, is based on if the WiFi speaker is in work ready state
The variable condition determine the television information source whether switching signal mode;
In the present embodiment, user can switch the television information source of TV by controller (for example, remote controler, mobile phone),
When user switches television information source, the signal mode of television information source will change, and the television information source of unlike signal mode is corresponding
Sound delay value can be different, so, when detecting that WiFi speaker is in work ready state, the variation of monitoring television information source
State, wherein when television information source state changes, it will send notification event to Handle_Control submodule, lead to
Cross Handle_Control submodule can real-time monitoring television information source notification event, when monitoring the notification event, obtain TV
Current signal mode, and determine whether signal mode changes, which includes that HDMI, USB (operate boundary comprising TV UI
Face), ATV (anolog TV signals) etc..
Step S32, if television information source switching signal mode, obtains the current demand signal mould of the television information source
Formula, and the corresponding sound delay value of the current demand signal mode is sent to WiFi speaker.
In the present embodiment, when television information source be first time TV start when state or information source be switched to
Different modes, Handle_Control thread submodule will send the sound delay value of television information source to WiFi speaker, wherein
The sound delay value is present in the packet of UDP format, when television information source be first time TV start when state or
When information source has been switched to different modes, the current current demand signal mode of television information source will acquire, by current demand signal mode
Corresponding sound delay value is sent to WiFi speaker, and specifically, type of message is by Handle_Control thread submodule
Set_Latency, Data field are the packets of the sound delay value of television information source to WiFi speaker, for example, HDMI prolongs
Duration is 170ms, and USB delay value is 230ms, and ATV delay value is 100ms.WiFi speaker is according to the sound delay value to described
The output time of PCM data packet carries out delays time to control, and carries out synchronization process, synchronizes so that sound is drawn, this time is longer, can handle
The time of WiFi packet loss and buffered is also more, and the transmission of WiFi audio is also more stable and more continuous.
The audio frequency transmission method that the present embodiment proposes obtains if being in work ready state by the WiFi speaker
The variable condition of television information source, based on the variable condition determine the television information source whether switching signal mode, if then institute
Television information source switching signal mode is stated, then obtains the current demand signal mode of the television information source, and by the current demand signal mould
The corresponding sound delay value of formula is sent to WiFi speaker;It realizes and avoids in television information source switching because WiFi transmits bring
Sound caused by sound delay draws nonsynchronous problem, so that improving sound draws synchronous efficiency.
Based on second embodiment, propose the 3rd embodiment of audio frequency transmission method of the present invention, reference Fig. 3, step S32 it
Afterwards, further includes:
Step S33, it is determined whether receive the confirmation message that the WiFi speaker is sent within a preset period of time;
Step S34 executes acquisition electricity if receiving the confirmation message that the WiFi speaker is sent within a preset period of time
Depending on information source variable condition the step of.
In the present embodiment, the confirmation message is for detecting whether WiFi speaker receives sound delay value, if default
The confirmation message that the transmission of WiFi speaker is received in period, then represent WiFi speaker and have received sound delay value, if pre-
If the step of receiving the confirmation message that WiFi speaker is sent in the period, then executing the variable condition for obtaining television information source, after
It is continuous that the variable condition of television information source is detected.
After step S33, further includes:
Step S35 is repeated if not receiving the confirmation message that the WiFi speaker is sent within a preset period of time to institute
It states WiFi speaker and sends sound delay value, and whether the transmission times for detecting transmission sound delay value reaches preset times;
Step S36 executes whether the detection WiFi speaker is in if the transmission times reaches the preset times
The step of ready state that works.
In the present embodiment, if voiceband facility does not receive the confirmation letter of WiFi speaker transmission within a preset period of time
Breath then continues to send sound delay value to WiFi speaker, and reclocking, judges whether to receive within a preset period of time again
WiFi speaker send confirmation message, do not receive within a preset period of time WiFi speaker transmission confirmation message, then continue to
WiFi speaker sends sound delay value, and so on, the transmission times that sound delay value is sent to WiFi speaker is recorded, judgement should
Whether transmission times is greater than preset times, if the transmission times is greater than preset times, is likely to the already off company of WiFi speaker
It connects, then it represents that WiFi speaker is not in work ready state, then executes whether the detection WiFi speaker is in the ready shape of work
The step of state, so as to when WiFi speaker is not in work ready state, avoid prolonging to WiFi speaker transmission sound always
Duration.
After step S35, further includes:
Step S37 is executed the current demand signal mode is corresponding if the transmission times is not up to the preset times
Sound delay value the step of being sent to WiFi speaker.
In the present embodiment, voiceband facility sends a sound delay value and gives WiFi speaker, then records current hair
Number is sent, and judges whether current transmission times reaches preset times, if not reaching preset times, TV is believed in execution
The step of sound delay value in source is sent to WiFi speaker continues to send sound delay value to WiFi speaker, until receiving
The confirmation message that WiFi speaker is sent, or detect that transmission times reaches preset times.
The audio frequency transmission method that the present embodiment proposes, receives the WiFi sound by determining whether within a preset period of time
The confirmation message that case is sent executes acquisition if receiving the confirmation message that the WiFi speaker is sent within a preset period of time
The step of variable condition of television information source, if not receiving the confirmation message that the WiFi speaker is sent within a preset period of time,
It then repeats to send sound delay value to the WiFi speaker, and whether the transmission times for detecting transmission sound delay value reaches default
Number executes whether the detection WiFi speaker is in the ready shape of work if the transmission times reaches the preset times
The step of state, executes if the transmission times is not up to the preset times by the corresponding sound of the current demand signal mode
Delay value is sent to the step of WiFi speaker;The confirmation message for monitoring whether to receive the transmission of WiFi speaker is realized, thus really
Determine whether WiFi speaker receives sound delay value, and then avoids because the unstable bring sound delay of WiFi transmission is led
The sound of cause draws nonsynchronous situation, improves sound and draws synchronous efficiency.
In addition, the embodiment of the present invention also provides a kind of audio transmission device.
It is the functional block diagram of audio transmission device first embodiment of the present invention referring to Fig. 4, Fig. 4.
Audio transmission device of the present invention is virtual bench, is stored in the memory 1005 of voiceband facility shown in Fig. 1,
It is functional for realizing the institute of audio transmission program: when playing video, to obtain the audio/video flow sound intermediate frequency of the video in real time
The PCM data packet of data, and the PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment;Described in detection
Whether WiFi speaker is in work ready state;If the WiFi speaker is in work ready state, preset sound is prolonged
Duration is sent to WiFi speaker, so that local equipment is when playing the video pictures of the video, the WiFi speaker is according to institute
State sound delay value and delays time to control carried out to output time of the PCM data packet, so realize the video pictures with it is described
The corresponding audio data of PCM data packet is synchronous.
Specifically, in the present embodiment, the audio transmission device includes:
Module 101 is obtained, for when playing video, obtaining the PCM data packet of audio/video flow sound intermediate frequency data in real time, and
The PCM data packet is sent to WiFi speaker;
Detection module 102, for detecting whether the WiFi speaker is in work ready state;
Sending module 103 sends out preset sound delay value if being in work ready state for the WiFi speaker
It send to WiFi speaker, so that the WiFi speaker is carried out according to output time of the sound delay value to the PCM data packet
Delays time to control, and synchronization process is carried out, it is synchronized so that sound is drawn.
Further, which is also used to:
When playing video, obtained in the IP and the audio/video flow of the WiFi speaker in real time not by audio driver
The PCM data of delay process;
The PCM data is encapsulated to obtain PCM data packet, and the PCM data packet is sent to WiFi router,
In, the PCM data is sent to the WiFi speaker by the WiFi router.
Further, which is also used to:
Broadcast data packet is sent to the WiFi speaker, monitors whether to receive the confirmation letter that the WiFi speaker returns
Breath;
If receiving the confirmation message that the WiFi speaker returns, determine that the WiFi speaker has been in the ready shape of work
State.
Further, which is also used to
If the WiFi speaker is in work ready state, the variable condition of television information source is obtained, is based on the variation
State determine the television information source whether switching signal mode;
If television information source switching signal mode, the current demand signal mode of the television information source is obtained, and by institute
It states the corresponding sound delay value of current demand signal mode and is sent to WiFi speaker.
Further, the audio transmission device further include:
Determining module is used to determine whether to receive the confirmation message that the WiFi speaker is sent within a preset period of time;
If receiving the confirmation message that the WiFi speaker is sent within a preset period of time, executes and obtain television information source
The step of variable condition.
Further, the audio transmission device further include:
Monitoring modular, if the confirmation message sent for not receiving the WiFi speaker within a preset period of time, weighs
It is multiple to send sound delay value to the WiFi speaker, and whether the transmission times for detecting transmission sound delay value reaches default time
Number;
If the transmission times reaches the preset times, executing the detection WiFi speaker, whether to be in work ready
The step of state.
Further, which is also used to:
If the transmission times is not up to the preset times, the corresponding sound of the current demand signal mode is prolonged in execution
Duration is sent to the step of WiFi speaker.
Wherein, each in the function realization and above-mentioned audio frequency transmission method embodiment of modules in above-mentioned audio transmission device
Step is corresponding, and function and realization process no longer repeat one by one here.
In addition, the embodiment of the present invention also provides a kind of storage medium.
Audio transmission program is stored on storage medium of the present invention, wherein the audio transmission program is executed by processor
When, it realizes such as the step of above-mentioned audio frequency transmission method.
Wherein, audio transmission program, which is performed realized method, can refer to each reality of audio frequency transmission method of the present invention
Example is applied, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in one as described above
In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone,
Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of audio frequency transmission method, which is characterized in that the audio frequency transmission method the following steps are included:
When playing video, the PCM data packet of the audio/video flow sound intermediate frequency data of the video is obtained in real time, and by the PCM
Data packet is sent to the WiFi speaker being wirelessly connected with local equipment;
Detect whether the WiFi speaker is in work ready state;
If the WiFi speaker is in work ready state, preset sound delay value is sent to WiFi speaker, so that this
For machine equipment when playing the video pictures of the video, the WiFi speaker is according to the sound delay value to the PCM data
The output time of packet carries out delays time to control, and then realizes that video pictures audio data corresponding with the PCM data packet is same
Step.
2. audio frequency transmission method as described in claim 1, which is characterized in that it is described when playing video, in real time described in acquisition
The PCM data packet of the audio/video flow sound intermediate frequency data of video, and the PCM data packet is sent to and is wirelessly connected with local equipment
WiFi speaker the step of include:
When playing video, obtains be not delayed by audio driver in the IP and the audio/video flow of the WiFi speaker in real time
The PCM data of processing;
The PCM data is encapsulated to obtain PCM data packet, and the PCM data packet is sent to WiFi router, wherein institute
It states WiFi router and the PCM data is sent to the WiFi speaker.
3. audio frequency transmission method as described in claim 1, which is characterized in that whether the detection WiFi speaker is in work
The step of making ready state include:
Broadcast data packet is sent to the WiFi speaker, monitors whether to receive the confirmation message that the WiFi speaker returns;
If receiving the confirmation message that the WiFi speaker returns, determine that the WiFi speaker has been in work ready state.
4. audio frequency transmission method as described in claim 1, which is characterized in that if to be in work ready for the WiFi speaker
State, then the step of preset sound delay value being sent to WiFi speaker include:
If the WiFi speaker is in work ready state, the variable condition of television information source is obtained, is based on the variable condition
Determine the television information source whether switching signal mode;
If television information source switching signal mode, obtain the current demand signal mode of the television information source, and will described in work as
The corresponding sound delay value of front signal mode is sent to WiFi speaker.
5. audio frequency transmission method as claimed in claim 4, which is characterized in that if television information source switching signal mould
Formula then obtains the current demand signal mode of the television information source, and the corresponding sound delay value of the current demand signal mode is sent
After the step of to WiFi speaker, the audio frequency transmission method further include:
Determine whether to receive the confirmation message that the WiFi speaker is sent within a preset period of time;
If receiving the confirmation message that the WiFi speaker is sent within a preset period of time, the variation for obtaining television information source is executed
The step of state.
6. audio frequency transmission method as claimed in claim 5, which is characterized in that described to determine whether to receive within a preset period of time
To the WiFi speaker send confirmation message the step of after, the audio frequency transmission method includes:
If not receiving the confirmation message that the WiFi speaker is sent within a preset period of time, repeat to send out to the WiFi speaker
Sound delay value is sent, and whether the transmission times for detecting transmission sound delay value reaches preset times;
If the transmission times reaches the preset times, execute whether the detection WiFi speaker is in work ready state
The step of.
7. audio frequency transmission method as claimed in claim 5, which is characterized in that if described do not receive institute within a preset period of time
The confirmation message for stating the transmission of WiFi speaker then continues to send confirmation message to the WiFi speaker, and detects the transmission times
After the step of whether reaching preset times, the audio frequency transmission method further include:
If the transmission times is not up to the preset times, execute the corresponding sound delay value of the current demand signal mode
The step of being sent to WiFi speaker.
8. a kind of audio transmission device, which is characterized in that the audio transmission device includes:
Module is obtained, for obtaining the PCM data of the audio/video flow sound intermediate frequency data of the video in real time when playing video
Packet, and the PCM data packet is sent to the WiFi speaker being wirelessly connected with local equipment;
Detection module, for detecting whether the WiFi speaker is in work ready state;
Preset sound delay value is sent to by sending module if being in work ready state for the WiFi speaker
WiFi speaker, so that local equipment is when playing the video pictures of the video, the WiFi speaker is according to the sound delay
It is worth and delays time to control is carried out to the output time of the PCM data packet, and then realizes the video pictures and the PCM data packet pair
The audio data answered is synchronous.
9. a kind of voiceband facility, which is characterized in that the voiceband facility includes processor, memory and storage
On the memory and the audio transmission program that can be executed by the processor, wherein the audio transmission program is by the place
When managing device and executing, the step of realizing audio frequency transmission method as described in any one of claims 1 to 7.
10. a kind of readable storage medium storing program for executing, which is characterized in that audio transmission program is stored on the readable storage medium storing program for executing, wherein
When the audio transmission program is executed by processor, realizing the audio frequency transmission method as described in any one of claims 1 to 7
Step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811631310.8A CN109451339B (en) | 2018-12-28 | 2018-12-28 | Audio transmission method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811631310.8A CN109451339B (en) | 2018-12-28 | 2018-12-28 | Audio transmission method, device, equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109451339A true CN109451339A (en) | 2019-03-08 |
CN109451339B CN109451339B (en) | 2021-10-01 |
Family
ID=65538736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811631310.8A Active CN109451339B (en) | 2018-12-28 | 2018-12-28 | Audio transmission method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109451339B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110062311A (en) * | 2019-06-01 | 2019-07-26 | 厦门市思芯微科技有限公司 | A kind of intelligent sound box system by the more room music playback functions of local area network |
CN111935595A (en) * | 2020-08-03 | 2020-11-13 | 诠航科技有限公司 | Audio output control method and device and distributed sound control device |
CN112004146A (en) * | 2020-08-18 | 2020-11-27 | 深圳创维-Rgb电子有限公司 | Audio playing method and system, television and storage medium |
CN113517901A (en) * | 2021-04-13 | 2021-10-19 | 深圳市太美亚电子科技有限公司 | Intelligent bracelet of solar intelligent household system and control method thereof |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120231835A1 (en) * | 2009-12-16 | 2012-09-13 | Zte Corporation | Dual-mode digital mobile communication terminal enabling CDMA and GSM |
CN104184894A (en) * | 2014-08-21 | 2014-12-03 | 深圳市比巴科技有限公司 | Karaoke implementation method and system |
CN104640013A (en) * | 2015-01-29 | 2015-05-20 | 广东欧珀移动通信有限公司 | Voice box control method and system |
CN104955168A (en) * | 2015-05-18 | 2015-09-30 | 乐视致新电子科技(天津)有限公司 | Audio data transmitting method, receiving method and device |
CN105376628A (en) * | 2014-08-27 | 2016-03-02 | 深圳Tcl新技术有限公司 | Method and device for synchronizing audio-video signals |
CN105898502A (en) * | 2016-04-11 | 2016-08-24 | 深圳Tcl新技术有限公司 | Audio and video playing synchronization method and synchronization device |
CN106210842A (en) * | 2016-07-18 | 2016-12-07 | 乐视控股(北京)有限公司 | Control method for playing back and device |
CN106301403A (en) * | 2015-06-03 | 2017-01-04 | 博通集成电路(上海)有限公司 | Method in wireless device and wireless device |
CN108054605A (en) * | 2017-12-06 | 2018-05-18 | 嘉兴职业技术学院 | A kind of multifunctional internet of things socket |
CN108111997A (en) * | 2017-12-15 | 2018-06-01 | 珠海市杰理科技股份有限公司 | Bluetooth equipment audio synchronization method and system |
US10080061B1 (en) * | 2009-12-18 | 2018-09-18 | Joseph F. Kirley | Distributing audio signals for an audio/video presentation |
-
2018
- 2018-12-28 CN CN201811631310.8A patent/CN109451339B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120231835A1 (en) * | 2009-12-16 | 2012-09-13 | Zte Corporation | Dual-mode digital mobile communication terminal enabling CDMA and GSM |
US10080061B1 (en) * | 2009-12-18 | 2018-09-18 | Joseph F. Kirley | Distributing audio signals for an audio/video presentation |
CN104184894A (en) * | 2014-08-21 | 2014-12-03 | 深圳市比巴科技有限公司 | Karaoke implementation method and system |
CN105376628A (en) * | 2014-08-27 | 2016-03-02 | 深圳Tcl新技术有限公司 | Method and device for synchronizing audio-video signals |
CN104640013A (en) * | 2015-01-29 | 2015-05-20 | 广东欧珀移动通信有限公司 | Voice box control method and system |
CN104955168A (en) * | 2015-05-18 | 2015-09-30 | 乐视致新电子科技(天津)有限公司 | Audio data transmitting method, receiving method and device |
CN106301403A (en) * | 2015-06-03 | 2017-01-04 | 博通集成电路(上海)有限公司 | Method in wireless device and wireless device |
CN105898502A (en) * | 2016-04-11 | 2016-08-24 | 深圳Tcl新技术有限公司 | Audio and video playing synchronization method and synchronization device |
CN106210842A (en) * | 2016-07-18 | 2016-12-07 | 乐视控股(北京)有限公司 | Control method for playing back and device |
CN108054605A (en) * | 2017-12-06 | 2018-05-18 | 嘉兴职业技术学院 | A kind of multifunctional internet of things socket |
CN108111997A (en) * | 2017-12-15 | 2018-06-01 | 珠海市杰理科技股份有限公司 | Bluetooth equipment audio synchronization method and system |
Non-Patent Citations (2)
Title |
---|
JAVED ASGHAR;IAN HOOD;FRANCOIS LE FAUCHEUR: "《Preserving Video Quality in IPTV Networks》", 《IEEE TRANSACTIONS ON BROADCASTING》 * |
黄津: "《实时音频处理模块的设计与数据恢复机制的研究》", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110062311A (en) * | 2019-06-01 | 2019-07-26 | 厦门市思芯微科技有限公司 | A kind of intelligent sound box system by the more room music playback functions of local area network |
CN111935595A (en) * | 2020-08-03 | 2020-11-13 | 诠航科技有限公司 | Audio output control method and device and distributed sound control device |
CN112004146A (en) * | 2020-08-18 | 2020-11-27 | 深圳创维-Rgb电子有限公司 | Audio playing method and system, television and storage medium |
CN113517901A (en) * | 2021-04-13 | 2021-10-19 | 深圳市太美亚电子科技有限公司 | Intelligent bracelet of solar intelligent household system and control method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN109451339B (en) | 2021-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109451339A (en) | Audio frequency transmission method, device, equipment and readable storage medium storing program for executing | |
KR102154800B1 (en) | Data streaming method of electronic apparatus and electronic apparatus thereof | |
US11936921B2 (en) | Method for managing network live streaming data and related apparatus, and device and storage medium | |
CN108476508B (en) | Downlink data packet configuration method and device | |
JP2001103067A (en) | Radio terminal device, data transfer method and control information notifying method | |
CN111654742B (en) | Remote intelligent linkage screen projection method and system | |
CN112350981B (en) | Method, device and system for switching communication protocol | |
WO2022089088A1 (en) | Display device, mobile terminal, screen-casting data transmission method, and transmission system | |
CN106658064B (en) | Virtual gift display method and device | |
CN111984215A (en) | Multimedia data playing method, terminal and storage medium | |
US20150065111A1 (en) | Information processing system, information processing method, mobile terminal, information processing apparatus, and control methods and control programs thereof | |
CN104796308A (en) | Method and system for network interconnection of devices | |
CN113438747A (en) | Processing method, processing apparatus, and storage medium | |
CN109963106B (en) | Video image processing method and device, storage medium and terminal | |
CN103561311A (en) | Screen transmission method and television | |
CN104837048A (en) | Screen mirror implementation method and system | |
CN112583822B (en) | Communication apparatus and communication method | |
CN106055297B (en) | The control system and method for mobile device and LED screen multimedia interaction | |
KR101884259B1 (en) | Apparatus and method for providing streaming service | |
WO2006027915A1 (en) | Image reproduction method | |
CN112203116A (en) | Video generation method, video playing method and related equipment | |
WO2010114491A1 (en) | A method and system for processing electronic image content for display | |
CN206728303U (en) | A kind of augmented reality system based on MEC | |
CN111026497A (en) | Device for providing multiple screens and method for dynamically configuring multiple screens | |
CN115297356B (en) | Equipment interaction method, system and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |