WO2019033940A1 - Volume adjustment method and apparatus, terminal device, and storage medium - Google Patents

Volume adjustment method and apparatus, terminal device, and storage medium Download PDF

Info

Publication number
WO2019033940A1
WO2019033940A1 PCT/CN2018/098647 CN2018098647W WO2019033940A1 WO 2019033940 A1 WO2019033940 A1 WO 2019033940A1 CN 2018098647 W CN2018098647 W CN 2018098647W WO 2019033940 A1 WO2019033940 A1 WO 2019033940A1
Authority
WO
WIPO (PCT)
Prior art keywords
amplitude
sound source
adjustment coefficient
determining
terminal device
Prior art date
Application number
PCT/CN2018/098647
Other languages
French (fr)
Chinese (zh)
Inventor
严锋贵
许钊铵
郑志勇
甘高亭
杨海
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019033940A1 publication Critical patent/WO2019033940A1/en

Links

Images

Classifications

    • 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/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • 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

Definitions

  • the present disclosure relates to the field of computer technology, for example, to a volume adjustment method, apparatus, terminal device, and storage medium.
  • terminal devices With the increasing popularity of terminal devices, more and more users use terminal devices to perform various functions to meet their own needs, such as reading text, watching videos, listening to music, playing games, and the like using terminal devices.
  • terminal device is playing audio and video, the adjustment of the volume level is flawed and needs to be improved.
  • the disclosure provides a volume adjustment method, device, terminal device and storage medium, which improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
  • Embodiments of the present disclosure provide a volume adjustment method, including:
  • the amplitude of the sound source is adjusted according to the amplitude adjustment coefficient.
  • the embodiment of the present disclosure further provides a volume adjustment apparatus, including:
  • An amplitude determining module configured to determine an amplitude corresponding to the audio information according to the audio information
  • the adjustment coefficient determining module is configured to determine an amplitude adjustment coefficient according to the amplitude size and the current volume value of the obtained terminal device;
  • the adjustment module is configured to adjust the amplitude of the sound source according to the amplitude adjustment coefficient.
  • An embodiment of the present disclosure 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 executing the computer program to implement an embodiment of the present disclosure The volume adjustment method described.
  • Embodiments of the present disclosure also provide a storage medium including terminal device executable instructions for performing a volume adjustment method according to an embodiment of the present disclosure when executed by a terminal device processor.
  • the technical solution provided by the embodiment of the present disclosure when detecting that the terminal device performs sound source playing, acquiring audio information of the sound source; determining, according to the audio information, an amplitude corresponding to the audio information; The current volume value of the terminal device determines an amplitude adjustment coefficient; the amplitude of the sound source is adjusted according to the amplitude adjustment coefficient.
  • the solution improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
  • FIG. 1 is a flowchart of a volume adjustment method according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 3 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 4 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 5 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 6 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • FIG. 1 is a flowchart of a volume adjustment method according to an embodiment of the present disclosure.
  • the method is applicable to a terminal device that is provided by the terminal device according to the embodiment of the present disclosure.
  • the volume adjustment device of the terminal device can be implemented by using software and/or hardware. As shown in FIG. 1 , the solution provided by this embodiment is as follows:
  • Step 101 Acquire audio information of the sound source when detecting that the terminal device performs sound source playback.
  • the terminal device can play the audio source through the installed third-party application or the audio and video playback software that comes with the system.
  • the playing of the sound source mainly includes the steps of acquiring, decoding, and outputting the sound source file.
  • the obtained sound source file may be a multicast stream received through a network, or may be an audio and video file stored locally by the terminal device.
  • the sound source file is loaded into the memory buffer, and the sound source file loaded into the memory buffer is decoded. Before the decoding starts, if the sound source file contains video data at the same time, separation of the audio data and the video data is required, and the separated audio data is input to the audio decoder.
  • the audio decoder is mainly used for reading audio data in the memory buffer, obtaining a digital audio signal, and converting the digital audio signal into an analog audio signal, and the playing device of the terminal device performs audio playback according to the analog audio signal.
  • the triggering event may be that the playing button displayed in the touch screen is detected to be pressed, or may be determined to determine that the terminal device performs sound source playing when the playing device of the terminal device detects that the sound starts playing.
  • the audio information of the sound source is acquired.
  • the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source.
  • the original file of the currently played sound source may also be acquired, and the audio information corresponding to the sound source is determined by parsing the original file.
  • the audio information of the sound source can be obtained through the android.media.MediaRecorder class or the android.media.AudioRecord class.
  • Step 102 Determine, according to the audio information, an amplitude corresponding to the audio information.
  • Amplitude refers to the maximum distance from the original position during the vibration of the object.
  • the loudness of the sound heard by the human ear is related to the amplitude of the sound source. The louder the amplitude, the stronger the loudness.
  • the digital audio signal decoded by the audio decoder may be sampled to obtain amplitude information within a preset time period T.
  • the amplitude information may be composed of a plurality of amplitude values, and the amplitude curves of the sound sources played during the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values.
  • the audio information of the sound source can be obtained by the android.media.MediaRecorder class or the android.media.AudioRecord class to obtain the corresponding amplitude.
  • the audio information acquired in step 101 is the original file corresponding to the sound source, the original file may be parsed to obtain a corresponding amplitude size.
  • the amplitude when detecting the sound source playing, the amplitude is determined once every preset time (eg, 1 s, 3 s, or 10 s), or in real time, the amplitude of each frame of the audio information is determined.
  • the acquiring the audio information of the sound source comprises: acquiring audio frame information of the sound source; and correspondingly, determining the amplitude of the sound source according to the audio information comprises: determining, according to the audio frame information, The amplitude of the audio frame per frame of the source.
  • the sound source file is parsed to obtain an audio frame sequence, and the corresponding amplitude is determined according to each frame of the audio frame sequence.
  • Step 103 Determine an amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device, and adjust an amplitude of the sound source according to the amplitude adjustment coefficient.
  • the fixed amplitude adjustment coefficient may be determined according to the determined amplitude magnitude and the current volume value of the obtained terminal device, or may be determined by using different amplitude adjustment coefficients according to the magnitude of the specific sound source amplitude. Perform amplitude adjustment.
  • the terminal device is divided into 18 adjustable levels from mute to maximum volume, and each level corresponds to a volume value.
  • the data representing the amplitude information in the obtained audio data may be modified by parsing the sound source file, and then the package is modified after being modified, and buffered to the corresponding sound source file and The amplitude of the sound source is correspondingly increased during playback; or, during the decoding process of the sound source playing, the amplitude data is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding adjustment coefficient to change the amplitude.
  • the size which in turn adjusts the volume of the source. Therefore, the volume of the sound source is adjusted without changing the original volume of the terminal device system, and the adjustment process may reduce the playback load before the sound source file does not enter the buffer, or may be in the buffer.
  • the sound source content is adjusted to improve the adjustment efficiency.
  • the amplitude magnitude of each frame of the audio source is adjusted.
  • different amplitude adjustment coefficients are assigned to different amplitude amplitudes of each frame of the audio frame during the adjustment process to perform corresponding adjustments. For example, several possible correspondences may be given as shown in Table 1:
  • the corresponding setting adjustment coefficient is 0.5, which lowers the high amplitude portion of the sound source; when the amplitude of the audio frame is smaller than -3db and greater than -10db, and the current terminal device volume value is moderate, the corresponding setting adjustment coefficient is 0.8, fine-tuning the amplitude of the sound source located in the medium amplitude region; when the amplitude of the audio frame is less than -20db and the current terminal device volume value is compared When high, the corresponding lower amplitude portion of the sound source is increased.
  • the terminal device detects the sound source playing, by analyzing the amplitude of the sound source and the volume of the current terminal, the corresponding amplitude adjustment coefficient is obtained, and the amplitude of the sound source is adjusted, so that when the sound source is played,
  • the automatic adjustment of the volume is completed under the premise of changing the volume of the terminal, so that the amplitude of the sound source is more reasonable, and the adjustment of the volume is more automated.
  • FIG. 2 is a flowchart of another volume adjustment method according to an embodiment of the present disclosure.
  • the obtaining the audio information of the sound source and determining the corresponding amplitude according to the audio information comprises: acquiring audio information of a preset length of the sound source, and determining the audio information according to the audio information.
  • Corresponding maximum amplitude and average amplitude; correspondingly, determining the amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the acquired terminal device comprises: determining, according to the maximum amplitude, the average amplitude, and the volume value Amplitude adjustment factor.
  • the technical solution provided by this embodiment is as follows:
  • Step 310 Acquire audio information of a preset length of the sound source when detecting that the terminal device performs sound source playing.
  • the preset length audio information of the sound source is acquired.
  • the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source.
  • the preset length may be 3 seconds (s), 5s or 10s, and the like.
  • the original file of the currently played sound source may also be acquired, and the audio information of the preset length corresponding to the sound source is determined by parsing the original file.
  • Step 320 Determine a maximum amplitude and an average amplitude in the audio information according to the audio information.
  • the digital audio signal decoded by the audio decoder can be sampled to obtain amplitude information.
  • the amplitude information may consist of a plurality of amplitude values.
  • the acquiring the preset length of the audio information of the sound source comprises: acquiring the preset length of the audio frame information of the sound source; and correspondingly, determining the maximum amplitude of the preset length of the audio information.
  • the average amplitude includes determining a maximum amplitude and an average amplitude in the audio frame information of the preset length according to the audio frame information.
  • the sound source file is parsed to obtain an audio frame sequence, and the audio frame of each frame of the predetermined length of audio information is determined to determine a corresponding amplitude, thereby determining a maximum amplitude and an average amplitude.
  • Step 330 Determine an amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the current volume value of the obtained terminal device.
  • the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises: if the difference between the maximum amplitude and the average amplitude satisfies a preset condition, The maximum amplitude, the average amplitude, and the volume value determine an amplitude adjustment factor.
  • the difference between the maximum amplitude and the average amplitude is large (e.g., 0.2 db), to avoid a louder volume when playing to a larger amplitude source, the higher amplitude is adjusted to lower the volume.
  • the difference between the maximum amplitude and the average amplitude does not satisfy the preset condition, i.e., the phase difference is not large, the amplitude of the sound source is not adjusted.
  • the first amplitude adjustment coefficient may be determined according to the difference between the maximum amplitude and the average amplitude and the volume value, Correspondingly, the amplitude of the sound source greater than the first preset threshold may be adjusted according to the first amplitude adjustment coefficient. In an embodiment, the relationship between the first amplitude adjustment coefficient is determined according to the difference between the maximum amplitude and the average amplitude and the current volume value of the terminal device.
  • Amplitude difference Volume value Amplitude adjustment factor Greater than 0.4db 8 0.3 Greater than 0.3db and less than 0.4db 10 0.7 Greater than 0.2db and less than 0.3db 15 0.9
  • the first predetermined amplitude threshold may be -2 db, that is, the amplitude of the amplitude greater than the first amplitude threshold is multiplied by a corresponding amplitude adjustment coefficient to perform amplitude attenuation to reduce the volume.
  • Step 340 Adjust the amplitude of the sound source according to the amplitude adjustment coefficient.
  • the amplitude adjustment coefficient is allocated according to the size of the difference and the current volume of the terminal device, and The amplitude adjustment coefficient adjusts the amplitude of the sound source that satisfies the condition, improves the volume adjustment efficiency, and avoids the problem that the adjustment effect caused by the synchronous adjustment of the unrelated amplitude in the sound source is poor.
  • FIG. 3 is a flowchart of another volume adjustment method according to an embodiment of the present disclosure.
  • the adjusting the amplitude of the sound source according to the amplitude adjustment coefficient further comprises: according to the second amplitude adjustment coefficient, being less than a second preset threshold and greater than a third preset threshold in the sound source The amplitude is adjusted, and the second preset threshold is smaller than the first preset threshold.
  • the solution provided in this embodiment includes:
  • Step 301 Acquire audio information of a preset length of the sound source when detecting that the terminal device performs sound source playing.
  • Step 302 Determine a maximum amplitude and an average amplitude in the audio information, and obtain a current volume value of the terminal device.
  • Step 303 Determine, according to the difference between the maximum amplitude and the average amplitude, and the volume value, a first amplitude adjustment coefficient, and according to the first amplitude adjustment coefficient, an amplitude greater than a first preset threshold in the sound source. Make adjustments.
  • Step 304 Determine a second amplitude adjustment coefficient according to the average amplitude, and adjust an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold according to the second amplitude adjustment coefficient.
  • the second preset threshold is smaller than the first preset threshold.
  • the second amplitude adjustment factor is determined based on the average amplitude. In one embodiment, the correspondence between the average amplitude and the second amplitude adjustment factor is as follows:
  • the second preset threshold may be -30 db
  • the third preset amplitude threshold may be -50 db.
  • the corresponding amplitude adjustment coefficient is determined according to the magnitude of the average amplitude of the sound source, and the larger the average amplitude is, the higher the amplitude adjustment coefficient is, and the condition that satisfies the condition (less than the second preset threshold and greater than the third preset threshold)
  • the amplitude is adjusted according to the amplitude adjustment coefficient, and the volume of the lower part of the sound source is increased, so that the playing effect is better during the playing of the sound source, and the manual volume adjustment is avoided, thereby improving the volume adjustment efficiency.
  • FIG. 4 is a flowchart of another volume adjustment method according to an embodiment of the present disclosure.
  • the method before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value, the method further includes: determining an impedance value of the playback device of the terminal device; correspondingly, the Determining the amplitude adjustment coefficient based on the maximum amplitude, the average amplitude, and the volume value includes determining an amplitude adjustment coefficient based on the impedance value, the maximum amplitude, the average amplitude, and the volume value.
  • the solution provided in this embodiment includes:
  • Step 401 Acquire audio information of a preset length of the sound source when detecting that the terminal device performs sound source playing.
  • Step 402 Determine a maximum amplitude and an average amplitude in the audio information, and obtain a current volume value of the terminal device.
  • Step 403 Determine an impedance value of the playback device of the terminal device.
  • the impedance value of the playback device (eg, speaker) installed in the terminal device may be detected by the power amplifier chip, or the impedance of the playback device may be physically detected.
  • Step 404 Determine a first amplitude adjustment coefficient according to the impedance value, the maximum amplitude, the average amplitude, and the volume value.
  • the first amplitude adjustment coefficient is further determined in conjunction with the impedance values of the playback devices of the terminal device determined in step 403. In an embodiment, the greater the impedance value, the greater the corresponding determined first amplitude adjustment factor. In an embodiment, assuming that the nominal impedance value of the playback device is x and the impedance value obtained by the detection is 1.2x, the corresponding first amplitude adjustment coefficient may be an amplitude determined only by the maximum amplitude, the average amplitude, and the volume value. The adjustment coefficient is 1.2 times as the final determined amplitude adjustment coefficient.
  • Step 405 Adjust an amplitude of the sound source that is greater than a first preset threshold according to the first amplitude adjustment coefficient.
  • Step 406 Determine a second amplitude adjustment coefficient according to the average amplitude, and adjust an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold according to the second amplitude adjustment coefficient.
  • the impedance value of the playing device is introduced as one of the parameters for determining the amplitude adjusting coefficient, thereby avoiding the increase of the impedance value of the playing device with the playing time and the normal playing process.
  • the volume level in the middle of the problem affects, so that the adjusted volume is better in line with the user's needs, further improving the volume adjustment effect.
  • FIG. 5 is a flowchart of another volume adjustment method according to an embodiment of the present disclosure.
  • the method before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value, the method further includes: determining a noise value of a current environment of the terminal device; correspondingly, Determining the amplitude adjustment coefficient based on the maximum amplitude, the average amplitude, and the volume value includes determining an amplitude adjustment coefficient based on the noise value, the maximum amplitude, the average amplitude, and the volume value.
  • the solution provided in this embodiment includes:
  • Step 501 Acquire audio information of a preset length of the sound source when detecting that the terminal device performs sound source playing.
  • Step 502 Determine a maximum amplitude and an average amplitude in the audio information, and obtain a current volume value of the terminal device.
  • Step 503 Determine a noise value of an environment in which the terminal device is currently located.
  • the noise of the current environment can be collected by the microphone installed by the terminal device to determine a corresponding noise value.
  • Step 504 Determine a first amplitude adjustment coefficient according to the noise value, the maximum amplitude, the average amplitude, and the volume value.
  • the first amplitude adjustment coefficient is determined together with the noise value of the environment in which the terminal device is currently determined in step 503. In an embodiment, the greater the noise value, the greater the corresponding determined first amplitude adjustment factor. In an embodiment, assuming that the noise value of the terminal device in a quiet environment is y, and the determined noise value is 1.2y when the terminal device is in an outdoor or noisy environment, the corresponding first amplitude adjustment coefficient may be only the maximum The amplitude, the average amplitude, and the volume value determine 1.2 times the amplitude adjustment coefficient as the final determined amplitude adjustment coefficient. In one embodiment, the impedance value, the noise value, the maximum amplitude of the sound source, and the average amplitude may also be used together to determine an amplitude adjustment factor of the sound source.
  • Step 505 Adjust an amplitude of the sound source that is greater than a first preset threshold according to the first amplitude adjustment coefficient.
  • Step 506 Determine a second amplitude adjustment coefficient according to the average amplitude, and adjust an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold according to the second amplitude adjustment coefficient.
  • the influence of noise on the volume of the terminal device is considered, and the determined noise value is taken as one of the parameters for determining the amplitude adjustment coefficient, so that the adjusted volume is better in accordance with the user's demand. , further improve the volume adjustment effect.
  • FIG. 6 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present disclosure.
  • the apparatus is configured to perform the volume adjustment method provided by the foregoing embodiment, and has a function module and a beneficial effect corresponding to the execution method.
  • the apparatus includes an acquisition module 10, an amplitude determination module 20, an adjustment coefficient determination module 30, and an adjustment module 40.
  • the obtaining module 10 is configured to acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
  • the terminal device can play the sound source through the installed third-party application or the audio and video playback software that comes with the system.
  • the playing of the sound source mainly includes the steps of acquiring, decoding, and outputting the sound source file.
  • the acquired sound source file may be a multicast stream received through a network, or may be an audio and video file stored locally by the terminal device. After the sound source file is obtained, the sound source file is loaded into the memory buffer, and the sound source file loaded into the memory buffer is decoded. Before the decoding starts, if the sound source file contains video data at the same time, separation of the audio data and the video data is required, and the separated audio data is input to the audio decoder.
  • the audio decoder is mainly used for reading audio data in the memory buffer, obtaining a digital audio signal, and converting the digital audio signal into an analog audio signal, and the playing device of the terminal device performs audio playback according to the analog audio signal.
  • the triggering event may be that it is detected that the play button displayed in the touch screen is pressed, or may be determined that the playing device of the terminal device, such as the horn, starts playing the sound, and determines that the terminal device performs the sound source playing.
  • the audio information of the sound source is acquired.
  • the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source.
  • the original file of the currently played sound source may also be acquired, and the audio information corresponding to the sound source is determined by parsing the original file.
  • the audio information of the audio source can be obtained through the android.media.MediaRecorder class or the android.media.AudioRecord class.
  • the amplitude determination module 120 is configured to determine a corresponding amplitude magnitude based on the audio information.
  • Amplitude refers to the maximum distance from the original position during the vibration of the object.
  • the loudness of the sound heard by the human ear is related to the amplitude of the sound source. The louder the amplitude, the stronger the loudness.
  • the digital audio signal decoded by the audio decoder may be sampled to obtain amplitude information within a preset time period T.
  • the amplitude information may be composed of a plurality of amplitude values, and the amplitude curves of the sound sources played during the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values.
  • the audio information of the sound source can be obtained by the android.media.MediaRecorder class or the android.media.AudioRecord class to obtain the corresponding amplitude.
  • the acquired audio information is the original file corresponding to the sound source, the original file may be parsed to obtain a corresponding amplitude size.
  • the amplitude when detecting the sound source playing, the amplitude is determined once every preset time (eg, 1 s, 3 s, or 10 s), or in real time, the amplitude of each frame of the audio information is determined.
  • the obtaining module 10 is configured to acquire audio frame information of the sound source when detecting the sound source playing by the terminal device; correspondingly, the amplitude determining module 20 is configured to determine the audio frame information according to the audio frame information. The amplitude of the audio frame per frame of the source.
  • the sound source file is parsed to obtain an audio frame sequence, and the corresponding amplitude is determined according to each frame of the audio frame sequence.
  • the adjustment coefficient determining module 30 is configured to determine an amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the acquired terminal device.
  • the adjustment module 40 is configured to adjust the amplitude of the sound source according to the amplitude adjustment coefficient.
  • the fixed amplitude adjustment coefficient may be determined according to the determined amplitude magnitude and the current volume value of the obtained terminal device, or may be determined by using different amplitude adjustment coefficients according to the magnitude of the specific sound source amplitude. Perform amplitude adjustment.
  • the terminal device is divided into 18 adjustable levels from mute to maximum volume, each level corresponding to a volume value.
  • the data representing the amplitude information in the obtained audio data may be modified by parsing the sound source file, and then the package is modified after being modified, and buffered to the corresponding sound source file and The amplitude of the sound source is correspondingly increased during playback; or, during the decoding process of the sound source playing, the amplitude data is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding adjustment coefficient to change the amplitude.
  • the size which in turn adjusts the volume of the source. Therefore, the volume of the sound source is adjusted without changing the original volume of the terminal device system, and the adjustment process may reduce the playback load before the sound source file does not enter the buffer, or may be in the buffer.
  • the sound source content is adjusted to improve the adjustment efficiency.
  • the technical solution provided by the embodiment when detecting that the terminal device performs sound source playing, acquiring audio information of the sound source; determining, according to the audio information, an amplitude corresponding to the audio information; according to the amplitude and the acquired The current volume value of the terminal device determines an amplitude adjustment coefficient; the amplitude of the sound source is adjusted according to the amplitude adjustment coefficient.
  • the solution improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
  • the obtaining module 10 is configured to: acquire audio information of a preset length of the sound source when detecting the sound source playing by the terminal device; the amplitude determining module 20 is configured to: according to the preset The length of the audio information determines a maximum amplitude and an average amplitude of the preset length of audio information; the adjustment coefficient determining module 30 is configured to: according to the maximum amplitude, the average amplitude, and the current state of the acquired terminal device The volume value determines the amplitude adjustment factor.
  • the adjustment factor determination module 30 is configured to:
  • the amplitude adjustment coefficient is determined according to the maximum amplitude, the average amplitude, and the volume value.
  • the adjustment coefficient determination module 30 is configured to determine an amplitude adjustment coefficient by determining a first amplitude adjustment coefficient according to the difference between the maximum amplitude and the average amplitude and the volume value;
  • the adjustment module 40 is configured to adjust an amplitude of the sound source that is greater than a first predetermined threshold according to the first amplitude adjustment coefficient.
  • the adjustment coefficient determining module 30 is further configured to: after determining the first amplitude adjustment coefficient according to the difference between the maximum amplitude and the average amplitude and the volume value, according to the average The amplitude determines a second amplitude adjustment coefficient; the adjustment module 104 is further configured to: adjust, according to the second amplitude adjustment coefficient, an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold, wherein The second preset threshold is smaller than the first preset threshold.
  • the adjustment factor determination module 30 is configured to determine an amplitude adjustment factor by:
  • the adjustment factor determination module 30 is configured to determine an amplitude adjustment factor by:
  • the acquiring module 10 is configured to acquire audio frame information of a preset length of the sound source when detecting that the terminal device performs sound source playing;
  • the amplitude determining module 20 is configured to determine a maximum amplitude and an average amplitude in the audio frame information of the preset length according to the audio frame information of the preset length.
  • FIG. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • the terminal device 200 includes: a memory 201.
  • Touch screen 212, other input/control devices 210, and external port 204 are communicated via one or more communication buses or signal lines 207.
  • the terminal device 200 illustrated in FIG. 7 is merely an example of a terminal device, and the terminal device 200 may have more or fewer components than those illustrated in FIG. 7, and two or more components may be combined, or Can have different component configurations.
  • the various components shown in Figure 7 can 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 terminal device 200 takes a smart phone as an example.
  • the memory 201 may be accessed by the CPU 202, the peripheral interface 203, etc., and the memory 201 may include a high speed random access memory, and may also include a nonvolatile memory such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
  • Peripheral interface 203 which can connect the input peripherals and output peripherals of the device to CPU 202 and memory 201.
  • the I/O subsystem 209 which can connect input and output peripherals on the device, such as touch screen 212 and other input/control devices 210, to peripheral interface 203.
  • the I/O subsystem 209 can include a display controller 2091 and one or more input controllers 2092 that are configured to control other input/control devices 210.
  • one or more input controllers 2092 receive electrical signals from other input/control devices 210 or transmit electrical signals to other input/control devices 210, and other input/control devices 210 may include physical buttons (pressing buttons or rocker buttons, etc.) ), dial, slide switch, joystick or click on the wheel.
  • the input controller 2092 can be coupled to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
  • the touch screen 212 is an input interface and an output interface between the user terminal and the user, and displays the visual output to the user.
  • the visual output may include graphics, text, icons, or video.
  • Display controller 2091 in I/O subsystem 209 receives electrical signals from touch screen 212 or transmits electrical signals to touch screen 212.
  • the touch screen 212 detects the contact on the touch screen 212, and the display controller 2091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 212, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 212 may be Run the game's icons or icons that are networked to the appropriate network.
  • the terminal device 200 may further include a light mouse, which is a touch sensitive surface that does not display a visual output, or an extension of a touch sensitive surface formed by the touch screen.
  • the RF circuit 205 is configured to establish communication between the mobile phone and the wireless network (ie, the network side) to implement data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages or emails.
  • the RF circuit 205 receives and transmits an RF signal, also referred to as an electromagnetic signal, and the RF circuit 205 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network And other devices to communicate.
  • the RF circuit 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, Coder-CODEter (CODEC) chipset and Subscriber Identity Module (SIM) and so on.
  • CDDEC Coder-CODEter
  • SIM Subscriber Identity Module
  • the audio circuit 206 is arranged to receive audio data from the peripheral interface 203, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 211.
  • the speaker 211 is arranged to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 205 to sound and play the sound to the user.
  • the power management chip 208 is configured to provide power and power management for the hardware connected to the CPU 202, the I/O subsystem, and the peripheral interface.
  • the volume adjustment device and the terminal device of the terminal device provided in the foregoing embodiments may perform the volume adjustment method of the terminal device provided by any embodiment of the present disclosure, and have corresponding function modules and beneficial effects for performing the method.
  • the volume adjustment method of the terminal device provided by any embodiment of the present disclosure may perform the volume adjustment method of the terminal device provided by any embodiment of the present disclosure, and have corresponding function modules and beneficial effects for performing the method.
  • Embodiments of the present disclosure also provide a storage medium including terminal device executable instructions for performing a volume adjustment method when executed by a terminal device processor, the method comprising:
  • the amplitude of the sound source is adjusted according to the amplitude adjustment coefficient.
  • the acquiring the audio information of the sound source, and determining the corresponding amplitude size according to the audio information includes:
  • determining the amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device includes:
  • the amplitude adjustment coefficient is determined according to the maximum amplitude, the average amplitude, and the current volume value of the acquired terminal device.
  • the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises:
  • the amplitude adjustment coefficient is determined according to the maximum amplitude, the average amplitude, and the volume value.
  • the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises:
  • adjusting the amplitude of the sound source according to the amplitude adjustment coefficient comprises:
  • the method further includes:
  • the adjusting the amplitude of the sound source according to the amplitude adjustment coefficient further includes:
  • the method before the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value, the method further includes:
  • determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises:
  • An amplitude adjustment coefficient is determined based on the impedance value, the maximum amplitude, the average amplitude, and the volume value.
  • the method before the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value, the method further includes:
  • determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises:
  • An amplitude adjustment coefficient is determined based on the noise value, the maximum amplitude, the average amplitude, and the volume value.
  • the acquiring the audio information of the sound source includes: acquiring audio frame information of the sound source; and determining, according to the audio information, an amplitude corresponding to the audio information, including: according to the audio The frame information determines an amplitude of the audio frame of each frame of the sound source; the determining the amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device, including: each frame of the audio frame according to the sound source The magnitude of the amplitude and the current volume value of the obtained terminal device determine an amplitude adjustment coefficient of each frame of the audio source of the sound source; the adjusting the amplitude of the sound source according to the amplitude adjustment coefficient, including: according to the The amplitude adjustment factor of each frame of the audio source adjusts the amplitude of each frame of the audio source of the source.
  • the acquiring the audio information of the preset length of the sound source, determining the maximum amplitude and the average amplitude corresponding to the audio information according to the audio information including:
  • Storage medium any one or more types of memory devices or storage devices.
  • the term “storage medium” includes: a mounting medium such as a Compact Disc Read-Only Memory (CD-ROM), a floppy disk or a tape device; a computer system memory or a random access memory such as dynamic random access. Memory (Dynamic Random Access Memory, DRAM), Double Data Rate Random Access Memory (DDR RAM), Static Random Access Memory (SRAM), Extended Data Output Random Access Extended Data Output Random Access Memory (EDO RAM) and Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory components, etc. .
  • the storage medium may also include other types of memory or a combination thereof.
  • 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, the second computer system being coupled to the first computer system via a network, such as the Internet.
  • the second computer system can provide program instructions to the first computer for execution.
  • the term "storage medium" can include two or more storage media that can reside in different locations (eg, in different computer systems connected through a network).
  • a storage medium may store program instructions (eg, embodied as a computer program) executable by one or more processors.
  • the computer executable instructions are not limited to the volume adjustment method as described above, and may also perform the volume adjustment method provided by any embodiment of the present disclosure. Related operations.

Landscapes

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

Abstract

A volume adjustment method and apparatus, a terminal device, and a storage medium. The method comprises: upon detecting that a terminal device is playing back a sound source, obtaining audio information of the sound source; according to the audio information, determining an amplitude size corresponding to the audio information; determining an amplitude adjustment coefficient according to the amplitude size and an obtained current volume value of the terminal device; performing amplitude adjustment on the sound source according to the amplitude adjustment coefficient.

Description

音量调节方法、装置、终端设备及存储介质Volume adjustment method, device, terminal device and storage medium
本公开要求申请日为2017年08月18日、申请号为201710711365.9、名称为“音量调节方法、装置、终端设备及存储介质”的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。The present application claims the priority of the Chinese patent application entitled "Volume Adjustment Method, Apparatus, Terminal Equipment, and Storage Medium" on August 18, 2017, the application number is 201710711365.9, the entire contents of which are incorporated by reference. In the present disclosure.
技术领域Technical field
本公开涉及计算机技术领域,例如涉及一种音量调节方法、装置、终端设备及存储介质。The present disclosure relates to the field of computer technology, for example, to a volume adjustment method, apparatus, terminal device, and storage medium.
背景技术Background technique
随着终端设备普及程度的提高,越来越多的用户使用终端设备执行各种各样的功能以满足自身需求,如使用终端设备阅读文字、观看视频、听音乐、玩游戏等。然而,当终端设备在播放音视频时,音量大小的调节存在缺陷,需要改进。With the increasing popularity of terminal devices, more and more users use terminal devices to perform various functions to meet their own needs, such as reading text, watching videos, listening to music, playing games, and the like using terminal devices. However, when the terminal device is playing audio and video, the adjustment of the volume level is flawed and needs to be improved.
发明内容Summary of the invention
本公开提供了一种音量调节方法、装置、终端设备及存储介质,提高了音量调节效率,降低了终端设备的功耗。The disclosure provides a volume adjustment method, device, terminal device and storage medium, which improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
本公开实施例提供了一种音量调节方法,包括:Embodiments of the present disclosure provide a volume adjustment method, including:
当检测到终端设备进行音源播放时,获取所述音源的音频信息;Obtaining audio information of the sound source when detecting that the terminal device performs sound source playing;
依据所述音频信息确定所述音频信息对应的振幅大小;Determining, according to the audio information, an amplitude corresponding to the audio information;
依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数;Determining an amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device;
依据所述振幅调节系数对所述音源的振幅进行调节。The amplitude of the sound source is adjusted according to the amplitude adjustment coefficient.
本公开实施例还提供了一种音量调节装置,包括:The embodiment of the present disclosure further provides a volume adjustment apparatus, including:
获取模块,设置为当检测到终端设备进行音源播放时,获取所述音源的音频信息;Obtaining a module, configured to acquire audio information of the sound source when detecting that the terminal device performs sound source playing;
振幅确定模块,设置为依据所述音频信息确定所述音频信息对应的振幅大小;An amplitude determining module, configured to determine an amplitude corresponding to the audio information according to the audio information;
调节系数确定模块,设置为依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数;The adjustment coefficient determining module is configured to determine an amplitude adjustment coefficient according to the amplitude size and the current volume value of the obtained terminal device;
调节模块,设置为依据所述振幅调节系数对所述音源的振幅进行调节。The adjustment module is configured to adjust the amplitude of the sound source according to the amplitude adjustment coefficient.
本公开实施例还提供了一种终端设备,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本公开实施例所述的音量调节方法。An embodiment of the present disclosure 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 executing the computer program to implement an embodiment of the present disclosure The volume adjustment method described.
本公开实施例还提供了一种包含终端设备可执行指令的存储介质,所述终端设备可执行指令在由终端设备处理器执行时用于执行本公开实施例所述的音量调节方法。Embodiments of the present disclosure also provide a storage medium including terminal device executable instructions for performing a volume adjustment method according to an embodiment of the present disclosure when executed by a terminal device processor.
本公开实施例提供的技术方案,当检测到终端设备进行音源播放时,获取所述音源的音频信息;依据所述音频信息确定所述音频信息对应的振幅大小;依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数;依据所述振幅调节系数对所述音源的振幅进行调节。本方案提高了音量调节效率,降低了终端设备的功耗。The technical solution provided by the embodiment of the present disclosure, when detecting that the terminal device performs sound source playing, acquiring audio information of the sound source; determining, according to the audio information, an amplitude corresponding to the audio information; The current volume value of the terminal device determines an amplitude adjustment coefficient; the amplitude of the sound source is adjusted according to the amplitude adjustment coefficient. The solution improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
附图说明DRAWINGS
图1是本公开一实施例提供的一种音量调节方法的流程图;FIG. 1 is a flowchart of a volume adjustment method according to an embodiment of the present disclosure;
图2是本公开另一实施例提供的一种音量调节方法的流程图;2 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图3是本公开另一实施例提供的一种音量调节方法的流程图;3 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图4是本公开另一实施例提供的一种音量调节方法的流程图;4 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图5是本公开另一实施例提供的一种音量调节方法的流程图;FIG. 5 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图6是本公开一实施例提供的一种音量调节装置的结构框图;FIG. 6 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present disclosure;
图7是本公开实施例提供的一种终端设备的结构示意图。FIG. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下面结合附图和实施例对本公开作说明。此处所描述的具体实施例用于解释本公开,而非对本公开的限定。另外,为了便于描述,附图中仅示出了与本公开相关的部分而非全部结构。The present disclosure will be described below in conjunction with the accompanying drawings and embodiments. The specific embodiments described herein are intended to be illustrative of the present disclosure and are not intended to be limiting. In addition, for the convenience of description, only some but not all of the structures related to the present disclosure are shown in the drawings.
图1是本公开实施例提供的一种音量调节方法的流程图,本实施例可适用于终端设备播放音源时对音量进行调节的情况,该方法可以由本公开实施例提供的终端设备来执行,该终端设备的音量调节装置可采用软件和/或硬件的方式实现,如图1所示,本实施例提供的方案如下:FIG. 1 is a flowchart of a volume adjustment method according to an embodiment of the present disclosure. The method is applicable to a terminal device that is provided by the terminal device according to the embodiment of the present disclosure. The volume adjustment device of the terminal device can be implemented by using software and/or hardware. As shown in FIG. 1 , the solution provided by this embodiment is as follows:
步骤101、当检测到终端设备进行音源播放时,获取所述音源的音频信息。Step 101: Acquire audio information of the sound source when detecting that the terminal device performs sound source playback.
终端设备可通过安装的第三方应用程序或系统自带的音视频播放软件进行 音源的播放。在一实施例中,音源的播放主要包括音源文件的获取、解码和输出等步骤。在一实施例中,获取到的音源文件可以是通过网络接收到的组播流,还可以是终端设备本地存储的音视频文件。获取到该音源文件后将该音源文件加载到内存缓冲区中,并对加载到内存缓冲区的音源文件进行解码。在解码开始之前,如果该音源文件同时包含有视频数据,需要进行音频数据和视频数据的分离,将分离后的音频数据输入至音频解码器。其中,音频解码器主要用于读取内存缓冲区中的音频数据,得到数字音频信号,并将该数字音频信号转换为模拟音频信号,终端设备的播放器件根据该模拟音频信号进行音频播放。在一个实施例中,当监听到音源播放事件被触发时,确定终端设备开始播放音源。在一个实施例中,该触发事件可以是检测到触摸屏中显示的播放按钮被按下,还可以是检测到终端设备的播放器件如喇叭开始播放声音时,确定终端设备进行音源播放。The terminal device can play the audio source through the installed third-party application or the audio and video playback software that comes with the system. In an embodiment, the playing of the sound source mainly includes the steps of acquiring, decoding, and outputting the sound source file. In an embodiment, the obtained sound source file may be a multicast stream received through a network, or may be an audio and video file stored locally by the terminal device. After the sound source file is obtained, the sound source file is loaded into the memory buffer, and the sound source file loaded into the memory buffer is decoded. Before the decoding starts, if the sound source file contains video data at the same time, separation of the audio data and the video data is required, and the separated audio data is input to the audio decoder. The audio decoder is mainly used for reading audio data in the memory buffer, obtaining a digital audio signal, and converting the digital audio signal into an analog audio signal, and the playing device of the terminal device performs audio playback according to the analog audio signal. In one embodiment, when it is detected that the sound source play event is triggered, it is determined that the terminal device starts playing the sound source. In one embodiment, the triggering event may be that the playing button displayed in the touch screen is detected to be pressed, or may be determined to determine that the terminal device performs sound source playing when the playing device of the terminal device detects that the sound starts playing.
当检测到终端设备进行音源播放时,获取所述音源的音频信息。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,确定该音源对应的音频信息。在另一实施例中,还可以获取当前播放的音源的原始文件,通过对该原始文件的解析确定音源对应的音频信息。在另一实施例中,以安卓(Android)系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息。When the terminal device detects the sound source playing, the audio information of the sound source is acquired. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source. In another embodiment, the original file of the currently played sound source may also be acquired, and the audio information corresponding to the sound source is determined by parsing the original file. In another embodiment, taking the Android system as an example, the audio information of the sound source can be obtained through the android.media.MediaRecorder class or the android.media.AudioRecord class.
步骤102、依据所述音频信息确定所述音频信息对应的振幅大小。Step 102: Determine, according to the audio information, an amplitude corresponding to the audio information.
振幅指物体震动过程中偏离原来位置的最大距离,人耳听到的声音的响度与音源的振幅相关,振幅越大响度越强。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,获取预设时间段T内的振幅信息。在一实施例中,该振幅信息可由多个振幅值组成,依据得到的多个振幅值可相应的确定在该预设时间段T内播放的音源的振幅曲线。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息后得到对应的振幅大小。在另一实施例中,当步骤101获取到的音频信息为音源对应的原始文件时,可通过对原始文件进行解析以得到对应的振幅大小。Amplitude refers to the maximum distance from the original position during the vibration of the object. The loudness of the sound heard by the human ear is related to the amplitude of the sound source. The louder the amplitude, the stronger the loudness. 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. In an embodiment, the amplitude information may be composed of a plurality of amplitude values, and the amplitude curves of the sound sources played during the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values. In another embodiment, taking the Android system as an example, the audio information of the sound source can be obtained by the android.media.MediaRecorder class or the android.media.AudioRecord class to obtain the corresponding amplitude. In another embodiment, when the audio information acquired in step 101 is the original file corresponding to the sound source, the original file may be parsed to obtain a corresponding amplitude size.
在一个实施例中,当检测音源播放时,每隔预设时间(如1s、3s或10s)确定一次振幅,或者实时的,对音频信息的每一帧的振幅进行确定。在一个实施例中,所述获取所述音源的音频信息包括:获取所述音源的音频帧信息;相应的,依据所述音频信息确定所述音源的振幅包括:依据所述音频帧信息确定所述音源每一帧音频帧的振幅。在一实施例中,当检测到音源播放时,对音源文 件进行解析得到音频帧序列,根据音频帧序列的每一帧音频帧确定对应的振幅。In one embodiment, when detecting the sound source playing, the amplitude is determined once every preset time (eg, 1 s, 3 s, or 10 s), or in real time, the amplitude of each frame of the audio information is determined. In an embodiment, the acquiring the audio information of the sound source comprises: acquiring audio frame information of the sound source; and correspondingly, determining the amplitude of the sound source according to the audio information comprises: determining, according to the audio frame information, The amplitude of the audio frame per frame of the source. In an embodiment, when the sound source is detected, the sound source file is parsed to obtain an audio frame sequence, and the corresponding amplitude is determined according to each frame of the audio frame sequence.
步骤103、依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数,依据所述振幅调节系数对所述音源的振幅进行调节。Step 103: Determine an amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device, and adjust an amplitude of the sound source according to the amplitude adjustment coefficient.
在一个实施例中,可根据确定的振幅大小以及获取到的终端设备当前的音量值确定固定的振幅调节系数,还可以是确定不同的振幅调节系数,再根据具体的音源振幅的大小进行分配以进行振幅调节。在一实施例中,终端设备由静音到最大音量总共分为18个可调等级,每个等级对应一个音量值。在对音源的振幅进行调节的过程中,可通过对音源文件进行解析,对得到的音频数据中的表征振幅信息的数据进行修改,修改完毕后再进行封装,当缓冲到对应的音源文件并被播放时音源的振幅相应的已被增大;还可以是,在音源播放的解码过程中,通过对得到的数字音频信号进行分析得到振幅数据,将该振幅数据乘以对应的调节系数以改变振幅大小,进而对音源的音量进行调节。由此,实现了在不改变终端设备系统原有音量的前提下对音源音量的大小进行了调节,调节过程可以在音源文件未进入缓冲区前,以减少播放负载,也可以是针对缓冲区中的音源内容进行调节以提高调节效率。In an embodiment, the fixed amplitude adjustment coefficient may be determined according to the determined amplitude magnitude and the current volume value of the obtained terminal device, or may be determined by using different amplitude adjustment coefficients according to the magnitude of the specific sound source amplitude. Perform amplitude adjustment. In an embodiment, the terminal device is divided into 18 adjustable levels from mute to maximum volume, and each level corresponds to a volume value. In the process of adjusting the amplitude of the sound source, the data representing the amplitude information in the obtained audio data may be modified by parsing the sound source file, and then the package is modified after being modified, and buffered to the corresponding sound source file and The amplitude of the sound source is correspondingly increased during playback; or, during the decoding process of the sound source playing, the amplitude data is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding adjustment coefficient to change the amplitude. The size, which in turn adjusts the volume of the source. Therefore, the volume of the sound source is adjusted without changing the original volume of the terminal device system, and the adjustment process may reduce the playback load before the sound source file does not enter the buffer, or may be in the buffer. The sound source content is adjusted to improve the adjustment efficiency.
在另一实施例中,对音源的每一帧音频帧的振幅大小进行调节。在一实施例中,调节过程中针对每一帧音频帧的振幅大小的不同分配不同的振幅调节系数以进行对应调节,例如,给出几种可能的对应关系可以如表1所示:In another embodiment, the amplitude magnitude of each frame of the audio source is adjusted. In an embodiment, different amplitude adjustment coefficients are assigned to different amplitude amplitudes of each frame of the audio frame during the adjustment process to perform corresponding adjustments. For example, several possible correspondences may be given as shown in Table 1:
表1Table 1
振幅amplitude 音量值(等级)Volume value (level) 调节系数Adjustment factor
大于-3dbGreater than -3db 55 0.50.5
小于-3db且大于-10dbLess than -3db and greater than -10db 1515 0.80.8
小于-20dbLess than -20db 1818 22
如表1所示,当音频帧的振幅大于-3分贝(db)且当前终端设备音量值较低时,相应的设置调节系数为0.5,将音源的高振幅部分降低;当音频帧的振幅小于-3db且大于-10db,且当前终端设备音量值适中时,相应的设置调节系数为0.8,对位于中振幅区域的音源振幅进行微调;当音频帧的振幅小于-20db且当前终端设备音量值较高时,相应的将音源的较低振幅部分进行增大。As shown in Table 1, when the amplitude of the audio frame is greater than -3 decibels (db) and the current terminal device volume value is lower, the corresponding setting adjustment coefficient is 0.5, which lowers the high amplitude portion of the sound source; when the amplitude of the audio frame is smaller than -3db and greater than -10db, and the current terminal device volume value is moderate, the corresponding setting adjustment coefficient is 0.8, fine-tuning the amplitude of the sound source located in the medium amplitude region; when the amplitude of the audio frame is less than -20db and the current terminal device volume value is compared When high, the corresponding lower amplitude portion of the sound source is increased.
由上述内容可知,当检测到终端设备进行音源播放时,通过对音源的振幅以及当前终端的音量进行分析,得到对应的振幅调节系数,对音源的振幅进行调节,实现了音源播放时,在不改变终端音量的前提下完成音量的自动调节,使得音源的振幅更加合理,音量的调节更加自动化。It can be seen from the above that when the terminal device detects the sound source playing, by analyzing the amplitude of the sound source and the volume of the current terminal, the corresponding amplitude adjustment coefficient is obtained, and the amplitude of the sound source is adjusted, so that when the sound source is played, The automatic adjustment of the volume is completed under the premise of changing the volume of the terminal, so that the amplitude of the sound source is more reasonable, and the adjustment of the volume is more automated.
图2是本公开实施例提供的另一种音量调节方法的流程图。在一实施例中,所述获取所述音源的音频信息,依据所述音频信息确定对应的振幅大小包括:获取所述音源的预设长度的音频信息,依据所述音频信息确定所述音频信息对应的最大振幅和平均振幅;相应的,所述依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数包括:依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。如图2所示,本实施例提供的技术方案如下:FIG. 2 is a flowchart of another volume adjustment method according to an embodiment of the present disclosure. In an embodiment, the obtaining the audio information of the sound source and determining the corresponding amplitude according to the audio information comprises: acquiring audio information of a preset length of the sound source, and determining the audio information according to the audio information. Corresponding maximum amplitude and average amplitude; correspondingly, determining the amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the acquired terminal device comprises: determining, according to the maximum amplitude, the average amplitude, and the volume value Amplitude adjustment factor. As shown in FIG. 2, the technical solution provided by this embodiment is as follows:
步骤310、当检测到终端设备进行音源播放时,获取所述音源的预设长度的音频信息。Step 310: Acquire audio information of a preset length of the sound source when detecting that the terminal device performs sound source playing.
当检测到终端设备进行音源播放时,获取所述音源的预设长度的音频信息。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,确定该音源对应的音频信息。在一实施例中,预设长度可以是3秒(s)、5s或10s等。在另一实施例中,还可以获取当前播放的音源的原始文件,通过对该原始文件的解析确定音源对应的预设长度的音频信息。When the terminal device detects the sound source playing, the preset length audio information of the sound source is acquired. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source. In an embodiment, the preset length may be 3 seconds (s), 5s or 10s, and the like. In another embodiment, the original file of the currently played sound source may also be acquired, and the audio information of the preset length corresponding to the sound source is determined by parsing the original file.
步骤320、依据所述音频信息确定所述音频信息中的最大振幅和平均振幅。Step 320: Determine a maximum amplitude and an average amplitude in the audio information according to the audio information.
在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,得到振幅信息。在一实施例中,该振幅信息可由多个振幅值组成。在一实施例中,以3s为例,3s时长内播放的音源中,对应得到的音频信息中的多个振幅值,记录获取的多个振幅值,确定多个振幅值中的最大振幅以及多个振幅的平均振幅。In one embodiment, the digital audio signal decoded by the audio decoder can be sampled to obtain amplitude information. In an embodiment, the amplitude information may consist of a plurality of amplitude values. In an embodiment, taking 3s as an example, among the sound sources played in the 3s duration, corresponding to the plurality of amplitude values in the obtained audio information, the acquired plurality of amplitude values are recorded, and the maximum amplitude and the plurality of amplitude values are determined. The average amplitude of the amplitudes.
在另一个实施例中,当检测音源播放时,每隔预设时间(如1s、3s或10s)确定一次预设长度的音频信息,或者实时的,对音频信息的每一帧音频帧的振幅进行确定。在一实施例中,所述获取所述音源的预设长度的音频信息包括:获取所述音源的预设长度的音频帧信息;相应的,确定所述预设长度的音频信息中的最大振幅和平均振幅包括:依据所述音频帧信息确定所述预设长度的音频帧信息中的最大振幅和平均振幅。在一实施例中,当检测到音源播放时,对音源文件进行解析得到音频帧序列,确定预设长度的音频信息下每一帧音频帧确定对应的振幅,进而确定最大振幅和平均振幅。In another embodiment, when detecting the sound source playing, determining the preset length of the audio information every preset time (such as 1s, 3s or 10s), or the amplitude of the audio frame of each frame of the audio information in real time. Make a decision. In an embodiment, the acquiring the preset length of the audio information of the sound source comprises: acquiring the preset length of the audio frame information of the sound source; and correspondingly, determining the maximum amplitude of the preset length of the audio information. And the average amplitude includes determining a maximum amplitude and an average amplitude in the audio frame information of the preset length according to the audio frame information. In an embodiment, when the sound source is detected, the sound source file is parsed to obtain an audio frame sequence, and the audio frame of each frame of the predetermined length of audio information is determined to determine a corresponding amplitude, thereby determining a maximum amplitude and an average amplitude.
步骤330、依据所述最大振幅、所述平均振幅以及获取到的终端设备当前的音量值确定振幅调节系数。Step 330: Determine an amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the current volume value of the obtained terminal device.
在一个实施例中,所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数包括:如果所述最大振幅和所述平均振幅的差值满足预设条件,则依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。在一实施例中,当最大振幅和平均振幅差值较大时(如0.2db),为避免播放到较大振幅的音源时音量较大,对较高的振幅进行调节以降低音量。在一实施例中,若 最大振幅和平均振幅之差不满足预设条件,即相差不大,则不对音源的振幅进行调节。In one embodiment, the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises: if the difference between the maximum amplitude and the average amplitude satisfies a preset condition, The maximum amplitude, the average amplitude, and the volume value determine an amplitude adjustment factor. In one embodiment, when the difference between the maximum amplitude and the average amplitude is large (e.g., 0.2 db), to avoid a louder volume when playing to a larger amplitude source, the higher amplitude is adjusted to lower the volume. In one embodiment, if the difference between the maximum amplitude and the average amplitude does not satisfy the preset condition, i.e., the phase difference is not large, the amplitude of the sound source is not adjusted.
在一个实施例中,如果所述最大振幅和所述平均振幅的差值满足预设条件,可依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数,相应的,可依据所述第一振幅调节系数,对所述音源中大于第一预设阈值的振幅进行调节。在一实施例中,依据最大振幅和平均振幅的差值以及终端设备当前的音量值确定第一振幅调节系数的关系如表2:In one embodiment, if the difference between the maximum amplitude and the average amplitude satisfies a preset condition, the first amplitude adjustment coefficient may be determined according to the difference between the maximum amplitude and the average amplitude and the volume value, Correspondingly, the amplitude of the sound source greater than the first preset threshold may be adjusted according to the first amplitude adjustment coefficient. In an embodiment, the relationship between the first amplitude adjustment coefficient is determined according to the difference between the maximum amplitude and the average amplitude and the current volume value of the terminal device.
表2Table 2
振幅差值Amplitude difference 音量值Volume value 振幅调节系数Amplitude adjustment factor
大于0.4dbGreater than 0.4db 88 0.30.3
大于0.3db且小于0.4dbGreater than 0.3db and less than 0.4db 1010 0.70.7
大于0.2db且小于0.3dbGreater than 0.2db and less than 0.3db 1515 0.90.9
在一实施例中,该第一预设振幅阈值可以是-2db,即将大于第一振幅阈值的振幅大小乘以对应的振幅调节系数以进行振幅衰减降低音量。由此,实现了对音源中振幅较大的部分进行合理衰减以避免听感突兀,提高了音源的播放效果。In an embodiment, the first predetermined amplitude threshold may be -2 db, that is, the amplitude of the amplitude greater than the first amplitude threshold is multiplied by a corresponding amplitude adjustment coefficient to perform amplitude attenuation to reduce the volume. Thereby, reasonable attenuation of the amplitude portion in the sound source is realized to avoid the sudden hearing, and the sound source playing effect is improved.
步骤340、依据所述振幅调节系数对所述音源的振幅进行调节。Step 340: Adjust the amplitude of the sound source according to the amplitude adjustment coefficient.
由上述可知,当检测到预设长度的音频信息中最大振幅和平均振幅的差值满足预设条件的情况下,依据该差值的大小以及终端设备当前音量的大小分配振幅调节系数,同时,该振幅调节系数针对满足条件的音源的振幅进行调节,提高了音量调节效率,避免了音源中无关振幅被同步调节带来的调节效果较差的问题。It can be seen from the above that when the difference between the maximum amplitude and the average amplitude in the audio information of the preset length is found to satisfy the preset condition, the amplitude adjustment coefficient is allocated according to the size of the difference and the current volume of the terminal device, and The amplitude adjustment coefficient adjusts the amplitude of the sound source that satisfies the condition, improves the volume adjustment efficiency, and avoids the problem that the adjustment effect caused by the synchronous adjustment of the unrelated amplitude in the sound source is poor.
图3是本公开实施例提供的另一种音量调节方法的流程图。在一实施例中,在所述依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数之后,还包括:依据所述平均振幅确定第二振幅调节系数;相应的,所述依据所述振幅调节系数对所述音源的振幅进行调节还包括:依据所述第二振幅调节系数,对所述音源中小于第二预设阈值且大于第三预设阈值的振幅进行调节,所述第二预设阈值小于第一预设阈值。如图3所示,本实施例提供的方案包括:FIG. 3 is a flowchart of another volume adjustment method according to an embodiment of the present disclosure. In an embodiment, after determining the first amplitude adjustment coefficient according to the difference between the maximum amplitude and the average amplitude and the volume value, further comprising: determining a second amplitude adjustment coefficient according to the average amplitude; Correspondingly, the adjusting the amplitude of the sound source according to the amplitude adjustment coefficient further comprises: according to the second amplitude adjustment coefficient, being less than a second preset threshold and greater than a third preset threshold in the sound source The amplitude is adjusted, and the second preset threshold is smaller than the first preset threshold. As shown in FIG. 3, the solution provided in this embodiment includes:
步骤301、当检测到终端设备进行音源播放时,获取所述音源的预设长度的音频信息。Step 301: Acquire audio information of a preset length of the sound source when detecting that the terminal device performs sound source playing.
步骤302、确定所述音频信息中的最大振幅和平均振幅,并获取终端设备当 前的音量值。Step 302: Determine a maximum amplitude and an average amplitude in the audio information, and obtain a current volume value of the terminal device.
步骤303、依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数,依据所述第一振幅调节系数,对所述音源中大于第一预设阈值的振幅进行调节。Step 303: Determine, according to the difference between the maximum amplitude and the average amplitude, and the volume value, a first amplitude adjustment coefficient, and according to the first amplitude adjustment coefficient, an amplitude greater than a first preset threshold in the sound source. Make adjustments.
步骤304、依据所述平均振幅确定第二振幅调节系数,依据所述第二振幅调节系数,对所述音源中小于第二预设阈值且大于第三预设阈值的振幅进行调节。Step 304: Determine a second amplitude adjustment coefficient according to the average amplitude, and adjust an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold according to the second amplitude adjustment coefficient.
其中,所述第二预设阈值小于第一预设阈值。在一个实施例中,依据所述平均振幅确定第二振幅调节系数。在一个实施例中,平均振幅和第二振幅调节系数的对应关系如下表3:The second preset threshold is smaller than the first preset threshold. In one embodiment, the second amplitude adjustment factor is determined based on the average amplitude. In one embodiment, the correspondence between the average amplitude and the second amplitude adjustment factor is as follows:
表3table 3
平均振幅Average amplitude 振幅调节系数Amplitude adjustment factor
-25db-25db 1.21.2
-20db-20db 1.51.5
-15db-15db 1.81.8
在一实施例中,该第二预设阈值可以是-30db,第三预设振幅阈值可以是-50db。当确定出的音源振幅小于第二预设阈值且大于第三预设阈值时,按照表3对应的振幅调节系数对满足条件的振幅进行调节。In an embodiment, the second preset threshold may be -30 db, and the third preset amplitude threshold may be -50 db. When the determined sound source amplitude is less than the second preset threshold and greater than the third preset threshold, the amplitude satisfying the condition is adjusted according to the amplitude adjustment coefficient corresponding to Table 3.
由上述可知,依据音源的平均振幅的大小确定对应的振幅调节系数,平均振幅越大对应的振幅调节系数越高,对满足条件的(小于第二预设阈值且大于第三预设阈值)的振幅按照该振幅调节系数进行调节,将音源中较低的音量部分进行音量的提高,使得音源播放播放过程中播放效果更佳,避免了用户手动进行音量调节,提高了音量调节效率。It can be seen from the above that the corresponding amplitude adjustment coefficient is determined according to the magnitude of the average amplitude of the sound source, and the larger the average amplitude is, the higher the amplitude adjustment coefficient is, and the condition that satisfies the condition (less than the second preset threshold and greater than the third preset threshold) The amplitude is adjusted according to the amplitude adjustment coefficient, and the volume of the lower part of the sound source is increased, so that the playing effect is better during the playing of the sound source, and the manual volume adjustment is avoided, thereby improving the volume adjustment efficiency.
图4是本公开实施例提供的另一种音量调节方法的流程图。在一实施例中,在所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数之前,还包括:确定所述终端设备的播放器件的阻抗值;相应的,所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数包括:依据所述阻抗值、所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。如图4所示,本实施例提供的方案包括:FIG. 4 is a flowchart of another volume adjustment method according to an embodiment of the present disclosure. In an embodiment, before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value, the method further includes: determining an impedance value of the playback device of the terminal device; correspondingly, the Determining the amplitude adjustment coefficient based on the maximum amplitude, the average amplitude, and the volume value includes determining an amplitude adjustment coefficient based on the impedance value, the maximum amplitude, the average amplitude, and the volume value. As shown in FIG. 4, the solution provided in this embodiment includes:
步骤401、当检测到终端设备进行音源播放时,获取所述音源的预设长度的音频信息。Step 401: Acquire audio information of a preset length of the sound source when detecting that the terminal device performs sound source playing.
步骤402、确定所述音频信息中的最大振幅和平均振幅,并获取终端设备当前的音量值。Step 402: Determine a maximum amplitude and an average amplitude in the audio information, and obtain a current volume value of the terminal device.
步骤403、确定所述终端设备的播放器件的阻抗值。Step 403: Determine an impedance value of the playback device of the terminal device.
在一个实施例中,可通过功放芯片检测终端设备中安装的播放器件(如:扬声器)的阻抗值,还可以是通过物理方式检测播放器件的阻抗。In one embodiment, the impedance value of the playback device (eg, speaker) installed in the terminal device may be detected by the power amplifier chip, or the impedance of the playback device may be physically detected.
步骤404、依据所述阻抗值、所述最大振幅、所述平均振幅和所述音量值确定第一振幅调节系数。Step 404: Determine a first amplitude adjustment coefficient according to the impedance value, the maximum amplitude, the average amplitude, and the volume value.
在一个实施例中,在上述实施例中依据最大振幅、平均振幅以及当前音量值的基础上,进一步结合步骤403确定的终端设备的播放器件的阻抗值共同确定第一振幅调节系数。在一实施例中,该阻抗值越大对应的共同确定的第一振幅调节系数越大。在一实施例中,假设播放器件的标称阻抗值为x,通过检测得到的阻抗值为1.2x,则相应的第一振幅调节系数可以是仅通过最大振幅、平均振幅和音量值确定的振幅调节系数的1.2倍以作为最终确定的振幅调节系数。In one embodiment, based on the maximum amplitude, the average amplitude, and the current volume value, the first amplitude adjustment coefficient is further determined in conjunction with the impedance values of the playback devices of the terminal device determined in step 403. In an embodiment, the greater the impedance value, the greater the corresponding determined first amplitude adjustment factor. In an embodiment, assuming that the nominal impedance value of the playback device is x and the impedance value obtained by the detection is 1.2x, the corresponding first amplitude adjustment coefficient may be an amplitude determined only by the maximum amplitude, the average amplitude, and the volume value. The adjustment coefficient is 1.2 times as the final determined amplitude adjustment coefficient.
步骤405、依据所述第一振幅调节系数,对所述音源中大于第一预设阈值的振幅进行调节。Step 405: Adjust an amplitude of the sound source that is greater than a first preset threshold according to the first amplitude adjustment coefficient.
步骤406、依据所述平均振幅确定第二振幅调节系数,依据所述第二振幅调节系数,对所述音源中小于第二预设阈值且大于第三预设阈值的振幅进行调节。Step 406: Determine a second amplitude adjustment coefficient according to the average amplitude, and adjust an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold according to the second amplitude adjustment coefficient.
由上述可知,在对音源的振幅进行调节过程中,引入播放器件的阻抗值作为确定振幅调节系数的参量之一,避免了播放器件随播放时长的增加阻抗值越来越高进而对正常播放过程中的音量大小产生影响的问题,使得调节后的音量大小更佳符合用户需求,进一步提高了音量调节效果。It can be seen from the above that in the process of adjusting the amplitude of the sound source, the impedance value of the playing device is introduced as one of the parameters for determining the amplitude adjusting coefficient, thereby avoiding the increase of the impedance value of the playing device with the playing time and the normal playing process. The volume level in the middle of the problem affects, so that the adjusted volume is better in line with the user's needs, further improving the volume adjustment effect.
图5是本公开实施例提供的另一种音量调节方法的流程图。在一实施例中,在所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数之前,还包括:确定所述终端设备当前所处环境的噪声值;相应的,所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数包括:依据所述噪声值、所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。如图5所示,本实施例提供的方案包括:FIG. 5 is a flowchart of another volume adjustment method according to an embodiment of the present disclosure. In an embodiment, before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value, the method further includes: determining a noise value of a current environment of the terminal device; correspondingly, Determining the amplitude adjustment coefficient based on the maximum amplitude, the average amplitude, and the volume value includes determining an amplitude adjustment coefficient based on the noise value, the maximum amplitude, the average amplitude, and the volume value. As shown in FIG. 5, the solution provided in this embodiment includes:
步骤501、当检测到终端设备进行音源播放时,获取所述音源的预设长度的音频信息。Step 501: Acquire audio information of a preset length of the sound source when detecting that the terminal device performs sound source playing.
步骤502、确定所述音频信息中的最大振幅和平均振幅,并获取终端设备当前的音量值。Step 502: Determine a maximum amplitude and an average amplitude in the audio information, and obtain a current volume value of the terminal device.
步骤503、确定所述终端设备当前所处环境的噪声值。Step 503: Determine a noise value of an environment in which the terminal device is currently located.
在一个实施例中,可通过终端设备安装的麦克风采集当前所处环境的噪音以确定对应的噪声值。In one embodiment, the noise of the current environment can be collected by the microphone installed by the terminal device to determine a corresponding noise value.
步骤504、依据所述噪声值、所述最大振幅、所述平均振幅和所述音量值确 定第一振幅调节系数。Step 504: Determine a first amplitude adjustment coefficient according to the noise value, the maximum amplitude, the average amplitude, and the volume value.
在一个实施例中,在上述实施例中依据最大振幅、平均振幅和音量值的基础上,进一步结合步骤503确定的终端设备当前所处环境的噪声值共同确定第一振幅调节系数。在一实施例中,该噪声值越大对应的共同确定的第一振幅调节系数越大。在一实施例中,假设终端设备在安静环境下的噪声值为y,终端设备处于户外或嘈杂环境中时,确定的噪声值为1.2y,则相应的第一振幅调节系数可以是仅通过最大振幅、平均振幅和音量值确定的振幅调节系数的1.2倍以作为最终确定的振幅调节系数。在一个实施例中,还可将阻抗值、噪声值、音源的最大振幅和平均振幅共同确定音源的振幅调节系数。In one embodiment, based on the maximum amplitude, the average amplitude, and the volume value, the first amplitude adjustment coefficient is determined together with the noise value of the environment in which the terminal device is currently determined in step 503. In an embodiment, the greater the noise value, the greater the corresponding determined first amplitude adjustment factor. In an embodiment, assuming that the noise value of the terminal device in a quiet environment is y, and the determined noise value is 1.2y when the terminal device is in an outdoor or noisy environment, the corresponding first amplitude adjustment coefficient may be only the maximum The amplitude, the average amplitude, and the volume value determine 1.2 times the amplitude adjustment coefficient as the final determined amplitude adjustment coefficient. In one embodiment, the impedance value, the noise value, the maximum amplitude of the sound source, and the average amplitude may also be used together to determine an amplitude adjustment factor of the sound source.
步骤505、依据所述第一振幅调节系数,对所述音源中大于第一预设阈值的振幅进行调节。Step 505: Adjust an amplitude of the sound source that is greater than a first preset threshold according to the first amplitude adjustment coefficient.
步骤506、依据所述平均振幅确定第二振幅调节系数,依据所述第二振幅调节系数,对所述音源中小于第二预设阈值且大于第三预设阈值的振幅进行调节。Step 506: Determine a second amplitude adjustment coefficient according to the average amplitude, and adjust an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold according to the second amplitude adjustment coefficient.
由上述可知,在对音源的振幅进行调节过程中,考虑了噪声对终端设备音量的影响,将确定的噪声值作为确定振幅调节系数的参量之一,使得调节后的音量大小更佳符合用户需求,进一步提高了音量调节效果。It can be seen from the above that in the process of adjusting the amplitude of the sound source, the influence of noise on the volume of the terminal device is considered, and the determined noise value is taken as one of the parameters for determining the amplitude adjustment coefficient, so that the adjusted volume is better in accordance with the user's demand. , further improve the volume adjustment effect.
图6是本公开实施例提供的一种音量调节装置的结构框图,该装置用于执行上述实施例提供的音量调节方法,具备执行方法相应的功能模块和有益效果。如图6所示,该装置包括:获取模块10、振幅确定模块20、调节系数确定模块30和调节模块40。FIG. 6 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present disclosure. The apparatus is configured to perform the volume adjustment method provided by the foregoing embodiment, and has a function module and a beneficial effect corresponding to the execution method. As shown in FIG. 6, the apparatus includes an acquisition module 10, an amplitude determination module 20, an adjustment coefficient determination module 30, and an adjustment module 40.
其中,获取模块10,设置为当检测到终端设备进行音源播放时,获取所述音源的音频信息。The obtaining module 10 is configured to acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
终端设备可通过安装的第三方应用程序或系统自带的音视频播放软件进行音源的播放。在一实施例中,音源的播放主要包括音源文件的获取、解码和输出等步骤。在一个实施例中,获取到的音源文件可以是通过网络接收到的组播流,还可以是终端设备本地存储的音视频文件。获取到该音源文件后将该音源文件加载到内存缓冲区中,并对加载到内存缓冲区的音源文件进行解码。在解码开始之前,如果该音源文件同时包含有视频数据,需要进行音频数据和视频数据的分离,将分离后的音频数据输入至音频解码器。其中,音频解码器主要用于读取内存缓冲区中的音频数据,得到数字音频信号,并将该数字音频信号转换为模拟音频信号,终端设备的播放器件根据该模拟音频信号进行音频播放。在一个实施例中,当监听到音源播放事件被触发时,确定终端设备开始播放音源。在一个实施例中,该触发事件可以是检测到触摸屏中显示的播放按钮被按 下,还可以是检测到终端设备的播放器件如喇叭开始播放声音时,确定终端设备进行音源播放。The terminal device can play the sound source through the installed third-party application or the audio and video playback software that comes with the system. In an embodiment, the playing of the sound source mainly includes the steps of acquiring, decoding, and outputting the sound source file. In an embodiment, the acquired sound source file may be a multicast stream received through a network, or may be an audio and video file stored locally by the terminal device. After the sound source file is obtained, the sound source file is loaded into the memory buffer, and the sound source file loaded into the memory buffer is decoded. Before the decoding starts, if the sound source file contains video data at the same time, separation of the audio data and the video data is required, and the separated audio data is input to the audio decoder. The audio decoder is mainly used for reading audio data in the memory buffer, obtaining a digital audio signal, and converting the digital audio signal into an analog audio signal, and the playing device of the terminal device performs audio playback according to the analog audio signal. In one embodiment, when it is detected that the sound source play event is triggered, it is determined that the terminal device starts playing the sound source. In one embodiment, the triggering event may be that it is detected that the play button displayed in the touch screen is pressed, or may be determined that the playing device of the terminal device, such as the horn, starts playing the sound, and determines that the terminal device performs the sound source playing.
当检测到终端设备进行音源播放时,获取所述音源的音频信息。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,确定该音源对应的音频信息。在另一实施例中,还可以获取当前播放的音源的原始文件,通过对该原始文件的解析确定音源对应的音频信息。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息When the terminal device detects the sound source playing, the audio information of the sound source is acquired. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source. In another embodiment, the original file of the currently played sound source may also be acquired, and the audio information corresponding to the sound source is determined by parsing the original file. In another embodiment, taking the Android system as an example, the audio information of the audio source can be obtained through the android.media.MediaRecorder class or the android.media.AudioRecord class.
振幅确定模块120,设置为依据所述音频信息确定对应的振幅大小。The amplitude determination module 120 is configured to determine a corresponding amplitude magnitude based on the audio information.
振幅指物体震动过程中偏离原来位置的最大距离,人耳听到的声音的响度与音源的振幅相关,振幅越大响度越强。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,获取预设时间段T内的振幅信息。在一实施例中,该振幅信息可由多个振幅值组成,依据得到的多个振幅值可相应的确定在该预设时间段T内播放的音源的振幅曲线。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息后得到对应的振幅大小。在另一实施例中,当获取到的音频信息为音源对应的原始文件时,可通过对原始文件进行解析以得到对应的振幅大小。Amplitude refers to the maximum distance from the original position during the vibration of the object. The loudness of the sound heard by the human ear is related to the amplitude of the sound source. The louder the amplitude, the stronger the loudness. 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. In an embodiment, the amplitude information may be composed of a plurality of amplitude values, and the amplitude curves of the sound sources played during the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values. In another embodiment, taking the Android system as an example, the audio information of the sound source can be obtained by the android.media.MediaRecorder class or the android.media.AudioRecord class to obtain the corresponding amplitude. In another embodiment, when the acquired audio information is the original file corresponding to the sound source, the original file may be parsed to obtain a corresponding amplitude size.
在一个实施例中,当检测音源播放时,每隔预设时间(如1s、3s或10s)确定一次振幅,或者实时的,对音频信息的每一帧音频帧的振幅进行确定。一个实施例中,获取模块10,是设置为当检测到终端设备进行音源播放时,获取所述音源的音频帧信息;相应的,振幅确定模块20是设置为依据所述音频帧信息确定所述音源每一帧音频帧的振幅大小。在一个实施例中,当检测到音源播放时,对音源文件进行解析得到音频帧序列,根据音频帧序列的每一帧音频帧确定对应的振幅。In one embodiment, when detecting the sound source playing, the amplitude is determined once every preset time (eg, 1 s, 3 s, or 10 s), or in real time, the amplitude of each frame of the audio information is determined. In one embodiment, the obtaining module 10 is configured to acquire audio frame information of the sound source when detecting the sound source playing by the terminal device; correspondingly, the amplitude determining module 20 is configured to determine the audio frame information according to the audio frame information. The amplitude of the audio frame per frame of the source. In one embodiment, when the sound source is detected, the sound source file is parsed to obtain an audio frame sequence, and the corresponding amplitude is determined according to each frame of the audio frame sequence.
调节系数确定模块30,设置为依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数。The adjustment coefficient determining module 30 is configured to determine an amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the acquired terminal device.
调节模块40,设置为依据所述振幅调节系数对所述音源的振幅进行调节。The adjustment module 40 is configured to adjust the amplitude of the sound source according to the amplitude adjustment coefficient.
在一个实施例中,可根据确定的振幅大小以及获取到的终端设备当前的音量值确定固定的振幅调节系数,还可以是确定不同的振幅调节系数,再根据具体的音源振幅的大小进行分配以进行振幅调节。在一个实施例中,终端设备由静音到最大音量总共分为18个可调等级,每个等级对应一个音量值。在对音源的振幅进行调节的过程中,可通过对音源文件进行解析,对得到的音频数据中 的表征振幅信息的数据进行修改,修改完毕后再进行封装,当缓冲到对应的音源文件并被播放时音源的振幅相应的已被增大;还可以是,在音源播放的解码过程中,通过对得到的数字音频信号进行分析得到振幅数据,将该振幅数据乘以对应的调节系数以改变振幅大小,进而对音源的音量进行调节。由此,实现了在不改变终端设备系统原有音量的前提下对音源音量的大小进行了调节,调节过程可以在音源文件未进入缓冲区前,以减少播放负载,也可以是针对缓冲区中的音源内容进行调节以提高调节效率。In an embodiment, the fixed amplitude adjustment coefficient may be determined according to the determined amplitude magnitude and the current volume value of the obtained terminal device, or may be determined by using different amplitude adjustment coefficients according to the magnitude of the specific sound source amplitude. Perform amplitude adjustment. In one embodiment, the terminal device is divided into 18 adjustable levels from mute to maximum volume, each level corresponding to a volume value. In the process of adjusting the amplitude of the sound source, the data representing the amplitude information in the obtained audio data may be modified by parsing the sound source file, and then the package is modified after being modified, and buffered to the corresponding sound source file and The amplitude of the sound source is correspondingly increased during playback; or, during the decoding process of the sound source playing, the amplitude data is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding adjustment coefficient to change the amplitude. The size, which in turn adjusts the volume of the source. Therefore, the volume of the sound source is adjusted without changing the original volume of the terminal device system, and the adjustment process may reduce the playback load before the sound source file does not enter the buffer, or may be in the buffer. The sound source content is adjusted to improve the adjustment efficiency.
本实施例提供的技术方案,当检测到终端设备进行音源播放时,获取所述音源的音频信息;依据所述音频信息确定所述音频信息对应的振幅大小;依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数;依据所述振幅调节系数对所述音源的振幅进行调节。本方案提高了音量调节效率,降低了终端设备的功耗。The technical solution provided by the embodiment, when detecting that the terminal device performs sound source playing, acquiring audio information of the sound source; determining, according to the audio information, an amplitude corresponding to the audio information; according to the amplitude and the acquired The current volume value of the terminal device determines an amplitude adjustment coefficient; the amplitude of the sound source is adjusted according to the amplitude adjustment coefficient. The solution improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
在一个实施例中,获取模块10是设置为:当检测到终端设备进行音源播放时,获取所述音源的预设长度的音频信息;所述振幅确定模块20是设置为:依据所述预设长度的音频信息确定所述预设长度的音频信息中的最大振幅和平均振幅;所述调节系数确定模块30是设置为:依据所述最大振幅、所述平均振幅以及获取到的终端设备当前的音量值确定振幅调节系数。In an embodiment, the obtaining module 10 is configured to: acquire audio information of a preset length of the sound source when detecting the sound source playing by the terminal device; the amplitude determining module 20 is configured to: according to the preset The length of the audio information determines a maximum amplitude and an average amplitude of the preset length of audio information; the adjustment coefficient determining module 30 is configured to: according to the maximum amplitude, the average amplitude, and the current state of the acquired terminal device The volume value determines the amplitude adjustment factor.
在一个实施例中,所述调节系数确定模块30是设置为:In one embodiment, the adjustment factor determination module 30 is configured to:
如果所述最大振幅和所述平均振幅的差值满足预设条件,则依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。If the difference between the maximum amplitude and the average amplitude satisfies a preset condition, the amplitude adjustment coefficient is determined according to the maximum amplitude, the average amplitude, and the volume value.
在一个实施例中,所述调节系数确定模块30是设置为通过如下方式确定振幅调节系数:依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数;所述调节模块40是设置为:依据所述第一振幅调节系数,对所述音源中大于第一预设阈值的振幅进行调节。In one embodiment, the adjustment coefficient determination module 30 is configured to determine an amplitude adjustment coefficient by determining a first amplitude adjustment coefficient according to the difference between the maximum amplitude and the average amplitude and the volume value; The adjustment module 40 is configured to adjust an amplitude of the sound source that is greater than a first predetermined threshold according to the first amplitude adjustment coefficient.
在一个实施例中,所述调节系数确定模块30还设置为:在所述依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数之后,依据所述平均振幅确定第二振幅调节系数;所述调节模块104还设置为:依据所述第二振幅调节系数,对所述音源中小于第二预设阈值且大于第三预设阈值的振幅进行调节,其中,所述第二预设阈值小于第一预设阈值。In an embodiment, the adjustment coefficient determining module 30 is further configured to: after determining the first amplitude adjustment coefficient according to the difference between the maximum amplitude and the average amplitude and the volume value, according to the average The amplitude determines a second amplitude adjustment coefficient; the adjustment module 104 is further configured to: adjust, according to the second amplitude adjustment coefficient, an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold, wherein The second preset threshold is smaller than the first preset threshold.
在一个实施例中,所述调节系数确定模块30是设置为通过如下方式确定振幅调节系数:In one embodiment, the adjustment factor determination module 30 is configured to determine an amplitude adjustment factor by:
在所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数之前,确定所述终端设备播放器件的阻抗值;依据所述阻抗值、所述最大振幅、 所述平均振幅和所述音量值确定振幅调节系数。Determining an impedance value of the terminal device playback device before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value; according to the impedance value, the maximum amplitude, and the average amplitude And the volume value determines an amplitude adjustment factor.
在一个实施例中,所述调节系数确定模块30是设置为通过如下方式确定振幅调节系数:In one embodiment, the adjustment factor determination module 30 is configured to determine an amplitude adjustment factor by:
在所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数之前,确定所述终端设备当前所处环境的噪声值;依据所述噪声值、所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。Determining a noise value of an environment in which the terminal device is currently located before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value; according to the noise value, the maximum amplitude, The average amplitude and the volume value determine an amplitude adjustment factor.
在一实施例中,所述获取模块10是设置为当检测到终端设备进行音源播放时,获取所述音源的预设长度的音频帧信息;In an embodiment, the acquiring module 10 is configured to acquire audio frame information of a preset length of the sound source when detecting that the terminal device performs sound source playing;
所述振幅确定模块20是设置为依据所述预设长度的音频帧信息确定所述预设长度的音频帧信息中的最大振幅和平均振幅。The amplitude determining module 20 is configured to determine a maximum amplitude and an average amplitude in the audio frame information of the preset length according to the audio frame information of the preset length.
本实施例在上述多个实施例的基础上提供了一种终端设备,图7是本公开实施例提供的一种终端设备的结构示意图,如图7所示,该终端设备200包括:存储器201、处理器(Central Processing Unit,CPU)202、外设接口203、射频(Radio Frequency,RF)电路205、音频电路206、扬声器211、电源管理芯片208、输入/输出(I/O)子系统209、触摸屏212、其他输入/控制设备210以及外部端口204,这些部件通过一个或多个通信总线或信号线207来通信。The present embodiment provides a terminal device based on the foregoing multiple embodiments. FIG. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure. As shown in FIG. 7, the terminal device 200 includes: a memory 201. A central processing unit (CPU) 202, a peripheral interface 203, a radio frequency (RF) circuit 205, an audio circuit 206, a speaker 211, a power management chip 208, and an input/output (I/O) subsystem 209 Touch screen 212, other input/control devices 210, and external port 204 are communicated via one or more communication buses or signal lines 207.
图7示出的终端设备200仅仅是终端设备的一个范例,并且终端设备200可以具有比图7中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图7中所示出的多种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。The terminal device 200 illustrated in FIG. 7 is merely an example of a terminal device, and the terminal device 200 may have more or fewer components than those illustrated in FIG. 7, and two or more components may be combined, or Can have different component configurations. The various components shown in Figure 7 can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
下面就本实施例提供的终端设备200进行描述,该终端设备200以智能手机为例。The following describes the terminal device 200 provided in this embodiment. The terminal device 200 takes a smart phone as an example.
存储器201,所述存储器201可以被CPU202、外设接口203等访问,所述存储器201可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 201 may be accessed by the CPU 202, the peripheral interface 203, etc., and the memory 201 may include a high speed random access memory, and may also include a nonvolatile memory such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
外设接口203,所述外设接口203可以将设备的输入外设和输出外设连接到CPU202和存储器201。 Peripheral interface 203, which can connect the input peripherals and output peripherals of the device to CPU 202 and memory 201.
I/O子系统209,所述I/O子系统209可以将设备上的输入输出外设,例如触摸屏212和其他输入/控制设备210,连接到外设接口203。I/O子系统209可以包括显示控制器2091和设置为控制其他输入/控制设备210的一个或多个输入控制器2092。其中,一个或多个输入控制器2092从其他输入/控制设备210接收电信号或者向其他输入/控制设备210发送电信号,其他输入/控制设备210 可以包括物理按钮(按压按钮或摇臂按钮等)、拨号盘、滑动开关、操纵杆或点击滚轮。在一实施例中,输入控制器2092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/O subsystem 209, which can connect input and output peripherals on the device, such as touch screen 212 and other input/control devices 210, to peripheral interface 203. The I/O subsystem 209 can include a display controller 2091 and one or more input controllers 2092 that are configured to control other input/control devices 210. Wherein, one or more input controllers 2092 receive electrical signals from other input/control devices 210 or transmit electrical signals to other input/control devices 210, and other input/control devices 210 may include physical buttons (pressing buttons or rocker buttons, etc.) ), dial, slide switch, joystick or click on the wheel. In an embodiment, the input controller 2092 can be coupled to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
触摸屏212,所述触摸屏212是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标或视频等。The touch screen 212 is an input interface and an output interface between the user terminal and the user, and displays the visual output to the user. The visual output may include graphics, text, icons, or video.
I/O子系统209中的显示控制器2091从触摸屏212接收电信号或者向触摸屏212发送电信号。触摸屏212检测触摸屏212上的接触,显示控制器2091将检测到的接触转换为与显示在触摸屏212上的用户界面对象的交互,即实现人机交互,显示在触摸屏212上的用户界面对象可以是运行游戏的图标或联网到相应网络的图标等。在一实施例中,终端设备200还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。 Display controller 2091 in I/O subsystem 209 receives electrical signals from touch screen 212 or transmits electrical signals to touch screen 212. The touch screen 212 detects the contact on the touch screen 212, and the display controller 2091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 212, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 212 may be Run the game's icons or icons that are networked to the appropriate network. In an embodiment, the terminal device 200 may further include a light mouse, which is a touch sensitive surface that does not display a visual output, or an extension of a touch sensitive surface formed by the touch screen.
RF电路205,设置为建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息或电子邮件等。在一实施例中,RF电路205接收并发送RF信号,RF信号也称为电磁信号,RF电路205将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路205可以包括用于执行这些功能的已知电路,RF电路205包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、编译码器(COder-DECoder,CODEC)芯片组以及用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 205 is configured to establish communication between the mobile phone and the wireless network (ie, the network side) to implement data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages or emails. In an embodiment, the RF circuit 205 receives and transmits an RF signal, also referred to as an electromagnetic signal, and the RF circuit 205 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network And other devices to communicate. The RF circuit 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, Coder-CODEter (CODEC) chipset and Subscriber Identity Module (SIM) and so on.
音频电路206,设置为从外设接口203接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器211。The audio circuit 206 is arranged to receive audio data from the peripheral interface 203, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 211.
扬声器211,设置为将手机通过RF电路205从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 211 is arranged to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 205 to sound and play the sound to the user.
电源管理芯片208,设置为为CPU202、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 208 is configured to provide power and power management for the hardware connected to the CPU 202, the I/O subsystem, and the peripheral interface.
上述实施例中提供的终端设备的音量调节装置及终端设备可执行本公开任意实施例所提供的终端设备的音量调节方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本公开任意实施例所提供的终端设备的音量调节方法。The volume adjustment device and the terminal device of the terminal device provided in the foregoing embodiments may perform the volume adjustment method of the terminal device provided by any embodiment of the present disclosure, and have corresponding function modules and beneficial effects for performing the method. For the technical details that are not described in detail in the above embodiments, reference may be made to the volume adjustment method of the terminal device provided by any embodiment of the present disclosure.
本公开实施例还提供一种包含终端设备可执行指令的存储介质,所述终端设备可执行指令在由终端设备处理器执行时用于执行一种音量调节方法,该方法包括:Embodiments of the present disclosure also provide a storage medium including terminal device executable instructions for performing a volume adjustment method when executed by a terminal device processor, the method comprising:
当检测到终端设备进行音源播放时,获取所述音源的音频信息;Obtaining audio information of the sound source when detecting that the terminal device performs sound source playing;
依据所述音频信息确定所述音频信息对应的振幅大小;Determining, according to the audio information, an amplitude corresponding to the audio information;
依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数;Determining an amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device;
依据所述振幅调节系数对所述音源的振幅进行调节。The amplitude of the sound source is adjusted according to the amplitude adjustment coefficient.
在一个实施例中,所述获取所述音源的音频信息,依据所述音频信息确定对应的振幅大小包括:In an embodiment, the acquiring the audio information of the sound source, and determining the corresponding amplitude size according to the audio information includes:
获取所述音源的预设长度的音频信息,依据所述音频信息确定所述音频信息对应的最大振幅和平均振幅;Obtaining audio information of a preset length of the sound source, and determining a maximum amplitude and an average amplitude corresponding to the audio information according to the audio information;
相应的,所述依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数包括:Correspondingly, determining the amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device includes:
依据所述最大振幅、所述平均振幅以及获取到的终端设备当前的音量值确定振幅调节系数。The amplitude adjustment coefficient is determined according to the maximum amplitude, the average amplitude, and the current volume value of the acquired terminal device.
在一个实施例中,所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数包括:In one embodiment, the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises:
如果所述最大振幅和所述平均振幅的差值满足预设条件,则依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。If the difference between the maximum amplitude and the average amplitude satisfies a preset condition, the amplitude adjustment coefficient is determined according to the maximum amplitude, the average amplitude, and the volume value.
在一个实施例中,所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数包括:In one embodiment, the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises:
依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数;Determining a first amplitude adjustment coefficient according to the difference between the maximum amplitude and the average amplitude and the volume value;
相应的,所述依据所述振幅调节系数对所述音源的振幅进行调节包括:Correspondingly, adjusting the amplitude of the sound source according to the amplitude adjustment coefficient comprises:
依据所述第一振幅调节系数,对所述音源中大于第一预设阈值的振幅进行调节。Adjusting an amplitude of the sound source that is greater than a first predetermined threshold according to the first amplitude adjustment coefficient.
在一个实施例中,在所述依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数之后,还包括:In an embodiment, after determining the first amplitude adjustment coefficient according to the difference between the maximum amplitude and the average amplitude and the volume value, the method further includes:
依据所述平均振幅确定第二振幅调节系数;Determining a second amplitude adjustment coefficient according to the average amplitude;
相应的,所述依据所述振幅调节系数对所述音源的振幅进行调节还包括:Correspondingly, the adjusting the amplitude of the sound source according to the amplitude adjustment coefficient further includes:
依据所述第二振幅调节系数,对所述音源中小于第二预设阈值且大于第三预设阈值的振幅进行调节,所述第二预设阈值小于第一预设阈值。And adjusting, according to the second amplitude adjustment coefficient, an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold, where the second preset threshold is smaller than the first preset threshold.
在一个实施例中,在所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数之前,还包括:In an embodiment, before the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value, the method further includes:
确定所述终端设备播放器件的阻抗值;Determining an impedance value of the terminal device playing device;
相应的,所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调 节系数包括:Correspondingly, determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises:
依据所述阻抗值、所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。An amplitude adjustment coefficient is determined based on the impedance value, the maximum amplitude, the average amplitude, and the volume value.
在一个实施例中,在所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数之前,还包括:In an embodiment, before the determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value, the method further includes:
确定所述终端设备当前所处环境的噪声值;Determining a noise value of an environment in which the terminal device is currently located;
相应的,所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数包括:Correspondingly, determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value comprises:
依据所述噪声值、所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。An amplitude adjustment coefficient is determined based on the noise value, the maximum amplitude, the average amplitude, and the volume value.
在一实施例中,所述获取所述音源的音频信息,包括:获取所述音源的音频帧信息;所述依据所述音频信息确定所述音频信息对应的振幅大小,包括:依据所述音频帧信息确定所述音源的每一帧音频帧的振幅大小;所述依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数,包括:依据所述音源的每一帧音频帧的振幅大小以及获取到的终端设备当前的音量值确定所述音源的每一帧音频帧的振幅调节系数;所述依据所述振幅调节系数对所述音源的振幅进行调节,包括:依据所述音源的每一帧音频帧的振幅调节系数对所述音源的每一帧音频帧的振幅进行调节。In an embodiment, the acquiring the audio information of the sound source includes: acquiring audio frame information of the sound source; and determining, according to the audio information, an amplitude corresponding to the audio information, including: according to the audio The frame information determines an amplitude of the audio frame of each frame of the sound source; the determining the amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device, including: each frame of the audio frame according to the sound source The magnitude of the amplitude and the current volume value of the obtained terminal device determine an amplitude adjustment coefficient of each frame of the audio source of the sound source; the adjusting the amplitude of the sound source according to the amplitude adjustment coefficient, including: according to the The amplitude adjustment factor of each frame of the audio source adjusts the amplitude of each frame of the audio source of the source.
在一实施例中,所述获取所述音源的预设长度的音频信息,依据所述音频信息确定所述音频信息对应的最大振幅和平均振幅,包括:In an embodiment, the acquiring the audio information of the preset length of the sound source, determining the maximum amplitude and the average amplitude corresponding to the audio information according to the audio information, including:
获取所述音源的预设长度的音频帧信息,依据所述预设长度的音频帧信息确定所述预设长度的音频帧信息中的最大振幅和平均振幅。Acquiring audio frame information of a preset length of the sound source, and determining a maximum amplitude and an average amplitude in the audio frame information of the preset length according to the audio frame information of the preset length.
存储介质——任何的一种或多种类型的存储器设备或存储设备。术语“存储介质”包括:安装介质,例如紧凑型光盘只读储存器(Compact Disc Read-Only Memory,CD-ROM)、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如动态随机存取存储器(Dynamic Random Access Memory,DRAM)、双倍数据速率随机存取存储器(Double Data Rate Random Access Memory,DDR RAM)、静态随机存取存储器(Static Random Access Memory,SRAM)、扩展数据输出随机存取存储器(Extended Data Output Random Access Memory,EDO RAM)以及兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网) 连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。Storage medium - any one or more types of memory devices or storage devices. The term "storage medium" includes: a mounting medium such as a Compact Disc Read-Only Memory (CD-ROM), a floppy disk or a tape device; a computer system memory or a random access memory such as dynamic random access. Memory (Dynamic Random Access Memory, DRAM), Double Data Rate Random Access Memory (DDR RAM), Static Random Access Memory (SRAM), Extended Data Output Random Access Extended Data Output Random Access Memory (EDO RAM) and Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory components, etc. . The storage medium may also include other types of memory or a combination thereof. Additionally, 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, the second computer system being coupled to the first computer system via a network, such as the Internet. The second computer system can provide program instructions to the first computer for execution. The term "storage medium" can include two or more storage media that can reside in different locations (eg, in different computer systems connected through a network). A storage medium may store program instructions (eg, embodied as a computer program) executable by one or more processors.
当然,本公开实施例所提供的一种包含计算机可执行指令的存储介质,计算机可执行指令不限于如上所述的音量调节方法,还可以执行本公开任意实施例所提供的音量调节方法中的相关操作。Certainly, a storage medium containing computer executable instructions provided by the embodiments of the present disclosure, the computer executable instructions are not limited to the volume adjustment method as described above, and may also perform the volume adjustment method provided by any embodiment of the present disclosure. Related operations.
注意,上述仅为本公开的实施例及所运用技术原理。Note that the above are only the embodiments of the present disclosure and the technical principles applied.

Claims (20)

  1. 一种音量调节方法,包括:A volume adjustment method includes:
    当检测到终端设备进行音源播放时,获取所述音源的音频信息;Obtaining audio information of the sound source when detecting that the terminal device performs sound source playing;
    依据所述音频信息确定所述音频信息对应的振幅大小;Determining, according to the audio information, an amplitude corresponding to the audio information;
    依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数;Determining an amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device;
    依据所述振幅调节系数对所述音源的振幅进行调节。The amplitude of the sound source is adjusted according to the amplitude adjustment coefficient.
  2. 根据权利要求1所述的方法,其中,所述获取所述音源的音频信息,依据所述音频信息确定所述音频信息对应的振幅大小,包括:The method according to claim 1, wherein the obtaining the audio information of the sound source, determining the amplitude corresponding to the audio information according to the audio information, comprises:
    获取所述音源的预设长度的音频信息,依据所述音频信息确定所述音频信息中的最大振幅和平均振幅;Obtaining audio information of a preset length of the sound source, and determining a maximum amplitude and an average amplitude in the audio information according to the audio information;
    所述依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数,包括:Determining the amplitude adjustment coefficient according to the amplitude magnitude and the current volume value of the obtained terminal device, including:
    依据所述最大振幅、所述平均振幅以及所述音量值确定振幅调节系数。An amplitude adjustment coefficient is determined based on the maximum amplitude, the average amplitude, and the volume value.
  3. 根据权利要求2所述的方法,其中,所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数,包括:The method of claim 2 wherein said determining an amplitude adjustment factor based on said maximum amplitude, said average amplitude, and said volume value comprises:
    如果所述最大振幅和所述平均振幅的差值满足预设条件,则依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。If the difference between the maximum amplitude and the average amplitude satisfies a preset condition, the amplitude adjustment coefficient is determined according to the maximum amplitude, the average amplitude, and the volume value.
  4. 根据权利要求3所述的方法,其中,所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数,包括:The method of claim 3 wherein said determining an amplitude adjustment factor based on said maximum amplitude, said average amplitude, and said volume value comprises:
    依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数;Determining a first amplitude adjustment coefficient according to the difference between the maximum amplitude and the average amplitude and the volume value;
    所述依据所述振幅调节系数对所述音源的振幅进行调节,包括:Adjusting the amplitude of the sound source according to the amplitude adjustment coefficient, including:
    依据所述第一振幅调节系数,对所述音源中大于第一预设阈值的振幅进行调节。Adjusting an amplitude of the sound source that is greater than a first predetermined threshold according to the first amplitude adjustment coefficient.
  5. 根据权利要求4所述的方法,其中,在所述依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数之后,还包括:The method of claim 4, wherein after determining the first amplitude adjustment coefficient based on the difference between the maximum amplitude and the average amplitude and the volume value, the method further comprises:
    依据所述平均振幅确定第二振幅调节系数;Determining a second amplitude adjustment coefficient according to the average amplitude;
    所述依据所述振幅调节系数对所述音源的振幅进行调节还包括:The adjusting the amplitude of the sound source according to the amplitude adjustment coefficient further includes:
    依据所述第二振幅调节系数,对所述音源中小于第二预设阈值且大于第三预设阈值的振幅进行调节,其中,所述第二预设阈值小于第一预设阈值。And adjusting, according to the second amplitude adjustment coefficient, an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold, wherein the second preset threshold is smaller than the first preset threshold.
  6. 根据权利要求2-5任一项所述的方法,其中,在所述依据所述最大振幅、 所述平均振幅和所述音量值确定振幅调节系数之前,还包括:The method according to any one of claims 2 to 5, further comprising: before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value,
    确定所述终端设备的播放器件的阻抗值;Determining an impedance value of the playback device of the terminal device;
    所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数,包括:The determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value includes:
    依据所述阻抗值、所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。An amplitude adjustment coefficient is determined based on the impedance value, the maximum amplitude, the average amplitude, and the volume value.
  7. 根据权利要求2-5中任一项所述的方法,其中,在所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数之前,还包括:The method according to any one of claims 2 to 5, further comprising: before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value,
    确定所述终端设备当前所处环境的噪声值;Determining a noise value of an environment in which the terminal device is currently located;
    所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数,包括:The determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value includes:
    依据所述噪声值、所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。An amplitude adjustment coefficient is determined based on the noise value, the maximum amplitude, the average amplitude, and the volume value.
  8. 根据权利要求1所述的方法,其中,所述获取所述音源的音频信息,包括:获取所述音源的音频帧信息;The method of claim 1, wherein the acquiring the audio information of the sound source comprises: acquiring audio frame information of the sound source;
    所述依据所述音频信息确定所述音频信息对应的振幅大小,包括:Determining, according to the audio information, an amplitude corresponding to the audio information, including:
    依据所述音频帧信息确定所述音源的每一帧音频帧的振幅大小。Determining an amplitude of each frame of the audio frame of the sound source according to the audio frame information.
  9. 根据权利要求2-5任一项所述的方法,其中,所述获取所述音源的预设长度的音频信息,依据所述音频信息确定所述音频信息中的最大振幅和平均振幅,包括:The method according to any one of claims 2 to 5, wherein the acquiring the audio information of the preset length of the sound source, determining the maximum amplitude and the average amplitude in the audio information according to the audio information, comprising:
    获取所述音源的预设长度的音频帧信息,依据所述预设长度的音频帧信息确定所述预设长度的音频帧信息中的最大振幅和平均振幅。Acquiring audio frame information of a preset length of the sound source, and determining a maximum amplitude and an average amplitude in the audio frame information of the preset length according to the audio frame information of the preset length.
  10. 一种音量调节装置,包括:A volume adjustment device includes:
    获取模块,设置为当检测到终端设备进行音源播放时,获取所述音源的音频信息;Obtaining a module, configured to acquire audio information of the sound source when detecting that the terminal device performs sound source playing;
    振幅确定模块,设置为依据所述音频信息确定所述音频信息对应的振幅大小;An amplitude determining module, configured to determine an amplitude corresponding to the audio information according to the audio information;
    调节系数确定模块,设置为依据所述振幅大小以及获取到的终端设备当前的音量值确定振幅调节系数;The adjustment coefficient determining module is configured to determine an amplitude adjustment coefficient according to the amplitude size and the current volume value of the obtained terminal device;
    调节模块,设置为依据所述振幅调节系数对所述音源的振幅进行调节。The adjustment module is configured to adjust the amplitude of the sound source according to the amplitude adjustment coefficient.
  11. 根据权利要求10所述的装置,其中,所述获取模块是设置为当检测到 终端设备进行音源播放时,获取所述音源的预设长度的音频信息;The device according to claim 10, wherein the obtaining module is configured to acquire audio information of a preset length of the sound source when detecting that the terminal device performs sound source playing;
    所述振幅确定模块是设置为依据所述预设长度的音频信息确定所述预设长度的音频信息中的最大振幅和平均振幅;The amplitude determining module is configured to determine a maximum amplitude and an average amplitude in the audio information of the preset length according to the audio information of the preset length;
    所述调节系数确定模块是设置为依据所述最大振幅、所述平均振幅以及所述音量值确定振幅调节系数。The adjustment coefficient determination module is configured to determine an amplitude adjustment coefficient based on the maximum amplitude, the average amplitude, and the volume value.
  12. 根据权利要求11所述的装置,其中,所述调节系数确定模块是设置为如果所述最大振幅和所述平均振幅的差值满足预设条件,则依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数。The apparatus according to claim 11, wherein said adjustment coefficient determining module is configured to set said maximum amplitude, said average amplitude, and if said difference between said maximum amplitude and said average amplitude satisfies a preset condition The volume value determines an amplitude adjustment factor.
  13. 根据权利要求12所述的装置,其中,所述调节系数确定模块是设置为通过如下方式确定所述振幅调节系数:The apparatus of claim 12, wherein the adjustment coefficient determination module is configured to determine the amplitude adjustment factor by:
    依据所述最大振幅和所述平均振幅的差值以及所述音量值确定第一振幅调节系数;Determining a first amplitude adjustment coefficient according to the difference between the maximum amplitude and the average amplitude and the volume value;
    所述调节模块是设置为依据所述第一振幅调节系数,对所述音源中大于第一预设阈值的振幅进行调节。The adjustment module is configured to adjust an amplitude of the sound source that is greater than a first predetermined threshold according to the first amplitude adjustment coefficient.
  14. 根据权利要求13所述的装置,其中,所述调节系数确定模块还设置为依据所述平均振幅确定第二振幅调节系数;The apparatus of claim 13, wherein the adjustment coefficient determination module is further configured to determine a second amplitude adjustment coefficient based on the average amplitude;
    所述调节模块还设置为依据所述第二振幅调节系数,对所述音源中小于第二预设阈值且大于第三预设阈值的振幅进行调节,其中,所述第二预设阈值小于第一预设阈值。The adjustment module is further configured to adjust, according to the second amplitude adjustment coefficient, an amplitude of the sound source that is smaller than a second preset threshold and greater than a third preset threshold, wherein the second preset threshold is smaller than A preset threshold.
  15. 根据权利要求11-14任一项所述的装置,其中,所述调节系数确定模块是设置为通过如下方式确定所述振幅调节系数:Apparatus according to any of claims 11-14, wherein the adjustment coefficient determination module is arranged to determine the amplitude adjustment factor by:
    在所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数之前,确定所述终端设备的播放器件的阻抗值;依据所述阻抗值、所述最大振幅、所述平均振幅和所述音量值确定所述振幅调节系数。Determining an impedance value of the playback device of the terminal device before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value; according to the impedance value, the maximum amplitude, and the average The amplitude and the volume value determine the amplitude adjustment factor.
  16. 根据权利要求11-14任一项所述的装置,其中,所述调节系数确定模块是设置为通过如下方式确定所述振幅调节系数:Apparatus according to any of claims 11-14, wherein the adjustment coefficient determination module is arranged to determine the amplitude adjustment factor by:
    在所述依据所述最大振幅、所述平均振幅和所述音量值确定振幅调节系数之前,确定所述终端设备当前所处环境的噪声值;依据所述噪声值、所述最大振幅、所述平均振幅和所述音量值确定所述振幅调节系数。Determining a noise value of an environment in which the terminal device is currently located before determining the amplitude adjustment coefficient according to the maximum amplitude, the average amplitude, and the volume value; according to the noise value, the maximum amplitude, The average amplitude and the volume value determine the amplitude adjustment factor.
  17. 根据权利要求10所述的装置,其中,所述获取模块是设置为获取所述音源的音频帧信息;The apparatus according to claim 10, wherein said obtaining module is configured to acquire audio frame information of said sound source;
    所述振幅确定模块是设置为依据所述音频帧信息确定所述音源的每一帧音频帧的振幅大小;The amplitude determining module is configured to determine an amplitude of an audio frame of each frame of the sound source according to the audio frame information;
    所述调节系数确定模块是设置为依据所述音源的每一帧音频帧的振幅大小以及获取到的终端设备当前的音量值确定所述音源的每一帧音频帧的振幅调节系数;The adjustment coefficient determining module is configured to determine an amplitude adjustment coefficient of each frame of the audio frame of the sound source according to an amplitude size of each frame of the audio frame of the sound source and a current volume value of the obtained terminal device;
    所述调节模块是设置为依据所述音源的每一帧音频帧的振幅调节系数对所述音源的每一帧音频帧的振幅进行调节。The adjustment module is configured to adjust an amplitude of each frame of the audio frame of the sound source according to an amplitude adjustment coefficient of each frame of the audio source of the sound source.
  18. 根据权利要求11-14任一项所述的装置,其中,所述获取模块是设置为当检测到终端设备进行音源播放时,获取所述音源的预设长度的音频帧信息;The device according to any one of claims 11 to 14, wherein the obtaining module is configured to acquire audio frame information of a preset length of the sound source when detecting that the terminal device performs sound source playing;
    所述振幅确定模块是设置为依据所述预设长度的音频帧信息确定所述预设长度的音频帧信息中的最大振幅和平均振幅。The amplitude determining module is configured to determine a maximum amplitude and an average amplitude in the audio frame information of the preset length according to the audio frame information of the preset length.
  19. 一种终端设备,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-9任一项所述的音量调节方法。A terminal device comprising: a processor, a memory, and a computer program stored on the memory and operable on the processor, the processor executing the computer program to implement the method of any one of claims 1-9 Volume adjustment method.
  20. 一种包含终端设备可执行指令的存储介质,所述终端设备可执行指令在由终端设备处理器执行时用于执行如权利要求1-9任一项所述的音量调节方法。A storage medium comprising terminal device executable instructions for performing the volume adjustment method of any one of claims 1-9 when executed by a terminal device processor.
PCT/CN2018/098647 2017-08-18 2018-08-03 Volume adjustment method and apparatus, terminal device, and storage medium WO2019033940A1 (en)

Applications Claiming Priority (2)

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

Publications (1)

Publication Number Publication Date
WO2019033940A1 true WO2019033940A1 (en) 2019-02-21

Family

ID=60681451

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/098647 WO2019033940A1 (en) 2017-08-18 2018-08-03 Volume adjustment method and apparatus, terminal device, and storage medium

Country Status (2)

Country Link
CN (1) CN107526570B (en)
WO (1) WO2019033940A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11822854B2 (en) 2020-04-07 2023-11-21 Beijing Bytedance Network Technology Co., Ltd. Automatic volume adjustment method and apparatus, medium, and device

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107526570B (en) * 2017-08-18 2020-01-14 Oppo广东移动通信有限公司 Volume adjusting method and device, terminal equipment and storage medium
CN109375893A (en) * 2018-11-20 2019-02-22 北京小米移动软件有限公司 Audio frequency playing method and device
CN110661502A (en) * 2019-10-18 2020-01-07 上海锐伟电子科技有限公司 Volume adjusting method based on embedded system
CN112306451A (en) * 2020-10-30 2021-02-02 西安万像电子科技有限公司 Volume adjustment method, device and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070104337A1 (en) * 2005-11-08 2007-05-10 Shurtz Gregory R Apparatus and method for automatic volume synchronization of a digital audio device with an analog audio source
CN101714855A (en) * 2009-11-19 2010-05-26 无敌科技(西安)有限公司 System and method for automatically adjusting volume
CN102075829A (en) * 2009-11-24 2011-05-25 鸿富锦精密工业(深圳)有限公司 Volume adjusting system
US20130034245A1 (en) * 2007-12-19 2013-02-07 Agere Systems Inc. Speakerphone using adaptive phase rotation
CN103746668A (en) * 2013-12-31 2014-04-23 上海斐讯数据通信技术有限公司 Sound volume control method and system
CN104363510A (en) * 2014-10-29 2015-02-18 深圳市金立通信设备有限公司 Terminal
CN107526570A (en) * 2017-08-18 2017-12-29 广东欧珀移动通信有限公司 volume adjusting method, device, terminal device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI352310B (en) * 2004-02-17 2011-11-11 Hon Hai Prec Ind Co Ltd System and method for controlling volume with a si
CN101997498A (en) * 2009-08-27 2011-03-30 北京宏景捷讯网络技术股份有限公司 Volume adjusting method and device
US9794669B2 (en) * 2014-02-11 2017-10-17 Mediatek Inc. Devices and methods for headphone speaker impedance detection
CN103916797A (en) * 2014-04-04 2014-07-09 安徽森力汽车电子有限公司 Vehicle-mounted audible device
CN104410379B (en) * 2014-10-29 2019-05-14 深圳市金立通信设备有限公司 A kind of volume adjusting method
CN106775563A (en) * 2016-12-13 2017-05-31 珠海市魅族科技有限公司 The method and device of volume adjusting

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070104337A1 (en) * 2005-11-08 2007-05-10 Shurtz Gregory R Apparatus and method for automatic volume synchronization of a digital audio device with an analog audio source
US20130034245A1 (en) * 2007-12-19 2013-02-07 Agere Systems Inc. Speakerphone using adaptive phase rotation
CN101714855A (en) * 2009-11-19 2010-05-26 无敌科技(西安)有限公司 System and method for automatically adjusting volume
CN102075829A (en) * 2009-11-24 2011-05-25 鸿富锦精密工业(深圳)有限公司 Volume adjusting system
CN103746668A (en) * 2013-12-31 2014-04-23 上海斐讯数据通信技术有限公司 Sound volume control method and system
CN104363510A (en) * 2014-10-29 2015-02-18 深圳市金立通信设备有限公司 Terminal
CN107526570A (en) * 2017-08-18 2017-12-29 广东欧珀移动通信有限公司 volume adjusting method, device, terminal device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11822854B2 (en) 2020-04-07 2023-11-21 Beijing Bytedance Network Technology Co., Ltd. Automatic volume adjustment method and apparatus, medium, and device

Also Published As

Publication number Publication date
CN107526570A (en) 2017-12-29
CN107526570B (en) 2020-01-14

Similar Documents

Publication Publication Date Title
US11251763B2 (en) Audio signal adjustment method, storage medium, and terminal
US10440464B2 (en) Method and apparatus for adjusting volume, terminal device and storage medium
WO2019033940A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
US11201598B2 (en) Volume adjusting method and mobile terminal
CN107465824B (en) Volume adjusting method and device, mobile terminal and storage medium
CN107566618B (en) Volume adjusting method and device, terminal equipment and storage medium
US11039246B2 (en) Volume adjusting method, device, and terminal device
WO2019033942A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
WO2017215657A1 (en) Sound effect processing method, and terminal device
WO2019033987A1 (en) Prompting method and apparatus, storage medium, and terminal
WO2019033941A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
US20160056781A1 (en) Volume control
CN107483734B (en) Volume adjusting method and device, terminal equipment and storage medium
CN107506168B (en) Volume adjusting 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
CN107506170A (en) volume adjusting method, device, terminal device and storage medium
CN107506169A (en) volume adjusting method, device, terminal device and storage medium
CN104427433A (en) Sound processing method and open-type broadcasting device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18847073

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18847073

Country of ref document: EP

Kind code of ref document: A1