CN107483734B - Volume adjusting method and device, terminal equipment and storage medium - Google Patents

Volume adjusting method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN107483734B
CN107483734B CN201710711510.3A CN201710711510A CN107483734B CN 107483734 B CN107483734 B CN 107483734B CN 201710711510 A CN201710711510 A CN 201710711510A CN 107483734 B CN107483734 B CN 107483734B
Authority
CN
China
Prior art keywords
amplitude
sound source
adjusting
volume
audio
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.)
Expired - Fee Related
Application number
CN201710711510.3A
Other languages
Chinese (zh)
Other versions
CN107483734A (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

Images

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 volume adjusting method, a volume adjusting device, terminal equipment and a storage medium, wherein the method comprises the following steps: when detecting that terminal equipment plays a sound source, acquiring audio information of the sound source; determining the amplitude of the sound source according to the audio information; and if the determined amplitude of the sound source is larger than a first amplitude threshold value or smaller than a second amplitude threshold value, adjusting the amplitude. According to the scheme, the volume adjusting efficiency is improved, and the power consumption of the terminal equipment is reduced.

Description

Volume adjusting method and device, terminal equipment and storage medium
Technical Field
The embodiment of the invention relates to computer technology, in particular to a volume adjusting method, a volume adjusting device, terminal equipment and a storage medium.
Background
With the increasing popularity of terminal devices, more and more users use the terminal devices to perform various functions to meet their own needs, such as reading text, watching video, listening to music, playing games, etc. When the terminal equipment plays audio and video, the adjustment of the volume has defects and needs to be improved.
Disclosure of Invention
The invention provides a volume adjusting method, a volume adjusting device, terminal equipment and a storage medium, which improve the volume adjusting efficiency and reduce the power consumption of the terminal equipment.
In a first aspect, an embodiment of the present invention provides a volume adjustment method, including:
when detecting that terminal equipment plays a sound source, acquiring audio information of the sound source;
determining the amplitude of the sound source according to the audio information;
and if the determined amplitude of the sound source is larger than a first amplitude threshold value or smaller than a second amplitude threshold value, adjusting the amplitude.
In a second aspect, an embodiment of the present invention further provides a volume adjusting apparatus, including:
the acquisition module is used for acquiring audio information of a sound source when the terminal equipment is detected to play the sound source;
the amplitude determining module is used for determining the amplitude of the sound source according to the audio information;
and if the determined amplitude of the sound source is larger than a first amplitude threshold value or smaller than a second amplitude threshold value, adjusting the amplitude.
In a third aspect, an embodiment of the present invention further provides a terminal device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor implementing the volume adjustment method according to an embodiment of the present invention when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a storage medium containing terminal device executable instructions, where the terminal device executable instructions are used to execute the volume adjustment method according to the embodiment of the present invention when executed by a terminal device processor.
According to the technical scheme provided by the embodiment of the invention, when the terminal equipment is detected to play the sound source, the audio information of the sound source is obtained, the amplitude of the sound source is determined according to the audio information, and if the determined amplitude of the sound source is larger than a first amplitude threshold value or smaller than a second amplitude threshold value, the amplitude is adjusted. According to the scheme, the volume adjusting efficiency is improved, and the power consumption of the terminal equipment is reduced.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a flowchart of a volume adjustment method according to an embodiment of the present invention;
fig. 2 is a flow chart of another volume adjustment method provided by the embodiment of the invention;
fig. 3 is a flow chart of another volume adjustment method provided by the embodiment of the invention;
fig. 4 is a flow chart of another volume adjustment method provided by the embodiment of the invention;
fig. 5 is a block diagram of a volume adjustment device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of a volume adjusting method provided in an embodiment of the present invention, where this embodiment is applicable to a situation where a terminal device adjusts a volume when playing a sound source, and the method may be executed by the terminal device provided in the embodiment of the present invention, and a volume adjusting device of the terminal device may be implemented in a software and/or hardware manner, as shown in fig. 1, a specific scheme provided in this embodiment is as follows:
and S101, when detecting that the terminal equipment plays the sound source, acquiring audio information of the sound source.
The terminal equipment can play the sound source through the installed third-party application program or the audio and video playing software carried by the system. The method mainly comprises the steps of obtaining, decoding, outputting and the like of the sound source file. Illustratively, the obtained sound source file may be a multicast stream received through a network, or may be an audio/video file locally stored by the terminal device; loading the sound source file into a memory buffer area after the sound source file is obtained; the method comprises the steps of decoding a sound source file loaded into a memory buffer area, before decoding starts, if the sound source file simultaneously contains video data, separating the audio data from the video data, and inputting the separated audio data into an audio decoder, wherein the audio decoder is mainly used for reading the audio data in the memory buffer area to obtain a digital audio signal and converting the digital audio signal into an analog audio signal, and a playing device of a terminal device plays audio according to the analog audio signal. In one embodiment, when it is monitored that a sound source playing event is triggered, it is determined that the terminal device starts playing a sound source, where the triggering event may be that a playing button displayed in a touch screen is pressed, or that a playing device of the terminal device, such as a speaker, starts playing sound, and the terminal device is determined to play the sound source.
And when detecting that the terminal equipment plays the sound source, acquiring the audio information of the sound source. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to determine the audio information corresponding to the audio source. In another embodiment, an original file of a currently played sound source may also be obtained, and audio information corresponding to the sound source may be determined through parsing the original file. In another embodiment, for example, in an Android system, the audio information of the sound source may be obtained through an Android.
And step S102, determining the amplitude of the sound source according to the audio information.
The amplitude refers to the maximum distance from the original position in the vibration process of the object, the loudness of the sound heard by human ears is related to the amplitude of the sound source, and the loudness is stronger when the amplitude is larger. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to obtain amplitude information within a preset time period T, where the amplitude information may be composed of a plurality of amplitude values, and an amplitude curve of the sound source played within the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values. In another embodiment, for example, in an Android system, the audio information of the sound source may be obtained through an Android. In another embodiment, when the audio information obtained in step S101 is an original file corresponding to the sound source, the original file may be parsed to obtain amplitude data corresponding to the sound source, and the amplitude data may be determined as the amplitude of the sound source.
In one embodiment, the amplitude of the audio source is determined every predetermined time (e.g., 1s, 3s, or 10s) when the audio source is detected to play, or in real time, for each frame of the audio source. Specifically, the acquiring the audio information of the sound source includes: acquiring audio frame information of the sound source; accordingly, determining the amplitude of the audio source from the audio information comprises: and determining the amplitude of each frame of the sound source according to the audio frame information. Illustratively, when audio source playing is detected, the audio source file is parsed to obtain a sequence of audio frames, and a corresponding amplitude is determined according to each frame of the sequence of audio frames.
Step S103, judging whether the amplitude of the sound source is larger than a first amplitude threshold value or smaller than a second amplitude threshold value, if so, executing step S104, otherwise, executing step S105.
Wherein the first amplitude threshold is greater than the second amplitude threshold. Illustratively, the magnitude of the first amplitude threshold may be-2 db, and the magnitude of the second preset amplitude may be-30 db. If the amplitude of the sound source determined in step S102 is greater than the first preset amplitude threshold or less than the second preset amplitude threshold, step S104 is performed to adjust the amplitude of the sound source.
And step S104, adjusting the amplitude of the sound source.
For example, the amplitude adjustment may be performed by using a uniform amplitude adjustment coefficient or by specifically assigning different amplitude adjustment coefficients according to different amplitude levels. Optionally, after determining that the sound source meets the adjustment condition, modifying data representing amplitude information in the obtained audio data by analyzing the sound source file, and encapsulating the modified data after the modification is completed, wherein the amplitude of the sound source is correspondingly increased when the corresponding sound source file is buffered and played; in the process of decoding the sound source playing, the obtained digital audio signal is analyzed to obtain amplitude data, and the amplitude data is multiplied by the corresponding adjusting coefficient to change the amplitude, so as to adjust the volume of the sound source. Therefore, the volume of the sound source is adjusted on the premise that the original volume of the terminal equipment system is not changed, the adjustment process can be carried out before the sound source file does not enter the buffer area so as to reduce the playing load, and the adjustment process can also be carried out aiming at the sound source content in the buffer area so as to improve the adjustment efficiency.
In another embodiment, the amplitude of each frame of the audio source is adjusted. Specifically, in the adjustment process, different amplitude adjustment coefficients are allocated for different amplitude sizes of each frame to perform corresponding adjustment, and for example, the specific correspondence relationship may be as shown in the following table:
TABLE 1
Amplitude of vibration Coefficient of regulation
Greater than-3 db or less than-50 db 1
Less than-10 db and greater than-50 db 2
Less than-3 db and greater than-10 db 1.5
As shown in Table 1, when the amplitude of an audio frame is greater than-3 db or less than-50 db, its gain is not adjusted; when the amplitude is less than-10 db and greater than-50 db, the amplitude is a high amplitude region to which a gain coefficient of 1.5 is assigned, and when the amplitude is less than-10 db and greater than-50 db, the amplitude is a medium amplitude region to which an amplitude coefficient of 2 is assigned to significantly increase the amplitude of the portion of the amplitude.
And step S105, ending.
According to the content, the audio information of the sound source is analyzed, when the adjusting condition is met, the amplitude of the sound source is adjusted, the adjusting mode comprises adjusting every other audio frame of the sound source, the accuracy of volume adjustment is improved, and the volume output by the sound source in the playing process is enabled to be better.
Fig. 2 is a flowchart of another volume adjustment method according to an embodiment of the present invention, where optionally, the determining the amplitude of the sound source according to the audio information, and if the determined amplitude of the sound source is greater than a first amplitude threshold or smaller than a second amplitude threshold, adjusting the amplitude includes: determining an amplitude curve of the sound source according to the audio information, and determining the average amplitude of the amplitude curve with a preset length; adjusting the amplitude curve if the average amplitude is greater than a first amplitude threshold or less than a second amplitude threshold. Based on the above optimization, as shown in fig. 2, the technical solution provided in this embodiment is specifically as follows:
step S201, when detecting that the terminal equipment plays the sound source, acquiring the audio information of the sound source.
Step S202, determining the amplitude of the sound source according to the audio information.
Step S203, determining the amplitude curve of the sound source according to the audio information, and determining the average amplitude of the amplitude curve with the preset length.
In one embodiment, the amplitude curve with the preset length may be an amplitude curve with a length of 3s, 5s or 10s, and after the amplitude curve with the preset length is determined, the average amplitude of the amplitude curve is taken for subsequent determination of whether the adjustment of the amplitude curve of the sound source is needed.
And step S204, judging whether the average amplitude is larger than a first amplitude threshold value or smaller than a second amplitude threshold value, if so, executing step S205, otherwise, executing step S206.
In one embodiment, the determined average amplitude is compared with an amplitude threshold value, and then whether amplitude adjustment is performed or not is determined, so that the accuracy of amplitude adjustment is further improved, and the interference of random noise on the amplitude adjustment of the sound source is avoided.
And S205, adjusting the amplitude curve.
For a specific adjustment manner of the amplitude curve, reference may be made to the explanation of step S104, which is not described herein again.
And S206, ending.
Fig. 3 is a flowchart of another volume adjustment method according to an embodiment of the present invention, where optionally, adjusting the amplitude includes: the amplitude greater than the first amplitude threshold is adjusted to a first amplitude and the amplitude less than the second amplitude threshold is adjusted to a second amplitude. The adjusting the amplitude less than the second amplitude threshold to the second amplitude comprises: adjusting the amplitude smaller than the second amplitude threshold and larger than the third amplitude threshold to the second amplitude is shown in fig. 3, specifically as follows:
step S301, when detecting that the terminal equipment plays the sound source, acquiring the audio information of the sound source.
Step S302, determining the amplitude of the sound source according to the audio information.
Step S303, determining whether the amplitude of the sound source is greater than a first preset amplitude threshold, if so, executing step S304, and if not, executing step S305.
Step S304, the amplitude is adjusted to the first amplitude. Illustratively, the first amplitude may be any value from-4 db to-10 db.
Step S305, judging whether the amplitude of the sound source is smaller than a second preset amplitude threshold value, if so, executing step S306, and if not, executing step S308.
Step S306, judging whether the amplitude of the sound source is larger than a third preset amplitude threshold value, if so, executing step S307, and if not, executing step S308. Illustratively, the third preset amplitude threshold may be-50 db.
Step S307, the amplitude is adjusted to the second amplitude. Illustratively, the magnitude of the second amplitude may be-20 db.
And step S308, ending.
Therefore, in the process of adjusting the amplitude of the sound source, the amplitude meeting the adjusting condition is adjusted to a fixed amplitude interval, the amplitude adjusting efficiency is improved, meanwhile, the amplitude information corresponding to the noise is not adjusted, and the problem that the noise is synchronously amplified and then the playing quality of the sound source is influenced is solved.
Fig. 4 is a flowchart of another volume adjustment method provided in the embodiment of the present invention, and optionally, after adjusting the amplitude, the method further includes: determining corresponding volume adjustment information according to the amplitude of the sound source; and adjusting the current volume of the terminal equipment according to the volume adjustment information. As shown in fig. 4:
step S401, when detecting that the terminal equipment plays the sound source, acquiring the audio information of the sound source.
Step S402, determining the amplitude of the sound source according to the audio information.
Step S403, if the determined amplitude of the sound source is greater than a first amplitude threshold or less than a second amplitude threshold, adjusting the amplitude.
Step S404, determining corresponding volume adjustment information according to the amplitude of the sound source, and adjusting the current volume of the terminal equipment according to the volume adjustment information.
In one embodiment, the corresponding volume adjustment information is determined based on the amplitude of the audio source. Illustratively, when the amplitude of the sound source is small (e.g., -40db), the corresponding volume up information is determined, and when the amplitude of the sound source is large (e.g., 0db), the corresponding volume down information is determined. Specifically, in one embodiment, the volume increase or volume decrease information is the corresponding target volume value. Illustratively, the terminal device is divided into 18 adjustable levels from mute to maximum volume, each level corresponds to a volume value, the target volume value corresponding to the volume reduction information may be 3 or 4, the target volume value corresponding to the volume increase information may be 14 or 15, when the determined amplitude of the sound source is smaller, the volume value is correspondingly increased to 14 or 15, and when the determined amplitude of the sound source is larger, the volume value is correspondingly reduced to 3 or 4. In another embodiment, the volume up or volume down information is a corresponding volume change value. Illustratively, the terminal device is divided into 18 adjustable levels from mute to maximum volume, each level corresponds to a volume value, the volume change values corresponding to the volume increasing information and the volume decreasing information are 3, for example, the volume value of the current terminal device is 10, when the volume information needs to be increased, 3 is increased on the basis of the current volume value, that is, 13 th level volume is adopted for sound playing, and when the volume information needs to be decreased, 3 is decreased on the basis of the current volume value, that is, 7 th level volume is adopted for sound playing. Optionally, before adjusting the volume of the terminal device, the method further includes: and determining the playing time of the sound source, and if the playing time is greater than the preset time, adopting a mode of adjusting the current volume value of the terminal equipment according to the volume change value in the volume increasing information or the volume decreasing information, so that the volume adjusting efficiency is further improved, and the energy consumption of the terminal equipment is reduced.
Fig. 5 is a block diagram of a volume adjusting apparatus according to an embodiment of the present invention, where the apparatus is configured to execute the volume adjusting method according to the embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method. As shown in fig. 5, the apparatus specifically includes: an acquisition module 101, an amplitude determination module 102 and an adjustment module 103.
The obtaining module 101 is configured to obtain audio information of a sound source when it is detected that the terminal device plays the sound source.
The terminal equipment can play the sound source through the installed third-party application program or the audio and video playing software carried by the system. The method mainly comprises the steps of obtaining, decoding, outputting and the like of the sound source file. Illustratively, the obtained sound source file may be a multicast stream received through a network, or may be an audio/video file locally stored by the terminal device; loading the sound source file into a memory buffer area after the sound source file is obtained; the method comprises the steps of decoding a sound source file loaded into a memory buffer area, before decoding starts, if the sound source file simultaneously contains video data, separating the audio data from the video data, and inputting the separated audio data into an audio decoder, wherein the audio decoder is mainly used for reading the audio data in the memory buffer area to obtain a digital audio signal and converting the digital audio signal into an analog audio signal, and a playing device of a terminal device plays audio according to the analog audio signal. In one embodiment, when it is monitored that a sound source playing event is triggered, it is determined that the terminal device starts playing a sound source, where the triggering event may be that a playing button displayed in a touch screen is pressed, or that a playing device of the terminal device, such as a speaker, starts playing sound, and the terminal device is determined to play the sound source.
And when detecting that the terminal equipment plays the sound source, acquiring the audio information of the sound source. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to determine the audio information corresponding to the audio source. In another embodiment, an original file of a currently played sound source may also be obtained, and audio information corresponding to the sound source may be determined through parsing the original file. In another embodiment, for example, in an Android system, the audio information of the sound source may be obtained through an Android.
An amplitude determining module 102, configured to determine the amplitude of the sound source according to the audio information.
The amplitude refers to the maximum distance from the original position in the vibration process of the object, the loudness of the sound heard by human ears is related to the amplitude of the sound source, and the loudness is stronger when the amplitude is larger. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to obtain amplitude information within a preset time period T, where the amplitude information may be composed of a plurality of amplitude values, and an amplitude curve of the sound source played within the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values. In another embodiment, for example, in an Android system, the audio information of the sound source may be obtained through an Android. In another embodiment, when the audio information obtained in step S101 is an original file corresponding to the sound source, the original file may be parsed to obtain amplitude data corresponding to the sound source, and the amplitude data may be determined as the amplitude of the sound source.
In one embodiment, the amplitude of the audio source is determined every predetermined time (e.g., 1s, 3s, or 10s) when the audio source is detected to play, or in real time, for each frame of the audio source. Specifically, the acquiring the audio information of the sound source includes: acquiring audio frame information of the sound source; accordingly, determining the amplitude of the audio source from the audio information comprises: and determining the amplitude of each frame of the sound source according to the audio frame information. Illustratively, when audio source playing is detected, the audio source file is parsed to obtain a sequence of audio frames, and a corresponding amplitude is determined according to each frame of the sequence of audio frames.
An adjusting module 103, configured to adjust the amplitude of the sound source if the determined amplitude of the sound source is greater than a first amplitude threshold or less than a second amplitude threshold.
Wherein the first amplitude threshold is greater than the second amplitude threshold. Illustratively, the magnitude of the first amplitude threshold may be-2 db, and the magnitude of the second preset amplitude may be-30 db. If the amplitude of the sound source determined in step S102 is greater than the first preset amplitude threshold or less than the second preset amplitude threshold, step S104 is performed to adjust the amplitude of the sound source.
According to the technical scheme provided by the embodiment of the invention, when the terminal equipment is detected to play the sound source, the audio information of the sound source is obtained, the amplitude of the sound source is determined according to the audio information, and if the determined amplitude of the sound source is larger than a first amplitude threshold value or smaller than a second amplitude threshold value, the amplitude is adjusted. According to the scheme, the volume adjusting efficiency is improved, and the power consumption of the terminal equipment is reduced.
In a possible embodiment, the obtaining module 101 is specifically configured to:
acquiring audio frame information of the sound source;
the amplitude determination module 102 is specifically configured to:
and determining the amplitude of each frame of the sound source according to the audio frame information.
In a possible embodiment, the adjusting module 103 is specifically configured to:
the amplitude of each frame of the audio source is adjusted.
In a possible embodiment, the adjusting module 103 is specifically configured to:
determining an amplitude curve of the sound source according to the audio information, and determining the average amplitude of the amplitude curve with a preset length;
adjusting the amplitude curve if the average amplitude is greater than a first amplitude threshold or less than a second amplitude threshold.
In a possible embodiment, the adjusting module 103 is specifically configured to:
the amplitude greater than the first amplitude threshold is adjusted to a first amplitude and the amplitude less than the second amplitude threshold is adjusted to a second amplitude.
In a possible embodiment, the adjusting module 103 is specifically configured to:
the amplitude less than the second amplitude threshold and greater than the third amplitude threshold is adjusted to a second amplitude.
In a possible embodiment, the adjusting module 103 is further specifically configured to:
after the amplitude is adjusted, determining corresponding volume adjustment information according to the amplitude of the sound source;
and adjusting the current volume of the terminal equipment according to the volume adjustment information.
In this embodiment, a terminal device is provided on the basis of the foregoing embodiments, and fig. 6 is a schematic structural diagram of a terminal device provided in an embodiment of the present invention, as shown in fig. 6, the terminal device 200 includes: memory 201, processor (CPU) 202, peripheral interfaces 203, RF (Radio Frequency) circuitry 205, audio circuitry 206, speaker 211, power management chip 208, input/output (I/O) subsystem 209, touch screen 212, other input/control devices 210, and external port 204, which communicate via one or more communication buses or signal lines 207.
It should be understood that the illustrated terminal device 200 is only one example of a terminal device, and that the terminal device 200 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail a terminal device for rights management of multi-open applications provided in this embodiment, where the terminal device is a smart phone as an example.
A memory 201, the memory 201 being accessible by the CPU202, the peripheral interface 203, and the like, the memory 201 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 203, said peripheral interface 203 may connect input and output peripherals of the device to the CPU202 and the memory 201.
An I/O subsystem 209, the I/O subsystem 209 may connect input and output peripherals on the device, such as a touch screen 212 and other input/control devices 210, to the peripheral interface 203. The I/O subsystem 209 may include a display controller 2091 and one or more input controllers 2092 for controlling the other input/control devices 210. Where one or more input controllers 2092 receive electrical signals from or transmit electrical signals to other input/control devices 210, the other input/control devices 210 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 2092 may be coupled to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 212, the touch screen 212 being an input interface and an output interface between the user terminal and the user, displaying visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 2091 within the I/O subsystem 209 receives electrical signals from the touch screen 212 or transmits electrical signals to the touch screen 212. The touch screen 212 detects a contact on the touch screen, and the display controller 2091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 212, i.e., implements a human-machine interaction, and the user interface object displayed on the touch screen 212 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 205 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, the RF circuitry 205 receives and transmits RF signals, also referred to as electromagnetic signals, through which the RF circuitry 205 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. RF circuitry 205 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 206 is mainly used to receive audio data from the peripheral interface 203, convert the audio data into an electric signal, and transmit the electric signal to the speaker 211.
And a speaker 211 for reproducing the voice signal received by the handset from the wireless network through the RF circuit 205 into sound and playing the sound to the user.
And the power management chip 208 is used for supplying power and managing power to the hardware connected with the CPU202, the I/O subsystem and the peripheral interface.
The volume adjusting device of the terminal device and the terminal device provided in the above embodiments can execute the volume adjusting method of the terminal device provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For details of the technology not described in detail in the above embodiments, reference may be made to a volume adjustment method of a terminal device provided in any embodiment of the present invention.
An embodiment of the present invention further provides a storage medium containing terminal device executable instructions, where the terminal device executable instructions are executed by a terminal device processor to perform a volume adjustment method, and the method includes:
when detecting that terminal equipment plays a sound source, acquiring audio information of the sound source;
determining the amplitude of the sound source according to the audio information;
and if the determined amplitude of the sound source is larger than a first amplitude threshold value or smaller than a second amplitude threshold value, adjusting the amplitude.
In one possible embodiment, the obtaining the audio information of the sound source includes:
acquiring audio frame information of the sound source;
accordingly, determining the amplitude of the audio source from the audio information comprises:
and determining the amplitude of each frame of the sound source according to the audio frame information.
In one possible embodiment, the adjusting the amplitude comprises:
the amplitude of each frame of the audio source is adjusted.
In a possible embodiment, the determining the amplitude of the sound source according to the audio information, and if the determined amplitude of the sound source is greater than a first amplitude threshold or less than a second amplitude threshold, the adjusting the amplitude includes:
determining an amplitude curve of the sound source according to the audio information, and determining the average amplitude of the amplitude curve with a preset length;
adjusting the amplitude curve if the average amplitude is greater than a first amplitude threshold or less than a second amplitude threshold.
In one possible embodiment, adjusting the magnitude of the amplitude comprises:
the amplitude greater than the first amplitude threshold is adjusted to a first amplitude and the amplitude less than the second amplitude threshold is adjusted to a second amplitude.
In one possible embodiment, the adjusting the amplitude smaller than the second amplitude threshold to the second amplitude includes:
the amplitude less than the second amplitude threshold and greater than the third amplitude threshold is adjusted to a second amplitude.
In a possible embodiment, after adjusting the magnitude of the amplitude, the method further includes:
determining corresponding volume adjustment information according to the amplitude of the sound source;
and adjusting the current volume of the terminal equipment according to the volume adjustment information.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the volume adjustment method described above, and may also perform related operations in the volume adjustment method provided by any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. A method of adjusting volume, comprising:
when detecting that terminal equipment plays a sound source, acquiring audio information of the sound source;
determining the amplitude of the sound source according to the audio information;
if the determined amplitude of the sound source is larger than a first amplitude threshold value or smaller than a second amplitude threshold value, adjusting the amplitude;
determining corresponding volume adjustment information according to the amplitude of the sound source;
adjusting the current volume of the terminal equipment according to the volume adjustment information;
wherein adjusting the magnitude of the amplitude comprises:
adjusting the amplitude greater than the first amplitude threshold to a first amplitude and the amplitude less than the second amplitude threshold to a second amplitude;
before adjusting the volume of the terminal equipment, the method further comprises the following steps:
and determining the playing time of the sound source, and adjusting the current volume value of the terminal equipment according to the volume change value in the volume increasing information or the volume decreasing information when the playing time is greater than the preset time.
2. The method of claim 1, wherein the obtaining the audio information of the audio source comprises:
acquiring audio frame information of the sound source;
accordingly, determining the amplitude of the audio source from the audio information comprises:
and determining the amplitude of each frame of the sound source according to the audio frame information.
3. The method of claim 2, wherein the adjusting the magnitude of the amplitude comprises:
the amplitude of each frame of the audio source is adjusted.
4. The method of claim 1, wherein the determining the amplitude of the audio source according to the audio information, and if the determined amplitude of the audio source is greater than a first amplitude threshold or less than a second amplitude threshold, adjusting the amplitude comprises:
determining an amplitude curve of the sound source according to the audio information, and determining the average amplitude of the amplitude curve with a preset length;
adjusting the amplitude curve if the average amplitude is greater than a first amplitude threshold or less than a second amplitude threshold.
5. The method of claim 1, wherein adjusting the amplitude less than the second amplitude threshold to the second amplitude comprises:
the amplitude less than the second amplitude threshold and greater than the third amplitude threshold is adjusted to a second amplitude.
6. A volume adjustment device, comprising:
the acquisition module is used for acquiring audio information of a sound source when the terminal equipment is detected to play the sound source;
the amplitude determining module is used for determining the amplitude of the sound source according to the audio information;
the adjusting module is used for adjusting the amplitude of the sound source if the determined amplitude of the sound source is larger than a first amplitude threshold value or smaller than a second amplitude threshold value; determining corresponding volume adjustment information according to the amplitude of the sound source; adjusting the current volume of the terminal equipment according to the volume adjustment information; adjusting the amplitude greater than the first amplitude threshold to a first amplitude and the amplitude less than the second amplitude threshold to a second amplitude; and before the volume of the terminal equipment is adjusted, determining the playing time of the sound source, and when the playing time is longer than the preset time, adjusting the current volume value of the terminal equipment according to the volume change value in the volume increasing information or the volume decreasing information.
7. A terminal device, comprising: processor, memory and computer program stored on the memory and executable on the processor, characterized in that the processor implements the volume adjustment method according to any one of claims 1-5 when executing the computer program.
8. A storage medium containing terminal device-executable instructions, which when executed by a terminal device processor, are configured to perform the volume adjustment method of any one of claims 1-5.
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 CN107483734A (en) 2017-12-15
CN107483734B true 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)

Families Citing this family (3)

* 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
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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (6)

* 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
CN100543841C (en) * 2005-10-21 2009-09-23 神基科技股份有限公司 Source of sound treatment circuit structure and disposal route thereof
CN102693737B (en) * 2012-06-11 2015-11-25 华为终端有限公司 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
CN106775563A (en) * 2016-12-13 2017-05-31 珠海市魅族科技有限公司 The method and device of volume adjusting

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN107483734A (en) 2017-12-15

Similar Documents

Publication Publication Date Title
CN107465824B (en) Volume adjusting method and device, mobile terminal and storage medium
US11251763B2 (en) Audio signal adjustment method, storage medium, and terminal
CN107566618B (en) Volume adjusting method and device, terminal equipment and storage medium
CN107526570B (en) Volume adjusting method and device, terminal equipment and storage medium
CN111033614B (en) Volume adjusting method and device, mobile terminal and storage medium
CN108810749B (en) Player control method, device, terminal equipment and storage medium
US10440464B2 (en) Method and apparatus for adjusting volume, terminal device and storage medium
CN110799936B (en) Volume adjusting method, volume adjusting device, terminal equipment and storage medium
WO2019033942A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
CN107483734B (en) Volume adjusting method and device, terminal equipment and storage medium
CN107506168B (en) Volume adjusting method and device, terminal equipment and storage medium
WO2019033941A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
CN108566706B (en) Flash lamp control method and device, terminal equipment and storage medium
WO2019033939A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
CN106293607B (en) Method and system for automatically switching audio output modes
CN110753919B (en) Volume adjusting method and device, storage medium and mobile terminal
CN113660599A (en) Loudspeaker control method and device, mobile terminal and storage medium
CN107506170A (en) volume adjusting method, device, terminal device and storage medium
CN110731087A (en) Volume adjusting method and device, mobile terminal and storage medium
WO2019033434A1 (en) Volume control method and apparatus, storage medium, and mobile terminal
CN107506169A (en) volume adjusting method, device, terminal device 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

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.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200714

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