CN108595142B - Volume adjusting method and device - Google Patents
Volume adjusting method and device Download PDFInfo
- Publication number
- CN108595142B CN108595142B CN201810272817.2A CN201810272817A CN108595142B CN 108595142 B CN108595142 B CN 108595142B CN 201810272817 A CN201810272817 A CN 201810272817A CN 108595142 B CN108595142 B CN 108595142B
- Authority
- CN
- China
- Prior art keywords
- volume value
- terminal
- volume
- value
- currently set
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
The invention discloses a method and a device for adjusting volume, which comprises the steps of obtaining the current volume value; acquiring a shielding volume value after a user shields a sound outlet; determining an adjusting coefficient according to the current volume value and a volume difference value between the current volume value and the shielding volume value; and obtaining a target volume value according to the adjusting coefficient and the current volume value. The present invention also provides a volume adjusting apparatus, comprising: the acquisition unit is used for acquiring the current volume value and the sheltered volume value after the sound hole is sheltered by the user; the determining unit is used for determining an adjusting coefficient according to the current volume value and the volume difference value between the current volume value and the shielding volume value; and the adjusting unit is used for obtaining the target volume value according to the adjusting coefficient and the current volume value. The invention provides a method and a device capable of adjusting the volume by shielding the sound outlet hole, which improve the convenience of volume adjustment and are beneficial to opening the consumer market.
Description
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a method and an apparatus for adjusting a volume.
Background
In the use process of various devices such as a notebook computer, a tablet computer or a mobile phone, audio or video is often required to be played, so that volume adjustment is an essential function in the devices. When the operation of volume adjustment is more convenient, the more the equipment can get the favor of consumers.
In the prior art, in order to improve the convenience of volume adjustment operation, some devices can achieve the purpose of volume adjustment by sliding on a screen through a touch screen, but because different playing software divides the touch screen area for volume adjustment differently, the volume adjustment operation is often confused with brightness adjustment; in addition, in the playing process of the video, the screen sliding operation easily causes the video to fast forward or rewind, and the physical examination of the client is poor. Meanwhile, most notebook computers do not have touch screen operation, and need to be adjusted through a mouse or a keyboard, so that the operation is not convenient.
Disclosure of Invention
The embodiment of the invention provides a method and a device for adjusting volume, which are used for solving the technical problems.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method of volume adjustment, comprising:
acquiring a volume value currently set by a terminal;
acquiring a shielding volume value after a user shields a sound outlet of the terminal;
determining an adjusting coefficient according to a volume difference value between the currently set volume value and the shielding volume value;
and obtaining a target volume value according to the adjusting coefficient and the volume value currently set by the terminal, and setting the volume value of the terminal as the target volume value.
Optionally, the steps of: determining an adjusting coefficient according to a volume difference value between the currently set volume value and the shielding volume value, wherein the adjusting coefficient comprises the following steps:
and respectively presetting a corresponding adjusting coefficient for the different volume difference values.
Optionally, the steps of: determining an adjusting coefficient according to a volume difference value between the currently set volume value and the shielding volume value, wherein the adjusting coefficient comprises the following steps:
establishing a functional relation between the volume difference and the adjustment coefficient, and determining the adjustment coefficient according to the functional relation:
wherein y is an adjustment coefficient, and x is a volume difference value between the currently set volume value and the shielding volume value.
Optionally, in the step: before obtaining the volume value currently set by the terminal, the method further comprises the following steps:
when the terminal starts to output audio, sampling a first sampling volume value k1 of the terminal, and setting k1 as a reference volume value;
sampling a second sampled volume value k2 of the terminal once every time interval in the process of outputting audio by the terminal;
judging whether the absolute value of the (reference volume value-k 2)/reference volume value is greater than 10%; if yes, entering the step: acquiring a volume value currently set by a terminal; if not, setting k2 as a reference volume value, and returning to the step: the second sampled volume value k2 of the terminal is sampled once every time interval while the terminal is outputting audio.
Optionally, the time interval is 3S.
Optionally, in the step: obtaining a target volume value according to the adjusting coefficient and the volume value currently set by the terminal, and setting the volume value of the terminal as the target volume value, and then the method further comprises the following steps:
setting the target volume value as a reference volume value, and then returning to the step: the second sampled volume value k2 of the terminal is sampled once every time interval while the terminal is outputting audio.
The present invention also provides a volume adjusting apparatus, comprising:
the acquisition unit is used for acquiring the currently set volume value of the terminal and the sheltered volume value after the sound outlet hole of the terminal is sheltered by a user;
the determining unit is used for determining an adjusting coefficient according to a volume difference value between the currently set volume value and the shielding volume value;
and the adjusting unit is used for obtaining a target volume value according to the adjusting coefficient and the volume value currently set by the terminal, and setting the volume value of the terminal as the target volume value.
Optionally, the determining unit stores a mapping relationship for determining the adjustment coefficient in advance; establishing a functional relation between the volume difference value and the adjustment coefficient, and determining the adjustment coefficient according to the functional relation;
the mapping relation is as follows: under the currently set volume value, the volume difference value has a corresponding adjusting coefficient;
wherein y is an adjustment coefficient, and x is a volume difference value between the currently set volume value and the occlusion volume value:
optionally, the acquisition unit is further configured to:
when the terminal starts to output audio, sampling a first sampling volume value k1 of the terminal, and setting k1 as a reference volume value;
sampling a second sampled volume value k2 of the terminal once every time interval in the process of outputting audio by the terminal;
judging whether the absolute value of the (reference volume value-k 2)/reference volume value is greater than 10%;
when the absolute value of the (reference volume value-k 2)/the reference volume value is greater than 10%, the acquisition unit acquires the volume value currently set by the terminal and the shielding volume value after the user shields the sound outlet hole of the terminal;
when the absolute value of the (reference volume value-k 2)/reference volume value is less than 10%, the acquisition unit sets k2 as the reference volume value and then continues to detect the second detected volume value k 2.
Optionally, the determining unit is further configured to:
the target volume value is set as a reference volume value, and then the acquisition unit acquires the volume value currently set by the terminal and the shielding volume value after the user shields the sound outlet of the terminal.
According to the technical scheme, the embodiment of the invention has the following advantages:
the invention provides a method and a device capable of adjusting the volume by shielding the sound hole, which improve the convenience of volume adjustment and are beneficial to opening the consumer market.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for adjusting volume according to the present invention
Fig. 2 is a block diagram of a volume adjusting apparatus according to the present invention.
In the figure:
10. a collection unit; 20. a determination unit; 30. an adjustment unit.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Referring to fig. 1, an embodiment of the present invention provides a volume adjustment device. The device includes:
the acquisition unit 10 is used for sampling a first sampling volume value k1 of the terminal when the terminal starts to output audio, and setting k1 as a reference volume value; sampling a second sampled volume value k2 of the terminal once every time interval in the process of outputting audio by the terminal; and judging whether the absolute value of the (reference volume value-k 2)/reference volume value is greater than 10%; if yes, go to step S10, and determine whether to start the volume adjustment operation according to the determination result;
in addition, the collecting unit 10 is further configured to obtain a currently set volume value of the terminal and a blocking volume value after the user blocks the sound outlet of the terminal.
A determining unit 20, configured to determine an adjustment coefficient according to a volume difference between a currently set volume value and the occlusion volume value;
and the adjusting unit 30 is configured to obtain a target volume value according to the adjustment coefficient and the volume value currently set by the terminal, and set the volume value of the terminal as the target volume value.
For the sake of understanding the principle of the volume adjustment method of the present invention, the present embodiment will explain the volume adjustment method in detail by the following embodiments.
Example one
Referring to fig. 2, an embodiment of the present invention provides a method for adjusting a volume, including:
and S101, when the terminal starts to output the audio, sampling a first sampling volume value k1 of the terminal, and setting k1 as a reference volume value.
When the terminal starts to output audio in an operating state, the acquiring unit 10 acquires a first sampling volume value k1 in real time, which is a reference volume value k1 for determining whether the output audio of the terminal is changed, and thus in this step, k1 is set as the reference volume value.
Wherein, the collecting unit 10 comprises a sensor installed at the sound outlet of the terminal. The sensor may be a sound sensor, a vibration sensor, or other type of sensor capable of detecting various physical parameters of the output audio.
Therefore, the data of the first sampling volume value k1 acquired by the sensor may be sound waves or amplitudes.
And S102, sampling the second sampling volume value k2 of the terminal once every time interval in the process of outputting the audio by the terminal.
The terminal is in an operating state, and the acquisition unit 10 acquires the second detection volume value k2 in real time. The second detected volume value k2 is used to compare with the reference volume value to determine whether to enter the volume adjustment operation.
In this embodiment, the time interval between step S101 and step S102 is 3S, and the workload of the terminal can be reduced by setting the detection time interval, thereby extending the service life of the terminal.
S103, judging whether the absolute value of the (reference volume value-k 2)/reference volume value is greater than 10%; if yes, go to step S10; if not, k2 is set as the reference volume value, and then the step S102 is returned to.
In the present embodiment, in the acquisition unit 10, whether or not the absolute value of (reference volume value-k 2)/reference volume value is greater than 10% is taken as a condition for entering the volume adjustment operation.
In the daily activities of users, the situation that other objects touch the sound outlet hole carelessly often occurs, and under the situation, even if the shielding degree is small, the volume adjusting program needs to be started, the terminal is easy to have overlarge work load, and the terminal response speed is slow to a certain extent. Therefore, the aim of reducing the workload of the terminal is achieved by setting the condition of entering the volume adjustment operation.
When the variation between k2 and the reference volume value does not satisfy the condition for entering the volume adjustment operation, the acquiring unit 10 sets k2 as the reference volume value, and repeats step S102.
And S10, acquiring the volume value currently set by the terminal.
In this embodiment, the method for obtaining the volume value currently set by the terminal is as follows: the reference volume value is set to the currently set volume value by the acquisition unit 10.
And S20, acquiring the shielding volume value after the user shields the sound outlet hole of the terminal.
In this implementation, the method of obtaining the shielding volume value after the user shields the sound outlet of the terminal is as follows: the second detection volume value k2 is set as the occlusion volume value by the acquisition unit 10.
After the sound outlet hole is shielded, the output audio frequency of the terminal can be changed, a user changes the volume through shielding the sound outlet hole to obtain a shielded volume value, and the shielded volume value and the currently set volume value before change are used as the basis for adjusting the volume.
And S30, determining an adjusting coefficient according to the volume difference between the currently set volume value and the shielding volume value.
After the user blocks the sound outlet, the volume is changed from the currently set volume value to the blocking volume value.
In this embodiment, the determining unit 20 obtains the adjustment coefficient through the volume difference, and obtains the target volume value required by the user by using the adjustment coefficient as the adjustment basis, and sets the target volume value as the volume value of the terminal.
The adjustment coefficient may be obtained by:
s301, presetting a corresponding adjusting coefficient for the different volume difference values respectively.
In this step, a map for determining the adjustment coefficient is stored in advance in the determination unit 20;
the mapping relation is as follows: and under the currently set volume value, the volume difference value has a corresponding adjusting coefficient.
Specifically, the mapping relationship between the volume difference and the adjustment coefficient is used as an adjustment basis, and the volume value currently played by the terminal is adjusted to the target volume value required by the user.
As an optional implementation manner in this embodiment, the mapping relationship may be:
when the currently set volume value is 20 volumes of the terminal volume grid number and the volume difference between the currently set volume value and the occlusion volume value is 18 volumes, the adjustment coefficient is 2.
When the currently set volume value is 20 volumes of the terminal volume grid number and the volume difference between the currently set volume value and the shielding volume value is 10, the adjustment coefficient is 1.
The currently set volume value is 20 of the terminal volume grid number, and when the volume difference between the currently set volume value and the shielding volume value is 2, the adjustment coefficient is 0.5.
The manner of obtaining the adjustment coefficient may also be obtained by step S302.
S302, establishing a functional relation between the volume difference value and the adjusting coefficient, and determining the adjusting coefficient according to the functional relation.
As an optional implementation manner in this embodiment, the functional relationship is as follows:
wherein y is an adjustment coefficient, and x is a volume difference value between the currently set volume value and the shielding volume value.
In step S301 and step S302, the adjustment coefficient is in a linear function relationship with the blocking amount of the sound outlet.
And S40, obtaining a target volume value according to the adjusting coefficient and the volume value currently set by the terminal, and setting the volume value of the terminal as the target volume value.
In this embodiment, the adjusting unit 30 adjusts the volume value played by the current terminal to the target volume value required by the user according to the adjustment coefficient obtained in the above step.
S50, setting the target volume value as the reference volume value, and then returning to step S102.
In step S40, the user has adjusted the volume to the target volume value, and at this time, the capturing unit 10 sets the current target volume value as the reference volume value, and then starts with step S102 and performs a loop to achieve the purpose of volume adjustment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (7)
1. A method of volume adjustment, comprising:
acquiring a volume value currently set by a terminal;
acquiring a shielding volume value after a user shields a sound outlet of the terminal;
determining an adjusting coefficient according to a volume difference value between the currently set volume value and the shielding volume value;
obtaining a target volume value according to the adjusting coefficient and the volume value currently set by the terminal, and setting the volume value of the terminal as the target volume value;
the steps are as follows: determining an adjusting coefficient according to a volume difference value between the currently set volume value and the shielding volume value, wherein the adjusting coefficient comprises the following steps:
presetting a corresponding adjusting coefficient for different volume difference values respectively;
the steps are as follows: determining an adjusting coefficient according to a volume difference value between the currently set volume value and the shielding volume value, wherein the adjusting coefficient comprises the following steps:
establishing a functional relation between the volume difference and the adjustment coefficient, and determining the adjustment coefficient according to the functional relation:
wherein y is an adjustment coefficient, and x is a volume difference value between the currently set volume value and the shielding volume value.
2. The method according to claim 1, characterized in that in step: before obtaining the volume value currently set by the terminal, the method further comprises the following steps:
when the terminal starts to output audio, sampling a first sampling volume value k1 of the terminal, and setting k1 as a reference volume value;
sampling a second sampled volume value k2 of the terminal once every time interval in the process of outputting audio by the terminal;
judging whether the absolute value of the (reference volume value-k 2)/reference volume value is greater than 10%; if yes, entering the step: acquiring a volume value currently set by a terminal; if not, setting k2 as a reference volume value, and returning to the step: the second sampled volume value k2 of the terminal is sampled once every time interval while the terminal is outputting audio.
3. The method of claim 2, wherein the time interval is 3S.
4. The method according to claim 2, characterized in that in step: obtaining a target volume value according to the adjusting coefficient and the volume value currently set by the terminal, and setting the volume value of the terminal as the target volume value, and then the method further comprises the following steps:
setting the target volume value as a reference volume value, and then returning to the step: the second sampled volume value k2 of the terminal is sampled once every time interval while the terminal is outputting audio.
5. An apparatus for volume adjustment, comprising:
the acquisition unit (10) is used for acquiring the currently set volume value of the terminal and the sheltered volume value after the sound outlet of the terminal is sheltered by a user;
the determining unit (20) is used for determining an adjusting coefficient according to a volume difference value between the currently set volume value and the shielding volume value, and presetting a corresponding adjusting coefficient for different volume difference values respectively;
the adjusting unit (30) is used for obtaining a target volume value according to the adjusting coefficient and the volume value currently set by the terminal, and setting the volume value of the terminal as the target volume value;
the determining unit (20) stores a map for determining an adjustment coefficient in advance; establishing a functional relation between the volume difference value and the adjustment coefficient, and determining the adjustment coefficient according to the functional relation;
the mapping relation is as follows: under the currently set volume value, the volume difference value has a corresponding adjusting coefficient;
6. the device according to claim 5, wherein the acquisition unit (10) is further configured to:
when the terminal starts to output audio, sampling a first sampling volume value k1 of the terminal, and setting k1 as a reference volume value;
sampling a second sampled volume value k2 of the terminal once every time interval in the process of outputting audio by the terminal;
judging whether the absolute value of the (reference volume value-k 2)/reference volume value is greater than 10%;
when the absolute value of the (reference volume value-k 2)/reference volume value is greater than 10%, the acquisition unit (10) acquires the volume value currently set by the terminal and the shielding volume value after the user shields the sound outlet hole of the terminal;
when the absolute value of the (reference volume value-k 2)/reference volume value is less than 10%, the acquisition unit (10) sets k2 as the reference volume value and then continues to detect the second detection volume value k 2.
7. The apparatus according to claim 6, wherein the determining unit (20) is further configured to:
the target volume value is set as a reference volume value, and then the acquisition unit (10) acquires the volume value currently set by the terminal and the shielding volume value after the user shields the sound outlet of the terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810272817.2A CN108595142B (en) | 2018-03-29 | 2018-03-29 | Volume adjusting method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810272817.2A CN108595142B (en) | 2018-03-29 | 2018-03-29 | Volume adjusting method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108595142A CN108595142A (en) | 2018-09-28 |
CN108595142B true CN108595142B (en) | 2021-08-06 |
Family
ID=63624967
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810272817.2A Active CN108595142B (en) | 2018-03-29 | 2018-03-29 | Volume adjusting method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108595142B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134361B (en) * | 2019-05-06 | 2022-08-19 | 上海幻电信息科技有限公司 | Volume adjusting method of device, computer device and computer-readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105187602A (en) * | 2015-09-06 | 2015-12-23 | 广东欧珀移动通信有限公司 | Terminal volume adjustment method and device |
CN106033676A (en) * | 2015-03-13 | 2016-10-19 | 北京智谷睿拓技术服务有限公司 | Audio play control method and device and electronic device |
CN106534578A (en) * | 2016-12-09 | 2017-03-22 | 联想(北京)有限公司 | Electronic equipment and sound control method thereof |
CN107391078A (en) * | 2017-07-14 | 2017-11-24 | 维沃移动通信有限公司 | A kind of sound adjusting method and mobile terminal |
US9838530B1 (en) * | 2016-12-09 | 2017-12-05 | Symbol Technologies, Llc | Device and method of sound interference avoidance |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10310804B2 (en) * | 2015-12-11 | 2019-06-04 | Facebook Technologies, Llc | Modifying haptic feedback provided to a user to account for changes in user perception of haptic feedback |
-
2018
- 2018-03-29 CN CN201810272817.2A patent/CN108595142B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106033676A (en) * | 2015-03-13 | 2016-10-19 | 北京智谷睿拓技术服务有限公司 | Audio play control method and device and electronic device |
CN105187602A (en) * | 2015-09-06 | 2015-12-23 | 广东欧珀移动通信有限公司 | Terminal volume adjustment method and device |
CN106534578A (en) * | 2016-12-09 | 2017-03-22 | 联想(北京)有限公司 | Electronic equipment and sound control method thereof |
US9838530B1 (en) * | 2016-12-09 | 2017-12-05 | Symbol Technologies, Llc | Device and method of sound interference avoidance |
CN107391078A (en) * | 2017-07-14 | 2017-11-24 | 维沃移动通信有限公司 | A kind of sound adjusting method and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN108595142A (en) | 2018-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107705778B (en) | Audio processing method, device, storage medium and terminal | |
WO2019120027A1 (en) | Screen brightness adjustment method and apparatus, storage medium and mobile terminal | |
EP3940517B1 (en) | Electrical capacitance detection method for touch display panel, electrical capacitance detection circuit for touch display panel, and touch display panel | |
CN106782613B (en) | Signal detection method and device | |
CN108335687B (en) | Method for detecting beat point of bass drum of audio signal and terminal | |
CN107155133B (en) | Volume adjusting method, audio playing terminal and computer readable storage medium | |
CN107436700B (en) | Data processing method and device | |
WO2014086218A1 (en) | Interface adjustment method, device and terminal | |
US9785268B2 (en) | Electronic device having multi-touch interface for spectral analysis | |
KR20140071282A (en) | Electronic device and method for controlling zooming of displayed object | |
CN104679414B (en) | Display control method and device | |
CN109121008B (en) | Video preview method, device, terminal and storage medium | |
KR20110087004A (en) | Method for sensing in capacitive touch sensor and capacitive touch sensor device thereof | |
CN107148776B (en) | Method, device and system for acquiring video data and computer readable storage medium | |
CN110599989B (en) | Audio processing method, device and storage medium | |
WO2020108045A1 (en) | Video playback method and apparatus and multimedia data playback method | |
CN110491419B (en) | Playing control method, system and terminal equipment | |
WO2019023923A1 (en) | Method for determining touch position and touch control chip | |
CN104777976A (en) | Interface operation method | |
CN108492837B (en) | Method, device and storage medium for detecting audio burst white noise | |
KR20130123221A (en) | Apparatus and method for detecting flicker in a camera module | |
JP2018531564A6 (en) | Method, apparatus and system for obtaining video data and computer-readable storage medium | |
CN104881225A (en) | Control method and device for adjusting bar | |
CN108234738B (en) | Volume adjusting method, device, terminal and storage medium | |
CN108595142B (en) | Volume adjusting method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |