CN106354470A - Key prompt tone processing method and system and terminal equipment - Google Patents

Key prompt tone processing method and system and terminal equipment Download PDF

Info

Publication number
CN106354470A
CN106354470A CN201610778749.8A CN201610778749A CN106354470A CN 106354470 A CN106354470 A CN 106354470A CN 201610778749 A CN201610778749 A CN 201610778749A CN 106354470 A CN106354470 A CN 106354470A
Authority
CN
China
Prior art keywords
volume
volume value
key
sound type
prompting voice
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
CN201610778749.8A
Other languages
Chinese (zh)
Other versions
CN106354470B (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.)
Yuanxin Information Technology Group Co ltd
Original Assignee
Yuanxin Technology
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 Yuanxin Technology filed Critical Yuanxin Technology
Priority to CN201610778749.8A priority Critical patent/CN106354470B/en
Publication of CN106354470A publication Critical patent/CN106354470A/en
Application granted granted Critical
Publication of CN106354470B publication Critical patent/CN106354470B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/23Construction or mounting of dials or of equivalent devices; Means for facilitating the use thereof
    • H04M1/236Construction or mounting of dials or of equivalent devices; Means for facilitating the use thereof including keys on side or rear faces

Abstract

The disclosure relates to a key prompt tone processing method, a system and a terminal device. The key prompt tone processing method is applied to a terminal device, the terminal device is provided with a volume key, and the method comprises the following steps: pre-establishing a storage module, wherein the storage module is used for storing the sound type of the terminal equipment and the volume value of the corresponding sound type, and the sound type at least comprises a key prompt tone; when a first trigger signal for pressing a volume key is received, calling a first function to obtain the current sound type of the terminal equipment; calling a second function to obtain the volume value of the current sound type from the storage module; setting the volume value of the current sound type as the volume value of the key prompt tone and storing the volume value; starting a thread to read the volume value of the key prompt tone, and playing a prompt tone according to the volume value of the key prompt tone. The method can realize that the user can intuitively feel the adjusted volume while adjusting the volume.

Description

Button prompting voice handling method, system and terminal unit
Technical field
The present invention relates to communication technical field, in particular to a kind of button prompting voice handling method, system and terminal Equipment.
Background technology
With the extensive application of mobile terminal, people increasingly be unable to do without mobile phone, computer in daily work and life Deng mobile terminal.In the epoch of smart mobile phone, the function increasingly hommization of mobile phone.The regulation of corresponding volume, is that people are frequent One of function of using.User can adjust volume by the volume key of mobile phone, then by the volume bar of display on screen Lai Judge the size of volume.But this mode has one disadvantage in that, user is unable to direct feel to the size of adjusted volume.
Accordingly, it would be desirable to a kind of new button prompting voice handling method, system and terminal unit.
Disclosed in described background section, above- mentioned information is only used for strengthening the understanding of background of this disclosure, therefore it Can include not constituting the information to prior art known to persons of ordinary skill in the art.
Content of the invention
The present invention provides a kind of button prompting voice handling method, system and terminal unit, is capable of mobile terminal and is adjusting While section volume, playing alert tones, the size of prompt tone is exactly the size of the adjusted volume of user, and such user can be directly perceived Experience the size of adjusted volume.
Other characteristics of the present invention and advantage will be apparent from by detailed description below, or partially by the present invention Practice and acquistion.
According to an aspect of this disclosure, provide a kind of button prompting voice handling method, be applied to a terminal unit, described Terminal unit has a volume key, comprising: pre-build a memory module, and described memory module is used for storing described terminal unit The sound type having and the volume value of corresponding sound type, wherein said sound type at least includes a key prompting voice;When Receive when pressing the first trigger of described volume key, call a first function to obtain the current sound of described terminal unit Type;A second function is called to obtain the volume value of described current sound type from described memory module;By described current sound The volume value of sound type is set to the volume value of described key prompting voice and preserves;Start a thread and read described key prompting voice Volume value, the size of the volume value according to described key prompting voice plays a prompt tone.
In a kind of exemplary embodiment of the disclosure, described memory module is a data base.
In a kind of exemplary embodiment of the disclosure, the volume value of described current sound type is set to described button The volume value of prompt tone includes: the volume value of described current sound type is stored in as the volume value of described key prompting voice hashmap;After the Preset Time of interval, the volume Value Data in described hashmap is write in described data base.
In a kind of exemplary embodiment of the disclosure, described thread is the thread of playing alert tones, described in described startup The volume value that thread reads described key prompting voice includes: described thread reads described key prompting voice from described hashmap Volume value.
In a kind of exemplary embodiment of the disclosure, methods described also includes: presses described volume key when receiving During the second trigger, described second function is called to adjust the volume value of described current sound type;Meanwhile, after according to adjustment The volume value of described current sound type, the volume value adjusting described key prompting voice is so that the sound of described current sound type Value is consistent with the volume value of described key prompting voice.
In a kind of exemplary embodiment of the disclosure, it is described that methods described sends the message to realization using synchronous dbus The interprocess communication of method.
In a kind of exemplary embodiment of the disclosure, also include: while playing described prompt tone, described terminal sets One volume bar is shown on standby display screen, described volume bar is used for indicating the size of the volume value of described current sound type.
According to an aspect of this disclosure, provide a kind of key prompting voice processing system, be applied to a terminal unit, described Terminal unit has a volume key, comprising: a memory module, for storing the sound type that described terminal unit has and corresponding The volume value of sound type, wherein said sound type at least includes a key prompting voice;First calling module, for when reception To press described volume key the first trigger when, call one first function obtain described terminal unit current sound class Type;Second calling module, for calling a second function to obtain the volume of described current sound type from described memory module Value;Setup module, for being set to the volume value of described key prompting voice and preserving the volume value of described current sound type; Playing alert tones module, reads the volume value of described key prompting voice, according to described key prompting voice for starting a thread The size of volume value plays a prompt tone.
In a kind of exemplary embodiment of the disclosure, described volume key includes: one first volume key, for according to pressing Number of times is incremented by the volume value of described current sound type;And one second volume key, for working as described in being successively decreased according to compression number The volume value of front sound type.
In a kind of exemplary embodiment of the disclosure, described memory module is a data base, and described setup module includes: One hashmap, for storing the volume value of described current sound type and being set to the volume value of described key prompting voice; Writing module, after being spaced Preset Time, the volume Value Data in described hashmap is write in described data base.
According to an aspect of this disclosure, provide a kind of terminal unit, described terminal unit has a volume key, comprising: Processor;For storing the memorizer of processor executable;Wherein, described processor is configured to: pre-builds that one deposits Storage module, described memory module is used for storing the volume value of the sound type that described terminal unit has and corresponding sound type, Wherein said sound type at least includes a key prompting voice;When receiving the first trigger pressing described volume key, A first function is called to obtain the current sound type of described terminal unit;A second function is called to obtain from described memory module Obtain the volume value of described current sound type;The volume value of described current sound type is set to the sound of described key prompting voice Value simultaneously preserves;Start the volume value that a thread reads described key prompting voice, the volume value according to described key prompting voice Size plays a prompt tone.
According to the button prompting voice handling method of the present invention, system and terminal unit, volume key is pressed by user and adjusts Playing alert tones during volume, thus allow user can direct feel to adjusted volume size.
In addition, the present invention send the message to realize the present invention also by synchronous dbus so that handling process simpler and The problem of volume adjusting failure being led to due to message blocking will not occur.
In further embodiments, the present invention is also by the volume value of hashmap unloading current sound type, such that it is able to Save system resource, it is to avoid continually read and write data base.
It should be appreciated that above general description and detailed description hereinafter are only exemplary, can not be limited this Invention.
Brief description
Describe its example embodiment by referring to accompanying drawing in detail, above and other target of the present invention, feature and advantage will Become more fully apparent.
Fig. 1 is a kind of flow chart of the button prompting voice handling method according to illustrative embodiments.
Fig. 2 is the flow chart of another kind of button prompting voice handling method according to illustrative embodiments.
Fig. 3 is a kind of block diagram of the key prompting voice processing system according to illustrative embodiments.
Fig. 4 is a kind of mobile end for realizing button prompting voice handling method according to illustrative embodiments The block diagram at end.
Specific embodiment
It is described more fully with example embodiment referring now to accompanying drawing.However, example embodiment can be with multiple shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, these embodiments are provided so that the present invention will more Fully and completely, and by the design of example embodiment comprehensively convey to those skilled in the art.Accompanying drawing is only the present invention Schematic illustrations, be not necessarily drawn to scale.In figure identical reference represents same or similar part, thus Repetition thereof will be omitted.
Additionally, described feature, structure or characteristic can combine in one or more enforcements in any suitable manner In mode.In the following description, many details are provided thus being given, embodiments of the present invention to be fully understood.So And, it will be appreciated by persons skilled in the art that technical scheme can be put into practice and omit one of described specific detail Or more, or other methods, constituent element, device, step etc. can be adopted.In other cases, it is not shown in detail or describe Known features, method, device, realization or operation with avoid that a presumptuous guest usurps the role of the host and so that each aspect of the present invention thickens.
Fig. 1 is a kind of flow chart of the button prompting voice handling method according to illustrative embodiments.
As shown in figure 1, this button prompting voice handling method, it is applied to a terminal unit, described terminal unit has a sound Amount key, comprises the following steps.
In the exemplary embodiment, described terminal unit can be that smart mobile phone, panel computer, notebook computer etc. are any There is the electronic equipment of volume adjusting demand.The following examples all illustrate taking smart mobile phone as a example.
In the exemplary embodiment, described volume key can be the physical button of a physics, for example, be generally disposed at intelligence The volume key of mobile phone side.In some other embodiment, described volume key can also be virtual key.The present invention does not make to this Limit, correspondingly, " pressing " here may be considered click action when being directed to virtual key, regardless of the concrete shape of volume key Formula, user operation mode, as long as the operation being capable of triggering regulation volume belongs within protection scope of the present invention.
Step s110, pre-builds a memory module, and described memory module is used for storing the sound that described terminal unit has Sound type and the volume value of corresponding sound type, wherein said sound type at least includes a key prompting voice.
In the exemplary embodiment, described memory module is a data base.Certainly, in other embodiments, using any The data base to replace the present invention for the storage form.
Various roles (role) have been pre-defined, for identifying the type of sound, such as smart mobile phone in system , ringtone (sound of telephone bell), notification (sound of system prompt), media (mobile phone can be defined The sound of music), system (sound of system), phone (sound of voice call), alarm (sound of alarm of mobile phone), Keytone (sound of volume key) etc..The sound being currently played corresponds to ative role, identifies sound using keytone The sound of amount key.It should be noted that the sound type of the present invention is not limited to these species exemplified as above and its name, tool The sound type that body has independently can be arranged according to the type of terminal unit.
System has the data base for storing the corresponding volume of alternative sounds type, supports the corresponding volume of various role The operation such as increase, delete, changing, looking into.
For example, as follows with the corresponding volume form of the various role of database purchase:
sink-input-by-media-role:ringtone xxx
sink-input-by-media-role:alarm xxx
Above-mentioned two is the storage form (xxx represents volume value) in data base for the volume of ringtone and alarm.
In system, the sound of each type all can specify a role, and the corresponding role of volume key is keytone, plays The thread of prompt tone can go to read the volume value of keytone.
In the exemplary embodiment, when user's pressing volume key, if mobile phone does not now play any sound (for example During cell phone standby), can arrange acquiescence active role is ringing sound of cell phone, now can adjust the volume of the tinkle of bells by volume key.When So it is also possible to the other role of setting is acquiescence active role.
Step s120, when receiving the first trigger pressing described volume key, calls a first function to obtain institute State the current sound type of terminal unit.
In the exemplary embodiment, described first function can be getactiverole ().Certainly, the invention is not restricted to This, specifically call which kind of function can change according to the change of the system being adopted, and works as long as being capable of the present invention and obtaining The function of front sound type belongs within protection scope of the present invention.
When user presses described volume key first time, this key-press event can be reported by the driving of kernel (kernel), is System process (system-main) receives this key-press event, calls the regulation that audio manager (audiomanager) externally provides The interface of volume, such as adjustvolume () adjust volume.
First pass through the current sound type (active role) that getactiverole () obtains described terminal unit, now Ignore keytone.Because when playing, active role is keytone to prompt tone, at this moment presses volume key again, can adjust The volume of keytone, such as you prepare to adjust the volume of the tinkle of bells, would not adjust the sound of the tinkle of bells in key prompting voice playing process again Amount, so ignore keytone.
Describe how system-main obtains active role in detail below taking some specific functions as a example.But this Bright it is not limited.
Simply introduce the several modules being related to: finger daemon pacd (pulseaudio control daemon) first, Audiomanager is interacted with pulseaudio by calling the interface of pacd;System audio services (pulseaudio), is sound The control core of frequency, pulseaudio stores volume by nemo module;Nemo is the mould for realizing various volume storages Block.
Getactiverole () function does not have parameter, belongs to the interface that audiomanager externally provides, by system- Main calls, for obtaining current active role.It implements and comprises the following steps.
First pass through and call pa_controller_get_active_role (pa_controller_st* Controller) function obtains current active role.Wherein pa_controller_get_active_role () function The interface of pacd offer is provided, is called by dbus by audiomanager.Parameter controller is a structure pointer, knot The variable of active role is preserved inside structure body.
Then, by call context_get_sink_input_info_callback (pa_pdispatch*pd, Uint32_t command, uint32_t tag, pa_tagstruct*t, void*userdata) function acquisition sink input Various information, including active role.Context_get_sink_input_info_callback () function belongs to The interface that pulseaudio provides, is called by pacd, mainly utilizes pa_tagstruct*t, pa_tagstruct is for sending The structure of data, there is the variable for preserving active role the inside.
Then, pa_controller_sink_input_callback (pa_context*pa_ctx, const are called Pa_sink_input_info*info, int eol, void*userdata) function.pa_controller_sink_input_ Callback () function is the call back function of a registration in pacd, as above-mentioned context_get_sink_input_ Info_callback () function obtains sink input information (including active role) in pulseaudio, can adjust back This function pa_controller_sink_input_callback (), the structure preserving the information of active role is passed to pacd.Wherein, mainly use pa_sink_input_info*info parameter, in structure, have the letter of active role Breath.
Finally, active role information can be passed to by audiomanager by dbus, audiomanager with The form of the return value of getactiverole () function is to system-main.So far system-main obtains active The information of role.
Step s130, calls a second function to obtain the volume value of described current sound type from described memory module.
In the exemplary embodiment, described second function be adjustvolume (const am_role_type role, Am_adjust_direction direction), for adjusting the volume of current sound type.Wherein parameter direction can For representing the upper lower key of volume key, such as 0 is used for representing key (incremental volume value), and 1 is used for representing lower key (volume of successively decreasing Value).Parameter role is exactly the return value being obtained by above-mentioned getactiverole () function.Adjustvolume () belongs to The interface that audiomanager externally provides, is called by system-main.Current by calling adjustvolume () to obtain The volume value of active role, and this volume is arranged keytone.
Step s140, the volume value of described current sound type is set to the volume value of described key prompting voice and protects Deposit.
In the exemplary embodiment, when first time pressing volume key, current active role, Ran Houcong can be obtained Read the volume value of active role in data base, and this volume is stored in data base as the volume of keytone.
In the exemplary embodiment, step s140 may comprise steps of further.
Step s141, the volume value of described current sound type is stored in as the volume value of described key prompting voice hashmap.
Step s142, after the Preset Time of interval, the volume Value Data in described hashmap is write described data base In.
In the exemplary embodiment, methods described sends the message to using synchronous dbus to realize between the process of methods described Communication.
In the embodiment of the present invention, audiomanager is interacted with pacd and is realized by dbus message, Audiomanager and pacd, not in a process, needs to communicate by dbus.
For example can be accomplished by:
Build message structure first to call long-range method:
Msg=
dbus_message_new_method_call(am_pa_controller_server,
am_pa_controller_dbus_path,
am_pa_controller_dbus_interface,
am_pa_controller_dbus_method_get_volume);
Then, variable is added in message:
dbus_message_append_args(msg,dbus_type_string,&param,dbus_type_ invalid)
Then, it is connected to system bus daemon, because message will be sent in bus daemon, bus daemon Search the bus name of target, message be sent to target process:
Bus=dbus_bus_get (dbus_bus_system, &err)
Then, send message, block to wait and reply:
Ret_msg=dbus_connection_send_with_reply_and_block (bus, msg, -1, &err)
Then, obtain effective information from the message replied:
dbus_message_get_args(ret_msg,&err,dbus_type_uint32,&volume,dbus_ type_invalid)
By the way of synchronization, dbus can block the response waiting remote object to the embodiment of the present invention, in the message of reply The information wanted can be comprised.And asynchronous system will not be blocked, need oneself to realize call back function process to process the message of far-end. The reply reliability that far-end can be received using the method for synchronization is higher than asynchronous system.
Dbus is a kind of low latency, low overhead, (inter-process communication, enters the ipc of high availability Communicate between journey) mechanism.The present invention be by dbus send the message to realize, than adopt message processing facility and multiple process Between communicate, flow process is more simple.Because message processing facility is asynchronous, a kind of risk will be implied, when system process is a certain There occurs obstruction during individual message, now press volume key, the volume that on interface, volume bar shows has no problem, but the sound of reality Amount does not but change, and the volume of same prompt tone also will not change, and the present invention would not have this to ask using synchronous dbus Topic.
In the exemplary embodiment, also include: while playing described prompt tone, the display screen of described terminal unit Upper display one volume bar, described volume bar is used for indicating the size of the volume value of described current sound type.
Similar, describe in detail below taking some specific functions as a example the volume value how obtaining active role and How the volume value of active role to be realized being assigned to keytone by way of hashmap intermediate storage again unloading 's.But the present invention is not limited.
First pass through call int pa_controller_get_volume (pa_controller_st*controller, Const char*role_name) function obtain specify role current volume.Wherein parameter controller is that structure refers to Pin, has the variable preserving volume in structure.Parameter role_name is the role name specifying.pa_ext_stream_ Restore_read () function belongs to the interface that pacd is supplied to audiomanager.
Then, pa_operation*pa_ext_stream_restore_read (pa_context*c, pa_ext_ are called Stream_restore_read_cb_t cb, void*userdata) function, it is a registered callbacks function, belongs to The interface of pulseaudio.When obtaining the volume of role, call this registered callbacks function, disappear additionally by sending out to nemo module The mode of breath, obtains volume value.Wherein parameter pa_ext_stream_restore_read_cb_t cb is the readjustment letter of registration Number.
Then, extension_cb (pa_native_protocol*p, pa_module*m, pa_native_ are called Connection*c, uint32_t tag, pa_tagstruct*t) function, it belongs to the interface of nemo offer, for volume Read-write.This function receives the message that pulseaudio sends, and searches corresponding volume in hashmap according to role name, carries out Read-write operation.Pulseaudio module can be sent to after reading volume.Wherein parameter pa_tagstruct*t is to carry data Structure, inside has the variable preserving volume.
Then, call pa_controller_ext_stream_restore_read_callback (pa_context* Pa_ctx, const pa_ext_stream_restore_info*info, void*userdata) function, this function belongs to The call back function of pacd registration.After pulseaudio obtains volume, this function can be adjusted back, preserve the sound obtaining from pulseaudio Amount.Wherein parameter pa_ext_stream_restore_info*info is used for preserving the volume obtaining from pulseaudio.Obtain Volume be sent to audiomanager eventually through dbus, audiomanager calculates volume index value, returns to System-main, system-main are used for showing current volume on screen.
Here volume index value could be arranged to 0~10 integer value, volume value could be arranged to 0~65535 whole Numerical value, can mutually convert between the two.
Then, pa_controller_set_volume (pa_controller_st*controller, const are called Char*role_name, int volume) function, this function belongs to the interface of pacd offer, is called by audiomanager, uses In setting volume.Wherein parameter role_name represents role name to be adjusted, and parameter volume represents volume value to be adjusted.
Then, above-mentioned pa_ext_stream_restore_read () function and extension_cb () function are called, By way of to nemo module messaging, obtain volume value.Recall above-mentioned pa_controller_ext_stream_ The volume that the preservation of restore_read_callback () function obtains from pulseaudio.
Then, call pa_controller_operate_static_volume_callback (pa_context*pa_ Ctx, const pa_ext_stream_restore_info*info, int eol, void*userdata) function, this function genus The interface providing in pacd, for by role name and volume in pa_ext_stream_restore_info structure It is placed in another structure, then call pa_ext_stream_restore_write () function to write volume Hashmap stores.Wherein have in parameter pa_ext_stream_restore_info*info structure role name and Volume information.
Wherein pa_operation*pa_ext_stream_restore_write (pa_context*c, pa_update_ mode_t mode,const pa_ext_stream_restore_info data[],unsignedn,int apply_ Immediately, pa_context_success_cb_t cb, void*userdata) function belong to pulseaudio offer Interface, is used for sending data to nemo module, the volume data that will adjust is sent to nemo module stores.Wherein parameter There are role name and volume information in pa_ext_stream_restore_info data [] structure.
The present embodiment obtains the volume value of active role first, and this volume is stored in as the volume of keytone Hashmap, reads during reading from hashmap again, interval Preset Time (such as 5 seconds, but invention is not limited) again will afterwards Data in hashmap is write in data base, so can reduce the number of times of read-write data base, saves system resource.
For example, it is assumed that in 5s, user has continuously pressed 5 volume keys, if directly by active will role volume Value is written in data base it is necessary to write 5 secondary data in data base, simultaneously during playing alert tones, needs to read 5 from data base Secondary data;And if by the way of the middle unloading of hashmap, often press a volume key and all can write data into hashmap In (with respect to writing data base, occupying system resources very little, can ignore), write from hashmap once to data after 5s Storehouse is such that it is able to save system resource.
Hashmap, the realization of the map interface based on Hash table.This realizes providing all optional map operations, and allows Using null value and null key.This realizes supposing that element is suitably distributed between each bucket hash function, can be basic operation (get and put) provides stable performance.Hashmap is the data structure that a kind of lightweight realizes data storage function, and read-write accounts for Little with system resource.
Step s150, starts the volume value that a thread reads described key prompting voice, according to the sound of described key prompting voice The size of value plays a prompt tone.
Start thread and remove playing alert tones, the volume value of keytone, playing alert tones in reading database.
In the exemplary embodiment, step s150 may include that described thread reads described button from described hashmap The volume value of prompt tone.
In the exemplary embodiment, methods described also includes: when the second trigger receiving the described volume key of pressing When, call described second function to adjust the volume value of described current sound type;Meanwhile, according to the described current sound after adjustment The volume value of type, the volume value adjusting described key prompting voice is so that the volume value of described current sound type is pressed with described The volume value of key prompt tone is consistent.
When user presses volume key for the second time, call the sound of the current active role of adjustvolume () adjustment Amount index value, adjusts the volume value of keytone in pacd simultaneously, consistent with the volume value of active role.
When persistently pressing volume up or down key, volume increases or reduces a grade, by the current active after change The volume of role and keytone is stored in data base or hashmap.Thread reads from data base or hashmap The volume value of keytone, with this volume come playing alert tones.So user just can intuitively experience the size of volume.
Fig. 2 is the flow chart of another kind of button prompting voice handling method according to illustrative embodiments.
As shown in Fig. 2 this button prompting voice handling method, it is applied to a terminal unit, described terminal unit has a sound Amount key, comprises the following steps.
Step s210, judges whether user presses described volume key.When receiving the trigger pressing described volume key When, enter next step;Conversely, continuing to judge whether user presses described volume key.
Step s220, obtains current active role.
Step s230, obtains the volume value of active role from data base.
Step s240, this volume value is stored in hashmap as the volume value of keytone.
Step s250, starts the volume value that thread reads keytone from hashmap.
Step s260, according to the volume value playing alert tones of keytone.
Step s270, shows the volume bar of active role on the display screen of this terminal unit.
Step s280, judges whether to reach Preset Time;After reaching described Preset Time, enter next step;Conversely, continuing Continue and judge whether to reach described Preset Time.
Step s290, by the data write into Databasce in hashmap.
When pressing volume key, current active role can be obtained, from data base, then obtain active role's Volume value, and this volume is stored in hashmap as the volume of keytone.Start thread area playing alert tones, read The volume of keytone in hashmap, arranges in prompt tone, and the size of prompt tone is exactly the size of the adjusted volume of user.
Other guide in the embodiment of the present invention, referring to above-described embodiment, will not be described here.
Fig. 3 is a kind of block diagram of the key prompting voice processing system according to illustrative embodiments.
According to illustrative embodiments of the disclosure, a kind of key prompting voice processing system 100 can be applicable to a terminal Equipment, described terminal unit has a volume key.This system 100 mays include: a memory module 310, for storing described terminal Sound type and the volume value of corresponding sound type that equipment has, wherein said sound type at least includes a button prompting Sound;First calling module 320, for when receiving the first trigger pressing described volume key, calling a first function Obtain the current sound type of described terminal unit;Second calling module 330, is used for calling a second function from described storage mould The volume value of described current sound type is obtained in block;Setup module 340, for setting the volume value of described current sound type It is set to the volume value of described key prompting voice and preserve;Playing alert tones module 350, reads described button for starting a thread The volume value of prompt tone, the size of the volume value according to described key prompting voice plays a prompt tone.
In the exemplary embodiment, described volume key includes: one first volume key, described in being incremented by according to compression number The volume value of current sound type;And one second volume key, for being successively decreased described current sound type according to compression number Volume value.
In the exemplary embodiment, described memory module 310 is a data base, and described setup module 340 includes: one Hashmap, for storing the volume value of described current sound type and being set to the volume value of described key prompting voice;Write Enter module, after being spaced Preset Time, the volume Value Data in described hashmap is write in described data base.
Following for present system embodiment, can be used for executing the inventive method embodiment.Real for present system Apply the details not disclosed in example, refer to the inventive method embodiment.
According to illustrative embodiments of the disclosure, provide a kind of terminal unit, described terminal unit has a volume Key, comprising: processor;For storing the memorizer of processor executable;Wherein, described processor is configured to: in advance Set up a memory module, described memory module is used for storing the sound type that described terminal unit has and corresponding sound type Volume value, wherein said sound type at least includes a key prompting voice;When the first triggering receiving the described volume key of pressing During signal, a first function is called to obtain the current sound type of described terminal unit;Call a second function from described storage The volume value of described current sound type is obtained in module;The volume value of described current sound type is set to described button carry Show the volume value of sound and preserve;Start the volume value that a thread reads described key prompting voice, according to described key prompting voice The size of volume value plays a prompt tone.
Fig. 4 is a kind of mobile end for realizing button prompting voice handling method according to illustrative embodiments The block diagram at end.
Fig. 4 schematically shows the common structure of described mobile terminal, with reference to the inside to common mobile terminal for the Fig. 4 Assembly, software and protocol architecture illustrate.
This mobile terminal has processor 410, and it is responsible for the integrated operation of mobile terminal, and can utilize any business CPU, digital signal processor or any other electronic programmable logic device can be obtained realize.Processor 410 has The memorizer 420 of association, this memorizer 420 includes but is not limited to ram memorizer, rom memorizer, eeprom memorizer, flash memory Or a combination thereof.Memorizer 420 controls for numerous purposes by processor 400, and one of them is as various soft in mobile terminal Part storage program instruction and data.
The software view of this mobile terminal includes real time operating system 440, the driver for man machine interface 460, application Datatron 450 and various application.Described application is, for example, text editor 451, handwriting recognition application 452 and various other many matchmakers Body application 453, typically this other multimedia application include such as audio call application, video call application, send and receive Short Message Service (sms) messages application, multimedia information service (mms) application or e-mail applications, web browser, immediately Information receiving and transmitting application, book applications, calendar application, control panel application, camera application, one or more video-game, Notepad appli-cation etc..It should be noted that two or more of above-mentioned application can execute as same application.
Described mobile terminal also includes one or more hardware controls, for together with the driver of man machine interface 460 With display device 461, (such as speaker, vibrator, jingle bell are sent out for physical button 462, mike 463 and various other i/o equipment Raw device, led indicator etc.) cooperation, to realize the man-machine interaction of described mobile terminal.Skilled artisan would appreciate that user Mobile terminal can be operated by such man machine interface 460 being formed.
The software view of this mobile terminal can also include various modules, protocol stack, driver etc. and related the patrolling that communicate Volume, it is summarized as communication interface 470 as shown in Figure 4, for for wireless radio interface 471 and be optionally blue tooth interface 472 and/or infrared interface 473 provide communication service (such as transmission, network and connectedness), to realize the net of described mobile terminal Network is connective.Wireless radio interface 471 includes internal or external antenna and for setting up and safeguarding the radio chains leading to base station The suitable radio circuit on road.As known to the skilled person, described radio circuit include a series of analog- and digital- Electronic building brick, it forms radio receiver and transmitter together.These assemblies for example include band filter, amplifier, mix Frequency device, local oscillator, low pass filter, ad/da transducer etc..
Mobile communication terminal can also include reader device 430, and this reader device 430 generally includes processor and data Memorizer etc., for reading the information of sim card and taking this as a foundation what cooperation wireless radio interface 417 access carrier was provided Network.
It will be appreciated by those skilled in the art that all or part of step realizing above-mentioned embodiment is implemented as being held by cpu The computer program of row.When this computer program is executed by cpu, execution the present invention provide said method limited above-mentioned Function.Described program can be stored in a kind of computer-readable recording medium, and this storage medium can be read only memory, Disk or CD etc..
Further, it should be noted that above-mentioned accompanying drawing is only according to included by the method for exemplary embodiment of the invention Process schematically illustrates, rather than limits purpose.It can be readily appreciated that above-mentioned process shown in the drawings is not intended that or limits these The time sequencing processing.In addition, being also easy to understand, these process can for example either synchronously or asynchronously be executed in multiple modules 's.
It should be noted that the block diagram shown in above-mentioned accompanying drawing is functional entity, not necessarily must with physically or logically Independent entity is corresponding.Can using software form realizing these functional entitys, or in one or more hardware modules or Realize these functional entitys in integrated circuit, or realize in heterogeneous networks and/or processor device and/or microcontroller device These functional entitys.
Button prompting voice handling method, system and terminal unit that the present invention provides, press volume key by user and adjust Playing alert tones during volume, thus allow user can direct feel to adjusted volume size.In certain embodiments, this Bright send the message to realize the present invention also by synchronous dbus so that handling process is simpler and will not occur to hinder due to message Fill in the problem of the volume adjusting failure leading to.In further embodiments, the present invention is also by hashmap unloading current sound class The volume value of type, such that it is able to save system resource, it is to avoid continually reads and writes data base.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can be realized by software it is also possible to be realized with reference to by way of necessary hardware by software.Therefore, according to the present invention The technical scheme of embodiment can be embodied in the form of software product, this software product can be stored in one non-volatile Property storage medium (can be cd-rom, u disk, portable hard drive etc.) in or network on, including some instructions so that a calculating Equipment (can be personal computer, server, mobile terminal or network equipment etc.) executes according to embodiment of the present invention Method.
More than it is particularly shown and described the illustrative embodiments of the present invention.It should be appreciated that the present invention does not limit In detailed construction described herein, set-up mode or implementation method;On the contrary, it is intended to cover be included in claims Spirit and scope in various modifications and equivalence setting.

