CN106604124A - Audio data playing method and device - Google Patents

Audio data playing method and device Download PDF

Info

Publication number
CN106604124A
CN106604124A CN201510677756.4A CN201510677756A CN106604124A CN 106604124 A CN106604124 A CN 106604124A CN 201510677756 A CN201510677756 A CN 201510677756A CN 106604124 A CN106604124 A CN 106604124A
Authority
CN
China
Prior art keywords
sound channel
voice data
switching
played
buffer area
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.)
Withdrawn
Application number
CN201510677756.4A
Other languages
Chinese (zh)
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.)
Sanechips Technology Co Ltd
Shenzhen ZTE Microelectronics Technology Co Ltd
Original Assignee
Shenzhen ZTE Microelectronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen ZTE Microelectronics Technology Co Ltd filed Critical Shenzhen ZTE Microelectronics Technology Co Ltd
Priority to CN201510677756.4A priority Critical patent/CN106604124A/en
Priority to PCT/CN2016/098888 priority patent/WO2017067350A1/en
Publication of CN106604124A publication Critical patent/CN106604124A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/439Processing of audio elementary streams

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Circuits Of Receivers In General (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses an audio data playing method. The audio data playing method comprises the steps of: playing unplayed audio data in each audio data buffer cache when receiving a sound track switching instruction during the process of sound track switching; and playing the unplayed audio data in the audio data buffer cache of the current sound track when the sound track switching is completed. The invention further discloses an audio data playing device.

Description

A kind of audio data play method and device
Technical field
The present invention relates to Audiotechnica field, more particularly to a kind of audio data play method and device.
Background technology
During playing device playing audio-fequency data, during such as playing the voice data in audio file, Or during the voice data in playing video file, sound channel switching command may be received, so as to can The sound that playing device can be caused to play is discontinuous.Specifically, playing device has multiple sound channels, each Sound channel has a voice data queue, voice data queue buffered audio number of the playing device to current channel According to, the voice data cached in the voice data queue of playing device reading current channel, and by current sound Play the voice data for reading in road;When playing device receives sound channel switching command, playing device is at once Current channel is switched to the target indicated by the sound channel switching command switch sound channel, playing device stops at once To the voice data queue buffered audio data of the sound channel before switching, start the audio frequency number to the sound channel after switching According to queue buffered audio data, caching is read in the voice data queue of sound channel of the playing device from after the switching Voice data, and sound channel after the switching plays the voice data for reading;Playing device is caused to leak Broadcast, switch before current channel voice data queue in the voice data that has not been played, so as to cause The sound that playing device is played before and after sound channel switching is discontinuous.
In order to solve the above problems, the audio data play method in related art is to set up a sound Frequency data queue, no matter which sound channel current channel is, playing device is cached in the voice data queue The current channel voice data to be cached, and regardless of whether receive sound channel switching command, from the audio frequency number According to the voice data that caching is read in queue, and the voice data for reading is played by current channel.The sound Frequency data playing method, although the sound that playing device is played before and after sound channel switching can be caused continuous, but by The data in voice data queue would generally be carried out with audio effect processing, and same voice data in playing device All voice datas in queue can be processed using identical audio effect processing mode, i.e., same voice data What the audio of the voice data in queue was just as, therefore different sound channels can not be caused to produce different audios.
The content of the invention
In view of this, the embodiment of the present invention is expected to provide a kind of audio data play method and device, with can be Ensure that different sound channels can be produced on the basis of different audios so that playing device is played before and after sound channel switching Sound is continuous.
To reach above-mentioned purpose, the technical scheme is that what is be achieved in that:
The embodiment of the invention discloses a kind of audio data play method, methods described includes:
In sound channel handoff procedure, when broadcasting receives sound channel switching command in each voice data buffer area not Played voice data;
When sound channel switching is completed, the sound not being played in the voice data buffer area of current channel is played Frequency evidence.
Further, in the sound channel handoff procedure state entrance process, including:
When sound channel switching command is received, sound channel switching state information is set in switching;
When the sound channel switching state information is in switching, confirmation is currently entering in sound channel handoff procedure.
Further, it is described in sound channel handoff procedure, each audio frequency number when broadcasting receives sound channel switching command According to voice data not played in buffer area, including:
When confirming to be currently in sound channel handoff procedure, broadcasting is cut when receiving the first sound channel switching command Not played voice data in sound channel, voice data buffer area before changing.
Further, it is described in sound channel handoff procedure, each voice data when broadcasting receives sound channel switching command The voice data not being played in buffer area, also includes:
It is described receive the first sound channel switching command when switching before sound channel, voice data buffer area in not Played voice data, when being played, history target is cut when broadcasting receives second sound channel switching command Voice data changing sound channel, not being played in voice data buffer area;
Wherein, the second sound channel switching command refers to that the sound channel received in sound channel handoff procedure switching refers to Order;The history target switching sound channel is referred in this secondary channel handoff procedure, newest described except what is received The target switching sound channel of the sound channel switching command outside second sound channel switching command.
Further, the process of caching of the voice data includes:
In sound channel handoff procedure, to target the switching sound channel, audio frequency of current newest sound channel switching command Add voice data in data buffer area.
Further, the process of caching of the voice data includes:
When sound channel switching is completed, to the voice data buffer area of current channel voice data is added.
The embodiment of the invention also discloses a kind of voice data playing device, described device includes:
Playing module, in sound channel handoff procedure, playing each audio frequency when receiving sound channel switching command The voice data not being played in data buffer area;When sound channel switching is completed, the described of current channel is played The voice data not being played in voice data buffer area.
Further, described device also includes:
Control module, for when sound channel switching command is received, sound channel switching state information being set to cut In changing;
Accordingly, the playing module, is specifically additionally operable to when the sound channel switching state information is in switching,
Confirmation is currently entering in sound channel handoff procedure.
Further, the playing module, specifically for when confirming to be currently in sound channel handoff procedure, Broadcasting is not played in sound channel, voice data buffer area when receiving the first sound channel switching command before switching Voice data.
Further, the playing module, specifically for it is described receive the first sound channel switching command when switch In front sound channel, voice data buffer area not played voice data, when be played, play reception Sound switching sound channel to history target during second sound channel switching command, not being played in voice data buffer area Frequency evidence;
Wherein, the second sound channel switching command refers to the sound channel switching command received in sound channel handoff procedure; The history target switching sound channel is referred in this secondary channel handoff procedure, except newest described second for receiving The target switching sound channel of the sound channel switching command outside sound channel switching command.
Further, described device also includes:
Add module, in sound channel handoff procedure, the target to current newest sound channel switching command to be cut Change sound channel, voice data buffer area addition voice data.
Further, described device also includes:
Add module, for when sound channel switching is completed, adding to the voice data buffer area of current channel Plus voice data.
A kind of voice data broadcasting method provided in an embodiment of the present invention and device, in sound channel handoff procedure, broadcast Put the voice data not being played in each voice data buffer area when receiving sound channel switching command;In sound channel When switching is completed, the voice data not being played in the voice data buffer area of current channel is played.Thus, The sound that playing device is played before and after sound channel switching can be caused continuous, while ensureing that different sound channels can be produced not Same audio, improves user experience.
Description of the drawings
Fig. 1 is a kind of schematic flow sheet of voice data broadcasting method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural representation of voice data broadcasting device provided in an embodiment of the present invention;
A kind of schematic flow sheet of voice data broadcasting method specific embodiment one that Fig. 3 is provided for the present invention;
Fig. 4 is the sound channel switching state transfer figure of the present invention;
A kind of schematic flow sheet of voice data broadcasting method specific embodiment two that Fig. 5 is provided for the present invention;
Fig. 6 (a) flows to schematic diagram for the voice data before the sound channel switching of the embodiment of the present invention two;
Fig. 6 (b) flows to schematic diagram for the voice data in the sound channel switching of the embodiment of the present invention two;
Fig. 6 (c) flows to schematic diagram for the voice data after the sound channel switching of the embodiment of the present invention two.
Specific embodiment
In embodiments of the present invention, in sound channel handoff procedure, playing device broadcasting receives sound channel switching and refers to The voice data not being played in each voice data buffer area when making;When sound channel switching is completed, dress is played Put the voice data not being played in the voice data buffer area for playing current channel.
Below in conjunction with the accompanying drawings and specific embodiment, the present invention is described in more detail.
Fig. 1 is a kind of schematic flow sheet of audio data play method provided in an embodiment of the present invention, such as Fig. 1 Shown, the method includes:
Step 101:In sound channel handoff procedure, each voice data when broadcasting receives sound channel switching command The voice data not being played in buffer area.
Specifically, this step can be, in sound channel handoff procedure, the playing module of playing device, play The voice data not being played in each voice data buffer area when receiving sound channel switching command.
It should be noted that, each sound channel one voice data buffer area of correspondence.The voice data buffer area can Think, be the voice data queue of sound channel foundation;Other linear lists that can also be set up for sound channel.
Specifically, this step can include that the playing module of playing device judges whether playing device is currently located In sound channel handoff procedure;When playing device is currently in sound channel handoff procedure, playing module is played and connect The voice data not being played in each voice data buffer area when receiving sound channel switching command.
Wherein, it is described to judge whether playing device is currently in sound channel handoff procedure, specifically can include, Playing module reads the sound channel switching state information for having stored;When sound channel switching state information is in switching, Playing module confirms that playing device is currently in sound channel handoff procedure.Specifically, the sound channel switching state The setting up procedure of information, Ke Yiwei, when the control module of playing device receives sound channel switching command, control Molding block is set to sound channel switching state information in switching.The entrance of state in i.e. described sound channel handoff procedure Process, can include, when control module receives sound channel switching command, sound channel is switched shape by control module State information is set in switching;When sound channel switching state information is in switching, playing module is confirmed when advance In entering sound channel handoff procedure.It should be noted that, when electricity is activated on playing device, control module is by sound channel Switching state information is set to original state;After electricity is activated on the playing device, and playing device ought When front channel parameters are set to give tacit consent to sound channel, sound channel switching state information is set to switching and is completed by control module; So that sound channel switching state information may indicate that the current sound channel switching state of playing device.
Wherein, described when playing device is currently in sound channel handoff procedure, playing module is played and received The voice data not being played in each voice data buffer area during sound channel switching command, can be included, true When recognizing playing device and being currently in sound channel handoff procedure, playing module is played and receives the switching of the first sound channel Not played voice data in sound channel, voice data buffer area before switching during instruction.It should be noted that, The first sound channel switching command refers to sound channel switching state information, completes to be set to institute in switching from switching The sound channel switching command of foundation.I.e. in order to ensure switching before and after playing device play sound be it is continuous, During playing device playing audio-fequency data, the control module of playing device receives the switching of the first sound channel and refers to When making, control module completes sound channel switching state information from switching to be set in switching;Playing module according to When sound channel switching state validation of information goes out playing device and is currently in sound channel handoff procedure, playing module continues Play when receiving the sound channel switching command, the add module of playing device has been cached to the sound channel before switching Voice data buffer area in but also not played voice data;Rather than receive sound channel switching command When, playing module play immediately the sound channel switching command of reception target switching sound channel, in audio buffer district The voice data for having cached but not also being played;The voice data is added when sound channel switching command is received The voice data that module is cached immediately in the audio buffer district of the target switching sound channel of the sound channel switching command.
Specifically, described when confirming that playing device is currently in sound channel handoff procedure, playing module is broadcast Put when receiving the first sound channel switching command played in sound channel, the voice data buffer area before switching Voice data, can include, when playing module confirms that playing device is currently in sound channel handoff procedure, Playing module reads current channel parameter;Playing module confirms the corresponding sound channel of the current channel parameters for switching Front sound channel;Playing module is detected and records what is be not played in the voice data buffer area of the sound channel before switching The data volume size of voice data;When the Data Data amount size is not zero, playing module confirms the audio frequency Data are not broadcast in sound channel, voice data buffer area when receiving the first sound channel switching command before switching The voice data put;Play mould frequency block and read the sound data, and play what is read by the sound channel before switching Voice data;Playing module judges whether the voice data has been played according to the data volume size;In the sound According to when not being played, playing module continues to play the voice data frequency, until the voice data is played It is complete.Exist in sound channel, voice data buffer area before switching i.e. when the first sound channel switching command is received Not during played voice data, the voice data is played.
Above-mentioned steps can also include, when the Data Data amount size is zero, playing module confirms to receive There is no not played sound in sound channel, voice data buffer area before switching during the first sound channel switching command Sound channel switching state information is set to switching and is completed by frequency evidence, playing module from switching, by current channel Parameter is set to the target switching sound channel recorded in sound channel array, and the target recorded in sound channel array is switched Sound channel is deleted.Sound channel, voice data buffer area before switching i.e. when the first sound channel switching command is received In when there is no not played voice data, switch sound channel.
It should be noted that, the process for recording target switching sound channel can be to connect in the control module of playing device Sound channel switching command is received, and when during sound channel switching state information being set to switch by control module, control Module records the target switching sound channel of the sound channel switching command for receiving in sound channel array.It should be noted that, In order to show the record order of the target switching sound channel in sound channel handoff procedure, control module can be according to array The order of elements record target currently to be recorded switching sound channel.
Wherein, described when playing device is currently in sound channel handoff procedure, playing module is played and received The voice data not being played in each voice data buffer area during sound channel switching command, can also include, Not played sound in sound channel, voice data buffer area when receiving the first sound channel switching command before switching Frequency according to, be played when, playing module is played history target when receiving second sound channel switching command and is switched Sound channel, not played in voice data buffer area voice data.
It should be noted that, the second sound channel switching command refers to the control of the playing device in sound channel handoff procedure The sound channel switching command that molding block is received;Enter in sound channel handoff procedure after state in playing device, also When the switching of unfinished sound channel is introduced into sound channel switching completion statuses, what the control module of playing device was received again Sound channel switching command.Wherein, the history target switches sound channel and refers in this secondary channel handoff procedure, removes The target switching sound channel of the sound channel switching command outside newest second sound channel switching command for receiving;It is i.e. described to go through History target switching sound channel can include the target switching sound channel of the first sound channel switching command, can also include except most The target switching sound channel of the second sound channel switching command outside new second sound channel switching command.
Specifically, due in sound channel handoff procedure control module have received sound channel switching command again, such as exist Not played sound in sound channel, voice data buffer area when receiving the first sound channel switching command before switching Frequency, when not also being played, control module have received one or more sound channel switching commands again, that is, control Molding block receives one or more second sound channel switching commands again, and when receiving the first sound channel switching command Add module has cached voice data to the target switching sound channel of the first sound channel switching command, receives newest The add module target switching of one or more second sound channel switching commands forward during second sound channel switching command Sound channel has cached voice data, therefore in order to ensure that the sound that playing device is played is continuous, is receiving In sound channel, voice data buffer area before switching during the first sound channel switching command not played voice data, When being played, playing module also needs to continue the first sound channel when broadcasting receives newest second sound channel switching command Second sound channel switching command target switching sound channel, in addition to newest second sound channel switching command of switching command Target switching sound channel, not played in voice data buffer area voice data.
Specifically, sound channel, the voice data when the first sound channel switching command is received before switching delays When depositing in area not played voice data, be played, playing module is played and receives second sound channel and switch History target switching sound channel, not played in voice data buffer area voice data, can wrap during instruction Include, do not broadcast in sound channel, the voice data buffer area before switching when the first sound channel switching command is received The voice data put, when being played, playing module judges the target switching channel number recorded in sound channel array Whether mesh is more than one;When target switches number of channels more than one, playing module is read in sound channel array Target switching sound channel, i.e., first of first aim switching sound channel, the i.e. first sound channel switching command of record History target switches sound channel;Playing module is big according to the residual data amount of the history target switching sound channel of record It is little, not played voice data is read from the voice data buffer area of the history target switching sound channel, and Sound channel is switched by the history target and plays the voice data for reading;The history of playing module according to record The residual data amount size judgement of target switching sound channel, receives next history target switching sound channel corresponding Whether played voice data is not played in the history target switching sound channel during second sound channel switching command It is complete;When the voice data has not been played, playing module continues to play the voice data, until the audio frequency Data have been played.
When the voice data has been played, playing module continues to read the next mesh recorded in sound channel array Mark switching sound channel, and judge that whether target switching sound channel is last the target switching sound in sound channel array Road;When last target in not being sound channel array in the target switching sound channel switches sound channel, playing module Confirm that the target switching sound channel is that history target switches sound channel, playing module is cut according to the history target of record The residual data amount size of sound channel is changed, is read not from the voice data buffer area of the history target switching sound channel Played voice data, and the voice data that sound channel broadcasting reads is switched by the history target;Play Module judges according to the residual data amount size of the history target switching sound channel of record, receives the next one and go through It is played in history target switching sound channel during history target switching sound channel corresponding second sound channel switching command Whether voice data has been played;When the voice data has not been played, playing module continues to play the sound Frequency evidence, until the voice data has been played;When the voice data has been played, playing module is returned The playing module continues to read the next target switching sound channel step recorded in sound channel array, until all When receiving second sound channel switching command history target switching sound channel, be not played in voice data buffer area Voice data, be played.I.e. when target switches number of channels more than one, playing module confirms Not played sound in sound channel, voice data buffer area when receiving the first sound channel switching command before switching Frequency according to, be played when, control module have received sound channel switching command again, i.e., second sound channel switches and refers to Order, therefore to ensure that the sound that playing device is played is continuous, when the first sound channel switching command is received In sound channel, voice data buffer area before switching not played voice data, be played, and confirmation When target switches number of channels more than one, when playing module continuation broadcasting receives second sound channel switching command Voice data that history target switches sound channel, not being played in voice data buffer area.
Above-mentioned steps can also include, when target switches number of channels not less than one, playing module is by sound Road switching state information is set to switching from switching and completes, and current channel parameter is set in sound channel array The target switching sound channel of record, and the target switching sound channel recorded in sound channel array is deleted.Cut in target When changing number of channels not less than one, playing module confirms that control module is not received in sound channel handoff procedure To sound channel switching command, that is, do not receive second sound channel switching command, due to receive the first sound channel switching refer to In sound channel, voice data buffer area before switching when making not played voice data, be played, Sound channel can now be switched.Or can also include, it is all receive second sound channel switching command when history Target switching sound channel, not played in voice data buffer area voice data, when be played, broadcasting Sound channel switching state information is set to switching and is completed by module from switching, and current channel parameter is set to into sound Last the target switching sound channel recorded in road array, and all targets recorded in sound channel array are switched Sound channel is deleted.I.e. it is all receive second sound channel switching command when history target switching sound channel, audio frequency number According to voice data not played in buffer area, be played when, according in sound channel array record last Individual target switches sound channel, i.e., the target switching sound channel of newest second sound channel switching command switches sound channel.
It should be noted that, the process of caching of the voice data can include, in sound channel handoff procedure, add mould Target switching sound channel, voice data buffer area addition audio frequency number of the block to current newest sound channel switching command According to.Wherein, history target described above switches the residual data amount size of sound channel, can be in this process Obtain, i.e., switch sound channel, voice data to the target of current newest sound channel switching command in add module Buffer area addition voice data process is obtained.
Specifically, described in sound channel handoff procedure, add module is to current newest sound channel switching command Target switching sound channel, voice data buffer area addition voice data, can include, add module reads The sound channel switching state information of storage;When sound channel switching state information is in switching, add module confirms to broadcast Put device to be currently in sound channel handoff procedure;When confirming that playing device is currently in sound channel handoff procedure, Add module reads last target switching sound channel in current channel array;Add module is to reading most Latter target switches the voice data buffer area buffered audio data of sound channel, and to should last target The data volume size of the voice data of switching sound channel record buffer memory;Add module returns what the reading had been stored Sound channel switching state information Step.Wherein, last mesh in addition to newest last target switching sound channel Mark switching sound channel is history target switching sound channel;Accordingly, in addition to newest last target switching sound channel The data volume size that recorded of last target switching sound channel, as history target switches the residual of sound channel Data volume size.
Step 102:When sound channel switching is completed, do not broadcast in the voice data buffer area for playing current channel The voice data put.
Specifically, this step can be, when sound channel switching is completed, the playing module of playing device, play The voice data not being played in the voice data buffer area of current channel.Thus, can cause before sound channel switching The sound that afterwards playing device is played is continuous, improves user experience;Simultaneously as each sound channel has one Corresponding voice data buffer area, ensures that different sound channels can produce different audios.
Specifically, this step can include that the playing module of playing device judges whether playing device is currently located In sound channel handoff procedure completion statuses;When playing device is currently at sound channel handoff procedure completion statuses, broadcast The voice data not being played in playing module, the voice data buffer area of broadcasting current channel of putting device.
Wherein, it is described to judge playing device currently whether in sound channel handoff procedure completion statuses, specifically can be with Including playing module reads the sound channel switching state information for having stored;It is switching in sound channel switching state information When completing, playing module confirms that playing device is currently at sound channel switching completion statuses.
Wherein, described when playing device is currently at sound channel handoff procedure completion statuses, playing device is broadcast The voice data not being played in amplification module, the voice data buffer area of broadcasting current channel, specifically can wrap Include, when confirming that playing device is currently at sound channel switching completion statuses, playing module reads current channel The voice data not being played in voice data buffer area, and the audio frequency number for reading is played by current channel According to.
It should be noted that, the process of caching of the voice data can also include, when sound channel switching is completed, Add module to the voice data buffer area of current channel adds voice data.Specifically, it is described to cut in sound channel Change when completing, add module to the voice data buffer area of current channel adds voice data, can include, Add module reads the sound channel switching state information for having stored;When sound channel switching state information is completed for switching, Add module confirms that playing device is currently at sound channel switching completion statuses;It is currently in confirmation playing device During sound channel switching completion statuses, add module reads current channel parameter;Add module is current to what is read The voice data buffer area buffered audio data of the corresponding current channel of channel parameters.
In order to realize said method, the invention discloses a kind of voice data playing device.
Fig. 2 is a kind of structural representation of voice data playing device provided in an embodiment of the present invention, such as Fig. 2 Shown, the voice data playing device includes:
Playing module 201, in sound channel handoff procedure, when broadcasting receives sound channel switching command each The voice data not being played in voice data buffer area;When sound channel switching is completed, current channel is played The voice data not being played in the voice data buffer area.
Further, described device also includes:
Control module 202, for when sound channel switching command is received, sound channel switching state information being arranged For in switching;
Accordingly, the playing module 201, it is switching to be specifically additionally operable in the sound channel switching state information When middle, confirmation is currently entering in sound channel handoff procedure.
Further, the playing module 201, specifically for confirming to be currently in sound channel handoff procedure When, in sound channel, voice data buffer area when broadcasting receives the first sound channel switching command before switching not by The voice data of broadcasting.
Further, the playing module 201, specifically for it is described receive the first sound channel switching command when In sound channel, voice data buffer area before switching not played voice data, when be played, broadcasting When receiving second sound channel switching command history target switching sound channel, be not played in voice data buffer area Voice data;
Wherein, the second sound channel switching command refers to that the sound channel received in sound channel handoff procedure switching refers to Order;The history target switching sound channel is referred in this secondary channel handoff procedure, newest described except what is received The target switching sound channel of the sound channel switching command outside second sound channel switching command.
Further, described device also includes:
Add module 203, in sound channel handoff procedure, to the mesh of current newest sound channel switching command Mark switching sound channel, voice data buffer area addition voice data.
Further, described device also includes:
Control module 203, for when sound channel switching is completed, caching to the voice data of current channel Add voice data in area.
In actual applications, the control module 202 of the playing module 201, add module 203 can be by position Central processing unit (Central Processing Unit, CPU) in terminal, microprocessor (Micro Processor Unit, MPU), digital signal processor (Digital Signal Processor, DSP) or Field programmable gate array (Field Programmable Gate Array, FPGA) etc. is realized.
A kind of schematic flow sheet of audio data play method specific embodiment one that Fig. 3 is provided for the present invention, As shown in figure 3, concrete steps include:
Step 301:When receiving sound channel switching command, sound channel switching state information is set in switching, The target switching sound channel of the sound channel switching command is recorded in sound channel array.
Specifically, this step can be, when the control module of playing device receives sound channel switching command, Control module is set to sound channel switching state information in switching, by the target of the sound channel switching command for receiving Switching sound channel is recorded in sound channel array.It should be noted that, when electricity is activated on playing device, control mould Sound channel switching state information is set to original state by block;After electricity is activated on the playing device, and play dress Put by current channel parameter be set to give tacit consent to sound channel when, control module is set to sound channel switching state information Switching is completed.
Specifically, as shown in figure 4, it is the sound channel switching state transfer figure of the present invention, connect in playing device Electricity instruction is received, when electricity is activated on playing device, sound channel switching state is original state 401;Upper electricity After being activated, playing device receive current channel parameter is set to give tacit consent to sound channel instruction after, and play When current channel parameter is set to give tacit consent to sound channel by device, sound channel switching state completes 402 into switching; When sound channel switching command is received, sound channel switching state is entered 403 in switching;Enter entering tone in playing device In road switching, when receiving sound channel switching command again, sound channel switching state is still in switching 403;Receiving To in each voice data buffer area during sound channel switching command not played voice data, when being played, Sound channel switching state reenters switching and completes 402.
It should be noted that, in order to show the record order of the sound channel in sound channel handoff procedure, control module can be with Switch sound channel according to the array element journal target currently to be recorded.
Step 302:When confirming that playing device is currently in sound channel handoff procedure, broadcasting receives the Not played voice data in sound channel, voice data buffer area before switching during one sound channel switching command.
Specifically, this step can be, when confirming that playing device is currently in sound channel handoff procedure, Playing module is played when receiving the first sound channel switching command in sound channel, the voice data buffer area before switching The voice data not being played;Wherein, the first sound channel switching command referred to sound channel switching state information, The sound channel switching command for being set to institute's foundation in switching is completed from switching.Dress is played before and after i.e. in order to ensure switching The sound for putting broadcasting is continuous, during playing device playing audio-fequency data, the control of playing device When module receives the first sound channel switching command, sound channel switching state information is completed to set by control module from switching In being set to switching;Playing module goes out playing device and is currently at sound channel according to sound channel switching state validation of information to be cut When during changing, playing module continuation is played when receiving the sound channel switching command, the addition mould of playing device The voice data that block has been cached in the voice data buffer area of the sound channel before switching but has not also been played; Rather than when receiving sound channel switching command, playing module plays immediately the target of the sound channel switching command of reception Switching sound channel, cached in audio buffer district but also not played voice data;The voice data be Add module switches the audio frequency of sound channel to the target of the sound channel switching command immediately when receiving sound channel switching command The voice data cached in buffer area.
Specifically, this step can include, confirm that playing device is currently at sound channel switching in playing module During when, playing module read current channel parameter;Playing module confirms that the current channel parameters are corresponding Sound channel is the sound channel before switching;Playing module is detected and recorded in the voice data buffer area of the sound channel before switching The data volume size of the voice data not being played;When the Data Data amount size is not zero, playing module Confirm that the voice data is sound channel, voice data caching when receiving the first sound channel switching command before switching The voice data not being played in area;Play mould frequency block and read the sound data, and broadcast by the sound channel before switching Put the voice data for reading;Playing module judges whether the voice data is played according to the data volume size It is complete;When the voice data has not been played, playing module continues to play the voice data, until the audio frequency Data have been played.Sound channel, voice data before switching i.e. when the first sound channel switching command is received delays Deposit when there is not played voice data in area, the voice data is played.
Above-mentioned steps can also include, when the Data Data amount size is zero, playing module confirms to receive There is no not played sound in sound channel, voice data buffer area before switching during the first sound channel switching command Sound channel switching state information is set to switching and is completed by frequency evidence, playing module from switching, by current channel Parameter is set to the target switching sound channel recorded in sound channel array, and the target recorded in sound channel array is switched Sound channel is deleted.Sound channel, voice data buffer area before switching i.e. when the first sound channel switching command is received In when there is no not played voice data, switch sound channel.
Step 303:Sound channel, voice data caching before switching when the first sound channel switching command is received Not played voice data in area, when be played, play history when receiving second sound channel switching command Voice data that target switches sound channel, not being played in voice data buffer area.
Specifically, this step can be, before switching when the first sound channel switching command is received it is sound channel, Not played voice data in voice data buffer area, when be played, playing module broadcasting receives the History target switching sound channel, not played in voice data buffer area audio frequency number during two sound channel switching commands According to.
Wherein, the second sound channel switching command refers to the control module of the playing device in sound channel handoff procedure The sound channel switching command for receiving;Also do not complete into after state in sound channel handoff procedure in playing device When sound channel switching is introduced into sound channel switching completion statuses, the sound channel that the control module of playing device is received again is cut Change instruction.
Wherein, history target switching sound channel referred in this secondary channel handoff procedure, except receiving most The target switching sound channel of the sound channel switching command outside new second sound channel switching command;I.e. described history target switching Sound channel can include the target switching sound channel of the first sound channel switching command, can also include except newest second sound channel The target switching sound channel of the second sound channel switching command outside switching command.
Specifically, due in sound channel handoff procedure control module have received sound channel switching command again, such as exist Not played sound in sound channel, voice data buffer area when receiving the first sound channel switching command before switching Frequency, when not also being played, control module have received one or more sound channel switching commands again, that is, control Molding block receives one or more second sound channel switching commands again, and when receiving the first sound channel switching command Add module has cached voice data to the target switching sound channel of the first sound channel switching command, receives newest The add module target switching of one or more second sound channel switching commands forward during second sound channel switching command Sound channel has cached voice data, therefore in order to ensure that the sound that playing device is played is continuous, is receiving In sound channel, voice data buffer area before switching during the first sound channel switching command not played voice data, When being played, playing module also needs to continue the first sound channel when broadcasting receives newest second sound channel switching command Second sound channel switching command target switching sound channel, in addition to newest second sound channel switching command of switching command Target switching sound channel, not played in voice data buffer area voice data.
Specifically, this step can include, can include, switch when the first sound channel switching command is received In front sound channel, voice data buffer area not played voice data, when being played, playing module Judge that whether the target recorded in sound channel array switches number of channels more than one;Switch number of channels in target During more than one, playing module reads first aim switching sound channel, i.e. the first sound recorded in sound channel array Target switching sound channel, i.e., a first history target switching sound channel of road switching command;Playing module is according to record The history target switch the residual data amount size of sound channel, switch the voice data of sound channel from the history target Not played voice data is read in buffer area, and sound channel is switched by the history target and play what is read Voice data;Playing module switches the residual data amount size judgement of sound channel according to the history target of record, History target switching sound when receiving next history target switching sound channel corresponding second sound channel switching command Whether played voice data has not been played in road;When the voice data has not been played, mould is played Block continues to play the voice data, until the voice data has been played.
When the voice data has been played, playing module continues to read the next mesh recorded in sound channel array Mark switching sound channel, and judge that whether target switching sound channel is last the target switching sound in sound channel array Road;When last target in not being sound channel array in the target switching sound channel switches sound channel, playing module Confirm that the target switching sound channel is that history target switches sound channel, playing module is cut according to the history target of record The residual data amount size of sound channel is changed, is read not from the voice data buffer area of the history target switching sound channel Played voice data, and the voice data that sound channel broadcasting reads is switched by the history target;Play Module judges according to the residual data amount size of the history target switching sound channel of record, receives the next one and go through It is played in history target switching sound channel during history target switching sound channel corresponding second sound channel switching command Whether voice data has been played;When the voice data has not been played, playing module continues to play the sound Frequency evidence, until the voice data has been played;When the voice data has been played, playing module is returned The playing module continues to read the next target switching sound channel step recorded in sound channel array, until all When receiving second sound channel switching command history target switching sound channel, be not played in voice data buffer area Voice data, be played.I.e. when target switches number of channels more than one, playing module confirms Not played sound in sound channel, voice data buffer area when receiving the first sound channel switching command before switching Frequency according to, be played when, control module have received sound channel switching command again, i.e., second sound channel switches and refers to Order, therefore to ensure that the sound that playing device is played is continuous, when the first sound channel switching command is received In sound channel, voice data buffer area before switching not played voice data, be played, and confirmation When target switches number of channels more than one, when playing module continuation broadcasting receives second sound channel switching command Voice data that history target switches sound channel, not being played in voice data buffer area.
Above-mentioned steps can also include, when target switches number of channels not less than one, playing module is by sound Road switching state information is set to switching from switching and completes, and current channel parameter is set in sound channel array The target switching sound channel of record, and the target switching sound channel recorded in sound channel array is deleted.Cut in target When changing number of channels not less than one, playing module confirms that control module is not received in sound channel handoff procedure To sound channel switching command, that is, do not receive second sound channel switching command, due to receive the first sound channel switching refer to In sound channel, voice data buffer area before switching when making not played voice data, be played, Sound channel can now be switched.
Wherein, history target described above switches the residual data amount size of sound channel, can be in add module Obtain to voice data buffer area addition voice data process.
Step 304:It is all receive second sound channel switching command when history target switching sound channel, audio frequency Not played voice data in data buffer area, when be played, switching sound channel.
Specifically, this step can be, it is all receive second sound channel switching command when history target switching Sound channel, not played in voice data buffer area voice data, when being played, playing module is by sound Road switching state information is set to switching from switching and completes, and current channel parameter is set in sound channel array Last target switching sound channel of record, and all targets switching sound channel recorded in sound channel array is deleted. I.e. it is all receive second sound channel switching command when history target switching sound channel, in voice data buffer area Not played voice data, when be played, switched according to last target recorded in sound channel array Sound channel, i.e., the target switching sound channel of newest second sound channel switching command, switches sound channel.
Step 305:When sound channel switching is completed, do not broadcast in the voice data buffer area for playing current channel The voice data put.
Specifically, this step can be, when sound channel switching is completed, the playing module of playing device, play The voice data not being played in the voice data buffer area of current channel.
Specifically, this step can include that the playing module of playing device judges whether playing device is currently located In sound channel handoff procedure completion statuses;When playing device is currently at sound channel handoff procedure completion statuses, broadcast The voice data not being played in playing module, the voice data buffer area of broadcasting current channel of putting device.
Wherein, it is described to judge playing device currently whether in sound channel handoff procedure completion statuses, specifically can be with Including playing module reads the sound channel switching state information for having stored;It is switching in sound channel switching state information When completing, playing module confirms that playing device is currently at sound channel switching completion statuses.
Wherein, described when playing device is currently at sound channel handoff procedure completion statuses, playing device is broadcast The voice data not being played in amplification module, the voice data buffer area of broadcasting current channel, specifically can wrap Include, when confirming that playing device is currently at sound channel switching completion statuses, playing module reads current channel The voice data not being played in voice data buffer area, and the audio frequency number for reading is played by current channel According to.
Step 306:In sound channel handoff procedure, to the target switching sound of current newest sound channel switching command Road, voice data buffer area addition voice data.
Specifically, this step can include that add module reads the sound channel switching state information for having stored; When sound channel switching state information is in switching, add module confirms that playing device is currently at sound channel handoff procedure In;When confirming that playing device is currently in sound channel handoff procedure, add module reads current channel array In last target switching sound channel;Add module switches the audio frequency of sound channel to last target for reading Data buffer area buffered audio data, and to should last target switch the audio frequency number of sound channel record buffer memory According to data volume size;Add module returns the sound channel switching state information Step for reading and having stored.Its In, last the target switching sound channel in addition to newest last target switching sound channel is history target and cuts Change sound channel;Accordingly, last target in addition to newest last target switching sound channel has switched sound channel The data volume size of record, as history target switch the residual data amount size of sound channel.
Step 307:When sound channel switching is completed, to the voice data buffer area of current channel audio frequency number is added According to.
Specifically, this step can be, after the completion of sound channel switching, audio frequency of the add module to current channel Data buffer area buffered audio data.
Specifically, this step can include that add module reads the sound channel switching state information for having stored; When sound channel switching state information is completed for switching, add module confirms that playing device is currently at sound channel and has switched Into state;When confirming that playing device is currently at sound channel switching completion statuses, add module reads current sound Road parameter;Voice data buffer area of the add module to the corresponding current channel of current channel parameter for reading Buffered audio data.
A kind of schematic flow sheet of voice data broadcasting method specific embodiment two that Fig. 5 is provided for the present invention, such as Shown in Fig. 5, playing device includes L channel and R channel, and current channel is L channel, and concrete steps include:
Step 501:Play the voice data not being played in the voice data queue of L channel.
Specifically, this step can be, the playing module of playing device, play the sound of current channel L channel The voice data not being played in frequency data queue.
Specifically, as shown in Fig. 6 (a), the voice data of the add module 203 of playing device to L channel Add voice data in queue 601, playing module 201 reads sound from the voice data queue 601 of L channel Frequency evidence is simultaneously played;Also including the voice data queue 602 of R channel in Fig. 6.
Step 502:When receiving R channel switching command, sound channel switching state information is set in switching, R channel is recorded in sound channel array.
Step 503:In sound channel handoff procedure, it is not played in the voice data buffer area for playing L channel Voice data.
Specifically, this step can be that playing module reads sound channel switching state information;Switch shape in sound channel When state information is in switching, playing module is read to confirm that playing device is currently in sound channel handoff procedure, plays The voice data not being played in the voice data buffer area of L channel.
Specifically, as shown in Fig. 6 (b), the add module 203 of playing device starts the audio frequency to R channel Add voice data in data queue 602, playing module 201 is read from the voice data queue 601 of L channel Take voice data and play.
Step 504:In the voice data buffer area of L channel not played voice data, be played, And when sound channel switching command is not received in sound channel handoff procedure, sound channel is switched to into R channel.
Wherein, described to switch to R channel step to include sound channel, playing module is by sound channel switching state Information is set to switching from switching and completes, and current channel parameter is set to into R channel, and by sound channel array The target switching sound channel of middle record is deleted.
Step 505:When sound channel has switched, play what is be not played in the voice data buffer area of R channel Voice data.
Specifically, as shown in Fig. 6 (c), the voice data of the add module 203 of playing device to R channel Add voice data in queue 602, playing module 201 reads sound from the voice data queue 602 of R channel Frequency evidence is simultaneously played.
The preferred embodiments of the present invention are the foregoing is only, the present invention is not limited to, for ability For the technical staff in domain, the present invention can have various modifications and variations, and protection scope of the present invention is with right Requirement is defined.

Claims (12)

1. a kind of audio data play method, it is characterised in that methods described includes:
In sound channel handoff procedure, when broadcasting receives sound channel switching command in each voice data buffer area not Played voice data;
When sound channel switching is completed, the sound not being played in the voice data buffer area of current channel is played Frequency evidence.
2. method according to claim 1, it is characterised in that state in the sound channel handoff procedure Into process, including:
When sound channel switching command is received, sound channel switching state information is set in switching;
When the sound channel switching state information is in switching, confirmation is currently entering in sound channel handoff procedure.
3. method according to claim 1, it is characterised in that described in sound channel handoff procedure, broadcasts The voice data not being played in each voice data buffer area when receiving sound channel switching command is put, including:
When confirming to be currently in sound channel handoff procedure, broadcasting is cut when receiving the first sound channel switching command Not played voice data in sound channel, voice data buffer area before changing.
4. method according to claim 3, it is characterised in that described in sound channel handoff procedure, broadcasts The voice data not being played in each voice data buffer area when receiving sound channel switching command is put, is also included:
It is described receive the first sound channel switching command when switching before sound channel, voice data buffer area in not Played voice data, when being played, history target is cut when broadcasting receives second sound channel switching command Voice data changing sound channel, not being played in voice data buffer area;
Wherein, the second sound channel switching command refers to that the sound channel received in sound channel handoff procedure switching refers to Order;The history target switching sound channel is referred in this secondary channel handoff procedure, newest described except what is received The target switching sound channel of the sound channel switching command outside second sound channel switching command.
5. method according to claim 1, it is characterised in that the process of caching bag of the voice data Include:
In sound channel handoff procedure, to target the switching sound channel, audio frequency of current newest sound channel switching command Add voice data in data buffer area.
6. method according to claim 1 or 5, it is characterised in that the voice data is cached Journey includes:
When sound channel switching is completed, to the voice data buffer area of current channel voice data is added.
7. a kind of voice data playing device, it is characterised in that described device includes:
Playing module, in sound channel handoff procedure, playing each audio frequency when receiving sound channel switching command The voice data not being played in data buffer area;When sound channel switching is completed, the described of current channel is played The voice data not being played in voice data buffer area.
8. device according to claim 7, it is characterised in that described device also includes:
Control module, for when sound channel switching command is received, sound channel switching state information being set to cut In changing;
Accordingly, the playing module, is specifically additionally operable to when the sound channel switching state information is in switching,
Confirmation is currently entering in sound channel handoff procedure.
9. device according to claim 7, it is characterised in that the playing module, specifically for When confirming to be currently in sound channel handoff procedure, when broadcasting receives the first sound channel switching command before switching Sound channel, not played in voice data buffer area voice data.
10. device according to claim 9, it is characterised in that the playing module, specifically for It is described receive the first sound channel switching command when switching before sound channel, voice data buffer area in do not broadcast The voice data put, when being played, history target switching sound when broadcasting receives second sound channel switching command Road, not played in voice data buffer area voice data;
Wherein, the second sound channel switching command refers to the sound channel switching command received in sound channel handoff procedure; The history target switching sound channel is referred in this secondary channel handoff procedure, except newest described second for receiving The target switching sound channel of the sound channel switching command outside sound channel switching command.
11. devices according to claim 7, it is characterised in that described device also includes:
Add module, in sound channel handoff procedure, the target to current newest sound channel switching command to be cut Change sound channel, voice data buffer area addition voice data.
12. devices according to claim 7 or 11, it is characterised in that described device also includes:
Add module, for when sound channel switching is completed, adding to the voice data buffer area of current channel Plus voice data.
CN201510677756.4A 2015-10-19 2015-10-19 Audio data playing method and device Withdrawn CN106604124A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510677756.4A CN106604124A (en) 2015-10-19 2015-10-19 Audio data playing method and device
PCT/CN2016/098888 WO2017067350A1 (en) 2015-10-19 2016-09-13 Audio data playback method, device, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510677756.4A CN106604124A (en) 2015-10-19 2015-10-19 Audio data playing method and device

Publications (1)

Publication Number Publication Date
CN106604124A true CN106604124A (en) 2017-04-26

Family

ID=58554896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510677756.4A Withdrawn CN106604124A (en) 2015-10-19 2015-10-19 Audio data playing method and device

Country Status (2)

Country Link
CN (1) CN106604124A (en)
WO (1) WO2017067350A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107948873A (en) * 2017-11-27 2018-04-20 安徽威斯贝尔智能科技有限公司 The automatic switchover system and its method of a kind of audio signal
CN109413492A (en) * 2017-08-18 2019-03-01 武汉斗鱼网络科技有限公司 Audio data reverberation processing method and system during a kind of live streaming
CN109599133A (en) * 2018-12-18 2019-04-09 青岛海信电器股份有限公司 Switching method, device, computer equipment and the storage medium of language soundtrack

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442586B (en) * 2008-12-31 2012-06-27 中兴通讯股份有限公司 Method and terminal for playing multimedia

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413492A (en) * 2017-08-18 2019-03-01 武汉斗鱼网络科技有限公司 Audio data reverberation processing method and system during a kind of live streaming
CN107948873A (en) * 2017-11-27 2018-04-20 安徽威斯贝尔智能科技有限公司 The automatic switchover system and its method of a kind of audio signal
CN107948873B (en) * 2017-11-27 2020-09-01 安徽威斯贝尔智能科技有限公司 Automatic switching system and method for audio signals
CN109599133A (en) * 2018-12-18 2019-04-09 青岛海信电器股份有限公司 Switching method, device, computer equipment and the storage medium of language soundtrack

Also Published As

Publication number Publication date
WO2017067350A1 (en) 2017-04-27

Similar Documents

Publication Publication Date Title
TW200603626A (en) Methods and related circuit for automatic audio volume level control
CN106604124A (en) Audio data playing method and device
JPWO2004084222A1 (en) In-vehicle recording / reproducing apparatus, recording / reproducing apparatus, recording / reproducing system, and recording / reproducing method
CN1983427B (en) Audio data reproducing method
US20130051207A1 (en) Multitrack recorder and mixdown method
JP2007267351A (en) Video recording and reproducing apparatus and video reproducing apparatus
JP4430637B2 (en) Digital multimedia broadcast receiving apparatus for performing reserved recording and method according thereto
CN104867507A (en) Audio file playing method and device
CN106658155A (en) Method and device for switching and playing of player
CN109495776A (en) The method and intelligent terminal that a kind of audio sends, plays
CN101494755B (en) Recording device and recording method
CN1201324C (en) Method for reproducing data which is stored on storage medium
CN101025983B (en) Buffer control system and method
US20200236439A1 (en) Method for the reception of audio contents in a hybrid receiver and time-shifted playback, receiver and program associated with the method
CN103813186B (en) Scene switching and broadcasting system and method applied to multiple media channels
JP4312180B2 (en) Recording / reproducing apparatus and method
KR100713389B1 (en) Digital multimedia broadcasting receiver for precontract recording and method thereof
CN105392040B (en) A kind of control method and control system that more equipment synchronize pause and play
US9067134B2 (en) Video game processing apparatus and video game processing program product
CN105338397A (en) Information push method, device and system
CN102760479B (en) Sound playing method and system with single master control terminal controlling multiple auxiliary units
CN100531297C (en) Digital multimedia transmission system and digital multimedia player set therein
JP4706326B2 (en) Receiving apparatus, broadcasting system, receiving method and receiving program
CN112153456B (en) Video data recording method and device, electronic equipment and storage medium
JPH10234006A (en) Reproduction 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20170426

WW01 Invention patent application withdrawn after publication