CN107479851A - volume adjusting method, device, terminal device and storage medium - Google Patents

volume adjusting method, device, terminal device and storage medium Download PDF

Info

Publication number
CN107479851A
CN107479851A CN201710711364.4A CN201710711364A CN107479851A CN 107479851 A CN107479851 A CN 107479851A CN 201710711364 A CN201710711364 A CN 201710711364A CN 107479851 A CN107479851 A CN 107479851A
Authority
CN
China
Prior art keywords
amplitude
adjustment factor
tide
sound
source
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
CN201710711364.4A
Other languages
Chinese (zh)
Other versions
CN107479851B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710711364.4A priority Critical patent/CN107479851B/en
Publication of CN107479851A publication Critical patent/CN107479851A/en
Priority to PCT/CN2018/098646 priority patent/WO2019033939A1/en
Application granted granted Critical
Publication of CN107479851B publication Critical patent/CN107479851B/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

Abstract

The embodiment of the invention discloses a kind of volume adjusting method, device, terminal device and storage medium, this method is included when detecting that terminal device carries out source of sound broadcasting, obtain the audio-frequency information of the preset length of the source of sound, determine the peak swing and mean amplitude of tide in the audio-frequency information, amplitude adjustment factor is determined according to the peak swing and the mean amplitude of tide, the amplitude of the source of sound is adjusted according to the amplitude adjustment factor.This programme improves volume adjusting efficiency, reduces the power consumption of terminal device.

Description

