Embodiment
See also Fig. 1, Fig. 1 is the schematic flow sheet of output audio control method the first execution mode of the present invention.
Described output audio control method comprises the following steps:
S101 obtains the frequency of current environment sound and the frequency of current output audio;
S102 judges that whether the difference of frequency of described output audio and described ambient sound is less than predetermined threshold value;
If S103 less than described predetermined threshold value, improves the frequency of described output audio.
Wherein, for step S101, the frequency of described ambient sound and volume can get by the sound transducer Real-time Measuring.The frequency of described output audio and volume can record Real-time Measuring by sound transducer and get, and also can obtain by the relevant parameter that reads in audio, video data output audio.
Especially, owing to may include the noise of multiple different frequency in described ambient sound, therefore can take any one in following mode to determine the frequency of described ambient sound, but be not limited to following mode:
First kind of way is: obtain the frequency of the ambient sound with highest frequency as the frequency of current environment sound; In the manner, with the frequency of the highest ambient sound component of frequency as described current environment sound, can prevent that the highest ambient sound of described frequency to the interference of listening to of output audio, improving the frequency difference of output audio and ambient sound to greatest extent, make output audio more outstanding.
The second way is: obtain the frequency averaging value of all ambient sounds as the frequency of current environment sound; Wherein, the frequency averaging value of described ambient sound is the frequency averaging value of the component of all different frequencies of comprising of described ambient sound.
The third mode is: obtain respectively frequency and the volume of the subenvironment sound of all different frequencies that described ambient sound comprises, calculate according to following formula the frequency of current environment sound: f=(F1*A1/(A1+A2+...+Am)+F2*A2/(A1+A2+...+Am)+...+Fm*Am/(A1+A2+...+Am))/m; Wherein, f is the frequency of the current environment sound of calculating, and m is the quantity of the subenvironment sound of different frequency; Fm is the frequency of m sub-ambient sound, and the Am volume is the volume of m sub-ambient sound.
In above-mentioned the third mode, the volume of each component of all different frequencies that described ambient sound comprises and the impact of frequency size have been considered, the component that gives great volume is also larger on the impact of operation result f, and the frequency of therefore calculating in this way the current environment sound that obtains can truly reflect the impact that the frequency of ambient sound causes listening to of output audio.
In step S102, with the frequency ratio of the frequency of described output audio and the ambient sound that gets, calculate its difference, judge that whether described difference is less than predetermined threshold value.Described predetermined threshold value should be the minimum value that allows between the frequency of the frequency of output audio and ambient sound, described predetermined threshold value can be arranged to positive number or negative as required.
If described difference less than predetermined threshold value, shows the underfrequency of output audio, need execution in step S103 automatically to adjust the frequency of output audio; Otherwise the frequency of output audio itself is enough high, just need not execution in step S103, returns to step S101 and S102, and the frequency of again obtaining ambient sound and output audio compares.
In step S103, the frequency of described output audio is adjusted.The mode that improves the frequency of described output audio can have multiple, for example, the frequency modulator on the output channel of described output audio is arranged, and output frequency is improved.When frequency is adjusted, the frequency of described output audio can be improved a preset value, perhaps improve several times.
In a preferred embodiment, according to frequency and the default optimum frequency difference of described ambient sound, the frequency of described output audio is adjusted, wherein, described default optimum frequency difference can specifically be set according to different needs, be preferably the sound frequency difference that makes the human auditory system best results, and can set with reference to known physiological knowledge, perhaps judge according to best auditory effect Experiential Knowledge Database table.And when regulating the frequency of described output audio, can take one of following methods, but be not limited to following methods:
First method for directly with the frequency adjustment of described output audio to the frequency that equals described ambient sound and the optimum frequency difference sum preset;
Second method is: judge that whether the frequency of described ambient sound and default optimum frequency difference sum are greater than default frequency maximum; If greater than described frequency maximum, with the frequency adjustment of described output audio to equaling described frequency maximum; Otherwise, with the frequency adjustment of described output audio to the frequency that equals described ambient sound and default optimum frequency difference sum.
Above-mentioned dual mode can make the sound frequency difference that keeps the human auditory system best results between the frequency of the frequency of output audio and ambient sound, makes user's content of the described output audio of uppick better.Second method in ambient sound frequency superelevation, no longer unrestrictedly improves the frequency of output audio by setting described frequency maximum, and the frequency that prevents output audio is too high and become ear-piercing, more meets general user's the requirement of listening to.
Especially, taking said method, when regulating the frequency of described output audio, can be in a plurality of sub-audio that described output audio comprises, choose one of them sub-audio component as a reference, thereby the frequency of all sub-audio that described output audio is comprised is adjusted.Specifically can be in the following ways:
With the frequency adjustment of described output audio during to the frequency that equals described ambient sound and default optimum frequency difference sum, the frequency adjustment of the sub-audio with highest frequency that described output audio is comprised is to the frequency that equals described ambient sound and the optimum frequency difference sum preset; Obtain described frequency adjustment amplitude with sub-audio of highest frequency; The frequency of all sub-audio that comprise according to the described output audio of described frequency adjustment amplitude adjusted;
With the frequency adjustment of described output audio when equaling described frequency maximum, the frequency adjustment of the sub-audio with highest frequency that described output audio is comprised is to equaling described frequency maximum; Obtain described frequency adjustment amplitude with sub-audio of highest frequency; The frequency of all sub-audio that comprise according to the described output audio of described frequency adjustment amplitude adjusted.
Output audio control method of the present invention can determine and automatically adjust the sound frequency size of output audio according to the sound frequency of the residing ambient sound of spectators, make the user need not the sound of manual adjustment audio frequency and video, and obtain better auditory effect.
See also Fig. 2, Fig. 2 is the schematic flow sheet of output audio control method the second execution mode of the present invention.
The output audio control method of described the second execution mode and the difference of described the first execution mode mainly are, and be further comprising the steps:
S104 obtains the volume value of current environment sound and the volume value of current output audio;
S105 judges that whether the difference of volume value of described output audio and described ambient sound is less than predetermined threshold value;
If S106 less than described predetermined threshold value, improves the volume of described output audio.
Wherein, for step S104, can take any one in following mode to determine the volume of described ambient sound, but be not limited to following mode:
First kind of way is: obtain the volume value of the ambient sound with highest frequency as the volume value of current environment sound.With the volume of the highest ambient sound component of volume as described current environment sound, can prevent that the highest ambient sound of described volume to the interference of listening to of output audio, improving the sound volume difference of output audio and ambient sound to greatest extent, make output audio more outstanding.
The second way is: obtain the volume mean value of all ambient sounds as the volume value of current environment sound.Wherein, the volume mean value of described ambient sound is the volume mean value of the component of all different frequencies of comprising of described ambient sound.
The third mode is: obtain respectively frequency and the volume of the subenvironment sound of all different frequencies that described ambient sound comprises, calculate according to following formula the volume value of current environment sound: a=(A1*F1/(F1+F2+...+Fm)+A2*F2/(F1+F2+...+Fm)+...+Am*Fm/(F1+F2+...+Fm))/m; Wherein, a is the volume value of the current environment sound of calculating, and m is the quantity of the subenvironment sound of different frequency; Fm is the frequency of m sub-ambient sound, and the Am volume is the volume of m sub-ambient sound.
In above-mentioned the third mode, the volume of each component of all different frequencies that described ambient sound comprises and the impact of frequency size have been considered, the component that frequency is high is also larger on the impact of operation result a, and the volume of therefore calculating in this way the current environment sound that obtains can truly reflect the impact that the volume of ambient sound causes listening to of output audio.
In step S105, with the frequency ratio of the volume of described output audio and the ambient sound that gets, calculate its difference, judge that whether described difference is less than predetermined threshold value.Described predetermined threshold value should be the minimum value that allows between the volume of the volume of output audio and ambient sound, described predetermined threshold value can be arranged to positive number or negative as required.
If described difference less than predetermined threshold value, shows that the volume of output audio is too low, need execution in step S106 automatically to adjust the volume of output audio; Otherwise the volume of output audio itself is enough high, just need not execution in step S106, returns to step S104 and S105, and the volume of again obtaining ambient sound and output audio compares.
In step S106, the volume of described output audio is adjusted.The mode that improves described output audio volume can have multiple, for example, the power amplifier on the output channel of described output audio is arranged, and improves the multiplication factor to output frequency.When volume is adjusted, the volume of described output audio can be improved a preset value, perhaps improve several times.
In a preferred embodiment, according to volume and the default best volume difference of described ambient sound, the volume of described output audio is adjusted, wherein, described default best volume difference can specifically be set according to different needs, be preferably the sound volume difference that makes the human auditory system best results, and can set with reference to known physiological knowledge, perhaps judge according to best auditory effect Experiential Knowledge Database table.When regulating the volume of described output audio, can take one of following methods, but be not limited to following methods:
First method for directly with the volume adjusting of described output audio to the volume that equals described ambient sound and the best volume difference sum preset;
Second method is: judge that whether the volume of described ambient sound and default best volume difference sum are greater than default volume maximum; If greater than described volume maximum, with the volume adjusting of described output audio to equaling described volume maximum; Otherwise, with the volume adjusting of described output audio to the volume that equals described ambient sound and default best volume difference sum.
Above-mentioned dual mode can make the wave volume difference that keeps the human auditory system best results between the volume of the volume of output audio and ambient sound, makes user's content of the described output audio of uppick better.Second method in the volume superelevation of ambient sound, no longer unrestrictedly improves the volume of output audio by setting described volume maximum, and the volume that prevents output audio is too high and become ear-piercing, more meets general user's the requirement of listening to.
Output audio control method of the present invention can determine also automatically to adjust the sound frequency of output audio and the size of volume according to sound frequency and the volume of the residing ambient sound of spectators, make the user need not sound frequency and the volume of manual adjustment audio frequency and video, and obtain better auditory effect.
See also Fig. 3, Fig. 3 is the structural representation of output audio regulating system the first execution mode of the present invention.
Described output audio regulating system comprises:
Frequency acquisition module 11 is used for obtaining the frequency of current environment sound and the frequency of current output audio;
Frequency discrimination module 12 is used for judging that whether the difference of frequency of described output audio and described ambient sound is less than predetermined threshold value;
Frequency adjustment module 13 is used for improving the frequency of described output audio when judgment result is that less than described predetermined threshold value.
Wherein, described frequency acquisition module 11 can get by controlling the sound transducer Real-time Measuring frequency and the volume of described ambient sound.And to frequency and the volume of described output audio, can record Real-time Measuring by sound transducer to get, also can in audio, video data, the relevant parameter to output audio obtains by reading.
Owing to may including the noise of multiple different frequency in described ambient sound, therefore described frequency acquisition module comprises following any one submodule:
Highest frequency obtains submodule, is used for obtaining the frequency of the ambient sound with highest frequency as the frequency of current environment sound;
Average frequency obtains submodule, is used for obtaining the frequency averaging value of all ambient sounds as the frequency of current environment sound;
Frequency calculation is obtained submodule, be used for obtaining respectively frequency and the volume of the subenvironment sound of all different frequencies that described ambient sound comprises, calculate according to following formula the frequency of current environment sound: f=(F1*A1/(A1+A2+...+Am)+F2*A2/(A1+A2+...+Am)+...+Fm*Am/(A1+A2+...+Am))/m; Wherein, f is the frequency of the current environment sound of calculating, and m is the quantity of the subenvironment sound of different frequency; Fm is the frequency of m sub-ambient sound, and the Am volume is the volume of m sub-ambient sound.
Described highest frequency obtains submodule with the frequency of the highest ambient sound component of frequency as described current environment sound, can prevent that the highest ambient sound of described frequency is to the interference of listening to of output audio, improve to greatest extent the frequency difference of output audio and ambient sound, make output audio more outstanding.
Described average frequency obtains the frequency averaging value that frequency averaging value that submodule obtains described ambient sound is the component of all different frequencies of comprising of described ambient sound.
Described frequency calculation is obtained submodule and has been considered the volume of each component of all different frequencies that described ambient sound comprises and the impact of frequency size, the component that gives great volume is also larger on the impact of operation result f, and the frequency of therefore calculating in this way the current environment sound that obtains can truly reflect the impact that the frequency of ambient sound causes listening to of output audio.
Described frequency discrimination module 12 with the frequency ratio of the frequency of described output audio and the ambient sound that gets calculates its difference, judges that whether described difference is less than predetermined threshold value.Described predetermined threshold value should be the minimum value that allows between the frequency of the frequency of output audio and ambient sound, described predetermined threshold value can be arranged to positive number or negative as required.
If described difference less than predetermined threshold value, shows the underfrequency of output audio, need automatically to adjust the frequency of output audio; Otherwise the frequency of output audio itself is enough high, just need not to regulate.
The frequency of 13 pairs of described output audios of described frequency adjustment module is adjusted.The mode that improves the frequency of described output audio can have multiple, for example, the frequency modulator on the output channel of described output audio is arranged, and output frequency is improved.When frequency is adjusted, the frequency of described output audio can be improved a preset value, perhaps improve several times.
In a preferred embodiment, described frequency adjustment module 13 is adjusted the frequency of described output audio according to frequency and the default optimum frequency difference of described ambient sound, wherein, described default optimum frequency difference can specifically be set according to different needs, be preferably the sound frequency difference that makes the human auditory system best results, and can set with reference to known physiological knowledge, perhaps judge according to best auditory effect Experiential Knowledge Database table.
Described frequency adjustment module 13 comprises following any one submodule:
First frequency is regulated submodule, is used for the frequency adjustment of described output audio to the frequency that equals described ambient sound and the optimum frequency difference sum preset;
Second frequency is regulated submodule, is used for judging that whether the frequency of described ambient sound and default optimum frequency difference sum are greater than default frequency maximum; If greater than described frequency maximum, with the frequency adjustment of described output audio to equaling described frequency maximum; Otherwise, with the frequency adjustment of described output audio to the frequency that equals described ambient sound and default optimum frequency difference sum.
Described first, second frequency adjustment submodule can make the sound frequency difference that keeps the human auditory system best results between the frequency of the frequency of output audio and ambient sound, makes user's content of the described output audio of uppick better.Described second frequency is regulated submodule by setting described frequency maximum, in ambient sound frequency superelevation, no longer unrestrictedly improves the frequency of output audio, and the frequency that prevents output audio is too high and become ear-piercing, more meets general user's the requirement of listening to.
Especially, in the time regulating the frequency of described output audio, can choose one of them sub-audio component as a reference in a plurality of sub-audio that described output audio comprises, thereby the frequency of all sub-audio that described output audio is comprised is adjusted.:
Described first, second frequency adjustment submodule is with the frequency adjustment of described output audio during to the frequency that equals described ambient sound and default optimum frequency difference sum, and the frequency adjustment of the sub-audio with highest frequency that described output audio is comprised is to the frequency that equals described ambient sound and the optimum frequency difference sum preset; Obtain described frequency adjustment amplitude with sub-audio of highest frequency; The frequency of all sub-audio that comprise according to the described output audio of described frequency adjustment amplitude adjusted;
Described second frequency regulate submodule with the frequency adjustment of described output audio when equaling described frequency maximum, the frequency adjustment of the sub-audio with highest frequency that described output audio is comprised is to equaling described frequency maximum; Obtain described frequency adjustment amplitude with sub-audio of highest frequency; The frequency of all sub-audio that comprise according to the described output audio of described frequency adjustment amplitude adjusted.
Output audio regulating system of the present invention can determine and automatically adjust the sound frequency size of output audio according to the sound frequency of the residing ambient sound of spectators, make the user need not the sound of manual adjustment audio frequency and video, and obtain better auditory effect.
See also Fig. 4, Fig. 4 is the structural representation of output audio regulating system the second execution mode of the present invention.
The output audio regulating system of described the second execution mode and the difference of described the first execution mode mainly are, further comprise:
Volume acquisition module 14 is used for obtaining the volume value of current environment sound and the volume value of current output audio;
Volume discrimination module 15 is used for judging that whether the difference of volume value of described output audio and described ambient sound is less than predetermined threshold value;
Volume adjusting module 16 is used for improving the volume of described output audio when judgment result is that less than described predetermined threshold value.
Described volume acquisition module 14 comprises following any one submodule:
The descant amount is obtained submodule, is used for obtaining the volume value of ambient sound of volume maximum as the volume of current environment sound;
Average volume is obtained submodule, is used for obtaining the volume mean value of all ambient sounds as the volume of current environment sound;
Submodule is obtained in the volume computing, be used for obtaining respectively frequency and the volume of the subenvironment sound of all different frequencies that described ambient sound comprises, calculate according to following formula the volume value of current environment sound: a=(A1*F1/(F1+F2+...+Fm)+A2*F2/(F1+F2+...+Fm)+...+Am*Fm/(F1+F2+...+Fm))/m; Wherein, a is the volume value of the current environment sound of calculating, and m is the quantity of the subenvironment sound of different frequency; Fm is the frequency of m sub-ambient sound, and the Am volume is the volume of m sub-ambient sound.
Described descant amount is obtained submodule with the volume of the highest ambient sound component of volume as described current environment sound, can prevent that the highest ambient sound of described volume is to the interference of listening to of output audio, improve to greatest extent the sound volume difference of output audio and ambient sound, make output audio more outstanding.
Described average volume is obtained the volume mean value that volume mean value that submodule obtains described ambient sound is the component of all different frequencies of comprising of described ambient sound.
Described volume computing is obtained submodule and has been considered the volume of each component of all different frequencies that described ambient sound comprises and the impact of frequency size, the component that frequency is large is also larger on the impact of operation result a, and the volume of therefore calculating in this way the current environment sound that obtains can truly reflect the impact that the volume of ambient sound causes listening to of output audio.
Described volume discrimination module 15 calculates its difference with the volume of described output audio and the volume comparison of the ambient sound that gets, and judges that whether described difference is less than predetermined threshold value.Described predetermined threshold value should be the minimum value that allows between the volume of the frequency of output audio and ambient sound, described predetermined threshold value can be arranged to positive number or negative as required.
If described difference less than predetermined threshold value, shows that the volume of output audio is too low, need automatically to adjust the volume of output audio; Otherwise the volume of output audio itself is enough high, just need not to regulate.
The volume of 16 pairs of described output audios of described volume adjusting module is adjusted.The mode that improves the volume of described output audio can have multiple, for example, the power amplifier on the output channel of described output audio is arranged, and improves the power amplification multiple to described output audio.When volume is adjusted, the volume of described output audio can be improved a preset value, perhaps improve several times.
In a preferred embodiment, described volume adjusting module 16 is adjusted the volume of described output audio according to volume and the default best volume difference of described ambient sound, wherein, described default best volume difference can specifically be set according to different needs, be preferably the wave volume difference that makes the human auditory system best results, and can set with reference to known physiological knowledge, perhaps judge according to best auditory effect Experiential Knowledge Database table.
Described volume adjusting module 16 comprises following any one submodule:
The first volume adjusting submodule is used for the volume adjusting of described output audio to the volume that equals described ambient sound and the best volume difference sum preset;
The second volume adjusting submodule is used for judging that whether the volume of described ambient sound and default best volume difference sum are greater than default volume maximum; If greater than described volume maximum, with the volume adjusting of described output audio to equaling described volume maximum; Otherwise, with the volume adjusting of described output audio to the volume that equals described ambient sound and default best volume difference sum.
Described first, second volume adjusting submodule can make the sound volume difference that keeps the human auditory system best results between the volume of the volume of output audio and ambient sound, makes user's content of the described output audio of uppick better.Described the second volume adjusting submodule in ambient sound volume superelevation, no longer unrestrictedly improves the volume of output audio by setting described volume maximum, and the volume that prevents output audio is too high and become ear-piercing, more meets general user's the requirement of listening to.
Especially, in the time regulating the volume of described output audio, can choose one of them sub-audio component as a reference in a plurality of sub-audio that described output audio comprises, thereby the volume of all sub-audio that described output audio is comprised is adjusted.:
Described first, second volume adjusting submodule is with the volume adjusting of described output audio during to the volume that equals described ambient sound and default best volume difference sum, and the volume adjusting of the sub-audio with descant amount that described output audio is comprised is to the volume that equals described ambient sound and the best volume difference sum preset; Obtain described volume adjusting amplitude with sub-audio of descant amount; The volume of all sub-audio that comprise according to the described output audio of described volume adjusting amplitude adjusted;
Described the second volume adjusting submodule with the volume adjusting of described output audio when equaling described volume maximum, the volume adjusting of the sub-audio with descant amount that described output audio is comprised is to equaling described volume maximum; Obtain described volume adjusting amplitude with sub-audio of descant amount; The volume of all sub-audio that comprise according to the described output audio of described volume adjusting amplitude adjusted.
Sound frequency and the volume of output audio can determine and automatically adjust according to the sound frequency of the residing ambient sound of spectators and volume to output audio regulating system of the present invention, make the user need not the sound of manual adjustment audio frequency and video, and obtain better auditory effect.
One of ordinary skill in the art will appreciate that all or part of flow process and the corresponding system that realize in above-mentioned execution mode, to come the relevant hardware of instruction to complete by computer program, described program can be stored in a computer read/write memory medium, this program can comprise the flow process as the respective embodiments described above when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.Should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.