CN109771945A - The control method and device of terminal device - Google Patents

The control method and device of terminal device Download PDF

Info

Publication number
CN109771945A
CN109771945A CN201910091740.3A CN201910091740A CN109771945A CN 109771945 A CN109771945 A CN 109771945A CN 201910091740 A CN201910091740 A CN 201910091740A CN 109771945 A CN109771945 A CN 109771945A
Authority
CN
China
Prior art keywords
audio frame
audio
judged
frame
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910091740.3A
Other languages
Chinese (zh)
Other versions
CN109771945B (en
Inventor
缪丽林
李伟雷
杜黎明
孙洪军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Awinic Technology Co Ltd
Original Assignee
Shanghai Awinic 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 Shanghai Awinic Technology Co Ltd filed Critical Shanghai Awinic Technology Co Ltd
Priority to CN201910091740.3A priority Critical patent/CN109771945B/en
Publication of CN109771945A publication Critical patent/CN109771945A/en
Application granted granted Critical
Publication of CN109771945B publication Critical patent/CN109771945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a kind of control method of terminal device and devices, by obtaining audio signal;Sub-frame processing is carried out to audio signal, obtains multiple audio frames;Successively judge whether each of audio signal audio frame includes signal specific;Wherein, signal specific is mapped with specific operation;If judging, the audio frame in audio signal includes signal specific, and controlling terminal device plays execute specific operation while including the audio frame of signal specific.By method and apparatus disclosed above, realizes that mobile phone is vibrated with shot audio while playing shot audio, player is made to possess better game experiencing.

Description

The control method and device of terminal device
Technical field
The present invention relates to the control methods and device of terminal device control field more particularly to a kind of terminal device.
Background technique
It uses with the popularization of intelligent terminals, more and more people carry out recreation, intelligent terminal using intelligent terminal On game become the recreation of people's first choice therewith.
Currently, player can experience game-play enjoyment by audio signal when playing game on intelligent terminal.For example, penetrating It hits in class mobile phone games, player is mobile by control personage and shoots other personages, reaches the mesh raced jointly with other players 's.In game process, player can pass through the shot audio experience that loudspeaker plays to the authenticity of game.
But disadvantage of the prior art is that, in game process, it is only capable of experiencing audio signal and is unable to satisfy player's Game demand, specific operation not corresponding with audio signal in intelligent terminal, cannot allow player to possess better game experiencing.
Summary of the invention
Based on above-mentioned the deficiencies in the prior art, the present invention proposes the control method and device of a kind of terminal device, to realize Audio signal is connected with corresponding specific operation in an intelligent terminal, player is made to possess better game experiencing.
To achieve the goals above, it is proposed that scheme it is as follows:
First aspect present invention discloses a kind of control method of terminal device, comprising:
Obtain audio signal;
Sub-frame processing is carried out to the audio signal, obtains multiple audio frames;
Successively judge whether each of audio signal audio frame includes signal specific;Wherein, the specific letter Number it is mapped with specific operation;
If judging, the audio frame in the audio signal includes the signal specific, and controlling terminal device plays include The specific operation is executed while the audio frame of signal specific.
It is optionally, described successively to judge whether each of audio signal audio frame includes signal specific, comprising:
Judge whether the average value of audio frame to be judged is less than the average value of the former frame of the audio frame to be judged;Judgement Whether the sampled value wait judge the first sampled point in audio frame is greater than the reference sample value of signal specific;It is described wait judge The first sampled point in audio frame is described wait judge the maximum sampled point of the sampled value in audio;And judge the first audio frame Average value whether be greater than the reference average value of signal specific;First audio frame includes the audio frame to be judged, described The front cross frame of the former frame of audio frame to be judged or the audio frame to be judged;
Wherein, if judging, the average value of the audio frame to be judged is less than the flat of the former frame of the audio frame to be judged Mean value, and judge that the sampled value wait judge the first sampled point in audio frame is greater than the reference sample of the signal specific Value;And judge that the average value of first audio frame is greater than the reference average value of the signal specific, then judge described Audio frame to be judged includes the signal specific;
The audio frame to be judged is each of audio signal audio frame.
Optionally, further includes:
Judge whether the combined value of the audio frame to be judged is greater than preset value;The combined value packet of the audio frame to be judged Include the average value of the audio frame to be judged, the average value of the former frame of the audio frame to be judged and the audio to be judged The average value of the front cross frame of frame;
Wherein, if judging, the combined value of the audio frame to be judged is greater than preset value, judges the sound to be judged Frequency frame includes the signal specific.
It is optionally, described to judge the audio frame to be judged comprising after the signal specific, further includes:
Determine the corresponding operation grade of combined value of the audio frame to be judged;Wherein, the audio frame to be judged Combined value is bigger, and corresponding operation stronger grade;
Wherein, the controlling terminal equipment executes the specific operation, comprising: controls the terminal device according to the behaviour Make grade and executes the specific operation.
It is optionally, described to judge the audio frame to be judged comprising after the signal specific, further includes:
Using the audio frame to be judged, the reference of the reference sample value and the signal specific of the signal specific is updated Average value.
Optionally, described that sub-frame processing is carried out to the audio signal, after obtaining multiple audio frames, further includes:
Low-pass filtering treatment is carried out to each described audio frame.
Second aspect of the present invention discloses a kind of control device of terminal device, comprising:
Acquiring unit, for obtaining audio signal;
Framing unit obtains multiple audio frames for carrying out sub-frame processing to the audio signal;
First judging unit, for successively judging whether each of audio signal audio frame includes specific letter Number;Wherein, the signal specific is mapped with specific operation;
Control unit, if judging that the audio frame in the audio signal includes the spy for first judging unit Determine signal, then executes the specific operation while controlling terminal device plays include the audio frame of signal specific.
Optionally, first judging unit, comprising:
First judgment sub-unit, for judging whether the average value of audio frame to be judged is less than the audio frame to be judged The average value of former frame;
Second judgment sub-unit, it is described wait judge whether the sampled value of the first sampled point in audio frame is greater than for judging The reference sample value of signal specific;It is described wait judge the first sampled point in audio frame to be described wait judge the sampled value in audio Maximum sampled point;
Third judgment sub-unit, for judging whether the average value of the first audio frame is greater than the reference of signal specific averagely Value;First audio frame includes the former frame or described wait judge of the audio frame to be judged, the audio frame to be judged The front cross frame of audio frame;
Wherein, if first judgment sub-unit judges the average value of the audio frame to be judged described in being less than wait judge The average value of the former frame of audio frame, and second judgment sub-unit judge it is described wait judge the first sampling in audio frame The sampled value of point is greater than the reference sample value of the signal specific;And the third judgment sub-unit judges first sound The average value of frequency frame is greater than the reference average value of the signal specific, then first judging unit judges the sound to be judged Frequency frame includes the signal specific;
The audio frame to be judged is each of audio signal audio frame.
Optionally, further includes:
Second judgment unit, for judging whether the combined value of the audio frame to be judged is greater than preset value;It is described wait sentence The combined value of disconnected audio frame includes the average value of the former frame of the average value of the audio frame to be judged, the audio frame to be judged And the average value of the front cross frame of the audio frame to be judged;
Wherein, if the second judgment unit judges that the combined value of the audio frame to be judged is greater than preset value, sentence The disconnected audio frame to be judged described out includes the signal specific.
Optionally, further includes:
Determination unit, for determining the corresponding operation grade of combined value of the audio frame to be judged;Wherein, it is described to Judge that the combined value of audio frame is bigger, corresponding operation stronger grade;
Wherein, described control unit controlling terminal equipment executes the specific operation, is used for: controlling the terminal device and press The specific operation is executed according to the operation grade.
It can be seen from the above technical scheme that the control method and device of terminal device provided by the invention are by successively Judge whether each of audio signal audio frame includes signal specific, and if judging the audio frame packet in audio signal Containing signal specific, then specific operation is executed while controlling terminal device plays include the audio frame of signal specific.Wherein, specific Signal is mapped with specific operation.By judging whether audio signal includes signal specific, audio signal is associated with specific operation. During game, player hears can experience specific operation again while sound, and player is made to possess better game experiencing.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of the control method of terminal device disclosed by the embodiments of the present invention;
Fig. 2 is the flow chart of the control method of another terminal device disclosed by the embodiments of the present invention;
Fig. 3 is the flow chart of the control method of another terminal device disclosed by the embodiments of the present invention;
Fig. 4 is a kind of structure chart of the control device of terminal device disclosed by the embodiments of the present invention;
Fig. 5 is the structure chart of the control device of another terminal device disclosed by the embodiments of the present invention;
Fig. 6 is the structure chart of the control device of another terminal device disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The invention proposes a kind of control method of terminal device and devices, while playing shot audio to realize, hand Machine is vibrated with shot audio, and player is made to possess better game experiencing.
Refering to fig. 1, the embodiment of the invention discloses a kind of control methods of terminal device, comprising:
S101, audio signal is obtained.
Audio signal can be the audio of various types of games.Wherein, in shooting game, may comprising shot, voice with And the sound such as background sound.Audio signal can be the voice data stream that the audio file of various formats exports after decoding, should Voice data stream can be the voice data stream of the sampling depth of sample rate and 16bit with 48000Hz.Sample rate and sampling The value of depth is bigger, more accurate to the record of sound.Wherein, the sample rate of 48000Hz is used in professional audio.
S102, sub-frame processing is carried out to audio signal, obtains multiple audio frames.
There are multiple sampled points in audio signal, sub-frame processing is carried out i.e. by N number of sampling in audio signal to audio signal Point is divided into a frame, and N can be equal to 1024, can also be other numerical value certainly.When the sampled point deficiency of ending audio frame is N number of When, zero padding is carried out, it is hereby achieved that multiple audio frames.
S103, successively judge whether each of audio signal audio frame includes signal specific;Wherein, signal specific is reflected Specific operation is penetrated.
It should be noted that signal specific can be reflection there are the audio frame of shot, certain signal specific be can also be There are the audio frames of alternative sounds for reflection.Successively judge whether each of audio signal audio frame includes signal specific, it can To be successively to judge whether each of audio signal audio frame includes reflection there are the audio frame of shot, can also be certainly Successively judge whether each of audio signal audio frame includes that there are the audio frames of alternative sounds for reflection.Wherein, reflection is deposited There is specific operation in the Tone Map of shot, which can be vibration, and certain specific operation can also be other operations.
If S104, judging that the audio frame in audio signal includes signal specific, controlling terminal device plays include spy Determine to execute specific operation while the audio frame of signal.
If judging, the audio frame in audio signal includes reflection there are the audio frame of shot, can also be and judges certainly Audio frame in audio signal includes that there are the audio frames of alternative sounds for reflection, then holds while controlling terminal device plays shot Row vibration, executes other operations while can also be other sound of controlling terminal device plays certainly.Terminal device can be The smart machines such as mobile phone, tablet computer.Wherein it is possible to play shot or other sound by audio frequency power amplifier drive the speaker, together Shi Mada driving chip receives different instructions, can also be that other chips receive different instructions certainly, passes through motor The vibration of driving chip drive motor or other component execute other operations.
Also, the audio frame in audio signal is to play out one by one, while the audio frame in audio signal is also Carry out judging whether to include signal specific one by one, judge that the audio frame in audio signal includes signal specific each time, A specific operation is then executed while playing audio frame.
In the embodiment of the present invention, by successively judging whether each of audio signal audio frame includes signal specific, And if judge that the audio frame in audio signal includes signal specific, controlling terminal device plays include the sound of signal specific Specific operation is executed while frequency frame.Wherein, signal specific is mapped with specific operation.By judging whether audio signal includes spy Determine signal, audio signal is associated with specific operation.During game, player hears can experience spy again while sound Fixed operation, makes player possess better game experiencing.
Optionally, referring to Fig.2, the control method of another kind terminal device disclosed in another embodiment of the present invention, comprising:
S201, audio signal is obtained.
Step S201 is identical as the implementation procedure of the S101 in Fig. 1 and principle, and which is not described herein again.
S202, sub-frame processing is carried out to audio signal, obtains multiple audio frames.
Step S201 is identical as the implementation procedure of the S102 in Fig. 1 and principle, and which is not described herein again.
S203, audio frame to be judged in multiple audio frames is determined;Wherein, audio frame to be judged is in audio signal Each audio frame.
It should be noted that successively determining each audio frame to be judged, and right according to the playing sequence of audio signal The audio frame to be judged determined executes step S204 to step S206.
S204, judge whether the average value of audio frame to be judged is less than the average value of the former frame of audio frame to be judged.
Wherein, each audio frame includes N number of sampled point, and the corresponding sampled value of N number of sampled point, which carries out summation, to be obtained To the sampling and value of the audio frame, the sampling of audio frame and value are subjected to mean value calculation again, being averaged for audio frame can be obtained Value.Therefore, the average value of audio frame refers to: the average value for the corresponding sampled value of multiple sampled points that audio frame includes.
In this step, the average value of audio frame to be judged can be expressed as AVE (n), the former frame of audio frame to be judged Average value is expressed as AVE (n-1).After obtaining multiple audio frames that audio signal includes, successively by the audio frame of front cross frame into Row average value compares, that is, compares AVE (n-1) and AVE (n).If judging AVE (n-1) >=AVE (n), illustrate AVE (0) extremely Not comprising there is signal specific, the corresponding audio frame of AVE (n) is possible to include specific letter the corresponding audio frame of AVE (n-1) Number.Therefore, the average value AVE (n-2) of the front cross frame of audio frame to be judged is recorded, the former frame of audio frame to be judged is averaged The average value AVE (n) of value AVE (n-1) and audio frame to be judged.
It should be noted that the average value of signal specific is other letters that can be greater than in audio signal in audio signal Number, average value substantially belongs to maximum.That is, several audio frames are averaged before and after signal specific in audio signal Value is shown with waveform diagram, is wave crest in this audio frame comprising signal specific.But due to being comparing audio frame by frame The average value of frame can just determine the audio frame only after determining next audio frame of the audio frame after maximum average value Former frame to be practical include signal specific audio frame, but the audio frame has finished, and therefore, can only select wave crest position The next audio frame for the audio frame set is as the audio frame including signal specific.
For example, the average value of a certain audio frame to be judged of audio signal is less than sound to be judged in the game of shooting The average value of the former frame of frequency frame then illustrates that the former frame of audio frame to be judged is the audio frame for actually including shot, wait sentence Disconnected audio frame is a later frame that sound disappears after shot sounds.It can rapidly disappear after being sounded due to shot, disappearance when shows Decline for the energy of audio frame, therefore audio frame to be judged is less than the former frame of audio frame to be judged, can illustrate audio to be judged The former frame of frame is the audio frame for actually including shot.But in audio signal, the interval of two adjacent audio frames is big About 20 milliseconds, human ear is difficult to tell hear gunshots and hear gunshots after 20 milliseconds or so of sound, usually two sound As being a sound.Therefore, using the audio frame to be judged as the audio frame that may include shot.
If judging, the average value of audio frame to be judged is less than the average value of the former frame of audio frame to be judged, executes S205, judge wait judge whether the sampled value of the first sampled point in audio frame is greater than the reference sample value of signal specific.
Wait judge the first sampled point in audio frame for wait judge the maximum sampled point of the sampled value in audio.
Wherein, if judging, the average value AVE (n) of audio frame to be judged is less than being averaged for the former frame of audio frame to be judged Value AVE (n-1), then explanation should audio frame be judged be possible to include signal specific, it is therefore desirable in conjunction with the in the audio frame The sampled value of one sampled point further judges whether audio frame to be judged includes signal specific.Specifically, audio frame to be judged In the sampled value of the first sampled point can be expressed as MAX (n).The reference sample value of signal specific can be expressed as LastMax, LastMax=MAX (x) * X1, MAX (x) is the maximum sampled value for the last time judging the audio frame comprising signal specific, X1It can be with Take 80% or other values.If not judging the audio frame comprising signal specific before, the reference sample value of signal specific LastMax can be zero.
It should also be noted that, it includes therefore signal specific is judging audio frame by frame that audio signal, which may be continual, During whether frame includes signal specific, it is possible to occur judge at least once include signal specific audio frame.Therefore, According to the sampled value of the maximum sampled point of sampled value in the last audio frame comprising signal specific judged, spy is calculated Determine the reference sample value LastMax of signal.
It therefore, will be wait judge the sampled value MAX (n) of the first sampled point in audio frame and the reference sample of signal specific Value LastMax is compared, and is the maximum sampled value of the audio frame including signal specific judged with the last time, come judge to Judge whether audio frame includes signal specific.
If judging, the sampled value wait judge the first sampled point in audio frame is greater than the reference sample value of signal specific, Further illustrate that audio frame to be judged may include signal specific.
If judging, the sampled value wait judge the first sampled point in audio frame is greater than the reference sample value of signal specific, It executes S206, judge whether the average value of the first audio frame is greater than the reference average value of signal specific;First audio frame include to Judge the front cross frame of audio frame, the former frame of audio frame to be judged or audio frame to be judged.
The average value of first audio frame can be expressed as the average value AVE (n) of audio frame to be judged, audio frame to be judged The average value AVE (n-2) of the front cross frame of the average value AVE (n-1) or audio frame to be judged of former frame.The reference of signal specific Average value can be expressed as LastAVE, LastAVE=[AVE (x-1)+AVE (x)]/2*X2, X285% or other values can be taken. AVE (x) is the last average value for judging the audio frame comprising signal specific, and AVE (x-1), which then judges for the last time, includes The average value of the former frame of the audio frame of signal specific.Also, if the audio frame comprising signal specific is not judged before, The reference average value LastMax of signal specific can be zero.
If judging, the average value of the first audio frame is greater than the reference average value of signal specific, thens follow the steps S207, control Terminal device processed executes specific operation while playing audio frame to be judged.
Wherein, if judging, the average value of the first audio frame is greater than the reference average value of signal specific, illustrates wait judge Audio frame includes signal specific, and therefore, controlling terminal device plays audio frame to be judged while executes specific operation.
It should also be noted that, if judging, audio frame to be judged includes signal specific, utilizes audio frame to be judged, more The new reference sample value LastMax of the signal specific and reference average value LastAVE of signal specific;And it returns to step S203 determines next audio frame to be judged of multiple audio frames of audio signal, and to the audio frame to be judged determined Execute step S204 to step S206.
In the present embodiment, in step S204, if judging the average value of audio frame to be judged not less than audio frame to be judged Former frame average value;Or in step S205, judge that the sampled value wait judge the first sampled point in audio frame is little In the reference sample value of signal specific;Or in step S206, judge the average value of the first audio frame no more than signal specific Reference average value, then illustrate that audio frame to be judged then is recorded as invalid sound wait judge not include signal specific in audio frame Frequency frame, i.e., invalid audio frame count INVALIDNUM adds 1, and returns to step S203.
Threshold value is reset when invalid audio frame count INVALIDNUM is greater than, then resets invalid audio frame count The reference average value LastAVE of INVALIDNUM, the reference sample value LastMax of signal specific and signal specific.Reset threshold value It can be set as desired value, it herein can value 5.
It should be noted that step S204, step S205 and step S206, can disclose according to the present embodiment and execute sequence It successively executes, can also execute, or execute in other orders, not illustrate one by one herein side by side.
Step S207 is identical as the implementation procedure of the S104 in Fig. 1 and principle, and which is not described herein again.
Optionally, refering to Fig. 3, the control method of another kind terminal device disclosed in another embodiment of the present invention:
S301, audio signal is obtained.
Step S301 is identical as the implementation procedure of the S101 in Fig. 1 and principle, and which is not described herein again.
S302, sub-frame processing is carried out to audio signal, obtains multiple audio frames.
Step S302 is identical as the implementation procedure of the S102 in Fig. 1 and principle, and which is not described herein again.
S303, low-pass filtering treatment is carried out to each audio frame.
The purpose for carrying out low-pass filtering treatment to each audio frame is to filter out unwanted extra sound, passes through S303 can filter out most of unwanted sound, leave specific sound.It, can since the different corresponding frequencies of sound is different To filter out unwanted sound by the cutoff frequency for setting sound.For example, the main frequency point of shot exists in shooting game 60Hz-200Hz can choose the low-pass filtering that cutoff frequency is 225Hz, filter out most voice and the background in game Sound.Due to having filtered out these sound for including in each sampled point of audio frame on frequency domain, so each in the time domain The sampled value of these sound of each sampled point of a audio frame can decline, and sampled value herein can descend to zero.
Meanwhile it taking absolute value to each sampled point of each audio frame after low-pass filtering treatment, that is, will have Just there is negative sampled value to be all taken as positive value.
S304, audio frame to be judged in multiple audio frames is determined;Wherein, audio frame to be judged is in audio signal Each audio frame.
Step S304 is identical as the implementation procedure of the S203 in Fig. 2 and principle, and which is not described herein again.
S305, judge whether the average value of audio frame to be judged is less than the average value of the former frame of audio frame to be judged.
Step S305 is identical as the implementation procedure of the S204 in Fig. 2 and principle, and which is not described herein again.
If judging, the average value of audio frame to be judged is less than the average value of the former frame of audio frame to be judged, executes S306, judge wait judge whether the sampled value of the first sampled point in audio frame is greater than the reference sample value of signal specific.
Wait judge the first sampled point in audio frame for wait judge the maximum sampled point of the sampled value in audio.
Step S306 is identical as the implementation procedure of the S205 in Fig. 2 and principle, and which is not described herein again.
If judging, the sampled value wait judge the first sampled point in audio frame is greater than the reference sample value of signal specific, It executes S307, judge whether the average value of the first audio frame is greater than the reference average value of signal specific;First audio frame include to Judge the front cross frame of audio frame, the former frame of audio frame to be judged or audio frame to be judged.
Step S307 is identical as the implementation procedure of the S206 in Fig. 2 and principle, and which is not described herein again.
If judge the first audio frame average value be greater than signal specific reference average value, execute S308, judge to Judge whether the combined value of audio frame is greater than preset value;The combined value of audio frame to be judged includes being averaged for audio frame to be judged The average value of the front cross frame of value, the average value of the former frame of audio frame to be judged and audio frame to be judged.
Wherein, the combined value of audio frame to be judged is the average value of the front cross frame of the audio frame to be judged recorded in S305 The average value AVE's (n) of the average value AVE (n-1) and audio frame to be judged of the former frame of AVE (n-2), audio frame to be judged With.The combined value of audio frame to be judged can be expressed as AVESUM, when n >=2 and AVE (n-2) > (AVE (n-1)/4), AVESUM=AVE (n-2)+AVE (n-1)+AVE (n);As n=1, AVESUM=AVE (n-1)+AVE (n).
Wherein, preset value is the threshold value for executing specific operation, and the value can be manually set.For example, in shooting game, Preset value can be set to 2750 or other values, and as AVESUM > 2750, audio frame to be judged includes signal specific.
It should be noted that if judging that audio frame to be judged includes signal specific, then audio frame to be judged is utilized, updated The reference sample value LastMax of the signal specific and reference average value LastAVE of signal specific;And return and execute S304, it determines Next audio frame to be judged of multiple audio frames of audio signal out, and S305 is executed extremely to the audio frame to be judged determined S308。
In the present embodiment, in step S305, if judging the average value of audio frame to be judged not less than audio frame to be judged Former frame average value;Or in step S306, judge that the sampled value wait judge the first sampled point in audio frame is little In the reference sample value of signal specific;Or in step S307, judge the average value of the first audio frame no more than signal specific Reference average value;Or in step S308, judge that the combined value of audio frame to be judged no more than preset value, then illustrates wait sentence Do not include signal specific in disconnected audio frame, then audio frame to be judged is recorded as invalid audio frame, while invalid audio frame count INVALIDNUM adds 1, and returns and execute S304.
Threshold value is reset when invalid audio frame count INVALIDNUM is greater than, then resets invalid audio frame count The reference average value LastAVE of INVALIDNUM, the reference sample value LastMax of signal specific and signal specific.Reset threshold value Can be set as desired value, herein can value 5, can also be other values certainly.
It should be noted that step S305, step S306, step S307 and step S308, it can be according to the present embodiment public affairs It opens execution sequence successively to execute, can also execute, or execute in other orders, not illustrate one by one herein side by side.
If judging, the combined value of audio frame to be judged is greater than preset value, and S309 optionally can also be performed, determine The corresponding operation grade of the combined value of audio frame to be judged;Wherein, the combined value of audio frame to be judged is bigger, corresponding operation etc. Grade is stronger.
Operation grade reflects the implementation dynamics for executing specific operation.Optionally, as an example with shooting game, wait sentence The combined value of disconnected audio frame corresponding operation grade in the section of 2750≤AVESUM < 5000 is the first order;Audio to be judged The combined value of frame corresponding operation grade in the section of 5000≤AVESUM < 10000 is the second level;The group of audio frame to be judged Conjunction value corresponding operation grade in the section of 10000≤AVESUM < 15000 is the third level;The combined value of audio frame to be judged Corresponding operation grade is the fourth stage in the section of 15000≤AVESUM < 20000;The combined value of audio frame to be judged is The corresponding operation grade in AVESUM >=20000 is level V.Operation higher grade, and implementation dynamics is bigger.If audio frame to be judged Combined value AVESUM not within the above range, then corresponding operation grade is zero, and controlling terminal equipment does not execute specific operation.
Specific behaviour is executed according to the operation grade determined while S310, controlling terminal device plays audio frame to be judged Make.
Step S310 is identical as the implementation procedure of the S104 in Fig. 1 and principle, and which is not described herein again.
Refering to Fig. 4, a kind of control device of terminal device of another embodiment of the present invention, comprising:
Acquiring unit 401, for obtaining audio signal.
Audio signal can be the audio of various types of games.Wherein, in shooting game, may comprising shot, voice with And the sound such as background sound.Audio signal can be the voice data stream that the audio file of various formats exports after decoding, should Voice data stream can be the voice data stream of the sampling depth of sample rate and 16bit with 48000Hz.Sample rate and sampling The value of depth is bigger, more accurate to the record of sound.Wherein, the sample rate of 48000Hz is used in professional audio.
Framing unit 402 obtains multiple audio frames for carrying out sub-frame processing to audio signal.
There are multiple sampled points in audio signal, sub-frame processing is carried out i.e. by N number of sampling in audio signal to audio signal Point is divided into a frame, and N can be equal to 1024, can also be other numerical value certainly.When the sampled point deficiency of ending audio frame is N number of When, zero padding is carried out, it is hereby achieved that multiple audio frames.
First judging unit 403, for successively judging whether each of audio signal audio frame includes signal specific; Wherein, signal specific is mapped with specific operation.
It should be noted that signal specific can be reflection there are the audio frame of shot, certain signal specific be can also be There are the audio frames of alternative sounds for reflection.Successively judge whether each of audio signal audio frame includes signal specific, it can To be successively to judge whether each of audio signal audio frame includes reflection there are the audio frame of shot, can also be certainly Successively judge whether each of audio signal audio frame includes that there are the audio frames of alternative sounds for reflection.Wherein, reflection is deposited There is specific operation in the Tone Map of shot, which can be vibration, and certain specific operation can also be other operations.
Control unit 404, if for judging that the audio frame in audio signal includes signal specific, controlling terminal equipment It plays and executes specific operation while including the audio frame of signal specific.
If judging, the audio frame in audio signal includes reflection there are the audio frame of shot, can also be and judges certainly Audio frame in audio signal includes that there are the audio frames of alternative sounds for reflection, then holds while controlling terminal device plays shot Row vibration, executes other operations while can also be other sound of controlling terminal device plays certainly.Terminal device can be The smart machines such as mobile phone, tablet computer.Wherein it is possible to play shot or other sound by audio frequency power amplifier drive the speaker, together Shi Mada driving chip receives different instructions, executes it by the vibration of motor driving chip drive motor or other component He operates.
In the embodiment of the present invention, successively judge that each of audio signal audio frame is by the first judging unit 403 It is no include signal specific, and if the first judging unit 403 judge the audio frame in audio signal include signal specific, control 404 controlling terminal device plays of unit processed execute specific operation while including the audio frame of signal specific.Wherein, signal specific It is mapped with specific operation.By judging whether audio signal includes signal specific, audio signal is associated with specific operation.It is swimming During play, player hears can experience specific operation again while sound, and player is made to possess better game experiencing.
Optionally, refering to Fig. 5, the control device of another kind terminal device disclosed in another embodiment of the present invention, comprising:
Acquiring unit 501, for obtaining audio signal.
The course of work of acquiring unit 501 can be found in the content of the S101 in Fig. 1, and which is not described herein again.
Framing unit 502 obtains multiple audio frames for carrying out sub-frame processing to audio signal.
Framing unit 502 and the course of work can be found in the content of the S102 in Fig. 1.
First judgment sub-unit 503, for judging whether the average value of audio frame to be judged is less than audio frame to be judged The average value of former frame.Wherein, audio frame to be judged is each of audio signal audio frame.
The course of work of first judgment sub-unit 503 can be found in the content of S203 and S204 in Fig. 2, no longer superfluous here It states.
Second judgment sub-unit 504, for judging wait judge whether the sampled value of the first sampled point in audio frame is greater than The reference sample value of signal specific;Wait judge the first sampled point in audio frame to be adopted wait judge that the sampled value in audio is maximum Sampling point.
The course of work of second judgment sub-unit 504 can be found in the content of the S205 in Fig. 2, and which is not described herein again.
Third judgment sub-unit 505, for judge the average value of the first audio frame whether be greater than signal specific reference it is flat Mean value;First audio frame includes audio frame, the former frame of audio frame to be judged or the front cross frame of audio frame to be judged to be judged.
The course of work of third judgment sub-unit 505 can be found in the content of the S206 in Fig. 2, and which is not described herein again.
Wherein, the first judging unit includes: the first judgment sub-unit 503, the second judgment sub-unit 504 and third judgement Unit 505, if the first judgment sub-unit 503 judges that the average value AVE (n) of audio frame to be judged is less than audio frame to be judged The average value AVE (n-1) of former frame, and the second judgment sub-unit 504 is judged wait judge the first sampled point in audio frame Sampled value MAX (n) is greater than the reference sample value LastMax of signal specific;And third judgment sub-unit 505 judges the first sound The average value of frequency frame is greater than the reference average value LastAVE of signal specific, then the first judging unit judges audio frame to be judged Include signal specific.
Control unit 506, if for judging that the audio frame in audio signal includes signal specific, controlling terminal equipment It plays and executes specific operation while including the audio frame of signal specific.
The course of work of control unit 506 can be found in the content of the S104 in Fig. 1, and which is not described herein again.
Optionally, refering to Fig. 6, the control device of another terminal device is disclosed in another embodiment of the invention, Include:
Acquiring unit 601, for obtaining audio signal.
The course of work of acquiring unit 601 can be found in the content of the S101 in Fig. 1, and which is not described herein again.
Framing unit 602 obtains multiple audio frames for carrying out sub-frame processing to audio signal.
The course of work of framing unit 602 can be found in the content of the S102 in Fig. 1, and which is not described herein again.
Low-pass filter unit 603, for carrying out low-pass filtering treatment to each audio frame.
The course of work of low-pass filter unit 603 can be found in the content of the S303 in Fig. 3, and which is not described herein again.
First judgment sub-unit 604, for judging whether the average value of audio frame to be judged is less than audio frame to be judged The average value of former frame.
The course of work of first judgment sub-unit 604 can be found in the content of S203 and S204 in Fig. 2, no longer superfluous here It states.
Second judgment sub-unit 605, for judging wait judge whether the sampled value of the first sampled point in audio frame is greater than The reference sample value of signal specific;Wait judge the first sampled point in audio frame to be adopted wait judge that the sampled value in audio is maximum Sampling point.
The course of work of second judgment sub-unit 605 can be found in the content of the S205 in Fig. 2, and which is not described herein again.
Third judgment sub-unit 606, for judge the average value of the first audio frame whether be greater than signal specific reference it is flat Mean value;First audio frame includes audio frame, the former frame of audio frame to be judged or the front cross frame of audio frame to be judged to be judged.
The course of work of third judgment sub-unit 606 can be found in the content of the S206 in Fig. 2, and which is not described herein again.
Second judgment unit 607, for judging whether the combined value of audio frame to be judged is greater than preset value;Audio to be judged The combined value of frame include the former frame of the average value of audio frame to be judged, audio frame to be judged average value and audio to be judged The average value of the front cross frame of frame.Wherein, if judging, the combined value of audio frame to be judged is greater than preset value, judges wait judge Audio frame includes signal specific.
The course of work of second judgment unit 607 can be found in the content of the S308 in Fig. 3, and which is not described herein again.
Optionally, the control device of terminal device can also include updating unit, if judging, audio frame to be judged includes Signal specific, then updating unit works, and using audio frame to be judged, updates the reference sample value LastMax and spy of signal specific Determine the reference average value LastAVE of signal.
Determination unit 608, the corresponding operation grade of combined value for determining audio frame to be judged;Wherein, wait judge The combined value of audio frame is bigger, and corresponding operation stronger grade.
The course of work of determination unit 608 can be found in the content of the S309 in Fig. 3, and which is not described herein again.
Control unit 609, if judging that the average value AVE (n) of audio frame to be judged is small for the first judgment sub-unit 604 In the average value AVE (n-1) of the former frame of audio frame to be judged;Second judgment sub-unit 605 is judged wait judge in audio frame The first sampled point sampled value MAX (n) be greater than signal specific reference sample value LastMax;Third judgment sub-unit 606 is sentenced The average value of disconnected first audio frame out is greater than the reference average value LastAVE of signal specific and second judgment unit 607 judges The combined value AVESUM of audio frame to be judged is greater than preset value out, then controlling terminal device plays include the audio frame of signal specific While, specific operation is executed according to the operation grade that determination unit 608 determines.
The course of work of control unit 609 can be found in the content of the S310 in Fig. 3, and which is not described herein again.
Professional technician can be realized or using the present invention.Profession of the various modifications to these embodiments to this field It will be apparent for technical staff, the general principles defined herein can not depart from spirit or model of the invention In the case where enclosing, realize in other embodiments.Therefore, the present invention will not be limited to the embodiments shown herein, And it is to fit to the widest scope consistent with the principles and novel features disclosed herein.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.

Claims (10)

1. a kind of control method of terminal device characterized by comprising
Obtain audio signal;
Sub-frame processing is carried out to the audio signal, obtains multiple audio frames;
Successively judge whether each of audio signal audio frame includes signal specific;Wherein, the signal specific is reflected Specific operation is penetrated;
If judging, the audio frame in the audio signal includes the signal specific, and controlling terminal device plays include specific The specific operation is executed while the audio frame of signal.
2. the method according to claim 1, wherein described successively judge each of audio signal sound Whether frequency frame includes signal specific, comprising:
Judge whether the average value of audio frame to be judged is less than the average value of the former frame of the audio frame to be judged;Described in judgement Wait judge whether the sampled value of the first sampled point in audio frame is greater than the reference sample value of signal specific;The audio to be judged The first sampled point in frame is described wait judge the maximum sampled point of the sampled value in audio;And judge the flat of the first audio frame Whether mean value is greater than the reference average value of signal specific;First audio frame includes the audio frame to be judged, described wait sentence The former frame of disconnected audio frame or the front cross frame of the audio frame to be judged;
Wherein, if judging, the average value of the audio frame to be judged is less than being averaged for the former frame of the audio frame to be judged Value, and judge that the sampled value wait judge the first sampled point in audio frame is greater than the reference sample of the signal specific Value;And judge that the average value of first audio frame is greater than the reference average value of the signal specific, then judge described Audio frame to be judged includes the signal specific;
The audio frame to be judged is each of audio signal audio frame.
3. according to the method described in claim 2, it is characterized by further comprising:
Judge whether the combined value of the audio frame to be judged is greater than preset value;The combined value of the audio frame to be judged includes institute State the average value of audio frame to be judged, the average value of the former frame of the audio frame to be judged and the audio frame to be judged The average value of front cross frame;
Wherein, if judging, the combined value of the audio frame to be judged is greater than preset value, judges the audio frame to be judged Include the signal specific.
4. according to the method described in claim 3, it is characterized in that, described judge that the audio frame to be judged includes the spy After determining signal, further includes:
Determine the corresponding operation grade of combined value of the audio frame to be judged;Wherein, the combination of the audio frame to be judged Value is bigger, and corresponding operation stronger grade;
Wherein, the controlling terminal equipment executes the specific operation, comprising: controls the terminal device according to described operation etc. Grade executes the specific operation.
5. according to the method described in claim 2, it is characterized in that, described judge that the audio frame to be judged includes the spy After determining signal, further includes:
Using the audio frame to be judged, the reference for updating the reference sample value and the signal specific of the signal specific is average Value.
6. being obtained the method according to claim 1, wherein described carry out sub-frame processing to the audio signal After multiple audio frames, further includes:
Low-pass filtering treatment is carried out to each described audio frame.
7. a kind of control device of terminal device characterized by comprising
Acquiring unit, for obtaining audio signal;
Framing unit obtains multiple audio frames for carrying out sub-frame processing to the audio signal;
First judging unit, for successively judging whether each of audio signal audio frame includes signal specific;Its In, the signal specific is mapped with specific operation;
Control unit, if judging that the audio frame in the audio signal includes the specific letter for first judging unit Number, then the specific operation is executed while controlling terminal device plays include the audio frame of signal specific.
8. device according to claim 7, which is characterized in that first judging unit, comprising:
First judgment sub-unit, for judging whether the average value of audio frame to be judged is less than the previous of the audio frame to be judged The average value of frame;
Second judgment sub-unit, it is described wait judge it is specific whether the sampled value of the first sampled point in audio frame is greater than for judging The reference sample value of signal;It is described wait judge the first sampled point in audio frame to be described wait judge the maximum of the sampled value in audio Sampled point;
Third judgment sub-unit, for judging whether the average value of the first audio frame is greater than the reference average value of signal specific;Institute Stating the first audio frame includes the audio frame to be judged, the former frame of the audio frame to be judged or the audio frame to be judged Front cross frame;
Wherein, if first judgment sub-unit judges that the average value of the audio frame to be judged is less than the audio to be judged The average value of the former frame of frame, and second judgment sub-unit judge it is described wait judge the first sampled point in audio frame Sampled value is greater than the reference sample value of the signal specific;And the third judgment sub-unit judges first audio frame Average value be greater than the signal specific reference average value, then first judging unit judge described in audio frame to be judged Include the signal specific;
The audio frame to be judged is each of audio signal audio frame.
9. device according to claim 8, which is characterized in that further include:
Second judgment unit, for judging whether the combined value of the audio frame to be judged is greater than preset value;The sound to be judged The combined value of frequency frame include the former frame of the average value of the audio frame to be judged, the audio frame to be judged average value and The average value of the front cross frame of the audio frame to be judged;
Wherein, if the second judgment unit judges that the combined value of the audio frame to be judged is greater than preset value, judge The audio frame to be judged includes the signal specific.
10. device according to claim 9, which is characterized in that further include:
Determination unit, for determining the corresponding operation grade of combined value of the audio frame to be judged;Wherein, described wait judge The combined value of audio frame is bigger, and corresponding operation stronger grade;
Wherein, described control unit controlling terminal equipment executes the specific operation, is used for: controlling the terminal device according to institute It states operation grade and executes the specific operation.
CN201910091740.3A 2019-01-30 2019-01-30 Control method and device of terminal equipment Active CN109771945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910091740.3A CN109771945B (en) 2019-01-30 2019-01-30 Control method and device of terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910091740.3A CN109771945B (en) 2019-01-30 2019-01-30 Control method and device of terminal equipment

Publications (2)

Publication Number Publication Date
CN109771945A true CN109771945A (en) 2019-05-21
CN109771945B CN109771945B (en) 2022-07-08

Family

ID=66503597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910091740.3A Active CN109771945B (en) 2019-01-30 2019-01-30 Control method and device of terminal equipment

Country Status (1)

Country Link
CN (1) CN109771945B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111603776A (en) * 2020-05-21 2020-09-01 上海艾为电子技术股份有限公司 Method for recognizing gunshot in audio data, method for driving motor and related device
CN112657179A (en) * 2020-12-31 2021-04-16 上海艾为电子技术股份有限公司 Motor control method, control system and control chip
CN112803828A (en) * 2020-12-31 2021-05-14 上海艾为电子技术股份有限公司 Motor control method, control system and control chip

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024481A (en) * 2009-09-14 2011-04-20 展讯通信(上海)有限公司 Method and device for extracting vibration information from audio file and vibrating device
CN102044241A (en) * 2009-10-15 2011-05-04 华为技术有限公司 Method and device for tracking background noise in communication system
CN104506114A (en) * 2014-12-15 2015-04-08 青岛海信移动通信技术股份有限公司 Motor control method and device in mobile terminal
CN105833524A (en) * 2016-04-08 2016-08-10 林云帆 Force feedback system and method
CN106803752A (en) * 2016-09-23 2017-06-06 建讯域有限公司 A kind of audio signal processor and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024481A (en) * 2009-09-14 2011-04-20 展讯通信(上海)有限公司 Method and device for extracting vibration information from audio file and vibrating device
CN102044241A (en) * 2009-10-15 2011-05-04 华为技术有限公司 Method and device for tracking background noise in communication system
CN104506114A (en) * 2014-12-15 2015-04-08 青岛海信移动通信技术股份有限公司 Motor control method and device in mobile terminal
CN105833524A (en) * 2016-04-08 2016-08-10 林云帆 Force feedback system and method
CN106803752A (en) * 2016-09-23 2017-06-06 建讯域有限公司 A kind of audio signal processor and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111603776A (en) * 2020-05-21 2020-09-01 上海艾为电子技术股份有限公司 Method for recognizing gunshot in audio data, method for driving motor and related device
CN111603776B (en) * 2020-05-21 2023-09-05 上海艾为电子技术股份有限公司 Method for identifying gunshot in audio data, motor driving method and related device
CN112657179A (en) * 2020-12-31 2021-04-16 上海艾为电子技术股份有限公司 Motor control method, control system and control chip
CN112803828A (en) * 2020-12-31 2021-05-14 上海艾为电子技术股份有限公司 Motor control method, control system and control chip
CN112803828B (en) * 2020-12-31 2023-09-01 上海艾为电子技术股份有限公司 Motor control method, control system and control chip

Also Published As

Publication number Publication date
CN109771945B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN109771945A (en) The control method and device of terminal device
US6805633B2 (en) Gaming machine with automatic sound level adjustment and method therefor
US8204238B2 (en) Systems and methods of sonic communication
CN108159702B (en) Multi-player voice game processing method and device
EP1439507A3 (en) Selectable audio preferences for a gaming machine
CN111798852B (en) Voice wakeup recognition performance test method, device, system and terminal equipment
US10653341B2 (en) Auditory stimulus for auditory rehabilitation
EP1595585A3 (en) Match game processing method, match game system and storage medium thereof
CN105308677A (en) Video gaming system with ultrasonic speakers
CN1703933B (en) Hearing aid, training device, game device, and audio output device
US20130231714A1 (en) Electrode stimulation signal generation in a neural auditory prosthesis
CN104978980A (en) Method for controlling sound playing and sound playing system
CN105843580A (en) Adjustment method and device of vehicle-mounted player volume
CN111603776A (en) Method for recognizing gunshot in audio data, method for driving motor and related device
CN109821246A (en) Motor vibrations method and device, storage medium and electronic equipment
CN106066782B (en) A kind of data processing method and electronic equipment
JP3354508B2 (en) Communication game system
CN113259801B (en) Horn noise reduction method and related device of intelligent earphone
Fasti et al. Equal loudness contours between 100 and 1000 Hz for 30, 50, and 70 phon
CN1606383A (en) Equalizing circuit
CN112803828B (en) Motor control method, control system and control chip
CN111314553B (en) Volume adjusting method, device, terminal and storage medium
CN201294092Y (en) Ear voice noise eliminator
CN112642160A (en) Electronic sports service management system based on big data analysis
JP2005253655A (en) Dementia preventing apparatus and dementia prevention method

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