Volume adjusting method, device, terminal device and storage medium
Technical field
The present embodiments relate to computer technology, more particularly to a kind of volume adjusting method, device, terminal device and deposit Storage media.
Background technology
With the raising of terminal device popularity, increasing user's using terminal equipment performs various work( Can be to meet self-demand, such as using terminal equipment reads word, watches video, listen music, play game.When terminal device exists During playing audio-video, the regulation existing defects of volume are, it is necessary to improve.
The content of the invention
The invention provides a kind of volume adjusting method, device, terminal device and storage medium, improves volume adjusting effect Rate, reduce the power consumption of terminal device.
In a first aspect, the embodiments of the invention provide a kind of volume adjusting method, including:
When detecting that terminal device carries out source of sound broadcasting, the audio-frequency information of the preset length of the source of sound is obtained;
Determine the peak swing and mean amplitude of tide in the audio-frequency information;
Amplitude adjustment factor is determined according to the peak swing and the mean amplitude of tide;
The amplitude of the source of sound is adjusted according to the amplitude adjustment factor.
Second aspect, the embodiment of the present invention additionally provide a kind of volume adjustment device, including:
Acquisition module, for when detecting that terminal device carries out source of sound broadcasting, obtaining the preset length of the source of sound Audio-frequency information;
Amplitude determination module, for determining peak swing and mean amplitude of tide in the audio-frequency information;
Adjustment factor determining module, for determining amplitude adjustment factor according to the peak swing and the mean amplitude of tide;
Adjustment module, for the amplitude of the source of sound to be adjusted according to the amplitude adjustment factor.
The third aspect, the embodiment of the present invention additionally provide a kind of terminal device, including:Processor, memory and storage On a memory and the computer program that can run on a processor, realized such as during computer program described in the computing device Volume adjusting method described in the embodiment of the present invention.
Fourth aspect, the embodiment of the present invention additionally provide a kind of storage medium for including terminal device executable instruction, institute Terminal device executable instruction is stated as being adjusted during terminal device computing device for the volume described in performing the embodiment of the present invention Section method.
Technical scheme provided in an embodiment of the present invention, when detecting that terminal device carries out source of sound broadcasting, obtain the sound The audio-frequency information of the preset length in source, peak swing and mean amplitude of tide in the audio-frequency information are determined, is shaken according to the maximum Width and the mean amplitude of tide determine amplitude adjustment factor, and the amplitude of the source of sound is adjusted according to the amplitude adjustment factor Section.This programme improves volume adjusting efficiency, reduces the power consumption of terminal device.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, of the invention is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of flow chart of volume adjusting method provided in an embodiment of the present invention;
Fig. 2 is the flow chart of another volume adjusting method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another volume adjusting method provided in an embodiment of the present invention;
Fig. 4 is the flow chart of another volume adjusting method provided in an embodiment of the present invention;
Fig. 5 is the flow chart of another volume adjusting method provided in an embodiment of the present invention;
Fig. 6 is the flow chart of another volume adjusting method provided in an embodiment of the present invention;
Fig. 7 is a kind of structured flowchart of volume adjustment device provided in an embodiment of the present invention;
Fig. 8 is a kind of structural representation of terminal device provided in an embodiment of the present invention.
Embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used to explain the present invention, rather than limitation of the invention.It also should be noted that for the ease of retouching State, part related to the present invention rather than entire infrastructure are illustrate only in accompanying drawing.
Fig. 1 is a kind of flow chart of volume adjusting method provided in an embodiment of the present invention, and the present embodiment is applicable to terminal Situation about its volume being adjusted during device plays source of sound, this method can by terminal device provided in an embodiment of the present invention Lai Perform, the volume adjustment device of the terminal device can be realized by the way of software and/or hardware, as shown in figure 1, the present embodiment The concrete scheme of offer is as follows:
Step S101, when detecting that terminal device carries out source of sound broadcasting, the audio of the preset length of the source of sound is obtained Information.
Terminal device can carry out source of sound by the audio and video playing software that the third party application or system of installation carry Broadcasting.Wherein, the steps such as acquisition, decoding and output of audio files are mainly included.Exemplary, the audio files got It can be the multicast data flow received by network, can also be the audio-video document that terminal device is locally stored;Get the sound It is loaded into after source file in core buffer;The audio files for being loaded into core buffer are decoded, opened in decoding Before beginning, if the audio files include video data, it is necessary to carry out the separation of voice data and video data simultaneously, it will divide Voice data from after is inputted to audio decoder, wherein, audio decoder is mainly used in reading the audio in core buffer Data, digital audio and video signals are obtained, and the digital audio and video signals are converted into simulated audio signal, the broadcasting device of terminal device Audio broadcasting is carried out according to the simulated audio signal.In one embodiment, when listening to source of sound broadcast event and being triggered, really Determine terminal device and commence play out source of sound, wherein, the trigger event can be the broadcast button quilt shown in the touch-screen detected Press, can also be when detecting the broadcasting device of terminal device for example loudspeaker commencing play out sound, determine that terminal device carries out sound Source plays.
When detecting that terminal device carries out source of sound broadcasting, the audio-frequency information of the preset length of the source of sound is obtained.One In individual embodiment, the digital audio and video signals that can decode to obtain to audio decoder are sampled, and determine audio corresponding to the source of sound Information, wherein preset length can be 3s, 5s or 10s etc..In another embodiment, currently playing source of sound can also be obtained Original document, the audio-frequency information of preset length corresponding to source of sound is determined by the parsing to the original document.In another embodiment In, by taking android system as an example, can by android.media.MediaRecorder classes or Android.media.AudioRecord classes obtain the audio-frequency information of source of sound.
Step S102, the peak swing and mean amplitude of tide in the audio-frequency information are determined.
Amplitude refers to the ultimate range of deviation origin-location during object vibrations, the loudness and source of sound of the sound that human ear is heard Amplitude it is related, amplitude is bigger, and loudness is stronger.In one embodiment, obtained DAB letter can be decoded to audio decoder Number it is sampled, obtains amplitude information, wherein, the amplitude information can be made up of multiple amplitudes.Exemplary, by taking 3s as an example, In the source of sound played in 3s durations, multiple amplitudes in obtained audio-frequency information are corresponded to, record each amplitude of acquisition, really The mean amplitude of tide of fixed peak swing therein and each amplitude.
In another embodiment, when detecting source of sound broadcasting, determined once every preset time (such as 1s, 3s or 10s) The audio-frequency information of preset length, or in real time, the amplitude of each frame of audio-frequency information is determined.Specifically, described obtain Taking the audio-frequency information of the source of sound includes:The audio-frequency information of the preset length for obtaining the source of sound includes:Obtain the sound The audio frame information of the preset length in source;Accordingly, determine the peak swing in the audio-frequency information of the preset length and be averaged Amplitude includes:The peak swing and mean amplitude of tide in the audio-frequency information of the preset length are determined according to the audio frame information. Exemplary, when detecting that source of sound plays, audio files are parsed to obtain audio frame sequence, determine the sound of preset length Amplitude corresponding to each frame determination under frequency information, and then determine peak swing and mean amplitude of tide.
Step S103, amplitude adjustment factor is determined according to the peak swing and the mean amplitude of tide, according to the amplitude The amplitude of the source of sound is adjusted adjustment factor.
In one embodiment, fixed amplitude adjustment factor can be determined according to peak swing and mean amplitude of tide, can be with Different amplitude adjustment factors is to determine, is allocated further according to the size of specific source of sound amplitude to enter row amplitude regulation. , can be by being parsed to audio files, to the table in obtained voice data during the amplitude of source of sound is adjusted The data of sign amplitude information are modified, and are packaged again after modification, audio files and are played corresponding to be buffered to Shi Yinyuan amplitude has been increased accordingly;It is also possible that in the decoding process that source of sound plays, pass through the digital sound to obtaining Frequency signal is analyzed to obtain amplitude data, and the amplitude data is multiplied by into corresponding adjustment factor to change amplitude size, and then The volume of source of sound is adjusted.Hereby it is achieved that to source of sound volume on the premise of not changing the original volume of terminal device system Size adjusted, regulation process can before audio files are introduced into buffering area, with reduce play load or It is adjusted for the source of sound content in buffering area to improve regulation efficiency.
In another embodiment, the amplitude size of each frame of source of sound is adjusted.Specifically, it is directed to during regulation The difference of the amplitude size of each frame distributes different amplitude adjustment factors to carry out corresponding regulation, exemplary, specific corresponding Relation can be with as shown in the table:
Table 1
Amplitude Adjustment factor
More than -3db or less than -50db 1
It is more than -50db less than -10db 2
It is more than -10db less than -3db 1.5
As shown in table 1, when the amplitude of audio frame is more than -3db or less than -50db, its gain is not adjusted;When shaking When width is more than -50db less than -10db, amplitude is high amplitude area, is that its distribution gain coefficient is 1.5, when amplitude is big less than -10db Be middle amplitude area when -50db, be its to distribute peak factor be 2 to significantly improve the amplitude size of the fractional amplitude.
In a possible embodiment, it is described to determine amplitude regulation system according to the peak swing and the mean amplitude of tide Number includes:If the difference of the peak swing and the mean amplitude of tide meets preparatory condition, according to the peak swing and The mean amplitude of tide determines amplitude adjustment factor.Exemplary, when peak swing and larger average amplitude difference (such as 0.2db), volume is larger when not avoiding being played to the source of sound of large magnitude, higher amplitude is adjusted with reduction volume. Optionally, if the difference of peak swing and mean amplitude of tide is unsatisfactory for preparatory condition, that is, it is more or less the same, then the amplitude of source of sound is not carried out Regulation.
Fig. 2 is the flow chart of another volume adjusting method provided in an embodiment of the present invention, optionally, described in the foundation Peak swing and the mean amplitude of tide determine that amplitude adjustment factor includes:Difference according to the peak swing and the mean amplitude of tide Value determines the first amplitude adjustment factor;Accordingly, it is described that the amplitude of the source of sound is adjusted according to the amplitude adjustment factor Section includes:According to the first amplitude adjustment factor, the amplitude that the first predetermined threshold value is more than in the source of sound is adjusted.Such as Shown in Fig. 2, technical scheme is specific as follows:
Step S201, when detecting that terminal device carries out source of sound broadcasting, the audio of the preset length of the source of sound is obtained Information.
Step S202, the peak swing and mean amplitude of tide in the audio-frequency information are determined.
Step S203, the difference according to the peak swing and the mean amplitude of tide determines the first amplitude adjustment factor, according to According to the first amplitude adjustment factor, the amplitude that the first predetermined threshold value is more than in the source of sound is adjusted.Exemplary, according to The relation such as following table of the first amplitude adjustment factor is determined according to the difference of peak swing and mean amplitude of tide:
Table 2
Amplitude difference Adjustment factor
More than 0.4db 0.4
It is less than 0.4db more than 0.3db 0.6
It is less than 0.3db more than 0.2db 0.8
Wherein, the first default amplitude threshold can be -2db, that is, the amplitude size that will be greater than the first amplitude threshold is multiplied by Corresponding adjustment factor reduces volume to enter row amplitude decay.Hereby it is achieved that the part larger to amplitude in source of sound is closed Reason decay improves the result of broadcast of source of sound to avoid sense of hearing lofty.
Fig. 3 is the flow chart of another volume adjusting method provided in an embodiment of the present invention, optionally, described according to institute State peak swing and the mean amplitude of tide difference determine the first amplitude adjustment factor after, in addition to:Averagely shaken according to described Width determines the second amplitude adjustment factor;Accordingly, it is described that the amplitude of the source of sound is adjusted according to the amplitude adjustment factor Section also includes:According to the second amplitude adjustment factor, to being less than the second predetermined threshold value in the source of sound and being preset more than the 3rd The amplitude of threshold value is adjusted, and second predetermined threshold value is less than the first predetermined threshold value.Specifically as shown in the figure:
Step S301, when detecting that terminal device carries out source of sound broadcasting, the audio of the preset length of the source of sound is obtained Information.
Step S302, the peak swing and mean amplitude of tide in the audio-frequency information are determined.
Step S303, the difference according to the peak swing and the mean amplitude of tide determines the first amplitude adjustment factor, according to According to the first amplitude adjustment factor, the amplitude that the first predetermined threshold value is more than in the source of sound is adjusted.
Step S304, the second amplitude adjustment factor is determined according to the mean amplitude of tide, system is adjusted according to second amplitude Number, it is adjusted to being less than the second predetermined threshold value in the source of sound and being more than the amplitude of the 3rd predetermined threshold value.
Wherein, second predetermined threshold value is less than the first predetermined threshold value.In one embodiment, according to the mean amplitude of tide Determine the second amplitude adjustment factor.Exemplary, the corresponding relation such as following table of mean amplitude of tide and the second amplitude adjustment factor:
Table 3
Mean amplitude of tide Adjustment factor
-25db 1.2
-20db 1.5
-15db 1.8
Exemplary, second predetermined threshold value can be -30db, and the 3rd default amplitude threshold can be -50db.When it is determined that When the source of sound amplitude gone out is less than the second predetermined threshold value and is more than three predetermined threshold values, according to adjustment factor corresponding to table 3 to meeting The amplitude of condition is adjusted.
It is from the foregoing, more big right according to adjustment factor, mean amplitude of tide corresponding to the size determination of the mean amplitude of tide of source of sound The adjustment factor answered is higher, to meet condition (be less than the second predetermined threshold value and be more than the 3rd predetermined threshold value) amplitude according to this Adjustment factor is adjusted, and volumes portions relatively low in source of sound are carried out to the raising of volume so that source of sound is played in playing process Result of broadcast more preferably, avoids user and carries out volume adjusting manually, improve volume adjusting efficiency.
Fig. 4 is the flow chart of another volume adjusting method provided in an embodiment of the present invention, optionally, described according to institute State peak swing and before the mean amplitude of tide determines amplitude adjustment factor, in addition to:Determine that the terminal device plays device Impedance value;Accordingly, it is described to determine that amplitude adjustment factor includes according to the peak swing and the mean amplitude of tide:According to institute State impedance value, the peak swing and the mean amplitude of tide and determine amplitude adjustment factor.Specifically as shown in the figure:
Step S401, when detecting that terminal device carries out source of sound broadcasting, the audio of the preset length of the source of sound is obtained Information.
Step S402, the peak swing and mean amplitude of tide in the audio-frequency information are determined.
Step S403, determine that the terminal device plays the impedance value of device.
In one embodiment, can be by the broadcasting device installed in power amplifier chips detection terminal equipment (such as:Loudspeaker) Impedance value, can also be by physics mode detect play device impedance.
Step S404, the first amplitude regulation system is determined according to the impedance value, the peak swing and the mean amplitude of tide Number.
In one embodiment, in the above-described embodiments according on the basis of peak swing and mean amplitude of tide, further knot Close impedance value the first amplitude adjustment factor of common determination that the terminal device that step S403 is determined plays device.Exemplary, should The the first amplitude adjustment factor determined jointly corresponding to impedance value is bigger is bigger.Specifically, assume to play the nominal impedance of device It is worth for x, is 1.2x by detecting obtained impedance value, then corresponding first amplitude regulation coefficient can only pass through peak swing 1.2 times of the amplitude adjustment factor determined with mean amplitude of tide are to be used as the amplitude adjustment factor finally determined.
Step S405, according to the first amplitude adjustment factor, the amplitude to being more than the first predetermined threshold value in the source of sound It is adjusted.
Step S406, the second amplitude adjustment factor is determined according to the mean amplitude of tide, system is adjusted according to second amplitude Number, it is adjusted to being less than the second predetermined threshold value in the source of sound and being more than the amplitude of the 3rd predetermined threshold value.
From the foregoing, during the amplitude of source of sound is adjusted, the impedance value for playing device is introduced as determination One of parameter of amplitude adjustment factor, avoid and play device with the increase impedance value more and more higher of playing duration and then to normal The problem of volume in playing process has an impact so that the volume after regulation more preferably meets user's request, enters one Step improves volume adjusting effect.
Fig. 5 is the flow chart of another volume adjusting method provided in an embodiment of the present invention, optionally, described according to institute State peak swing and before the mean amplitude of tide determines amplitude adjustment factor, in addition to:Determine that the terminal device plays device Noise figure;Accordingly, it is described to determine that amplitude adjustment factor includes according to the peak swing and the mean amplitude of tide:According to institute State noise figure, the peak swing and the mean amplitude of tide and determine amplitude adjustment factor.Specifically as shown in the figure:
Step S501, when detecting that terminal device carries out source of sound broadcasting, the audio of the preset length of the source of sound is obtained Information.
Step S502, the peak swing and mean amplitude of tide in the audio-frequency information are determined.
Step S503, determine that the terminal device is presently in the noise figure of environment.
In one embodiment, the noise of environment can be presently in by the collection of the microphone of installing terminal equipment to determine Corresponding noise figure.
Step S504, the first amplitude regulation system is determined according to the noise figure, the peak swing and the mean amplitude of tide Number.
In one embodiment, in the above-described embodiments according on the basis of peak swing and mean amplitude of tide, further knot Close noise figure the first amplitude adjustment factor of common determination that the terminal device that step S503 is determined is presently in environment.It is exemplary , the first amplitude adjustment factor for determining jointly corresponding to the noise figure is bigger is bigger.Specifically, assume terminal device in peace and quiet Noise figure under environment is y, when terminal device is in outdoor or noisy environment, it is determined that noise figure be 1.2y, then accordingly First amplitude regulation coefficient can be 1.2 times of the amplitude adjustment factor only determined by peak swing and mean amplitude of tide using as The amplitude adjustment factor finally determined.It should be noted that can also be by impedance value, noise figure, the peak swing of source of sound and average Amplitude determines the amplitude adjustment factor of source of sound jointly.
Step S505, according to the first amplitude adjustment factor, the amplitude to being more than the first predetermined threshold value in the source of sound It is adjusted.
Step S506, the second amplitude adjustment factor is determined according to the mean amplitude of tide, system is adjusted according to second amplitude Number, it is adjusted to being less than the second predetermined threshold value in the source of sound and being more than the amplitude of the 3rd predetermined threshold value.
From the foregoing, during the amplitude of source of sound is adjusted, it is contemplated that shadow of the noise to terminal device volume Ring, using the noise figure of determination as one of parameter for determining amplitude adjustment factor so that the volume after regulation more preferably meets User's request, further increase volume adjusting effect.
Fig. 6 is the flow chart of another volume adjusting method provided in an embodiment of the present invention, optionally, is shaken according to described in After the amplitude of the source of sound is adjusted width adjustment factor, in addition to:According to corresponding to amplitude adjustment factor determination Volume adjusting information;The volume current to the terminal device according to the volume adjusting information is adjusted.Specifically such as figure institute Show:
Step S601, when detecting that terminal device carries out source of sound broadcasting, the audio of the preset length of the source of sound is obtained Information.
Step S602, the peak swing and mean amplitude of tide in the audio-frequency information are determined.
Step S603, amplitude adjustment factor is determined according to the peak swing and the mean amplitude of tide, according to the amplitude The amplitude of the source of sound is adjusted adjustment factor.
Step S604, according to volume adjusting information corresponding to amplitude adjustment factor determination, according to the volume adjusting The information volume current to the terminal device is adjusted.
In one embodiment, the volume adjusting information according to corresponding to determining amplitude adjustment factor.Exemplary, work as amplitude When adjustment factor is more than 1, it is determined that corresponding volume increases information, when amplitude adjustment factor is less than 1, it is determined that corresponding sound Amount reduces information.Specifically, in one embodiment, the information of volume increase or volume reduction is corresponding target volume Value.Exemplary, terminal device is always divided into 18 grade-adjustables, the corresponding volume of each grade to max volume by Jing Yin Value, target sound value corresponding to volume reduction information can be 3 or 4, and target sound value corresponding to volume increase information can To be 14 or 15, when the source of sound amplitude determined is less than normal, then volume value is increased into 14 or 15 accordingly, when the sound determined When source amplitude is bigger than normal, then volume value is decreased to 3 or 4 accordingly.In another embodiment, volume increase or volume reduce Information is corresponding volume change value.Exemplary, terminal device is always divided into 18 grade-adjustables to max volume by Jing Yin, It is 3 that each corresponding volume value of grade, volume increase information and volume, which reduce volume change value corresponding to information, for example, The volume value of present terminal equipment is 10, and when needing to increase information volume, then increase by 3 is adopted on the basis of current volume value Sound broadcasting is carried out with the 13rd grade of volume, when needing to reduce information volume, then reduces 3 on the basis of current volume value and adopts Sound broadcasting is carried out with the 7th grade of volume.Optionally, before the volume of terminal device is adjusted, in addition to:Determine the sound The reproduction time in source, when reproduction time is more than preset time, using volume increase information or volume down according to as described in if 30s The mode that volume change value in the small information volume value current to the terminal device is adjusted, is thus further increased Volume adjusting efficiency, reduce the energy consumption of terminal device.
Thus, on the basis of the amplitude of source of sound is adjusted, the broadcast sound volume to terminal device of adaptability is carried out Regulation, further enhancing regulating effect so that the volume in source of sound playing process is more preferably moderate, meets user's request.
Fig. 7 is a kind of structured flowchart of volume adjustment device provided in an embodiment of the present invention, and the device is above-mentioned for performing The volume adjusting method that embodiment provides, possesses the corresponding functional module of execution method and beneficial effect.As shown in fig. 7, the dress Put and specifically include:Acquisition module 101, amplitude determination module 102, adjustment factor determining module 103 and adjustment module 104.
Wherein, acquisition module 101, for when detecting that terminal device carries out source of sound broadcasting, obtaining the pre- of the source of sound If the audio-frequency information of length.
Amplitude determination module 102, for determining peak swing and mean amplitude of tide in the audio-frequency information.
Adjustment factor determining module 103, for determining amplitude regulation system according to the peak swing and the mean amplitude of tide Number.
Adjustment module 104, for the amplitude of the source of sound to be adjusted according to the amplitude adjustment factor.
The technical scheme that the present embodiment provides, when detecting that terminal device carries out source of sound broadcasting, obtain the source of sound The audio-frequency information of preset length, determine peak swing and mean amplitude of tide in the audio-frequency information, according to the peak swing and The mean amplitude of tide determines amplitude adjustment factor, and the amplitude of the source of sound is adjusted according to the amplitude adjustment factor.This Scheme improves volume adjusting efficiency, reduces the power consumption of terminal device.
In a possible embodiment, the amplitude determination module 102 includes:
If the difference of the peak swing and the mean amplitude of tide meets preparatory condition, according to the peak swing and The mean amplitude of tide determines amplitude adjustment factor.
In a possible embodiment, the adjustment factor determining module 103 is specifically used for:
Difference according to the peak swing and the mean amplitude of tide determines the first amplitude adjustment factor;
Accordingly, the adjustment module 104 is specifically used for:
According to the first amplitude adjustment factor, the amplitude that the first predetermined threshold value is more than in the source of sound is adjusted.
In a possible embodiment, the adjustment factor determining module 103 is additionally operable to:
After the difference according to the peak swing and the mean amplitude of tide determines the first amplitude adjustment factor, according to The second amplitude adjustment factor is determined according to the mean amplitude of tide;
The adjustment module 104 is additionally operable to:
According to the second amplitude adjustment factor, to being less than the second predetermined threshold value in the source of sound and more than the 3rd default threshold The amplitude of value is adjusted, and second predetermined threshold value is less than the first predetermined threshold value.
In a possible embodiment, the adjustment factor determining module 103 is additionally operable to:
It is described determine amplitude adjustment factor according to the peak swing and the mean amplitude of tide before, determine the terminal The impedance value of device plays device, amplitude regulation system is determined according to the impedance value, the peak swing and the mean amplitude of tide Number.
In a possible embodiment, the adjustment factor determining module 103 is additionally operable to:
It is described determine amplitude adjustment factor according to the peak swing and the mean amplitude of tide before determine the terminal Equipment is presently in the noise figure of environment, determines that amplitude is adjusted according to the noise figure, the peak swing and the mean amplitude of tide Save coefficient.
In a possible embodiment, the adjustment module 104 is additionally operable to:
After the amplitude of the source of sound is adjusted according to the amplitude adjustment factor, system is adjusted according to the amplitude Volume adjusting information corresponding to number determination;The volume current to the terminal device according to the volume adjusting information is adjusted Section.
The present embodiment provides a kind of terminal device on the basis of the various embodiments described above, and the terminal device can include this The volume adjustment device provided is provided.Fig. 8 is the structural representation of another terminal device provided in an embodiment of the present invention, is such as schemed Shown in 8, the terminal device 200 includes:Memory 201, processor (Central Processing Unit, CPU) 202, peripheral hardware Interface 203, RF (Radio Frequency, radio frequency) circuit 205, voicefrequency circuit 206, loudspeaker 211, power management chip 208th, input/output (I/O) subsystem 209, touch-screen 212, other input/control devicess 210 and outside port 204, this A little parts are communicated by one or more communication bus or signal wire 207.
It should be understood that graphic terminal 200 is only an example of terminal device, and terminal device 200 Can have than more or less parts shown in figure, can combine two or more parts, or can be with Configured with different parts.Various parts shown in figure can be including one or more signal transactings and/or special Hardware, software including integrated circuit are realized in the combination of hardware and software.
The terminal device for being used to open the rights management of application more that the present embodiment provides is described in detail below, should Terminal device is by taking smart mobile phone as an example.
Memory 201, the memory 201 can be accessed by CPU202, Peripheral Interface 203 etc., and the memory 201 can Including high-speed random access memory, can also include nonvolatile memory, such as one or more disk memories, Flush memory device or other volatile solid-state parts.
The input of equipment and output peripheral hardware can be connected to CPU202 and deposited by Peripheral Interface 203, the Peripheral Interface 203 Reservoir 201.
I/O subsystems 209, the I/O subsystems 209 can be by the input/output peripherals in equipment, such as touch-screen 212 With other input/control devicess 210, Peripheral Interface 203 is connected to.I/O subsystems 209 can include the He of display controller 2091 For controlling one or more input controllers 2092 of other input/control devicess 210.Wherein, one or more input controls Device 2092 processed receives electric signal from other input/control devicess 210 or sends electric signal to other input/control devicess 210, Other input/control devicess 210 can include physical button (pressing button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole, click on roller.What deserves to be explained is input controller 2092 can with it is following any one be connected:Keyboard, infrared port, The instruction equipment of USB interface and such as mouse.
Touch-screen 212, the touch-screen 212 are the input interface and output interface between user terminal and user, can It can include figure, text, icon, video etc. to user, visual output depending on output display.
Display controller 2091 in I/O subsystems 209 receives electric signal from touch-screen 212 or sent out to touch-screen 212 Electric signals.Touch-screen 212 detects the contact on touch-screen, and the contact detected is converted to and shown by display controller 2091 The interaction of user interface object on touch-screen 212, that is, realize man-machine interaction, the user interface being shown on touch-screen 212 Icon that object can be the icon of running game, be networked to corresponding network etc..What deserves to be explained is equipment can also include light Mouse, light mouse is not show the touch sensitive surface visually exported, or the extension of the touch sensitive surface formed by touch-screen.
RF circuits 205, it is mainly used in establishing the communication of mobile phone and wireless network (i.e. network side), realizes mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuits 205 receive and send RF letters Number, RF signals are also referred to as electromagnetic signal, and RF circuits 205 convert electrical signals to electromagnetic signal or electromagnetic signal is converted into telecommunications Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuits 205 can include being used to perform The known circuit of these functions, it includes but is not limited to antenna system, RF transceivers, one or more amplifiers, tuner, one Individual or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identify mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 206, it is mainly used in receiving voice data from Peripheral Interface 203, the voice data is converted into telecommunications Number, and the electric signal is sent to loudspeaker 211.
Loudspeaker 211, for the voice signal for receiving mobile phone from wireless network by RF circuits 205, it is reduced to sound And play the sound to user.
Power management chip 208, the hardware for being connected by CPU202, I/O subsystem and Peripheral Interface are powered And power management.
The executable present invention of the volume adjustment device and terminal device of the terminal device provided in above-described embodiment is any real The volume adjusting method for the terminal device that example is provided is applied, possesses and performs the corresponding functional module of this method and beneficial effect.Not The ins and outs of detailed description in the above-described embodiments, reference can be made to the volume for the terminal device that any embodiment of the present invention is provided Adjusting method.
The embodiment of the present invention also provides a kind of storage medium for including terminal device executable instruction, and the terminal device can Execute instruction is used to perform a kind of volume adjusting method when by terminal device computing device, and this method includes:
When detecting that terminal device carries out source of sound broadcasting, the audio-frequency information of the preset length of the source of sound is obtained;
Determine the peak swing and mean amplitude of tide in the audio-frequency information;
Amplitude adjustment factor is determined according to the peak swing and the mean amplitude of tide;
The amplitude of the source of sound is adjusted according to the amplitude adjustment factor.
In a possible embodiment, it is described to determine amplitude regulation system according to the peak swing and the mean amplitude of tide Number includes:
If the difference of the peak swing and the mean amplitude of tide meets preparatory condition, according to the peak swing and The mean amplitude of tide determines amplitude adjustment factor.
In a possible embodiment, it is described to determine amplitude regulation system according to the peak swing and the mean amplitude of tide Number includes:
Difference according to the peak swing and the mean amplitude of tide determines the first amplitude adjustment factor;
Accordingly, it is described the amplitude of the source of sound is adjusted according to the amplitude adjustment factor including:
According to the first amplitude adjustment factor, the amplitude that the first predetermined threshold value is more than in the source of sound is adjusted.
In a possible embodiment, is determined in the difference according to the peak swing and the mean amplitude of tide After one amplitude adjustment factor, in addition to:
The second amplitude adjustment factor is determined according to the mean amplitude of tide;
Accordingly, the described amplitude of the source of sound is adjusted according to the amplitude adjustment factor also includes:
According to the second amplitude adjustment factor, to being less than the second predetermined threshold value in the source of sound and more than the 3rd default threshold The amplitude of value is adjusted, and second predetermined threshold value is less than the first predetermined threshold value.
In a possible embodiment, determine that amplitude is adjusted according to the peak swing and the mean amplitude of tide described Before coefficient, in addition to:
Determine that the terminal device plays the impedance value of device;
Accordingly, it is described to determine that amplitude adjustment factor includes according to the peak swing and the mean amplitude of tide:
Amplitude adjustment factor is determined according to the impedance value, the peak swing and the mean amplitude of tide.
In a possible embodiment, determine that amplitude is adjusted according to the peak swing and the mean amplitude of tide described Before coefficient, in addition to:
Determine that the terminal device is presently in the noise figure of environment;
Accordingly, it is described to determine that amplitude adjustment factor includes according to the peak swing and the mean amplitude of tide:
Amplitude adjustment factor is determined according to the noise figure, the peak swing and the mean amplitude of tide.
In a possible embodiment, it is being adjusted to the amplitude of the source of sound according to the amplitude adjustment factor Afterwards, in addition to:
According to volume adjusting information corresponding to amplitude adjustment factor determination;
The volume current to the terminal device according to the volume adjusting information is adjusted.
Storage medium --- any various types of memory devices or storage device.Term " storage medium " is intended to wrap Include:Install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, blue Bath (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetizing mediums (such as hard disk or optical storage);Memory component of register or other similar types etc..Storage medium can also include other The memory of type or its combination.In addition, storage medium can be located at program in the first computer system being wherein performed, Or can be located in different second computer systems, second computer system is connected to the by network (such as internet) One computer system.Second computer system can provide programmed instruction and be used to perform to the first computer." storage is situated between term Matter " can include may reside within diverse location two of (such as in different computer systems by network connection) or More storage mediums.Storage medium can store the programmed instruction that can be performed by one or more processors and (such as implement For computer program).
Certainly, a kind of storage medium for including computer executable instructions that the embodiment of the present invention is provided, its computer The volume adjusting method operation that executable instruction is not limited to the described above, can also carry out what any embodiment of the present invention was provided Associative operation in volume adjusting method.
Pay attention to, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes, Readjust and substitute without departing from protection scope of the present invention.Therefore, although being carried out by above example to the present invention It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also Other more equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.

Claims (10)

  1. A kind of 1. volume adjusting method, it is characterised in that including:
    When detecting that terminal device carries out source of sound broadcasting, the audio-frequency information of the preset length of the source of sound is obtained;
    Determine the peak swing and mean amplitude of tide in the audio-frequency information;
    Amplitude adjustment factor is determined according to the peak swing and the mean amplitude of tide;
    The amplitude of the source of sound is adjusted according to the amplitude adjustment factor.
  2. 2. according to the method for claim 1, it is characterised in that described true according to the peak swing and the mean amplitude of tide Determining amplitude adjustment factor includes:
    If the difference of the peak swing and the mean amplitude of tide meets preparatory condition, according to the peak swing and described Mean amplitude of tide determines amplitude adjustment factor.
  3. 3. according to the method for claim 2, it is characterised in that described true according to the peak swing and the mean amplitude of tide Determining amplitude adjustment factor includes:
    Difference according to the peak swing and the mean amplitude of tide determines the first amplitude adjustment factor;
    Accordingly, it is described the amplitude of the source of sound is adjusted according to the amplitude adjustment factor including:
    According to the first amplitude adjustment factor, the amplitude that the first predetermined threshold value is more than in the source of sound is adjusted.
  4. 4. according to the method for claim 3, it is characterised in that described according to the peak swing and the mean amplitude of tide Difference determine the first amplitude adjustment factor after, in addition to:
    The second amplitude adjustment factor is determined according to the mean amplitude of tide;
    Accordingly, the described amplitude of the source of sound is adjusted according to the amplitude adjustment factor also includes:
    According to the second amplitude adjustment factor, to being less than the second predetermined threshold value in the source of sound and more than the 3rd predetermined threshold value Amplitude is adjusted, and second predetermined threshold value is less than the first predetermined threshold value.
  5. 5. according to the method any one of claim 1-4, it is characterised in that described according to the peak swing and institute State before mean amplitude of tide determines amplitude adjustment factor, in addition to:
    Determine that the terminal device plays the impedance value of device;
    Accordingly, it is described to determine that amplitude adjustment factor includes according to the peak swing and the mean amplitude of tide:
    Amplitude adjustment factor is determined according to the impedance value, the peak swing and the mean amplitude of tide.
  6. 6. according to the method any one of claim 1-4, it is characterised in that described according to the peak swing and institute State before mean amplitude of tide determines amplitude adjustment factor, in addition to:
    Determine that the terminal device is presently in the noise figure of environment;
    Accordingly, it is described to determine that amplitude adjustment factor includes according to the peak swing and the mean amplitude of tide:
    Amplitude adjustment factor is determined according to the noise figure, the peak swing and the mean amplitude of tide.
  7. 7. according to the method any one of claim 1-4, it is characterised in that according to the amplitude adjustment factor to institute State source of sound amplitude be adjusted after, in addition to:
    According to volume adjusting information corresponding to amplitude adjustment factor determination;
    The volume current to the terminal device according to the volume adjusting information is adjusted.
  8. A kind of 8. volume adjustment device, it is characterised in that including:
    Acquisition module, for when detecting that terminal device carries out source of sound broadcasting, obtaining the audio of the preset length of the source of sound Information;
    Amplitude determination module, for determining peak swing and mean amplitude of tide in the audio-frequency information;
    Adjustment factor determining module, for determining amplitude adjustment factor according to the peak swing and the mean amplitude of tide;
    Adjustment module, for the amplitude of the source of sound to be adjusted according to the amplitude adjustment factor.
  9. 9. a kind of terminal device, including:Processor, memory and storage are on a memory and the meter that can run on a processor Calculation machine program, it is characterised in that realized described in the computing device during computer program such as any one of claim 1-7 institutes The volume adjusting method stated.
  10. A kind of 10. storage medium for including terminal device executable instruction, it is characterised in that the terminal device executable instruction As volume adjusting method during terminal device computing device for execution as any one of claim 1-7.
CN201710711364.4A 2017-08-18 2017-08-18 Volume adjusting method, device, terminal device and storage medium Active CN107479851B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710711364.4A CN107479851B (en) 2017-08-18 2017-08-18 Volume adjusting method, device, terminal device and storage medium
PCT/CN2018/098646 WO2019033939A1 (en) 2017-08-18 2018-08-03 Volume adjustment method and apparatus, terminal device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710711364.4A CN107479851B (en) 2017-08-18 2017-08-18 Volume adjusting method, device, terminal device and storage medium

Publications (2)

Publication Number Publication Date
CN107479851A true CN107479851A (en) 2017-12-15
CN107479851B CN107479851B (en) 2019-07-16

Family

ID=60601641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710711364.4A Active CN107479851B (en) 2017-08-18 2017-08-18 Volume adjusting method, device, terminal device and storage medium

Country Status (2)

Country Link
CN (1) CN107479851B (en)
WO (1) WO2019033939A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019033939A1 (en) * 2017-08-18 2019-02-21 Oppo广东移动通信有限公司 Volume adjustment method and apparatus, terminal device, and storage medium
WO2020103527A1 (en) * 2018-11-23 2020-05-28 北京达佳互联信息技术有限公司 Loudness adjustment method and apparatus, and electronic device and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007228411A (en) * 2006-02-24 2007-09-06 Funai Electric Co Ltd Acoustic equipment and television receiver
CN101714855A (en) * 2009-11-19 2010-05-26 无敌科技(西安)有限公司 System and method for automatically adjusting volume
CN101997498A (en) * 2009-08-27 2011-03-30 北京宏景捷讯网络技术股份有限公司 Volume adjusting method and device
CN103746668A (en) * 2013-12-31 2014-04-23 上海斐讯数据通信技术有限公司 Sound volume control method and system
CN104410379A (en) * 2014-10-29 2015-03-11 深圳市金立通信设备有限公司 A volume adjusting method
CN105185396A (en) * 2015-07-28 2015-12-23 小米科技有限责任公司 Method and device for playing audio signal
CN106024007A (en) * 2016-06-21 2016-10-12 维沃移动通信有限公司 Sound processing method and mobile terminal
CN106101929A (en) * 2016-06-30 2016-11-09 维沃移动通信有限公司 A kind of protection human ear audition method and mobile terminal
CN106126164A (en) * 2016-06-16 2016-11-16 广东欧珀移动通信有限公司 A kind of sound effect treatment method and terminal unit
CN106775563A (en) * 2016-12-13 2017-05-31 珠海市魅族科技有限公司 The method and device of volume adjusting
CN106878866A (en) * 2017-03-03 2017-06-20 广东欧珀移动通信有限公司 Acoustic signal processing method, device and terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6999591B2 (en) * 2001-02-27 2006-02-14 International Business Machines Corporation Audio device characterization for accurate predictable volume control
KR101215937B1 (en) * 2006-02-07 2012-12-27 엘지전자 주식회사 tempo tracking method based on IOI count and tempo tracking apparatus therefor
US9402132B2 (en) * 2013-10-14 2016-07-26 Qualcomm Incorporated Limiting active noise cancellation output
CN104486668B (en) * 2014-11-20 2018-06-19 深圳市金立通信设备有限公司 A kind of volume adjusting method
CN106448690A (en) * 2016-10-20 2017-02-22 广州视源电子科技股份有限公司 Automatic gain control method and apparatus of audio signals
CN107479851B (en) * 2017-08-18 2019-07-16 Oppo广东移动通信有限公司 Volume adjusting method, device, terminal device and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007228411A (en) * 2006-02-24 2007-09-06 Funai Electric Co Ltd Acoustic equipment and television receiver
CN101997498A (en) * 2009-08-27 2011-03-30 北京宏景捷讯网络技术股份有限公司 Volume adjusting method and device
CN101714855A (en) * 2009-11-19 2010-05-26 无敌科技(西安)有限公司 System and method for automatically adjusting volume
CN103746668A (en) * 2013-12-31 2014-04-23 上海斐讯数据通信技术有限公司 Sound volume control method and system
CN104410379A (en) * 2014-10-29 2015-03-11 深圳市金立通信设备有限公司 A volume adjusting method
CN105185396A (en) * 2015-07-28 2015-12-23 小米科技有限责任公司 Method and device for playing audio signal
CN106126164A (en) * 2016-06-16 2016-11-16 广东欧珀移动通信有限公司 A kind of sound effect treatment method and terminal unit
CN106024007A (en) * 2016-06-21 2016-10-12 维沃移动通信有限公司 Sound processing method and mobile terminal
CN106101929A (en) * 2016-06-30 2016-11-09 维沃移动通信有限公司 A kind of protection human ear audition method and mobile terminal
CN106775563A (en) * 2016-12-13 2017-05-31 珠海市魅族科技有限公司 The method and device of volume adjusting
CN106878866A (en) * 2017-03-03 2017-06-20 广东欧珀移动通信有限公司 Acoustic signal processing method, device and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019033939A1 (en) * 2017-08-18 2019-02-21 Oppo广东移动通信有限公司 Volume adjustment method and apparatus, terminal device, and storage medium
WO2020103527A1 (en) * 2018-11-23 2020-05-28 北京达佳互联信息技术有限公司 Loudness adjustment method and apparatus, and electronic device and storage medium
US11284151B2 (en) 2018-11-23 2022-03-22 Beijing Dajia Internet Information Technology Co., Ltd. Loudness adjustment method and apparatus, and electronic device and storage medium

Also Published As

Publication number Publication date
CN107479851B (en) 2019-07-16
WO2019033939A1 (en) 2019-02-21

Similar Documents

Publication Publication Date Title
CN107526568A (en) volume adjusting method, device, terminal device and storage medium
CN107465824A (en) volume adjusting method, device, mobile terminal and storage medium
CN107566618A (en) volume adjusting method, device, terminal device and storage medium
US11201598B2 (en) Volume adjusting method and mobile terminal
WO2017215657A1 (en) Sound effect processing method, and terminal device
CN107526570A (en) volume adjusting method, device, terminal device and storage medium
CN102610229B (en) Method, apparatus and device for audio dynamic range compression
CN107479852B (en) Volume adjusting method, device, terminal device and storage medium
CN107436751A (en) volume adjusting method, device, terminal device and storage medium
JP6785907B2 (en) How to arrange wireless speakers, wireless speakers and terminal devices
CN102364931B (en) Dynamic volume regulation method, device and television
CN103456334B (en) Audio file play method and playing device
CN107483734A (en) volume adjusting method, device, terminal device and storage medium
CN107506168A (en) volume adjusting method, device, terminal device and storage medium
CN107479851B (en) Volume adjusting method, device, terminal device and storage medium
CN107508983A (en) volume adjusting method, device, storage medium and terminal device
US11039246B2 (en) Volume adjusting method, device, and terminal device
CN107506170A (en) volume adjusting method, device, terminal device and storage medium
CN106293607B (en) Method and system for automatically switching audio output modes
CN107506169A (en) volume adjusting method, device, terminal device and storage medium
CN110799936B (en) Volume adjusting method, volume adjusting device, terminal equipment and storage medium
CN101958956A (en) Vehicle-mounted electronic equipment and reproduction method thereof
CN112185414A (en) Method and device for adjusting audio playing volume and storage medium
CN115550820A (en) Loudspeaker control method, device, electronic equipment and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant