CN107483734A - 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
CN107483734A
CN107483734A CN201710711510.3A CN201710711510A CN107483734A CN 107483734 A CN107483734 A CN 107483734A CN 201710711510 A CN201710711510 A CN 201710711510A CN 107483734 A CN107483734 A CN 107483734A
Authority
CN
China
Prior art keywords
amplitude
sound
source
audio
adjusted
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
CN201710711510.3A
Other languages
Chinese (zh)
Other versions
CN107483734B (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 CN201710711510.3A priority Critical patent/CN107483734B/en
Publication of CN107483734A publication Critical patent/CN107483734A/en
Application granted granted Critical
Publication of CN107483734B publication Critical patent/CN107483734B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a kind of volume adjusting method, device, terminal device and storage medium, this method includes:When detecting that terminal device carries out source of sound broadcasting, the audio-frequency information of the source of sound is obtained;The amplitude of the source of sound is determined according to the audio-frequency information;If it is determined that the amplitude of the source of sound be more than the first amplitude threshold or less than the second amplitude threshold, then the size of the amplitude is adjusted.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 source of sound is obtained;
The amplitude of the source of sound is determined according to the audio-frequency information;
If it is determined that the amplitude of the source of sound be more than the first amplitude threshold or less than the second amplitude threshold, then to described The size of amplitude is adjusted.
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 audio-frequency information of the source of sound;
Amplitude determination module, for determining the amplitude of the source of sound according to the audio-frequency information;
If it is determined that the amplitude of the source of sound be more than the first amplitude threshold or less than the second amplitude threshold, then to described The size of amplitude is adjusted.
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 in source, the amplitude of the source of sound is determined according to the audio-frequency information, if it is determined that the amplitude of the source of sound gone out is big In the first amplitude threshold or less than the second amplitude threshold, then the size of the amplitude is adjusted.This programme improves volume Efficiency is adjusted, 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 a kind of structured flowchart of volume adjustment device provided in an embodiment of the present invention;
Fig. 6 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 volume being adjusted during device plays source of sound, this method can be held by terminal device provided in an embodiment of the present invention OK, 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 carries The concrete scheme of confession is as follows:
Step S101, when detecting that terminal device carries out source of sound broadcasting, the audio-frequency information of the source of sound is obtained.
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 source of sound is obtained.In one embodiment, The digital audio and video signals that can decode to obtain to audio decoder are sampled, and determine audio-frequency information corresponding to the source of sound.Another In embodiment, the original document of currently playing source of sound can also be obtained, source of sound pair is determined by the parsing to the original document The audio-frequency information answered.In another embodiment, by taking android system as an example, can pass through Android.media.MediaRecorder classes or android.media.AudioRecord classes obtain the audio-frequency information of source of sound.
Step S102, the amplitude of the source of sound is determined according to the audio-frequency information.
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 the amplitude information in preset time period T, wherein, the amplitude information can be made up of multiple amplitudes, foundation Obtained multiple amplitudes can determine the amplitude curve of the source of sound played in preset time period T accordingly.In another implementation In example, 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.In another embodiment, when step S101 is got Audio-frequency information be the amplitude that can obtain corresponding source of sound corresponding to source of sound during original document by being parsed to original document Data, and then the amplitude data is defined as to the amplitude of source of sound.
In one embodiment, when detecting source of sound broadcasting, a secondary noise is determined every preset time (such as 1s, 3s or 10s) The amplitude in source, or in real time, the amplitude of each frame of source of sound is determined.Specifically, the sound for obtaining the source of sound Frequency information includes:Obtain the audio frame information of the source of sound;Accordingly, the amplitude of the source of sound is determined according to the audio-frequency information Including:The amplitude of each frame of the source of sound is determined according to the audio frame information.Exemplary, when detecting that source of sound plays, Audio files are parsed to obtain audio frame sequence, the amplitude according to corresponding to determining each frame of audio frame sequence.
Step S103, judge whether the amplitude of the source of sound is more than the first amplitude threshold or less than the second amplitude threshold, such as Fruit is then to perform step S104, otherwise, performs step S105.
Wherein, the first amplitude threshold is more than the second amplitude threshold.Exemplary, the size of first amplitude threshold can be with It is -2db, the size of the second default amplitude can be -30db.If the amplitude for the source of sound determined in step S102 is more than the One default amplitude threshold presets amplitude threshold less than second, then performs step S104 and the amplitude size of source of sound is adjusted Section.
Step S104, the amplitude size of the source of sound is adjusted.
Exemplary, amplitude size, which is adjusted, can use unified amplitude adjustment factor or according to amplitude size Difference is specifically distributed different amplitude adjustment factors and is adjusted with the amplitude to source of sound.Optionally, when it is determined that source of sound meets to adjust After section condition, the data of the sign amplitude information in obtained voice data can be carried out by being parsed to audio files Modification, is packaged again after modification, and when being buffered to corresponding audio files and being played, the amplitude of source of sound is corresponding It is increased;It is also possible that in the decoding process that source of sound plays, shaken by being analyzed obtained digital audio and video signals Width data, the amplitude data is multiplied by corresponding adjustment factor to change amplitude size, and then the volume of source of sound is adjusted. Hereby it is achieved that being adjusted on the premise of not changing the original volume of terminal device system to the size of source of sound volume, adjust Process can play load or in the source of sound in buffering area before audio files are introduced into buffering area to reduce Appearance is adjusted 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.
Step S105, terminate.
As shown in the above, by analyzing the audio-frequency information of source of sound, when meeting adjusting condition, to the source of sound Amplitude be adjusted, regulative mode include source of sound is adjusted every audio frame, improve the accuracy of volume adjusting, So that the volume that source of sound exports in playing process is more preferably.
Fig. 2 is the flow chart of another volume adjusting method provided in an embodiment of the present invention, optionally, described in the foundation Audio-frequency information determines the amplitude of the source of sound, if it is determined that the amplitude of the source of sound gone out is more than the first amplitude threshold or less than the Two amplitude thresholds, then the size of the amplitude is adjusted including:The amplitude of the source of sound is determined according to the audio-frequency information Curve, determine the mean amplitude of tide of the amplitude curve of preset length;If the mean amplitude of tide is more than the first amplitude threshold or is less than Second amplitude threshold, then the amplitude curve is adjusted.Based on above-mentioned optimization, as shown in Fig. 2 the skill that the present embodiment provides Art scheme is specific as follows:
Step S201, when detecting that terminal device carries out source of sound broadcasting, the audio-frequency information of the source of sound is obtained.
Step S202, the amplitude of the source of sound is determined according to the audio-frequency information.
Step S203, the amplitude curve of the source of sound is determined according to the audio-frequency information, determines that the amplitude of preset length is bent The mean amplitude of tide of line.
In one embodiment, the amplitude curve of the preset length can be the amplitude curve of 3s, 5s or 10s length, really After making the amplitude curve of preset length, the mean amplitude of tide of this section of amplitude curve is taken, subsequently to judge whether to need to source of sound Amplitude curve be adjusted.
Step S204, judge whether the mean amplitude of tide is more than the first amplitude threshold or less than the second amplitude threshold, if It is then to perform step S205, otherwise, performs step S206.
In one embodiment, the mean amplitude of tide determined and amplitude threshold are compared, and then determine whether to carry out Amplitude is adjusted, and further increases the accuracy of amplitude regulation, avoids interference caused by random noise is adjusted to source of sound amplitude.
Step S205, the amplitude curve is adjusted.
Specific amplitude curve regulative mode can be found in step S104 explanation, and here is omitted.
Step S206, terminate.
Fig. 3 is the flow chart of another volume adjusting method provided in an embodiment of the present invention, optionally, to the amplitude Size be adjusted including:The amplitude that will be greater than the first amplitude threshold is adjusted to the first amplitude, by less than the second amplitude threshold Amplitude is adjusted to the second amplitude.The amplitude by less than the second amplitude threshold, which is adjusted to the second amplitude, to be included:Second will be less than Amplitude threshold and adjusted more than the amplitude of the 3rd amplitude threshold to the second amplitude as shown in figure 3, specific as follows:
Step S301, when detecting that terminal device carries out source of sound broadcasting, the audio-frequency information of the source of sound is obtained.
Step S302, the amplitude of the source of sound is determined according to the audio-frequency information.
Step S303, judge whether the amplitude of the source of sound is more than the first default amplitude threshold, if it is, performing step S304, if it is not, then performing step S305.
Step S304, amplitude is adjusted to the first amplitude.Exemplary, first amplitude can be in -4db to -10db Any value.
Step S305, judge whether the amplitude of the source of sound is less than the second default amplitude threshold, if it is, performing step S306, if it is not, then performing step S308.
Step S306, judge whether the amplitude of the source of sound is more than the 3rd default amplitude threshold, if it is, performing step S307, if it is not, then performing step S308.Exemplary, the 3rd default amplitude threshold can be -50db.
Step S307, amplitude is adjusted to the second amplitude.Exemplary, the size of second amplitude can be -20db.
Step S308, terminate.
From the foregoing, during the amplitude of source of sound is adjusted, the amplitude for meeting adjusting condition is adjusted to solid Determine amplitude section, improve amplitude regulated efficiency, meanwhile, for amplitude information corresponding to noise, without regulation, avoid by The problem of Noise Synchronization is amplified and then influences source of sound playback quality.
Fig. 4 is the flow chart of another volume adjusting method provided in an embodiment of the present invention, optionally, to the amplitude Size be adjusted after, in addition to:According to volume adjusting information corresponding to the amplitude determination of the source of sound;According to the sound The amount regulation information volume current to the terminal device is adjusted.As shown in Figure 4:
Step S401, when detecting that terminal device carries out source of sound broadcasting, the audio-frequency information of the source of sound is obtained.
Step S402, the amplitude of the source of sound is determined according to the audio-frequency information.
Step S403, if it is determined that the amplitude of the source of sound be more than the first amplitude threshold or less than the second amplitude threshold Value, then the size of the amplitude is adjusted.
Step S404, according to volume adjusting information corresponding to the amplitude determination of the source of sound, believe according to the volume adjusting The breath volume current to the terminal device is adjusted.
In one embodiment, the volume adjusting information according to corresponding to determining the amplitude of source of sound.Exemplary, when source of sound (such as -40db) when amplitude is less than normal, it is determined that corresponding volume increases information, when the amplitude of source of sound is bigger than normal (such as 0db), it is determined that Corresponding volume reduces information.Specifically, in one embodiment, the information of volume increase or volume reduction is corresponding mesh Mark with phonetic symbols value.Exemplary, terminal device is always divided into 18 grade-adjustables, each grade corresponding one to max volume by Jing Yin Individual volume value, target sound value corresponding to volume reduction information can be 3 or 4, target sound corresponding to volume increase information Value can be 14 or 15, when the source of sound amplitude determined is less than normal, then volume value be increased into 14 or 15 accordingly, when it is determined that When the source of sound amplitude gone out is bigger than normal, then volume value is decreased to 3 or 4 accordingly.In another embodiment, volume increase or volume The information of reduction is corresponding volume change value.It is exemplary, terminal device by it is Jing Yin be always divided into 18 to max volume can Grade, the corresponding volume value of each grade are adjusted, volume change value corresponding to volume increase information and volume reduction information is 3, for example, the volume value of present terminal equipment is 10, when needing to increase information volume, then increase on the basis of current volume value Add 3 to carry out sound broadcasting using the 13rd grade of volume, when needing to reduce information volume, then subtract on the basis of current volume value Small 3 carry out sound broadcasting using the 7th grade of volume.Optionally, before the volume of terminal device is adjusted, in addition to: The reproduction time of the source of sound is determined, when reproduction time is more than preset time, using the volume increase information according to as described in if 30s Or volume reduces the mode that the volume change value volume value current to the terminal device in information is adjusted, and thus enters one Step improves volume adjusting efficiency, reduces the energy consumption of terminal device.
Fig. 5 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 figure 5, the dress Put and specifically include:Acquisition module 101, amplitude determination module 102 and adjustment module 103.
Wherein, acquisition module 101, for when detecting that terminal device carries out source of sound broadcasting, obtaining the sound of the source of sound Frequency 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 source of sound is obtained.In one embodiment, The digital audio and video signals that can decode to obtain to audio decoder are sampled, and determine audio-frequency information corresponding to the source of sound.Another In embodiment, the original document of currently playing source of sound can also be obtained, source of sound pair is determined by the parsing to the original document The audio-frequency information answered.In another embodiment, by taking android system as an example, can pass through Android.media.MediaRecorder classes or android.media.AudioRecord classes obtain the audio-frequency information of source of sound.
Amplitude determination module 102, for determining the amplitude of the source of sound according to the audio-frequency information.
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 the amplitude information in preset time period T, wherein, the amplitude information can be made up of multiple amplitudes, foundation Obtained multiple amplitudes can determine the amplitude curve of the source of sound played in preset time period T accordingly.In another implementation In example, 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.In another embodiment, when step S101 is got Audio-frequency information be the amplitude that can obtain corresponding source of sound corresponding to source of sound during original document by being parsed to original document Data, and then the amplitude data is defined as to the amplitude of source of sound.
In one embodiment, when detecting source of sound broadcasting, a secondary noise is determined every preset time (such as 1s, 3s or 10s) The amplitude in source, or in real time, the amplitude of each frame of source of sound is determined.Specifically, the sound for obtaining the source of sound Frequency information includes:Obtain the audio frame information of the source of sound;Accordingly, the amplitude of the source of sound is determined according to the audio-frequency information Including:The amplitude of each frame of the source of sound is determined according to the audio frame information.Exemplary, when detecting that source of sound plays, Audio files are parsed to obtain audio frame sequence, the amplitude according to corresponding to determining each frame of audio frame sequence.
Adjustment module 103, for if it is determined that the amplitude of the source of sound be more than the first amplitude threshold or less than second Amplitude threshold, then the size of the amplitude is adjusted.
Wherein, the first amplitude threshold is more than the second amplitude threshold.Exemplary, the size of first amplitude threshold can be with It is -2db, the size of the second default amplitude can be -30db.If the amplitude for the source of sound determined in step S102 is more than the One default amplitude threshold presets amplitude threshold less than second, then performs step S104 and the amplitude size of source of sound is adjusted Section.
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 in source, the amplitude of the source of sound is determined according to the audio-frequency information, if it is determined that the amplitude of the source of sound gone out is big In the first amplitude threshold or less than the second amplitude threshold, then the size of the amplitude is adjusted.This programme improves volume Efficiency is adjusted, reduces the power consumption of terminal device.
In a possible embodiment, the acquisition module 101 is specifically used for:
Obtain the audio frame information of the source of sound;
The amplitude determination module 102 is specifically used for:
The amplitude of each frame of the source of sound is determined according to the audio frame information.
In a possible embodiment, the adjustment module 103 is specifically used for:
The amplitude size of each frame of the source of sound is adjusted.
In a possible embodiment, the adjustment module 103 is specifically used for:
The amplitude curve of the source of sound is determined according to the audio-frequency information, determines that being averaged for amplitude curve of preset length is shaken Width;
If the mean amplitude of tide is more than the first amplitude threshold or less than the second amplitude threshold, the amplitude curve is entered Row regulation.
In a possible embodiment, the adjustment module 103 is specifically used for:
The amplitude that will be greater than the first amplitude threshold is adjusted to the first amplitude, by the amplitude less than the second amplitude threshold adjust to Second amplitude.
In a possible embodiment, the adjustment module 103 is specifically used for:
It will be adjusted less than the second amplitude threshold and more than the amplitude of the 3rd amplitude threshold to the second amplitude.
In a possible embodiment, the adjustment module 103 is specifically additionally operable to:
After the size of the amplitude is adjusted, according to volume adjusting letter corresponding to the amplitude determination of the source of sound Breath;
The volume current to the terminal device according to the volume adjusting information is adjusted.
The present embodiment provides a kind of terminal device on the basis of the various embodiments described above, and Fig. 6 is that the embodiment of the present invention carries The structural representation of a kind of terminal device supplied, as shown in fig. 6, the terminal device 200 includes:Memory 201, processor (Central Processing Unit, CPU) 202, Peripheral Interface 203, RF (Radio Frequency, radio frequency) circuit 205, Voicefrequency circuit 206, loudspeaker 211, power management chip 208, input/output (I/O) subsystem 209, touch-screen 212, other Input/control devices 210 and outside port 204, these parts are led to by one or more communication bus or signal wire 207 Letter.
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 source of sound is obtained;
The amplitude of the source of sound is determined according to the audio-frequency information;
If it is determined that the amplitude of the source of sound be more than the first amplitude threshold or less than the second amplitude threshold, then to described The size of amplitude is adjusted.
In a possible embodiment, the audio-frequency information for obtaining the source of sound includes:
Obtain the audio frame information of the source of sound;
Accordingly, the amplitude for determining the source of sound according to the audio-frequency information includes:
The amplitude of each frame of the source of sound is determined according to the audio frame information.
In a possible embodiment, the size to the amplitude be adjusted including:
The amplitude size of each frame of the source of sound is adjusted.
In a possible embodiment, the amplitude that the source of sound is determined according to the audio-frequency information, if it is determined that The amplitude of the source of sound gone out is more than the first amplitude threshold or less than the second amplitude threshold, then the size of the amplitude is adjusted Section includes:
The amplitude curve of the source of sound is determined according to the audio-frequency information, determines that being averaged for amplitude curve of preset length is shaken Width;
If the mean amplitude of tide is more than the first amplitude threshold or less than the second amplitude threshold, the amplitude curve is entered Row regulation.
In a possible embodiment, the size of the amplitude is adjusted including:
The amplitude that will be greater than the first amplitude threshold is adjusted to the first amplitude, by the amplitude less than the second amplitude threshold adjust to Second amplitude.
In a possible embodiment, the amplitude by less than the second amplitude threshold is adjusted to the second amplitude and included:
It will be adjusted less than the second amplitude threshold and more than the amplitude of the 3rd amplitude threshold to the second amplitude.
In a possible embodiment, after the size of the amplitude is adjusted, in addition to:
According to volume adjusting information corresponding to the amplitude determination of the source of sound;
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 source of sound is obtained;
    The amplitude of the source of sound is determined according to the audio-frequency information;
    If it is determined that the amplitude of the source of sound be more than the first amplitude threshold or less than the second amplitude threshold, then to the amplitude Size be adjusted.
  2. 2. according to the method for claim 1, it is characterised in that the audio-frequency information for obtaining the source of sound includes:
    Obtain the audio frame information of the source of sound;
    Accordingly, the amplitude for determining the source of sound according to the audio-frequency information includes:
    The amplitude of each frame of the source of sound is determined according to the audio frame information.
  3. 3. according to the method for claim 2, it is characterised in that the size to the amplitude be adjusted including:
    The amplitude size of each frame of the source of sound is adjusted.
  4. 4. according to the method for claim 1, it is characterised in that described to determine shaking for the source of sound according to the audio-frequency information Width, if it is determined that the amplitude of the source of sound gone out is more than the first amplitude threshold or less than the second amplitude threshold, then to the amplitude Size be adjusted including:
    The amplitude curve of the source of sound is determined according to the audio-frequency information, determines the mean amplitude of tide of the amplitude curve of preset length;
    If the mean amplitude of tide is more than the first amplitude threshold or less than the second amplitude threshold, the amplitude curve is adjusted Section.
  5. 5. according to the method any one of claim 1-4, it is characterised in that bag is adjusted to the size of the amplitude Include:
    The amplitude that will be greater than the first amplitude threshold is adjusted to the first amplitude, and the amplitude less than the second amplitude threshold is adjusted to second Amplitude.
  6. 6. according to the method for claim 5, it is characterised in that the amplitude by less than the second amplitude threshold is adjusted to the Two amplitudes include:
    It will be adjusted less than the second amplitude threshold and more than the amplitude of the 3rd amplitude threshold to the second amplitude.
  7. 7. according to the method for claim 6, it is characterised in that after the size of the amplitude is adjusted, also wrap Include:
    According to volume adjusting information corresponding to the amplitude determination of the source of sound;
    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-frequency information of the source of sound;
    Amplitude determination module, for determining the amplitude of the source of sound according to the audio-frequency information;
    Adjustment module, for if it is determined that the amplitude of the source of sound be more than the first amplitude threshold or less than the second amplitude threshold Value, then the size of the amplitude is adjusted.
  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.
CN201710711510.3A 2017-08-18 2017-08-18 Volume adjusting method and device, terminal equipment and storage medium Expired - Fee Related CN107483734B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710711510.3A CN107483734B (en) 2017-08-18 2017-08-18 Volume adjusting method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710711510.3A CN107483734B (en) 2017-08-18 2017-08-18 Volume adjusting method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN107483734A true CN107483734A (en) 2017-12-15
CN107483734B CN107483734B (en) 2020-07-14

Family

ID=60601031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710711510.3A Expired - Fee Related CN107483734B (en) 2017-08-18 2017-08-18 Volume adjusting method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN107483734B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984147A (en) * 2018-07-02 2018-12-11 Oppo(重庆)智能科技有限公司 Method for controlling volume, electronic device and computer readable storage medium
CN110058837A (en) * 2019-04-22 2019-07-26 维沃移动通信有限公司 A kind of audio-frequency inputting method and terminal
CN114442990A (en) * 2020-11-04 2022-05-06 北京小米移动软件有限公司 Volume adjusting method and device and storage medium
CN116069078A (en) * 2023-01-16 2023-05-05 歌尔股份有限公司 Control method and device of VR/AR audio vibration damper and electronic equipment thereof

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006025196A (en) * 2004-07-08 2006-01-26 Funai Electric Co Ltd Television receiver
CN1953058A (en) * 2005-10-21 2007-04-25 神基科技股份有限公司 Circuit structure for sound source processing and processing method thereof
CN102693737A (en) * 2012-06-11 2012-09-26 华为终端有限公司 Volume adjusting method and device
CN103746668A (en) * 2013-12-31 2014-04-23 上海斐讯数据通信技术有限公司 Sound volume control method and system
CN103929140A (en) * 2014-04-30 2014-07-16 深圳市中兴移动通信有限公司 Method and device for pre-processing voice frequency
CN104978166A (en) * 2015-06-30 2015-10-14 北京奇艺世纪科技有限公司 Volume adjusting method and device
CN105120332A (en) * 2015-09-06 2015-12-02 成都爆米花信息技术有限公司 Volume adjusting method for television
CN105786442A (en) * 2016-03-01 2016-07-20 惠州Tcl移动通信有限公司 Volume control method and intelligent terminal
CN106303687A (en) * 2016-08-16 2017-01-04 乐视控股(北京)有限公司 Method for controlling volume and device
CN106775563A (en) * 2016-12-13 2017-05-31 珠海市魅族科技有限公司 The method and device of volume adjusting

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006025196A (en) * 2004-07-08 2006-01-26 Funai Electric Co Ltd Television receiver
CN1953058A (en) * 2005-10-21 2007-04-25 神基科技股份有限公司 Circuit structure for sound source processing and processing method thereof
CN102693737A (en) * 2012-06-11 2012-09-26 华为终端有限公司 Volume adjusting method and device
CN103746668A (en) * 2013-12-31 2014-04-23 上海斐讯数据通信技术有限公司 Sound volume control method and system
CN103929140A (en) * 2014-04-30 2014-07-16 深圳市中兴移动通信有限公司 Method and device for pre-processing voice frequency
CN104978166A (en) * 2015-06-30 2015-10-14 北京奇艺世纪科技有限公司 Volume adjusting method and device
CN105120332A (en) * 2015-09-06 2015-12-02 成都爆米花信息技术有限公司 Volume adjusting method for television
CN105786442A (en) * 2016-03-01 2016-07-20 惠州Tcl移动通信有限公司 Volume control method and intelligent terminal
CN106303687A (en) * 2016-08-16 2017-01-04 乐视控股(北京)有限公司 Method for controlling volume and device
CN106775563A (en) * 2016-12-13 2017-05-31 珠海市魅族科技有限公司 The method and device of volume adjusting

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984147A (en) * 2018-07-02 2018-12-11 Oppo(重庆)智能科技有限公司 Method for controlling volume, electronic device and computer readable storage medium
CN110058837A (en) * 2019-04-22 2019-07-26 维沃移动通信有限公司 A kind of audio-frequency inputting method and terminal
CN110058837B (en) * 2019-04-22 2022-05-03 维沃移动通信有限公司 Audio output method and terminal
CN114442990A (en) * 2020-11-04 2022-05-06 北京小米移动软件有限公司 Volume adjusting method and device and storage medium
CN116069078A (en) * 2023-01-16 2023-05-05 歌尔股份有限公司 Control method and device of VR/AR audio vibration damper and electronic equipment thereof

Also Published As

Publication number Publication date
CN107483734B (en) 2020-07-14

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
CN107436751A (en) volume adjusting method, device, terminal device and storage medium
CN107566618A (en) volume adjusting method, device, terminal device and storage medium
CN107526570A (en) volume adjusting method, device, terminal device and storage medium
CN107483734A (en) volume adjusting method, device, terminal device and storage medium
CN110799936B (en) Volume adjusting method, volume adjusting device, terminal equipment and storage medium
CN111033614B (en) Volume adjusting method and device, mobile terminal and storage medium
CN107040660A (en) Control method, device and the mobile terminal of mobile terminal playing volume
CN107479852B (en) Volume adjusting method, device, terminal device and storage medium
JP6785907B2 (en) How to arrange wireless speakers, wireless speakers and terminal devices
CN110677774B (en) Volume self-adaptive adjusting method and device, computer equipment and storage medium
CN107799113A (en) Audio-frequency processing method, device, storage medium and mobile terminal
CN106713653A (en) Audio/video playing control method and device, and terminal
CN107506168A (en) volume adjusting method, device, terminal device and storage medium
CN103456334B (en) Audio file play method and playing device
CN107479851B (en) Volume adjusting method, device, terminal device and storage medium
CN107508983A (en) volume adjusting method, device, storage medium and terminal device
CN107506170A (en) volume adjusting method, device, terminal device and storage medium
CN107506169A (en) volume adjusting method, device, terminal device and storage medium
CN101958956A (en) Vehicle-mounted electronic equipment and reproduction method thereof
CN113613145B (en) Noise reduction processing method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200714