Software-based pop sound suppression method, terminal, and computer-readable medium
By obtaining the current volume and performing gradual processing when audio playback starts or stops, the pop sound problem generated by the software is solved, a smooth transition of volume is achieved, and the impact of sudden audio changes on hearing is reduced.
Patent Information
- Application Number
- CN202011526072.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-22
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2040-12-22
AI Technical Summary
Existing technologies are difficult to effectively suppress pop sounds generated by software, and hardware circuits cannot solve this problem.
By monitoring the start or stop instructions of audio playback, the current volume is obtained, and the volume is gradually changed using the volume gradient step to achieve a smooth transition of the volume.
It effectively suppresses the pop sound when audio playback starts or stops, reducing damage to hearing.
Smart Images

Figure CN112712815B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a software-based pop sound suppression method, a terminal, and a computer-readable medium. Background Art
[0002] Popping noise is a type of noise that occurs when audio starts and stops playing. This sharp noise can be very disturbing to the ears and can even cause hearing damage over time. Popping noise is mostly caused by hardware. Audio components experience transient surges during power-up and power-down, which can cause popping. This type of popping noise can usually be resolved by modifying the codec's power-up sequence or adding capacitors to the circuit.
[0003] However, another type of pop is generated by software. At the beginning or end of an audio segment, the sound signal appears to be interrupted, with a sudden drop in amplitude. The sound energy is released or accumulated over a short period of time, resulting in a "pop" effect. This sound is similar to a pop generated by hardware and can also cause shock and hearing damage. However, this type of pop cannot be suppressed or eliminated by hardware circuits.
[0004] When processing pop noise, hardware circuits usually change the power-on timing of each module or introduce capacitors into the circuit. The purpose is to alleviate the sudden accumulation or release of energy when the device is powered on or off, thereby achieving the purpose of suppressing transient impact.
[0005] The essence of pop sound generated by software is also a sudden change in volume when the audio starts or ends. Therefore, it is possible to use software to "buffer" the sudden change in volume and thus suppress the pop sound. Summary of the Invention
[0006] The main purpose of the present invention is to provide a software-based pop sound suppression method, terminal and computer-readable medium, aiming to effectively suppress the pop sound.
[0007] To achieve the above object, the present invention proposes a software-based pop sound suppression method, comprising the following steps:
[0008] When an audio playback start or stop instruction is detected, the current volume of the audio is obtained;
[0009] According to the current volume of the audio, the volume of the audio is gradually changed using a volume gradual change step.
[0010] Optionally, when an audio playback start instruction is detected, the step of obtaining the current volume of the audio includes:
[0011] When the start() function is detected, the getStreamVolume() function is called;
[0012] The current volume of the audio is read from the getStreamVolume() function.
[0013] Optionally, when an audio stop instruction is detected, the step of obtaining the current volume of the audio includes:
[0014] When the stop() function is detected, the getStreamVolume() function is called;
[0015] The current volume of the audio is read from the getStreamVolume() function.
[0016] Optionally, the step of gradually changing the volume of the audio using a volume gradient step according to the current volume of the audio includes:
[0017] According to the current volume of the audio, obtaining the corresponding volume gradient step;
[0018] The volume of the audio is gradually changed using the volume gradual change step size.
[0019] Optionally, the step of obtaining the corresponding volume gradient step length according to the current volume of the audio includes:
[0020] According to the current volume of the audio, the volume gradual change step corresponding to the current volume of the audio is searched in a preset mapping relationship table.
[0021] Optionally, the step of gradually changing the volume of the audio using a volume gradient step according to the current volume of the audio includes:
[0022] Obtaining the volume gradient step length;
[0023] Calculating the number of volume gradients according to the current volume of the audio and the volume gradient step;
[0024] The volume gradient step is used to perform a gradient process on the volume of the audio with a number of equal steps of volume gradient.
[0025] Optionally, when an audio playback start instruction is detected, the step of gradually changing the volume of the audio includes:
[0026] The volume of the audio is gradually increased.
[0027] Optionally, when an audio stop instruction is detected, the step of gradually changing the volume of the audio includes:
[0028] The volume of the audio is gradually attenuated.
[0029] In addition, the present invention also provides a terminal, including a memory, a processor, and a program for implementing a software-based pop sound suppression method stored in the memory and executable on the processor. When the program for implementing the software-based pop sound suppression method is executed by the processor, the following steps are performed:
[0030] When an audio playback start or stop instruction is detected, the current volume of the audio is obtained;
[0031] According to the current volume of the audio, the volume of the audio is gradually changed using a volume gradual change step.
[0032] In addition, the present invention further provides a computer-readable medium having stored thereon a program for implementing a software-based method for suppressing pop sounds. When the program for implementing the software-based method for suppressing pop sounds is executed, the following steps are implemented:
[0033] When an audio playback start or stop instruction is detected, the current volume of the audio is obtained;
[0034] According to the current volume of the audio, the volume of the audio is gradually changed using a volume gradual change step.
[0035] The technical solution of the present invention obtains the current volume of the audio when an audio playback start or stop instruction is detected, and gradually changes the volume of the audio using a volume gradient step according to the current volume of the audio, so that the volume of the audio transitions smoothly, thereby effectively suppressing the pop sound in the start or stop stage of audio playback. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0037] Figure 1 A schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention;
[0038] Figure 2 A communication network system architecture diagram provided by an embodiment of the present invention;
[0039] Figure 3 Flowchart of the first embodiment of the software-based pop sound suppression method of the present invention;
[0040] Figure 4 Flowchart of a second embodiment of a software-based pop sound suppression method of the present invention;
[0041] Figure 5 for Figure 3 The flowchart of the first embodiment of the step of gradually changing the volume of the audio using a volume gradient step according to the current volume of the audio;
[0042] Figure 6 for Figure 3 The flowchart shown is a second embodiment of the step of gradually changing the volume of the audio using a volume gradient step according to the current volume of the audio.
[0043] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0045] In the subsequent description, suffixes such as "module," "component," or "unit" used to represent elements are only used to facilitate the description of the present invention and have no specific meaning. Therefore, "module," "component," or "unit" can be used interchangeably.
[0046] The terminal can be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile terminals, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0047] The following description will be made by taking a mobile terminal as an example. It will be understood by those skilled in the art that, in addition to components specifically used for mobile purposes, the configuration according to the embodiments of the present invention can also be applied to fixed type terminals.
[0048] See also Figure 1, which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (audio / video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation to the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0049] The following combination Figure 1 A detailed introduction to each component of the mobile terminal is given below:
[0050] The RF unit 101 can be used to send and receive information or receive signals during calls. Specifically, it receives downlink information from the base station and transmits it to the processor 110 for processing. It also transmits uplink data to the base station. Typically, the RF unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and more. Furthermore, the RF unit 101 can communicate with the network and other devices via wireless communication. The above-mentioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.
[0051] WiFi is a short-range wireless transmission technology. Mobile terminals can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 102. It provides users with wireless broadband Internet access. Figure 1 The WiFi module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as needed without changing the essence of the invention.
[0052] The audio output unit 103 can convert audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Furthermore, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, or the like.
[0053] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos captured by an image capture device (e.g., a camera) in video capture mode or image capture mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the GPU 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the RF unit 101 or the WiFi module 102. The microphone 1042 may receive sound (audio data) in operating modes such as a phone call mode, a recording mode, and a voice recognition mode, and may process such sound into audio data. In the phone call mode, the processed audio (voice) data may be converted into a format that can be transmitted to a mobile communication base station via the RF unit 101. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.
[0054] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile terminal, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described in detail here.
[0055] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0056] The user input unit 107 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using a finger, stylus, or any other suitable object or accessory on or near the touch panel 1071) and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 110. It can also receive commands sent by the processor 110 and execute them. In addition, the touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may further include other input devices 1072. Specifically, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power keys, etc.), a trackball, a mouse, a joystick, etc., and are not specifically limited here.
[0057] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Figure 1 In the embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, which is not limited here.
[0058] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
[0059] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data generated based on the use of the mobile terminal (such as audio data, a phone book, etc.). Furthermore, the memory 109 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0060] Processor 110 is the control center of the mobile terminal, connecting all components of the mobile terminal using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 109 and accessing data stored in memory 109, it executes various functions of the mobile terminal and processes data, thereby providing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, processor 110 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 110.
[0061] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.
[0062] although Figure 1 Not shown, the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.
[0063] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.
[0064] See also Figure 2 , Figure 2 A communication network system architecture diagram is provided for an embodiment of the present invention. The communication network system is an LTE system of universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an Evolved UMTS Terrestrial Radio Access Network (E-UTRAN) 202, an Evolved Packet Core (EPC) 203, and an operator's IP service 204, which are sequentially connected in communication.
[0065] Specifically, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0066] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 , etc. Among them, eNodeB 2021 can be connected to other eNodeBs 2022 via a backhaul (eg, an X2 interface), and eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 can provide UE 201 with access to EPC 203 .
[0067] EPC 203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, PGW (PDN Gate Way) 2035, and PCRF (Policy and Charging Rules Function) 2036. MME 2031 is the control node that handles signaling between UE 201 and EPC 203, providing bearer and connection management. HSS 2032 provides registers for managing functions such as the Home Location Register (not shown) and stores user-specific information such as service features and data rates. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions for UE 201, PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources, and it selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).
[0068] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services.
[0069] Although the above description is based on the LTE system as an example, those skilled in the art should know that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, and is not limited here.
[0070] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.
[0071] like Figure 3 As shown, Figure 3 FIG. 1 is a flow chart of a first embodiment of a method for suppressing pop sound based on software according to the present invention.
[0072] In this embodiment, the software-based method for suppressing pop sounds includes the following steps:
[0073] Step S110: monitoring an audio playback start instruction.
[0074] Step S120: Acquire the current volume of the audio.
[0075] Step S130 : Gradual change processing is performed on the volume of the audio using a volume gradual change step size according to the current volume of the audio.
[0076] The technical solution of this embodiment is mainly used to suppress pop sounds in mobile terminals (such as smart phones, tablet computers, etc.). The technical solution adopted is mainly based on the improvement of the system software components of the mobile terminal. The implementation principle is: adding a gradual volume processing in the start() function.
[0077] Specifically, in this embodiment, when the audio playback software in the mobile terminal starts playing audio, the system-level start() function of the mobile terminal is called to modify the audio to the playback state. When it is detected that the start() function is called, the getStreamVolume() function is called to obtain the current volume of the audio. After obtaining the current volume of the audio, the volume of the audio is gradually enhanced using a volume gradient step according to the current volume of the audio (for example, when an audio playback start instruction is detected, the current volume of the audio obtained is A, then a volume gradient step is used to make the volume of the audio smoothly change from 0 to A), so that the volume of the audio transitions smoothly.
[0078] The technical solution of this embodiment obtains the current volume of the audio when an audio playback start instruction is detected, and gradually changes the volume of the audio using a volume gradient step according to the current volume of the audio, so that the volume of the audio transitions smoothly, thereby effectively suppressing the pop sound at the beginning of audio playback.
[0079] like Figure 4 As shown, Figure 4 FIG. 4 is a flow chart of a second embodiment of a software-based method for suppressing pop noise according to the present invention.
[0080] In this embodiment, the software-based method for suppressing pop sounds includes the following steps:
[0081] Step S210: monitoring an audio stop instruction.
[0082] Step S220: Acquire the current volume of the audio.
[0083] Step S230: Gradual change is performed on the volume of the audio using a volume gradual change step size according to the current volume of the audio.
[0084] The technical solution of this embodiment is mainly used to suppress pop sounds in mobile terminals (such as smart phones, tablet computers, etc.). The technical solution adopted is mainly based on the improvement of the system software components of the mobile terminal. The implementation principle is: adding a gradual volume processing in the stop() function.
[0085] Specifically, in this embodiment, when the audio playback software in the mobile terminal stops playing audio, the stop() function at the system level of the mobile terminal is called to modify the audio to a stopped state. When it is detected that the stop() function is called, the getStreamVolume() function is called to obtain the current volume of the audio. After obtaining the current volume of the audio, the volume of the audio is gradually attenuated using a volume gradient step according to the current volume of the audio (for example, when an audio playback stop instruction is detected, the current volume of the audio obtained is A, then a volume gradient step is used to make the volume of the audio smoothly change from A to 0), so that the volume of the audio transitions smoothly.
[0086] The technical solution of this embodiment obtains the current volume of the audio when an audio stop instruction is detected, and gradually changes the volume of the audio using a volume gradient step according to the current volume of the audio, so that the volume of the audio transitions smoothly, thereby effectively suppressing the pop sound in the audio stop stage.
[0087] Further, such as Figure 5 As shown, Figure 5 for Figure 3 The flowchart of the first embodiment of the step of gradually changing the volume of the audio using a volume gradient step size according to the current volume of the audio is shown. Based on any of the above embodiments, in this embodiment, the step of gradually changing the volume of the audio using a volume gradient step size according to the current volume of the audio includes:
[0088] Step S311: Obtain the corresponding volume gradient step according to the current volume of the audio.
[0089] Step S312: Gradual change processing is performed on the volume of the audio using the volume gradual change step size.
[0090] Specifically, in this embodiment, when an audio playback start or stop instruction is detected, the current volume of the audio is obtained. Then, based on the current volume of the audio, the volume gradient step corresponding to the current volume of the audio is searched in a preset mapping relationship table. The mapping relationship table is pre-stored in the storage space of the mobile terminal, which contains the correspondence between the current volume of the audio and the corresponding volume gradient step, for example, volume A corresponds to volume gradient step a, volume B corresponds to volume gradient step b, etc. When the current volume of the audio obtained is A, the volume of the audio is gradually processed using the volume gradient step a, so that the pop sound can be suppressed.
[0091] Further, such as Figure 6 As shown, Figure 6 for Figure 3 The flowchart of the second embodiment of the step of gradually changing the volume of the audio using a volume gradient step size according to the current volume of the audio is shown. Based on any of the above embodiments, in this embodiment, the step of gradually changing the volume of the audio using a volume gradient step size according to the current volume of the audio includes:
[0092] Step S321: Obtain the volume gradient step length.
[0093] Step S322: Calculate the number of volume gradient changes according to the current volume of the audio and the volume gradient step.
[0094] Step S323: performing a volume gradient process on the audio volume with equal steps of volume gradient steps.
[0095] Specifically, in this embodiment, when an audio playback start or stop instruction is detected, the current volume of the audio and the volume gradient step length are obtained. Then, the volume gradient times are calculated based on the current volume of the audio and the volume gradient step length; the value of the volume gradient times is equal to the current volume of the audio divided by the volume gradient step length. Finally, the volume gradient step length is used to perform a gradient processing of the volume gradient times with equal steps. For example, the current volume of the audio is C, the volume gradient step length is c, and the value of the volume gradient times N = C / c = 3; then, the current volume C of the audio is gradient processed 3 times using the volume gradient step length c, so as to achieve the suppression of pop sound.
[0096] The present invention also provides a terminal comprising a memory, a processor, and a program for implementing a software-based pop-suppression method stored in the memory and executable on the processor. When executed by the processor, the program for implementing the software-based pop-suppression method implements all the steps of the aforementioned software-based pop-suppression method embodiments. Because the terminal can execute all the steps of any of the aforementioned embodiments, the present mobile terminal at least possesses all the beneficial effects of the technical solutions of the aforementioned method embodiments, and no further elaboration is required here.
[0097] The present invention also provides a computer-readable medium storing a program for implementing a software-based method for suppressing pop noise. When executed, the program can implement all the steps in any of the aforementioned embodiments. Because the computer-readable medium can execute all the steps in any of the aforementioned embodiments, it possesses at least all the beneficial effects of the technical solutions of the aforementioned method embodiments, and therefore will not be further elaborated upon here.
[0098] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0099] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0100] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course, by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile terminal, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0101] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.
Claims
1. A software-based method for suppressing pop sound, characterized in that: The steps include: When an audio playback start or stop instruction is detected, the current volume of the audio is obtained; Gradually changing the volume of the audio using a volume gradient step according to the current volume of the audio; The step of gradually changing the volume of the audio using a volume gradient step according to the current volume of the audio comprises: According to the current volume of the audio, the corresponding volume gradient step length is obtained; the volume of the audio is gradually changed using the volume gradient step length; wherein, according to the current volume of the audio, the volume gradient step length corresponding to the current volume of the audio is searched in a preset mapping relationship table; or, Obtain the volume gradient step; calculate the number of volume gradients based on the current volume of the audio and the volume gradient step; and use the volume gradient step to gradient the volume of the audio a number of times with equal steps; wherein, the current volume of the audio is C, the volume gradient step is c, the value of the number of volume gradients N = C / c = 3, and the current volume C of the audio is gradient-processed three times using the volume gradient step c.
2. The software-based pop sound suppression method according to claim 1, wherein: When an audio playback start instruction is detected, the step of obtaining the current volume of the audio includes: When the start() function is detected, the getStreamVolume() function is called; The current volume of the audio is read from the getStreamVolume() function.
3. The software-based pop sound suppression method according to claim 1, wherein: When an audio stop instruction is detected, the step of obtaining the current volume of the audio includes: When the stop() function is detected, the getStreamVolume() function is called; The current volume of the audio is read from the getStreamVolume() function.
4. A terminal, characterized in that: The present invention comprises a memory, a processor, and an implementation program of a software-based pop sound suppression method stored in the memory and executable on the processor, wherein the implementation program of the software-based pop sound suppression method is executed by the processor to implement the steps of the software-based pop sound suppression method according to any one of claims 1 to 3.
5. A computer-readable medium, characterized in that The computer-readable medium stores a program for implementing a method for suppressing pop sounds based on software. When the program for implementing a method for suppressing pop sounds based on software is executed, the steps of the method for suppressing pop sounds based on software as claimed in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Method and device for dynamically adjusting volume
CN102098606A
Method for optimizing pops and clicks of audio device and terminal
CN105828255A
Method and device for adjusting volume
CN106453940A