The content of the invention
The invention provides a kind of method for controlling volume and device, lead to its purpose is to solve existing earphone
Often it is negligent of the problem to the protection of human ear.
In order to achieve the above object, The embodiment provides a kind of method for controlling volume, it is applied to one
Earphone, including:
First parameter and the second parameter sets of earphone are obtained, the first parameter is the analog-to-digital conversion module of earphone
Sensitivity coefficient, the sensitivity coefficient of D/A converter module and earphone sensitivity coefficient sum, second
Parameter sets are all voice datas of L channel in earphone one preset time period of future or R channel
The set of decibel value;
When the numerical value in the second parameter sets and the first parameter, default deviation ratio sum are more than or equal to default
Threshold value when, reduce the volume of the corresponding voice data of the numerical value, default deviation ratio is the first sound pressure level
With the relative deviation ratio of the second sound pressure level, the first sound pressure level is with 2 × 10-5Handkerchief is the sound pressure level of reference sound pressure,
Second sound pressure level is the sound pressure level with 1 handkerchief as reference sound pressure.
Preferably, when the numerical value in the second parameter sets is more than with the first parameter, default deviation ratio sum
During equal to default threshold value, the volume of the corresponding voice data of the numerical value is reduced, including:
When the numerical value in the second parameter sets and the first parameter, default deviation ratio sum are more than or equal to default
Threshold value when, reduce earphone play the corresponding voice data of the numerical value volume or reduce earphone play the numerical value
The power of corresponding voice data.
Preferably, default deviation ratio is 94.
Preferably, default threshold value is 100.
Preferably, the default time period is 2 seconds.
To achieve these goals, present invention also offers a kind of sound volume control device, an earphone is applied to,
Including:
Acquisition module, the first parameter and the second parameter sets for obtaining earphone, the first parameter are earphone
The sensitivity coefficient of analog-to-digital conversion module, the sensitivity coefficient of D/A converter module and earphone sensitivity
Coefficient sum, the second parameter sets are the L channel in earphone one preset time period of future or the institute of R channel
There is the set of the decibel value of voice data;
Control module, for the numerical value and the first parameter, default deviation ratio in the second parameter sets it
During with more than or equal to default threshold value, the volume of the corresponding voice data of the numerical value, default skew system are reduced
Number is the first sound pressure level and the relative deviation ratio of the second sound pressure level, and the first sound pressure level is with 2 × 10-5Handkerchief is ginseng
The sound pressure level of acoustic pressure is examined, the second sound pressure level is the sound pressure level with 1 handkerchief as reference sound pressure.
Preferably, control module is used for:
When the numerical value in the second parameter sets and the first parameter, default deviation ratio sum are more than or equal to default
Threshold value when, reduce earphone play the corresponding voice data of the numerical value volume or reduce earphone play the numerical value
The power of corresponding voice data.
Preferably, default deviation ratio is 94.
Preferably, default threshold value is 100.
Preferably, the default time period is 2 seconds.
Such scheme of the invention at least includes following beneficial effect:
Method for controlling volume and device that the present invention is provided, by the voice data that will play earphone point
Shellfish value is combined with the ardware feature of earphone, when the decibel value that can damage human ear hearing is reached, then automatic to reduce
Earpiece volume, it is to avoid because of the excessive injury human ear of volume.The present invention is automatically obtained to human ear hearing by earphone end
Protection, it is to avoid there is the situation that very big sound causes ear to feel bad or be damaged, solve existing earphone
Equipment is negligent of the problem to the protection of human ear.
Specific embodiment
To make the technical problem to be solved in the present invention, technical scheme and advantage clearer, below in conjunction with attached
Figure and specific embodiment are described in detail.
The present invention is directed to existing problem, there is provided a kind of method for controlling volume and device.
First embodiment
Referring to Fig. 1, the first embodiment of the present invention provides a kind of method for controlling volume, is applied to an earphone,
Including:
Step 101, obtains first parameter and the second parameter sets of earphone, and the first parameter is the mould of earphone
The sensitivity coefficient of the sensitivity coefficient, the sensitivity coefficient of D/A converter module and earphone of number modular converter
Sum, the second parameter sets for earphone future one preset time period in L channel or R channel it is sound
The set of the decibel value of sound data.
Wherein, the sensitivity coefficient of analog-to-digital conversion module, the sensitivity coefficient of D/A converter module and earphone
Sensitivity coefficient be earphone ardware feature;Obtain earphone future one preset time period in L channel or
The set of the decibel value of all voice datas of person's R channel, in order to obtain the audio number that will be played
According to volume, to control the volume that will play.
Step 102, when the numerical value in the second parameter sets is big with the first parameter, default deviation ratio sum
When equal to default threshold value, the volume of the corresponding voice data of the numerical value is reduced, default deviation ratio is
The relative deviation ratio of the first sound pressure level and the second sound pressure level, the first sound pressure level is with 2 × 10-5Handkerchief is to refer to sound
The sound pressure level of pressure, the second sound pressure level is the sound pressure level with 1 handkerchief as reference sound pressure.
Wherein, sound pressure level is that the ratio of acoustic pressure virtual value to be measured and reference sound pressure is taken into common logarithm, multiplied by with
20 obtain, and its unit is decibel (dB), i.e.,:
SPL=20 × log10 [p (e)/p (ref)],
Wherein, p (e) is acoustic pressure virtual value to be measured, and SPL is the sound pressure level of p (e), and p (ref) is reference sound pressure;
Reference sound pressure p (ref) is typically taken as 2 × 10 in atmosphere-5Handkerchief, this numerical value is normal human ear to 1
Kilo hertz sound can just perceive the sound pressure level of its presence, that is, 1 kilo hertz of audibility threshold acoustic pressure of sound, i.e., and the
One sound pressure level.
And the second sound pressure level is the sound pressure level with 1 handkerchief as reference sound pressure, default deviation ratio is the first acoustic pressure
The relative deviation ratio of value and the second sound pressure level.Preferably, default deviation ratio is 94, that is to say, that
Under normal circumstances, the relative deviation ratio of the first sound pressure level and the second sound pressure level.
Wherein, when the numerical value in the second parameter sets and the first parameter, default deviation ratio sum more than etc.
When default threshold value, then it is assumed that the hearing of human ear can be injured, then by reducing the corresponding sound number of the numerical value
According to volume protect people the sense of hearing.
Preferably, step 102 includes:
When the numerical value in the second parameter sets and the first parameter, default deviation ratio sum are more than or equal to default
Threshold value when, reduce earphone play the corresponding voice data of the numerical value volume or reduce earphone play the numerical value
The power of corresponding voice data.
Wherein, playing the volume or power of the corresponding voice data of the numerical value by reducing earphone realizes drop
Amount of bass.
Preferably, default threshold value is 100, for that can damage the decibel value of human ear hearing.
Preferably, the default time period is 2 seconds.
If stating the above embodiment of the present invention with a formula, can be represented by below equation:
X1+X2+X3+X4+Y1<Y2,
Wherein X1 is the L channel or all voice datas of R channel in earphone one preset time period of future
Decibel value in a numerical value, the sensitivity coefficient of the analog-to-digital conversion module of X2 earphones, X3 be digital-to-analogue turn
The sensitivity coefficient of block is changed the mold, X4 is the sensitivity coefficient of earphone;
Y1 is default deviation ratio, and Y2 is default threshold value.
Work as Y1=94, during Y2=100, then when X1 is unsatisfactory for below equation:
X1+X2+X3+X4<6,
Then need to reduce the volume of the corresponding voice datas of X1.
In the above embodiment of the present invention, decibel value and the earphone of the voice data that will be played by earphone
Ardware feature is combined, when the decibel value that can damage human ear hearing is reached, then automatic to reduce earpiece volume.This
Invention is automatically obtained the protection to human ear hearing by earphone end, it is to avoid very big sound occur causes ear difficult
By or impaired situation, solve the problems, such as that existing ear speaker device is negligent of the protection to human ear.
Second embodiment
Referring to Fig. 2, the second embodiment of the present invention provides a kind of sound volume control device, is applied to an earphone,
Including:
Acquisition module 201, the first parameter and the second parameter sets for obtaining earphone, the first parameter is
The spirit of the sensitivity coefficient of the analog-to-digital conversion module of earphone, the sensitivity coefficient of D/A converter module and earphone
Sensitivity coefficient sum, the second parameter sets are the L channel or R channel in earphone one preset time period of future
All voice datas decibel value set;
Control module 202, for when the numerical value in the second parameter sets and the first parameter, default skew system
When number sum is more than or equal to default threshold value, the volume of the corresponding voice data of the numerical value is reduced, it is default inclined
The relative deviation ratio that coefficient is the first sound pressure level and the second sound pressure level is moved, the first sound pressure level is with 2 × 10-5
Handkerchief is the sound pressure level of reference sound pressure, and the second sound pressure level is the sound pressure level with 1 handkerchief as reference sound pressure.
In the above embodiment of the present invention, decibel value and the earphone of the voice data that will be played by earphone
Ardware feature is combined, when the decibel value that can damage human ear hearing is reached, then automatic to reduce earpiece volume.This
Invention is automatically obtained the protection to human ear hearing by earphone end, it is to avoid very big sound occur causes ear difficult
By or impaired situation, solve the problems, such as that existing ear speaker device is negligent of the protection to human ear.
Preferably, control module 202 is used for:
When the numerical value in the second parameter sets and the first parameter, default deviation ratio sum are more than or equal to default
Threshold value when, reduce earphone play the corresponding voice data of the numerical value volume or reduce earphone play the numerical value
The power of corresponding voice data.
Preferably, default deviation ratio is 94.
Preferably, default threshold value is 100.
Preferably, the default time period is 2 seconds.
It should be noted that sound volume control device provided in an embodiment of the present invention is using the device of the above method,
I.e. all embodiments of the above method are applied to the device, and can reach same or analogous beneficial effect.
Above is the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these change
Enter and retouch and also should be regarded as protection scope of the present invention.