CN108174028A - A kind of way of recording, device, terminal and computer readable storage medium - Google Patents

A kind of way of recording, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN108174028A
CN108174028A CN201711432995.9A CN201711432995A CN108174028A CN 108174028 A CN108174028 A CN 108174028A CN 201711432995 A CN201711432995 A CN 201711432995A CN 108174028 A CN108174028 A CN 108174028A
Authority
CN
China
Prior art keywords
terminal
processing
earphone
recording
sound
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.)
Pending
Application number
CN201711432995.9A
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.)
Shanghai Spreadrise Technologies Co Ltd
Original Assignee
Shanghai Spreadrise Technologies 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 Spreadrise Technologies Co Ltd filed Critical Shanghai Spreadrise Technologies Co Ltd
Priority to CN201711432995.9A priority Critical patent/CN108174028A/en
Publication of CN108174028A publication Critical patent/CN108174028A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72451User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to schedules, e.g. using calendar applications

Landscapes

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

Abstract

The embodiment of the invention discloses a kind of way of recording, device, terminal and computer readable storage medium, wherein method includes:When terminal connects the sound-recording function opening of earphone and terminal, the initial value of the default counter of setting, and in the button operation inputted on the target button of terminal monitoring to earphone, obtain the object count device value that default counter is obtained in the first preset time inside counting, if the object count device value meets preset first count condition, the first processing is performed to terminal sound-recording function;If the object count device value meets preset second count condition, second processing is performed to terminal sound-recording function.Wherein, the first processing and second processing are to realize the processing of different terminals sound-recording function.Using the embodiment of the present invention, can be recorded by earphone control terminal.

Description

A kind of way of recording, device, terminal and computer readable storage medium
Technical field
The present invention relates to field of computer technology more particularly to a kind of way of recording, device, terminal and computer-readable deposit Storage media.
Background technology
In the current information age, the development of most of terminals increasingly tends to intelligent and facilitation.For example, mobile phone and The portable mobile termianls such as tablet computer, in addition to realize it is basic make a phone call, other than the communication functions such as send short messages, can also be used to record Sound.
Mobile phone is being used when terminals are recorded, if terminal is in screen state of going out, is needing first to wake up screen, and at end Recording application is searched in the menu at end step by step, then opens recording application, starts to record.Similarly, if user wants to close recording, User needs to carry out operation same as described above.Such operation for being turned on and off recording is comparatively laborious, it has not been convenient to which user uses.
Invention content
The embodiment of the present invention provides a kind of way of recording, device, terminal and computer readable storage medium, can pass through ear The sound-recording function of machine control terminal.
In a first aspect, an embodiment of the present invention provides a kind of way of recording, this method includes:
When terminal connects the sound-recording function opening of earphone and terminal, the initial value of default counter is set;
When listening in the button operation inputted on the target button of earphone, default counter is obtained when first is default Between the obtained object count device value of inside counting;
If object count device value meets preset first count condition, the first processing is performed to terminal sound-recording function;
If object count device value meets preset second count condition, second processing is performed to terminal sound-recording function;
Wherein, the first processing and second processing are to realize the processing of different terminals sound-recording function.
Optionally, if object count device value meets preset first count condition, terminal sound-recording function is performed at first Reason, including:
Empty the queue of current pending event;
Generation the first processing event, the first processing event are performed to open recording;
If in the second preset time, object count device value is constant, then reverts to the value of the default counter initially Value, and perform the first processing event.
Optionally, if object count device value meets preset second count condition, terminal sound-recording function is performed at second Reason, including:
Empty the queue of current pending event;
Second processing event is generated, second processing event is performed to close recording;
If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and Perform second processing.
Optionally, the way of recording further includes:If object count device value meets preset third count condition, record to terminal Function performs third processing;
Wherein, third processing be and first processing and the different processing of second processing.
Optionally, if object count device value meets preset third count condition, terminal sound-recording function is performed at third Reason, including:
Empty the queue of current pending event;
Generate third processing event, third processing event be performed be used to implement it is mute;
If in the second preset time, object count device value is constant, then reverts to the value of the default counter described Initial value, and perform the third processing.
Optionally, when terminal connects the sound-recording function opening of earphone and terminal, the initial value of default counter, packet are set It includes:
Judge whether terminal is connected to earphone;
If judging result is connected to earphone for terminal, further judge terminal whether in earphone call mode and terminal Sound-recording function be in an open state;
If so, default counter is set as initial value.
Optionally, when the sound-recording function that terminal connects earphone and terminal is opened, set default counter initial value it Before, method further includes:
Judge whether that terminal opens the function of earphone control recording;If opening, perform and connect earphone and end in terminal When the sound-recording function at end is opened, the step of initial value of default counter is set.
Second aspect, an embodiment of the present invention provides a kind of recording device, which includes:
Setting unit, for when the sound-recording function of device connection earphone and device is opened, setting the first of default counter Initial value;
Acquiring unit, for when listening in the button operation inputted on the target button of earphone, obtaining default count The object count device value that device is obtained in the first preset time inside counting;
Execution unit if meeting preset first count condition for object count device value, performs device sound-recording function First processing;
Execution unit if being additionally operable to object count device value meets preset second count condition, is held device sound-recording function Row second processing;
Wherein, the first processing and second processing are to realize the processing of different terminals sound-recording function.
Optionally, if execution unit meets preset first count condition for object count device value, work(of recording to device The concrete mode that the first processing can be performed is:
Empty current pending processing queue;
Generation the first processing event, the first processing event are performed to open recording;
If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and Perform the first processing event.
Optionally, if execution unit meets preset second count condition for object count device value, work(of recording to device The concrete mode that second processing can be performed is:
Empty current pending processing queue;
Second processing event is generated, second processing event is performed to close recording;
If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and Perform second processing.
Optionally, it if execution unit is additionally operable to object count device value and meets preset third count condition, records to device Function performs third processing;Wherein, third processing be and first processing and the different processing of second processing.
Optionally, if execution unit meets preset third count condition for object count device value, work(of recording to device The concrete mode that third is handled, which can be performed, is:
Empty current pending processing queue;
Generate third processing event, third processing event be performed be used to implement it is mute;
If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and Perform third processing.
Optionally, setting unit is specifically used for:
Judge whether terminal is connected to earphone;
If judging result is connected to earphone for terminal, further judge terminal whether in earphone call mode and terminal Sound-recording function be in an open state;
If so, default counter is set as initial value.
Optionally, device further includes judging unit, and the function of earphone control recording whether is opened for judgment means;If It opens, setting unit performs the initial value for when device connects the sound-recording function opening of earphone and device, setting default counter The step of.
The third aspect, an embodiment of the present invention provides a kind of terminals, including processor and memory, processor and memory It is connected with each other, wherein, for memory for storing the computer program that terminal is supported to perform the above method, computer program includes journey Sequence instructs, and processor is configured for caller instruction, the method for performing above-mentioned first aspect.
Fourth aspect, an embodiment of the present invention provides a kind of computer readable storage medium, computer readable storage mediums Computer program is stored with, computer program includes program instruction, and program instruction performs processor when being executed by a processor The method of above-mentioned first aspect.
The embodiment of the present invention sets the initial of default counter when terminal connects the sound-recording function opening of earphone and terminal Value, and the button operation of monitoring headpone.When having input button operation on the target button for listening to earphone, obtain pre- first If presetting the object count device value of counter in the time, when the object count device value meets the first count condition, perform to end Hold the first processing of sound-recording function;When the object count device value meets the second technical conditions, perform to terminal sound-recording function Second processing can pass through earphone control terminal sound-recording function.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for ability For the those of ordinary skill of domain, without having to pay creative labor, others are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is a kind of schematic flow diagram of way of recording provided in an embodiment of the present invention;
Fig. 2 is the schematic flow diagram of another way of recording provided in an embodiment of the present invention;
Fig. 3 is the schematic flow diagram of another way of recording provided in an embodiment of the present invention;
Fig. 4 is a kind of structure diagram of recording device provided in an embodiment of the present invention;
Fig. 5 is a kind of structure diagram of terminal provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without making creative work Example, shall fall within the protection scope of the present invention.
It is a kind of schematic flow diagram of way of recording provided in an embodiment of the present invention referring to Fig. 1, recording as shown in Figure 1 Method may include:
101st, terminal sets the initial value of default counter when earphone is used to be conversed.
When terminal detects that terminal is connected to earphone, and terminal is conversed using earphone, terminal can be pre-designed Number device setting initial value.Wherein, terminal can connect earphone by wired mode, can also wirelessly connect earphone, The initial value can be equal to 0 either according to terminal or the needs of user, which may be set to be other numerical value.
102nd, whether button operation is had input on the target button of terminal monitoring earphone.
On the earphone being connect with terminal can there are one or multiple buttons, such as at present common earphone it is usual there are one Button, three buttons, two buttons etc..If the earphone being connect with terminal is the earphone there are one button, terminal The button is given tacit consent to for target button;If the earphone being connect with terminal be there are two or three buttons earphone, terminal can Preset a target button, the button operation on the terminal monitoring target button.Wherein, button operation can include long-press Button, short-press button etc..
If the 103, having input button operation on terminal monitoring to the target button of earphone, the value of default counter is added 1.
Specifically, terminal is often listened to when having input button operation on the target button of earphone, all by nonce counter Value plus 1.For example, if it is assumed that it is 0 that terminal, which presets the initial value of counter, if terminal monitoring is to button operation, terminal The initial value of default counter is added 1, so current default Counter Value is 1.If terminal listens to earphone again at this moment Button operation is had input on target button, then terminal adds the value of current preset counter (value of current preset counter is 1) Upper 1, using obtained result as the value of current preset counter, i.e. the value of current preset counter is 2.
104th, terminal obtains the value of nonce counter, according to the value of nonce counter, determines terminal-pair earphone calling record The processing of execution.
Wherein, the processing that terminal-pair earphone calling record performs includes:It opens calling record, close calling record and mute Current talking etc..Terminal can pre-set the processing that the value of at least one set of default counter is performed with terminal-pair earphone calling record Correspondence, for example terminal can be pre-set when the value of default counter is equal to 1, the current talking of corresponding mute terminal; When the value of default counter is equal to 2, the corresponding calling record for opening present terminal call;When the value of default counter is more than etc. When 3, the corresponding calling record for closing present terminal call.
105th, terminal is judged in preset time, if has new earphone keystroke operation, if not having, terminal performs The processing that determining terminal-pair earphone calling record performs, and present counter value is reverted into initial value;If in preset time It is interior, there is new earphone keystroke operation, then terminal repeats step 103-105.
Terminal sets a preset time, it is assumed that the preset time can be 300ms, in the preset time, if eventually When end listens to no earphone keystroke operation, terminal then performs the place that the above-mentioned terminal-pair earphone calling record having determined performs Reason.If in preset time, terminal monitoring is to there is new button operation, then terminal will repeat step 103-105, i.e., eventually The value of current preset counter is added 1 value as new current preset counter by end, true according to the value of new default counter Determine the operation of terminal-pair earphone calling record execution, terminal performs the operation.
Fig. 1 is a kind of embodiment flow diagram of way of recording described above, for reference to understand above-described embodiment Middle scheme.
It is the schematic flow diagram of another way of recording provided in an embodiment of the present invention referring to Fig. 2, record as shown in Figure 2 Sound method may include:
201st, when terminal connects the sound-recording function opening of earphone and terminal, the initial value of default counter is set.
Wherein, terminal can be the portable mobile termianls such as mobile phone, tablet computer, and earphone can be wired earphone, also may be used Think bluetooth headset.Optionally, the connection mode of wired earphone and terminal can be that earphone will be inserted by the earphone interface of terminal Enter, bluetooth headset can complete the connection with terminal by being matched with terminal Bluetooth.Optionally, the default counter of terminal setting Initial value can be any numerical value according to terminal or the demand of user, for example the initial value of the usually default counter of setting is 0 or can be other any numbers.
Optionally, after terminal connection earphone, if detecting, terminal is in earphone call mode and the sound-recording function of terminal is beaten When opening, the initial value of default counter is set.That is, when terminal has connected earphone and the sound-recording function opening of terminal, If detecting, terminal is in earphone call mode, i.e., when terminal is used earphone and is made a phone call, terminal setting is pre-designed The initial value of number device, in order to which terminal performs step 202-204.Terminal can so be realized when earphone is used to make a phone call, led to Cross during making a phone call by key control on earphone and record to dialog context, close recording or it is mute wait operation, facilitate User opens recording when earphone is used to converse when talking about important content, and recording is closed when talking about insignificant content, simplifies The triviality of terminal call recording operation.
Optionally, when the sound-recording function that terminal connects earphone and terminal is opened, set default counter initial value it Before, judge whether that terminal opens the function of earphone control recording;If opening, the record that earphone and terminal are connected in terminal is performed When sound function is opened, the step of initial value of default counter is set.Optionally, if terminal is not turned on earphone control recording Function, then terminal can not perform the operation of the initial value of the default counter of setting, power consumption of terminal can be saved.
202nd, when listening in the button operation inputted on the target button of earphone, it is pre- first to obtain default counter If the object count device value that time inside counting obtains.
Wherein, button operation can be long-press button, short-press button.Optionally, button is normal on the earphone being connect with terminal That sees can be there are three types of situation:There are one there are two there are three buttons on button and earphone on button, earphone on earphone.Its In, the button of earphone has different functions under application scenarios, and if terminal is when making a phone call, button, which can be realized, to be answered or hang up Etc. functions;For another example for terminal when music is played, button can realize that pause plays, plays a upper head and play next Function, but in existing technology, the button of earphone is not carried out control sound-recording function.
Optionally, if there are one buttons on the earphone being connect with terminal, terminal can be using the button as target button;If On the earphone being connect with terminal there are two or during multiple buttons, terminal can preset a target button.Specifically, terminal The button operation inputted on the target button of earphone can be monitored, if terminal monitoring on the target button of earphone to there is button behaviour When making, the object count device value that default counter is obtained in the first preset time inside counting is obtained.That is, terminal can be advance Set first preset time, in first preset time, the button operation on the target button of terminal monitoring earphone.Such as There is button operation on fruit terminal monitoring to the target button of earphone, then default counter initial value can be added 1 by terminal, until First preset time terminates, using the value that current preset counter stored count obtains as object count device value.
If the 203, object count device value meets preset first count condition, the first processing is performed to terminal sound-recording function.
Wherein, terminal sound-recording function may include opening recording, close recording and mute etc..Optionally, terminal preset One count condition can be that object count device value is equal to or more than some default value, such as terminal preset first counts item Part can be that object count device value is equal to 1 or object count device value is more than or equal to 3.The present embodiment is only enumerated Possible situation does not limit specific implementation situation.
Optionally, if object count device value meets preset first count condition, terminal sound-recording function is performed at first Reason includes:Empty current pending processing queue;Generation the first processing event, the first processing event are performed to open Open recording;If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and Perform the first processing event.Optionally, the first processing event, which is performed, can be used for closing recording or realize mute.
If the 204, object count device value meets preset second count condition, second processing is performed to terminal sound-recording function.
Wherein, the first processing is to realize the processing of different terminals sound-recording function with second processing.For example, the first processing can be real Existing terminal opens the processing of recording, and it can be to realize eventually that second processing, which can realize that terminal closes the processing of recording or the first processing, The processing of recording is closed at end, and it is to realize that second processing, which is to realize the processing of terminal unlatching recording or can also be the first processing, The processing of terminal mute, second processing are to realize that terminal opens processing of recording etc., this implementation only enumerates some possible feelings Condition realizes that the concrete function of recording does not limit for the first processing terminal corresponding with second processing.
Optionally, if object count device value meets preset second count condition, terminal sound-recording function is performed at second Reason, including:Empty current pending processing queue;Second processing event is generated, second processing event is performed to close Close recording;If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and Perform second processing.Optionally, which, which is performed, can also be used for opening recording or realize mute.
For step 203 and step 204 in other words, terminal can pre-set multiple count conditions and meet each meter During said conditions, processing that terminal-pair sound-recording function can perform, such as:Terminal can pre-set the first count condition as object count When device value is equal to 1, the first processing that terminal can perform is mute to realize;When second count condition is equal to 2 for object count device value, The second processing that terminal can perform is recorded to open;Or first count condition for object count device value be more than or equal to 3 when, terminal Executable first processing can also set the second count condition to be equal to 4,5 for Counter Value or appoint to close recording etc., terminal When what is counted, the second processing that terminal can perform is mute etc. to realize.The pre-set count condition of terminal and and count condition The processing of corresponding terminal-pair sound-recording function can there are many, more than some possibilities for only enumerating in embodiment, for Specific setting does not limit.After terminal gets the object count device that pre-designed rolling counters forward obtains, by the object count Device value is compared with the preset each count condition of terminal, which preset count condition which meets, and terminal is just Perform the corresponding terminal sound-recording function of which count condition.
Optionally, the way of recording shown in Fig. 2 further includes:If object count device value meets preset third count condition, Third processing is performed to terminal sound-recording function;Wherein, third processing be and first processing and the different processing of second processing.Example Such as, it will be assumed that the processing for opening recording is realized in the first processing for terminal, and second processing realizes the processing for closing recording for terminal, the Three processing can be that terminal realizes that mute processing or the first processing can be that terminal realizes mute processing, and second processing can be Terminal opens the processing of recording, and third processing can be that terminal realizes the processing for closing recording.
For the embodiment of the present invention when terminal connects the sound-recording function opening of earphone and terminal, terminal is that default counter is set Initial value, and it is pre- first to obtain preset timer in the button operation of the target key-press input on listening to earphone for terminal If the object count device value that time inside counting obtains.Terminal counts item by judging that the object count device value meets preset first Part or preset second count condition determine to perform terminal sound-recording function the first processing or second processing, can realize and pass through The sound-recording function of earphone control terminal.
It is the schematic flow diagram of another way of recording provided in an embodiment of the present invention with reference to figure 3, recording as shown in Figure 3 Method may include:
301st, judge whether terminal opens the function of earphone control recording.
Optionally, if terminal opens the function of earphone control recording, terminal can perform step 302-308;If terminal The function of earphone control recording is not turned on, then terminal can not perform step 302-308, it is ensured that reasonable distribution terminal work( Consumption saves power consumption of terminal expense.
As an example it is assumed that terminal be not turned on earphone control recording function, terminal perform step 302-308 it Afterwards, the sound-recording function of terminal is not carried out, then terminal wastes the power consumption for performing step 302-308, and may result in use Family false judgment terminal cisco unity malfunction, influences experience of the user to terminal;If terminal before step 302-308 is performed, Judge that terminal opens the function of earphone control recording, then can ensure that terminal controls the function of realizing terminal by earphone, simplify Terminal recording operation.
If the 302, opening, judge whether terminal is connected to earphone.
If the 303, terminal is connected to earphone, further judge whether terminal is in the recording of earphone call mode and terminal Function is in an open state.
304th, if so, default counter is set as initial value by terminal.
Optionally, if terminal opens the function of earphone control recording, terminal can further judge whether terminal is in The earphone call mode and sound-recording function of terminal is in an open state, if so, the value of default counter is set as initial by terminal Value;If judging, terminal is not in earphone call mode or the sound-recording function of terminal is not switched on, and terminal can be not provided with pre-designed The initial value of number device, it is ensured that terminal avoids consuming extra power consumption.
Optionally, the execution sequence of step 301 and step 302-304 are unrestricted, that is to say, that terminal can first carry out step Rapid 302-304, then perform step 301, when ensureing that terminal meets the condition of step 301 and step 302-304, terminal performs step again Rapid 305-308.I.e. terminal can first judge whether that terminal is connected to earphone, when terminal is connected to earphone, if further judged Terminal is in earphone call mode and when terminal sound-recording function is in an open state, and terminal judges whether to open earphone control recording Function.If opening, terminal can perform step 305-308;If not opening, terminal can not perform step 305-308.
305th, when listening in the button operation inputted on the target button of earphone, it is pre- first to obtain default counter If the object count device value that time inside counting obtains.
Optionally, the target button of earphone can be that terminal is preset or terminal is given tacit consent to.Such as earphone There are one upper during button, terminal gives tacit consent to the button for target button or if on earphone during three buttons, and terminal acquiescence can Other buttons that the button of acquiescence earphone pause is target button or terminal can be preset on earphone are target button.
Specifically, terminal can preset the first preset time, the target button of earphone is obtained in the first preset time The button operation of upper input, it is ensured that the object count device value that terminal is finally got is that user wants input.In other words It says, if terminal is not provided with preset time, the button operation of target key-press input often listened on earphone just immediately obtains this When the obtained value of pre-designed rolling counters forward as object count device value, it is further to perform step 306-308, may result in end What end performed is not that user wants to the processing of terminal sound-recording function, influences experience of the user to terminal.
As an example it is assumed that terminal connects earphone and the sound-recording function of terminal is opened, the first of counter is preset in terminal setting Initial value can be 0.If terminal pre-sets the first preset time, which can be 300ms, it is assumed that terminal exists It is 3 times that the button operation number that earphone inputs on target button is listened in 300ms, it will be assumed that in 3 button operations, is had For 2 times the button operation that user continuously inputs, be for 1 time user the 50ms buttons that have been delayed (or the other times that can be delayed, The delay time is less than 300ms), then the value that pre-designed rolling counters forward obtains in the first preset time at this time should be 3, terminal Using 3 as object count device value.It is further to perform step 306-308, it is assumed that object count device value meets preset third for 3 Count condition, the terminal sound-recording function that terminal can perform are recorded to close.In the example above, if terminal is not provided in advance First preset time 300ms can then lead to terminal after listening to continuous key-press of the earphone on target button and operating 2 times, The object count device value that 2 are counted to get at this time as default counter, further terminal can perform step 306-308, false If object count device value meets preset second count condition for 2, the terminal sound-recording function that terminal can perform is mute to realize.Such as This can cause, and the sound-recording function that user's original idea wants terminal execution is recorded to close, but it is default to be not provided with first in terminal In the case of time, then terminal performs terminal recording mute function, is not the closing recording that user wants.
If the 306, object count device value meets preset first count condition, the first processing is performed to terminal sound-recording function.
Optionally, if object count device value meets preset first count condition, terminal sound-recording function is performed at first Reason includes:Empty current pending processing queue;Generation the first processing event, the first processing event are performed to open Recording;If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and hold Row first handles event.
If the 307, object count device value meets preset second count condition, second processing is performed to terminal sound-recording function.
Optionally, if object count device value meets preset second count condition, terminal sound-recording function is performed at second Reason includes:Empty current pending processing queue;Second processing event is generated, second processing event is performed to close Recording;If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and hold Row second processing.
If the 308, object count device value meets preset third count condition, third processing is performed to terminal sound-recording function.
Optionally, if object count device value meets preset third count condition, terminal sound-recording function is performed at third Reason, including:Empty current pending processing queue;Third processing event is generated, third processing event is performed for real It is existing mute;If in the second preset time, object count device value is constant, then it is initial value to restore default counter, and performs the Three processing.
Specifically, terminal empties current pending processing queue in step 306-308:In terminal earphone control recording Before, there are other other pending processing in possible terminal, if therefore terminal to judge that the object count device value meets preset During the first count condition, terminal first empties current pending processing queue or terminal can also reduce it is current pending The priority handled in processing queue ensures that terminal first carries out some processing of earphone control terminal sound-recording function.
Specifically, the first processing of terminal generation event, generation second processing event or generation third in step 306-308 Event handling:Terminal meets preset first count condition, the second count condition or third meter according to the object count device value Said conditions generate processing event corresponding with count condition.Wherein, can be that terminal is advance with count condition alignment processing event Setting, for example, terminal can be preset, and the first processing event corresponding with the first count condition can be to open record Sound, second processing event corresponding with the second count condition can be to close recording, at third corresponding with third count condition Director's part can be mute.The embodiment of the present invention only enumerates some possible correspondences, count condition and processing event tool Body correspondence does not limit.
Specifically, in step 306-308 in the second preset time, object count device value is constant, then restores default and count Device is initial value, and performs the first processing, second processing or third processing:Terminal perform first processing, second processing or Before third processing, terminal is delayed the second preset time, so as to terminal judge in second preset time whether object count Device value changes namely whether the new button for the target key-press input that terminal is listened in the second preset time on earphone is grasped Make.If there is new button operation, may illustrate terminal user want to change before terminal by the terminal sound-recording function of execution, then Terminal needs to re-execute step 305-308;If without new button operation, that is, illustrate at terminal will perform first Either third processing wants the then terminal of terminal execution for user and performs the first processing, second processing or for reason, second processing Three processing.Meanwhile the value of default counter is reverted to initial value by terminal.Wherein, the second preset time can be that terminal is advance Setting, which can be identical with the first preset time, can also be different from the first preset time.
If the embodiment of the present invention detects that terminal opens the function of earphone control recording, earphone and terminal are connected in terminal When being opened in earphone call mode and the sound-recording function of terminal, the initial value of the default counter of terminal setting.If it listens to The button operation inputted on the target button of earphone, terminal then obtain default Counter Value arriving in the first preset time inside counting Object count device value, and meet the first count condition, the second count condition or third count condition in the object count device value When, perform to the first of terminal sound-recording function the processing, second processing or third processing, can when terminal carries out earphone call, Calling record is controlled by earphone, recording operation when simplifying call.
A kind of computer readable storage medium is additionally provided in an embodiment of the present invention, and computer readable storage medium is deposited Computer program is contained, computer program includes program instruction, realized when program instruction is executed by processor:
Connect earphone and sound-recording function open when, the initial value of default counter is set;
When listening in the button operation inputted on the target button of earphone, default counter is obtained when first is default Between the obtained object count device value of inside counting;
If object count device value meets preset first count condition, the first processing is performed to sound-recording function;
If object count device value meets preset second count condition, second processing is performed to sound-recording function;
Wherein, the first processing and the processing that second processing is the function of realizing different recording.
Optionally, if object count device value meets preset first count condition, the first processing, journey are performed to sound-recording function Sequence instruction implements when being executed by processor:
Empty the queue of current pending event;
Generation the first processing event, the first processing event are performed to open recording;
If in the second preset time, object count device value is constant, then it is initial value, and perform to restore default Counter Value First processing event.
Optionally, if object count device value meets preset second count condition, second processing, journey are performed to sound-recording function Sequence instruction implements when being executed by processor:
Empty the queue of current pending event;
Second processing event is generated, which is performed to close recording;
If in the second preset time, object count device value is constant, then it is initial value to reply default counter, and performs the Two processing events.
Optionally, it is also realized when program instruction is executed by processor:It is counted if object count device value meets preset third Condition performs sound-recording function third processing;
Wherein, third processing be and first processing and the different processing of second processing.
Optionally, if object count device value meets preset third count condition, third processing, journey are performed to sound-recording function Sequence instruction implements when being executed by processor:
Empty the queue of current pending event;
Generate third processing event, the third processing event be performed be used to implement it is mute;
If in the second preset time, object count device value is constant, then it is initial value to restore default counter, and performs the Three processing events.
Optionally, when connecting earphone and sound-recording function is opened, the initial value of default counter is set, program instruction is located Reason device implements when performing:
Judge whether to be connected to earphone;
If judging result to be connected to earphone, further determine whether in earphone call mode and sound-recording function be Opening state;
If so, default counter is set as initial value.
Optionally, when connecting earphone and sound-recording function is opened, before the initial value that default counter is set, program instruction It is implemented when being executed by processor:
It is determined whether to enable the functions of earphone control recording;
If opening, the step of performing when connecting earphone and sound-recording function is opened, the initial value of default counter be set.
In the specific implementation, the program stored in computer readable storage medium described in the embodiment of the present invention can perform Realization method described in Fig. 2 and Fig. 3 of the way of recording provided in an embodiment of the present invention, details are not described herein.
It is a kind of schematic block diagram of recording device provided in an embodiment of the present invention referring to Fig. 4.Device packet as shown in Figure 4 It includes:Setting unit 401, acquiring unit 402 and execution unit 403.
Setting unit 401, for when the sound-recording function of device connection earphone and device is opened, setting default counter Initial value;
Acquiring unit 402, for when listening in the button operation inputted on the target button of earphone, obtaining pre-designed The object count device value that number device is obtained in the first preset time inside counting;
Execution unit 403 if meeting preset first count condition for object count device value, is held device sound-recording function Row first is handled;
Execution unit 403, if being additionally operable to object count device value meets preset second count condition, to device sound-recording function Perform second processing;
Wherein, the first processing and the processing that second processing is the function of realizing different recording.
Optionally, it if execution unit 403 meets preset first count condition for object count device value, records to device Function performs the first concrete mode handled:
Empty current pending processing queue;
Generation the first processing event, the first processing event are performed to open recording;
If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and Perform the first processing event.
Optionally, it if execution unit 403 meets preset second count condition for object count device value, records to device Function perform second processing concrete mode be:
Empty current pending processing queue;
Second processing event is generated, second processing event is performed to close recording;
If in the second preset time, object count device value is constant, then the value of default counter is reverted to initial value, and Perform second processing.
Optionally, which further includes:If object count device value meets preset third count condition, device is recorded Sound function performs third processing;Wherein, third processing be and first processing and the different processing of second processing.
Optionally, it if execution unit 403 meets preset third count condition for object count device value, records to device Function performs the concrete mode that third is handled:
Empty current pending processing queue;
Generate third processing event, third processing event be performed be used to implement it is mute;
If in the second preset time, object count device value is constant, then it is initial value to restore default counter, and performs the Three processing.Wherein, the second preset time can be identical with the first preset time, can also be different from the first preset time.
Optionally, setting unit 401 is specifically used for judging whether terminal is connected to earphone;If judging result is connected for terminal Earphone then further judges whether terminal is in earphone call mode and the sound-recording function of terminal is in an open state;It if so, will Default counter is set as initial value.
Optionally, recording device further includes judging unit 404, and earphone control recording whether is opened for judgment means Function;If opening, setting unit is performed when device connects the sound-recording function opening of earphone and device, sets default counter The step of initial value.
For setting unit of the embodiment of the present invention 401 when device connects the sound-recording function opening of earphone and device, setting is default The initial value of counter, acquiring unit 402 obtain pre-designed in the button operation of the target key-press input on listening to earphone The object count device value that number device is obtained in the first preset time inside counting.Execution unit 403 is by judging the object count device value Meet preset first count condition or preset second count condition, determine to perform device sound-recording function the first processing or the Two processing, can realize the sound-recording function by earphone control device.
It is a kind of terminal schematic block diagram provided in an embodiment of the present invention referring to Fig. 5.In the present embodiment as shown in Figure 5 Terminal can include:One or more processors 501 and memory 502.Above-mentioned processor 501 and memory 502 pass through bus 503 connections.Memory 502 is for storing computer program, and computer program includes program instruction, and processor 501 is used to perform The program instruction that memory 502 stores.Wherein, processor 501 is configured for caller instruction execution:
Connect earphone and sound-recording function open when, the initial value of default counter is set;
When listening in the button operation inputted on the target button of earphone, default counter is obtained when first is default Between the obtained object count device value of inside counting;
If object count device value meets preset first count condition, the first processing is performed to sound-recording function;
If object count device value meets preset second count condition, second processing is performed to sound-recording function;
Wherein, the first processing and second processing are to realize the processing of different terminals sound-recording function.
Optionally, if object count device value meets preset first count condition, the first processing, place are performed to sound-recording function Device 501 is managed specifically to perform:
Empty the queue of current pending event;
Generation the first processing event, the first processing event are performed to open recording;
If in the second preset time, object count device value is constant, then it is initial value, and perform to restore default Counter Value First processing event.
Optionally, if object count device value meets preset second count condition, second processing, place are performed to sound-recording function Device 501 is managed specifically to perform:
Empty the queue of current pending event;
Second processing event is generated, which is performed to close recording;
If in the second preset time, object count device value is constant, then it is initial value to reply default counter, and performs the Two processing events.
Optionally, processor 501 also performs:If object count device value meets preset third count condition, to work(of recording Third processing can be performed;
Wherein, third processing be and first processing and the different processing of second processing.
Optionally, if object count device value meets preset third count condition, third processing, place are performed to sound-recording function Device 501 is managed specifically to perform:
Empty the queue of current pending event;
Generate third processing event, the third processing event be performed be used to implement it is mute;
If in the second preset time, object count device value is constant, then it is initial value to restore default counter, and performs the Three processing events.
Optionally, when connecting earphone and sound-recording function is opened, the initial value of default counter is set, processor 501 has Body performs:
Judge whether terminal is connected to earphone;
If judging result is connected to earphone for terminal, further judge terminal whether in earphone call mode and terminal Sound-recording function be in an open state;
If so, default counter is set as initial value.
Optionally, when connecting earphone and sound-recording function is opened, before the initial value that default counter is set, processor 501 specific execution:
Judge whether that terminal opens the function of earphone control recording;
If opening, the step of performing when connecting earphone and sound-recording function is opened, the initial value of default counter be set.
It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at It can also be any conventional processor etc. to manage device.
The memory 502 can include read-only memory and random access memory, and to processor 501 provide instruction and Data.The a part of of memory 502 can also include nonvolatile RAM.For example, memory 502 can also be deposited Store up the information of device type.
In the specific implementation, the processor 501 described in the embodiment of the present invention can perform record provided in an embodiment of the present invention It is real also to can perform the described recording devices of Fig. 4 of the embodiment of the present invention for realization method described in Fig. 2 and Fig. 3 of sound method Existing mode, details are not described herein.
More than, only some embodiments of the invention, but protection scope of the present invention is not limited thereto, in above-mentioned reality The various equivalent modifications or substitutions expected on the basis of example are applied, should be covered by the protection scope of the present invention.

Claims (10)

1. a kind of way of recording, which is characterized in that including:
When terminal connects the sound-recording function opening of earphone and terminal, the initial value of default counter is set;
When listening in the button operation inputted on the target button of earphone, the default counter is obtained when first is default Between the obtained object count device value of inside counting;
If the object count device value meets preset first count condition, the first processing is performed to the terminal sound-recording function;
If the object count device value meets preset second count condition, second processing is performed to the terminal sound-recording function;
Wherein, first processing and the processing that the second processing is the different terminal sound-recording functions of realization.
2. if according to the method described in claim 1, it is characterized in that, the object count device value meets preset first Count condition performs the terminal sound-recording function the first processing, including:
Empty current pending processing queue;
Generation the first processing event, the first processing event are performed to open recording;
If in the second preset time, the object count device value is constant, then reverts to the value of the default counter described Initial value, and perform the first processing event.
3. if according to the method described in claim 1, it is characterized in that, the object count device value meets preset second Count condition performs second processing to the terminal sound-recording function, including:
Empty current pending processing queue;
Second processing event is generated, the second processing event is performed to close recording;
If in the second preset time, the object count device value is constant, then reverts to the value of the default counter described Initial value, and perform the second processing.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
If the object count device value meets preset third count condition, third processing is performed to the terminal sound-recording function;
Wherein, third processing is and the described first processing and the different processing of the second processing.
5. if according to the method described in claim 4, it is characterized in that, the object count device value meets preset third Count condition performs the terminal sound-recording function third processing, including:
Empty current pending processing queue;
Generate third processing event, third processing event be performed be used to implement it is mute;
If in the second preset time, the object count device value is constant, then reverts to the value of the default counter described Initial value, and perform the third processing.
6. according to the method described in claim 1, it is characterized in that, the sound-recording function that earphone and terminal are connected in terminal is beaten When opening, the initial value of default counter is set, including:
Judge whether terminal is connected to earphone;
If judging result is connected to earphone for the terminal, further judge the terminal whether in earphone call mode and The sound-recording function of the terminal is in an open state;
If so, default counter is set as initial value.
7. according to the method described in claim 1, it is characterized in that, described connect earphone and the sound-recording function quilt of terminal in terminal During opening, before the initial value for setting default counter, the method further includes:
Judge whether that terminal opens the function of earphone control recording;
If opening, described in execution when terminal connects the sound-recording function opening of earphone and terminal, set and preset the first of counter The step of initial value.
8. a kind of recording device, which is characterized in that including:
Setting unit, for when the sound-recording function of the earphone interface of device insertion earphone and device is opened, setting to be pre-designed The initial value of number device;
Acquiring unit, for when listening in the button operation inputted on the target button of earphone, obtaining the default counting The object count device value that device is obtained in the first preset time inside counting;
Execution unit, if meeting preset first count condition for the object count device value, to the terminal sound-recording function Perform the first processing;
The execution unit if being additionally operable to the object count device value meets preset second count condition, is recorded the terminal Sound function performs second processing;
Wherein, first processing and the processing that the second processing is the different terminal sound-recording functions of realization.
9. a kind of terminal, which is characterized in that including processor and memory, the processor and the memory are connected with each other, Wherein, the memory is for storing computer program, and the computer program includes program instruction, and the processor is configured For described program to be called to instruct, such as claim 1-7 any one of them methods are performed.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program include program instruction, and described program instruction makes the processor perform such as when being executed by a processor Claim 1-7 any one of them methods.
CN201711432995.9A 2017-12-26 2017-12-26 A kind of way of recording, device, terminal and computer readable storage medium Pending CN108174028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711432995.9A CN108174028A (en) 2017-12-26 2017-12-26 A kind of way of recording, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711432995.9A CN108174028A (en) 2017-12-26 2017-12-26 A kind of way of recording, device, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN108174028A true CN108174028A (en) 2018-06-15

Family

ID=62521106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711432995.9A Pending CN108174028A (en) 2017-12-26 2017-12-26 A kind of way of recording, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108174028A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112533081A (en) * 2019-09-19 2021-03-19 成都鼎桥通信技术有限公司 Recording processing method, recording processing device and recording medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333652A (en) * 2014-09-26 2015-02-04 广州酷狗计算机科技有限公司 Operation execution method and device
CN105100361A (en) * 2015-09-16 2015-11-25 广东欧珀移动通信有限公司 Mobile terminal recording method and device
CN105577863A (en) * 2016-01-20 2016-05-11 广东欧珀移动通信有限公司 Sound recording method and apparatus
CN106303047A (en) * 2016-08-19 2017-01-04 成都中科创达软件有限公司 Method, device and the mobile device that a kind of mobile device is quickly recorded

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333652A (en) * 2014-09-26 2015-02-04 广州酷狗计算机科技有限公司 Operation execution method and device
CN105100361A (en) * 2015-09-16 2015-11-25 广东欧珀移动通信有限公司 Mobile terminal recording method and device
CN105577863A (en) * 2016-01-20 2016-05-11 广东欧珀移动通信有限公司 Sound recording method and apparatus
CN106303047A (en) * 2016-08-19 2017-01-04 成都中科创达软件有限公司 Method, device and the mobile device that a kind of mobile device is quickly recorded

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112533081A (en) * 2019-09-19 2021-03-19 成都鼎桥通信技术有限公司 Recording processing method, recording processing device and recording medium

Similar Documents

Publication Publication Date Title
US8909199B2 (en) Voicemail systems and methods
US8553856B2 (en) Voicemail systems and methods
CN104571498B (en) A kind of application program launching method
CN105912226A (en) Method and apparatus for displaying pages in application
US11445285B2 (en) Interactive control method and device of an earphone case, earphone case and storage medium
CN110324748A (en) A kind of wireless headset serial ports control method, device and wireless headset and storage medium
CN103838577A (en) Breaking news processing method and terminal
KR101094015B1 (en) Voicemail systems and methods
CN104333641B (en) Call method and device
CN106101427A (en) A kind of mobile terminal and the method for preventing error operation of call thereof
CN104301486A (en) Electronic equipment and conversation control method
CN109814798A (en) Ear returns function control method, device and mobile terminal
CN106657647A (en) Incoming call processing method and device and mobile terminal
CN106713592B (en) A kind of way of recording and mobile terminal of mobile terminal
CN108174028A (en) A kind of way of recording, device, terminal and computer readable storage medium
US20080167010A1 (en) Voicemail Systems and Methods
CN105573471A (en) Information processing method and device
CN107995645A (en) Method for connecting network, mobile terminal and computer-readable recording medium
CN105392087B (en) A kind of speaker management method and user terminal
US20080167011A1 (en) Voicemail Systems and Methods
US20080167009A1 (en) Voicemail Systems and Methods
US20080167012A1 (en) Voicemail systems and methods
AU2012201411B2 (en) Voicemail systems and methods
CN115119098A (en) Audio playing control method, TWS earphone and storage medium
CN107968829A (en) Communication means and communication equipment

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180615

RJ01 Rejection of invention patent application after publication