Claims (11)

1. a kind of button prompting voice handling method, is applied to a terminal unit, and described terminal unit has a volume key, its feature It is, comprising:
Pre-build a memory module, described memory module is used for storing the sound type that described terminal unit has and mutually at the sound The volume value of sound type, wherein said sound type at least includes a key prompting voice;
When receiving the first trigger pressing described volume key, a first function is called to obtain working as of described terminal unit Front sound type;
A second function is called to obtain the volume value of described current sound type from described memory module;
The volume value of described current sound type is set to the volume value of described key prompting voice and preserves;
Start the volume value that a thread reads described key prompting voice, the size of the volume value according to described key prompting voice is play One prompt tone.
2. method according to claim 1 is it is characterised in that described memory module is a data base.
3. method according to claim 2 it is characterised in that be set to described by the volume value of described current sound type The volume value of key prompting voice includes:
The volume value of described current sound type is stored in hashmap as the volume value of described key prompting voice;
After the Preset Time of interval, the volume Value Data in described hashmap is write in described data base.
4. method according to claim 3 it is characterised in that described thread be playing alert tones thread, described startup The volume value that described thread reads described key prompting voice includes:
Described thread reads the volume value of described key prompting voice from described hashmap.
5. method according to claim 2 is it is characterised in that methods described also includes:
When receiving the second trigger pressing described volume key, described second function is called to adjust described current sound class The volume value of type;Meanwhile,
According to the volume value of the described current sound type after adjustment, the volume value adjusting described key prompting voice is so that described The volume value of current sound type is consistent with the volume value of described key prompting voice.
6. method according to claim 5 is it is characterised in that methods described sends the message to realize using synchronous dbus The interprocess communication of methods described.
7. method according to claim 1 is it is characterised in that also include:
While playing described prompt tone, the display screen of described terminal unit shows a volume bar, described volume bar is used Size in the volume value indicating described current sound type.
8. a kind of key prompting voice processing system, is applied to a terminal unit, and described terminal unit has a volume key, its feature It is, comprising:
One memory module, for storing the volume value of the sound type that described terminal unit has and corresponding sound type, wherein Described sound type at least includes a key prompting voice;
First calling module, for when receiving the first trigger pressing described volume key, calling a first function to obtain Obtain the current sound type of described terminal unit;
Second calling module, for calling a second function to obtain the volume of described current sound type from described memory module Value;
Setup module, for being set to the volume value of described key prompting voice and protecting the volume value of described current sound type Deposit;
Playing alert tones module, reads the volume value of described key prompting voice, according to described button prompting for starting a thread The size of the volume value of sound plays a prompt tone.
9. system according to claim 8 is it is characterised in that described volume key includes:
One first volume key, for being incremented by the volume value of described current sound type according to compression number;And
One second volume key, for the volume value of described current sound type of being successively decreased according to compression number.
10. system according to claim 8 it is characterised in that described memory module be a data base, described setup module Including:
One hashmap, for storing the volume value of described current sound type and being set to the sound of described key prompting voice Value;
Writing module, after being spaced Preset Time, the volume Value Data in described hashmap is write described data base In.
A kind of 11. terminal units, described terminal unit has a volume key it is characterised in that including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Pre-build a memory module, described memory module is used for storing the sound type that described terminal unit has and mutually at the sound The volume value of sound type, wherein said sound type at least includes a key prompting voice;
When receiving the first trigger pressing described volume key, a first function is called to obtain working as of described terminal unit Front sound type;
A second function is called to obtain the volume value of described current sound type from described memory module;
The volume value of described current sound type is set to the volume value of described key prompting voice and preserves;
Start the volume value that a thread reads described key prompting voice, the size of the volume value according to described key prompting voice is play One prompt tone.
CN201610778749.8A 2016-08-29 2016-08-29 Key prompt tone processing method and system and terminal equipment Active CN106354470B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610778749.8A CN106354470B (en) 2016-08-29 2016-08-29 Key prompt tone processing method and system and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610778749.8A CN106354470B (en) 2016-08-29 2016-08-29 Key prompt tone processing method and system and terminal equipment

Publications (2)

Publication Number Publication Date
CN106354470A true CN106354470A (en) 2017-01-25
CN106354470B CN106354470B (en) 2019-07-09

Family

ID=57856653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610778749.8A Active CN106354470B (en) 2016-08-29 2016-08-29 Key prompt tone processing method and system and terminal equipment

Country Status (1)

Country Link
CN (1) CN106354470B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109429138A (en) * 2017-08-22 2019-03-05 上海汽车集团股份有限公司 A kind of method, apparatus and system for realizing interior sound control
CN111010477A (en) * 2019-11-27 2020-04-14 捷开通讯(深圳)有限公司 Audio signal calling method and system, storage medium and terminal equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002189466A (en) * 2000-12-21 2002-07-05 Casio Comput Co Ltd Performance training apparatus and performance training method
CN104636111A (en) * 2015-02-15 2015-05-20 联想(北京)有限公司 Information processing method and electronic device
CN104965651A (en) * 2015-06-12 2015-10-07 联想(北京)有限公司 Information processing method and electronic equipment
US20160135167A1 (en) * 2013-06-07 2016-05-12 Zte Corporation Terminal prompt mode adjusting method and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002189466A (en) * 2000-12-21 2002-07-05 Casio Comput Co Ltd Performance training apparatus and performance training method
US20160135167A1 (en) * 2013-06-07 2016-05-12 Zte Corporation Terminal prompt mode adjusting method and terminal
CN104636111A (en) * 2015-02-15 2015-05-20 联想(北京)有限公司 Information processing method and electronic device
CN104965651A (en) * 2015-06-12 2015-10-07 联想(北京)有限公司 Information processing method and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109429138A (en) * 2017-08-22 2019-03-05 上海汽车集团股份有限公司 A kind of method, apparatus and system for realizing interior sound control
CN111010477A (en) * 2019-11-27 2020-04-14 捷开通讯(深圳)有限公司 Audio signal calling method and system, storage medium and terminal equipment
CN111010477B (en) * 2019-11-27 2022-01-04 捷开通讯(深圳)有限公司 Audio signal calling method and system, storage medium and terminal equipment

Also Published As

Publication number Publication date
CN106354470B (en) 2019-07-09

Similar Documents

Publication Publication Date Title
US10206074B2 (en) Remote access to a mobile communication device over a wireless local area network (WLAN)
US8996067B2 (en) Method of displaying menu screen in mobile communication terminal and the system thereof
CN105653226A (en) Information display method and device
CN1332292C (en) Mobile communication terminal, method for controlling execution state of application program, application program, and recording medium wherein application program has been recorded
CN106453512A (en) Redis cluster information monitoring device and method
CN112913199B (en) Data transmission method and related product
CN105812567A (en) Mobile terminal control method and device
WO2020211705A1 (en) Contact person recommendation method and electronic device
CN105718405B (en) The method that the USB interface of mobile terminal and its processor is multiplexed
CN106406940A (en) System upgrading method, system upgrading apparatus, and terminal
CN115016706B (en) Thread scheduling method and electronic equipment
CN110753153A (en) Terminal control method, terminal and computer storage medium
CN106294707A (en) A kind of countdown information output intent and device
CN106354470B (en) Key prompt tone processing method and system and terminal equipment
CN104219372B (en) Adjust the method and device of backlight brightness
KR100695212B1 (en) Method and mobile communication for automatically saving push message
CN105549836B (en) Method for processing message on screen locking interface of mobile electronic terminal and mobile electronic terminal
CN112987907A (en) Control method and device of wearable device, electronic device and readable storage medium
KR100453160B1 (en) Method for transmitting multi short message service in mobile telephone
CN106055154B (en) A kind of contact action control method and device and mobile terminal
CN111460424B (en) Interaction method, terminal and computer storage medium for lock screen configuration
CN106550143A (en) A kind of mode switching method and mobile terminal
CN103402015B (en) A kind of method and user terminal controlling user terminal application
CN105704688A (en) Communication service processing device, method and system
WO2020014900A1 (en) Message display method and terminal

Legal Events

Date Code Title Description
C06 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
TR01 Transfer of patent right

Effective date of registration: 20210129

Address after: 101300 room 153, 1 / F, building 17, 16 Caixiang East Road, Nancai Town, Shunyi District, Beijing

Patentee after: Yuanxin Information Technology Group Co.,Ltd.

Address before: 100176 room 2222, building D, building 33, 99 Kechuang 14th Street, Beijing Economic and Technological Development Zone, Beijing

Patentee before: BEIJING YUANXIN SCIENCE & TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20170125

Assignee: Beijing Yuanxin Junsheng Technology Co.,Ltd.

Assignor: Yuanxin Information Technology Group Co.,Ltd.

Contract record no.: X2021110000018

Denomination of invention: Processing method, system and terminal equipment of key prompt sound

Granted publication date: 20190709

License type: Common License

Record date: 20210531

EE01 Entry into force of recordation of patent licensing contract