Audio equalizer adjustment method and device, computer device, and storage medium
Patent Information
- Application Number
- CN202310827376.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-06
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-07-06
AI Technical Summary
[0003]现有的音频设备中增加参量均衡器处理时需要专业的数字信号处理,而采用专业的数字信号处理,会使得产品成本提高,降低用户的使用体验
[0037]本申请实施例提供的音频均衡器的调节方法,通过获取音频文件信息,并对所述音频文件信息进行解码,得到PCM音频数据;根据所述音频文件信息实时计算所述PCM音频数据的分贝,并根据所述分贝动态调节音频信号增益参数;配置滤波器的滤波参数,根据所述滤波参数和所述音频信号增益参数计算所述滤波器的滤波系数;根据所述滤波系数对所述PCM音频数据进行滤波调节处理,通过调节均衡器的不同频点对滤波器进行处理,无需使用专业的数字信号处理,降低了产品成本,提高了用户的使用体验。
Smart Images

Figure CN116935903B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an audio equalizer adjustment method, apparatus, computer device, and storage medium. Background Technology
[0002] With the rapid development of digital audio technology, the requirements for sound quality of digital audio electronic products are becoming increasingly higher.
[0003] Adding parametric equalizer processing to existing audio equipment requires specialized digital signal processing, which increases product costs and reduces the user experience. Summary of the Invention
[0004] To address the aforementioned technical problems, embodiments of this application provide an audio equalizer adjustment method, apparatus, computer device, and storage medium.
[0005] This invention provides the following technical solution:
[0006] In a first aspect, this disclosure provides a method for adjusting an audio equalizer, the method comprising:
[0007] Obtain audio file information and decode the audio file information to obtain PCM audio data;
[0008] The decibel level of the PCM audio data is calculated in real time based on the audio file information, and the audio signal gain parameter is dynamically adjusted based on the decibel level.
[0009] Configure the filter parameters, and calculate the filter coefficients based on the filter parameters and the audio signal gain parameters;
[0010] The PCM audio data is filtered and adjusted according to the filtering coefficients.
[0011] According to a specific embodiment disclosed in this application, the audio file information includes sampling rate, bit depth, and number of channels; decoding the audio file information to obtain PCM audio data includes:
[0012] The audio data is decoded to obtain the PCM audio data.
[0013] According to a specific embodiment disclosed in this application, the step of calculating the decibels of the PCM audio data in real time based on the audio file information includes:
[0014] The decibel level of the PCM audio data is calculated in real time based on the bit depth of the audio file information and a decibel formula, wherein the decibel formula is:
[0015] Lp = ·20·*·Log10(P·rms / ·P·ref)dB, where Lp is the decibel of the PCM audio data, P·rms is the sound amplitude of the PCM audio data, and Pref is the maximum amplitude of the PCM audio data.
[0016] According to one specific embodiment disclosed in this application, the filtering parameters include filter type, frequency, gain parameter, and quality factor.
[0017] According to a specific embodiment disclosed in this application, the step of calculating the filter coefficients based on the filter parameters and the audio signal gain parameters includes:
[0018] The filter coefficients are calculated using the following formula:
[0019]
[0020]
[0021] Where gain is the audio signal gain parameter, f0 is the frequency point, and f s Where is the sampling rate, and Q is the quality factor.
[0022] According to a specific embodiment disclosed in this application, the step of filtering and adjusting the PCM audio data according to the filtering coefficient includes:
[0023] The filter is a second-order IIR filter connected in series, and the PCM audio data is filtered and adjusted according to the time-domain formula.
[0024] The time-domain formula is:
[0025]
[0026] Where x(n) is the input of the filter, y(n) is the output of the filter, and a0, a1, a2, b0, b1 and b2 are the filter coefficients.
[0027] Secondly, this disclosure provides an audio equalizer adjustment device, the device comprising:
[0028] The acquisition module is used to acquire audio file information and decode the audio file information to obtain PCM audio data;
[0029] The calculation module is used to calculate the decibels of the PCM audio data in real time based on the audio file information, and dynamically adjust the audio signal gain parameters based on the decibels.
[0030] A configuration module is used to configure the filter parameters of the filter and calculate the filter coefficients of the filter based on the filter parameters and the audio signal gain parameters.
[0031] An adjustment module is used to perform filtering and adjustment processing on the PCM audio data according to the filtering coefficients.
[0032] According to one specific embodiment disclosed in this application, the acquisition module is specifically used for:
[0033] The audio data is decoded to obtain the PCM audio data.
[0034] Thirdly, this disclosure provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the audio equalizer adjustment method described in the first aspect.
[0035] Fourthly, this disclosure provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the audio equalizer adjustment method described in the first aspect.
[0036] The embodiments of this application have the following advantages:
[0037] The audio equalizer adjustment method provided in this application embodiment obtains PCM audio data by acquiring audio file information and decoding the audio file information; calculates the decibel level of the PCM audio data in real time based on the audio file information, and dynamically adjusts the audio signal gain parameters based on the decibel level; configures the filter parameters of the filter, calculates the filter coefficients of the filter based on the filter parameters and the audio signal gain parameters; and performs filtering adjustment processing on the PCM audio data based on the filter coefficients. By adjusting different frequency points of the equalizer to process the filter, no professional digital signal processing is required, reducing product costs and improving the user experience.
[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 A flowchart of an audio equalizer adjustment method provided in an embodiment of this application is shown;
[0041] Figure 2 The diagram illustrates the filter adjustment process provided in an embodiment of this application.
[0042] Figure 3 This illustration shows a structural schematic diagram of an audio equalizer adjustment device provided in an embodiment of this application;
[0043] Figure 4 A schematic diagram of the hardware architecture of a computer device provided in an embodiment of this application is shown. Detailed Implementation
[0044] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0045] It should be noted that when an element is said to be "fixed" to another element, it can be directly on the other element or there may be an intervening element. When an element is said to be "connected" to another element, it can be directly connected to the other element or there may be an intervening element. Conversely, when an element is said to be "directly" on another element, there is no intervening element. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0046] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0047] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the template description is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0049] Example 1
[0050] like Figure 1 The diagram shows a flowchart of an audio equalizer adjustment method according to an embodiment of this application. The audio equalizer adjustment method provided in this embodiment includes the following steps:
[0051] Step S110: Obtain audio file information and decode the audio file information to obtain PCM audio data.
[0052] Understandably, the audio file information includes at least one of sound files and MIDI files, such as songs, which can be obtained by users through download. The basic information of the audio file information is obtained by software decoding, including sampling rate, bit depth, and number of channels. The basic information in the audio file information is parsed to obtain encoded audio data, which is then decoded according to the corresponding encoding format to obtain PCM (Pulse Code Modulation) audio data.
[0053] Specifically, the audio file information includes sampling rate, bit depth, and number of channels; decoding the audio file information to obtain PCM audio data includes:
[0054] The audio data is decoded to obtain the PCM audio data.
[0055] Specifically, the sampling rate refers to the number of samples extracted from a continuous signal per second to form a discrete signal, usually expressed in Hertz. The bit depth refers to the numerical value of each sample point in the sampling rate; the more bits, the higher the sound quality. Since audio acquisition and playback can be superimposed, sound can be acquired from multiple audio sources simultaneously and output to different speakers. Therefore, the number of channels generally represents the number of audio sources during recording or the corresponding number of speakers during playback.
[0056] Step S120: Calculate the decibel level of the PCM audio data in real time based on the audio file information, and dynamically adjust the audio signal gain parameter based on the decibel level.
[0057] Specifically, the step of calculating the decibels of the PCM audio data in real time based on the audio file information includes:
[0058] The decibel level of the PCM audio data is calculated in real time based on the bit depth of the audio file information and a decibel formula, wherein the decibel formula is:
[0059] Lp = ·20·*·Log10(P·rms / ·P·ref)dB, where Lp is the decibel of the PCM audio data, P·rms is the sound amplitude of the PCM audio data, and Pref is the maximum amplitude of the PCM audio data.
[0060] In practice, the maximum amplitude of the PCM audio data is obtained by acquiring the bit depth in the audio file information, and the decibel level of the PCM audio data is calculated in real time using the decibel formula and the maximum amplitude.
[0061] Step S130: Configure the filter parameters and calculate the filter coefficients based on the filter parameters and the audio signal gain parameters.
[0062] Specifically, the filtering parameters include filter type, frequency, gain parameter, and quality factor.
[0063] Specifically, the filter types include peak filters, low-pass filters, high-pass filters, band-pass filters, band-stop filters, all-pass filters, low-profile filters, and high-profile filters. A higher quality factor results in a narrower bandwidth and higher gain.
[0064] Further, the step of calculating the filter coefficients based on the filter parameters and the audio signal gain parameters includes:
[0065] The filter coefficients are calculated using the following formula:
[0066]
[0067]
[0068] Where gain is the audio signal gain parameter, f0 is the frequency point, and f s Where is the sampling rate, and Q is the quality factor.
[0069] It should be noted that the calculation of the filter coefficients differs for different types of filters in this invention.
[0070] Calculation of the filter coefficients for the peak filter:
[0071] a0 = 1 + alpha / A;
[0072] a1 = -2·cos(w0);
[0073] a² = 1 - alpha / A;
[0074] b0 = 1 + alpha·A;
[0075] b1 = -2·cos(w0);
[0076] b2 = 1 - alpha·A;
[0077] Among them, w o It is 2×π×frequency÷sampleRate, where frequency is the frequency point and sampleRate is the sampling rate.
[0078] Calculation of filter coefficients for a low-pass filter:
[0079] a0 = 1 + alpha;
[0080] a1 = -2·cos(w0);
[0081] a2 = 1 - alpha;
[0082] b0 = (1 - cos(w0)) / 2;
[0083] b1 = 1 - cos(w0);
[0084] b2 = (1 - cos(w0)) / 2;
[0085] Among them, w o It is 2×π×frequency÷sampleRate, where frequency is the frequency point and sampleRate is the sampling rate.
[0086] Calculation of filter coefficients for a high-pass filter:
[0087] a0 = 1 + alpha;
[0088] a1 = -2·cos(w0);
[0089] a2 = 1 - alpha;
[0090] b0 = (1 + cos(w0)) / 2;
[0091] b1 = -(1 + cos(w0));
[0092] b2 = (1 + cos(w0)) / 2;
[0093] Among them, w oIt is 2×π×frequency÷sampleRate, where frequency is the frequency point and sampleRate is the sampling rate.
[0094] Calculation of the filter coefficients for a bandpass filter:
[0095] a0 = 1 + alpha;
[0096] a1 = -2·cos(w0);
[0097] a2 = 1 - alpha;
[0098] b0 = alpha;
[0099] b1 = 0;
[0100] b2 = -alpha;
[0101] Among them, w o It is 2×π×frequency÷sampleRate, where frequency is the frequency point and sampleRate is the sampling rate.
[0102] Calculation of filter coefficients for a band-stop filter:
[0103] a0 = 1 + alpha;
[0104] a1 = -2·cos(w0);
[0105] a2 = 1 - alpha;
[0106] b0 = 1;
[0107] b1 = -2·cos(w0);
[0108] b2 = 1;
[0109] Among them, w o It is 2×π×frequency÷sampleRate, where frequency is the frequency point and sampleRate is the sampling rate.
[0110] Calculation of filter coefficients for an all-pass filter:
[0111] a0 = 1 + alpha;
[0112] a1 = -2·cos(w0);
[0113] a2 = 1 - alpha;
[0114] b0 = 1 - alpha;
[0115] b1 = -2·cos(w0);
[0116] b2 = 1 + alpha;
[0117] Among them, w o It is 2×π×frequency÷sampleRate, where frequency is the frequency point and sampleRate is the sampling rate.
[0118] Calculation of filter coefficients for low-profile filters:
[0119] a0=(A+1)+(A-1)·cos(w0)+2·sqrt(A)·alpha;
[0120] a1=-2·((A-1)+(A+1)·cos(w0));
[0121] a2=(A+1)+9A-1)·cos(w0)-2·sqrt(A)·alpha;
[0122] b0=A·((A+1)-(A-1)·cos(w0)+2·sqrt(A)·alpha);
[0123] b1=2·A·(A-1)-(A+1)·cos(w0));
[0124] b2=A·((A+1)-(A-1)·cos(w0)-2·sqrt(A)·alpha);
[0125] Among them, w o It is 2×π×frequency÷sampleRate, where frequency is the frequency point and sampleRate is the sampling rate.
[0126] Calculation of filter coefficients for elevated filters:
[0127] a0=(A+1)-(A-1)·cos(w0)+2·sqrt(A)·alpha;
[0128] a1=2·((A-1)-(A+1)·cos(w0));
[0129] a2=(A+1)-(A-1)·cos(w0)-2·sqrt(A)·alpha;;
[0130] b0=A·((A+1)+(A-1)·cos(w0)+2·sqrt(A)·alpha);
[0131] b1=-2·A·(A-1)+(A+1)·cos(w0));
[0132] b2=A·((A+1)+(A-1)·cos(w0)-2·sqrt(A)·alpha);
[0133] Among them, w o It is 2×π×frequency÷sampleRate, where frequency is the frequency point and sampleRate is the sampling rate.
[0134] Step S140: Perform filtering and adjustment processing on the PCM audio data according to the filtering coefficients.
[0135] Specifically, see Figure 2 The step of filtering and adjusting the PCM audio data according to the filtering coefficients includes:
[0136] The filter is a second-order IIR filter connected in series, and the PCM audio data is filtered and adjusted according to the time-domain formula.
[0137] The time-domain formula is:
[0138]
[0139] Where x(n) is the input of the filter, y(n) is the output of the filter, and a0, a1, a2, b0, b1 and b2 are the filter coefficients.
[0140] In practice, multiple filters are cascaded. The input PCM audio data is passed to the first filter, where it is processed using the filter coefficients corresponding to the first filter and the time-domain formula. Similarly, in the second filter, the PCM audio data processed by the first filter is processed using the filter coefficients corresponding to the second filter and the time-domain formula, until the last filter.
[0141] The audio equalizer adjustment method provided in this application embodiment obtains PCM audio data by acquiring audio file information and decoding the audio file information; calculates the decibel level of the PCM audio data in real time based on the audio file information, and dynamically adjusts the audio signal gain parameters based on the decibel level; configures the filter parameters of the filter, calculates the filter coefficients of the filter based on the filter parameters and the audio signal gain parameters; and performs filtering adjustment processing on the PCM audio data based on the filter coefficients. By adjusting different frequency points of the equalizer to process the filter, no professional digital signal processing is required, reducing product costs and improving the user experience.
[0142] Example 2
[0143] like Figure 3 The diagram shown is a structural schematic of an audio equalizer adjustment device 300 according to an embodiment of this application. The device includes:
[0144] The acquisition module 301 is used to acquire audio file information and decode the audio file information to obtain PCM audio data;
[0145] The calculation module 302 is used to calculate the decibels of the PCM audio data in real time based on the audio file information, and dynamically adjust the audio signal gain parameters based on the decibels.
[0146] The configuration module 303 is used to configure the filtering parameters of the filter and calculate the filtering coefficients of the filter based on the filtering parameters and the audio signal gain parameters.
[0147] The adjustment module 304 is used to perform filtering and adjustment processing on the PCM audio data according to the filtering coefficient.
[0148] Optionally, the above-mentioned acquisition module is specifically used for:
[0149] The audio data is decoded to obtain the PCM audio data.
[0150] Optionally, the above calculation module is specifically used for:
[0151] The decibel level of the PCM audio data is calculated in real time based on the bit depth of the audio file information and a decibel formula, wherein the decibel formula is:
[0152] Lp = 20 * log10(P rms / P ref) dB, where Lp is the decibel of the PCM audio data, P rms is the sound amplitude of the PCM audio data, and Pref is the maximum amplitude of the PCM audio data.
[0153] Optionally, the above configuration module is specifically used for:
[0154] The filter coefficients are calculated using the following formula:
[0155]
[0156]
[0157] Where gain is the audio signal gain parameter, f0 is the frequency point, and f s Where is the sampling rate, and Q is the quality factor.
[0158] Optionally, the above-mentioned adjustment module is specifically used for:
[0159] The filter is a second-order IIR filter connected in series, and the PCM audio data is filtered and adjusted according to the time-domain formula.
[0160] The time-domain formula is:
[0161]
[0162] Where x(n) is the input of the filter, y(n) is the output of the filter, and a0, a1, a2, b0, b1 and b2 are the filter coefficients.
[0163] The audio equalizer adjustment device provided in this application embodiment obtains PCM audio data by acquiring audio file information and decoding the audio file information; calculates the decibel level of the PCM audio data in real time based on the audio file information, and dynamically adjusts the audio signal gain parameters based on the decibel level; configures the filter parameters of the filter, calculates the filter coefficients of the filter based on the filter parameters and the audio signal gain parameters; and performs filtering adjustment processing on the PCM audio data based on the filter coefficients. By adjusting different frequency points of the equalizer to process the filter, there is no need to use professional digital signal processing, which reduces product costs and improves the user experience.
[0164] Example 3
[0165] Figure 4 A schematic diagram of the hardware architecture of the computer device provided in this application is shown. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it implements the steps of the audio equalizer adjustment method described in Embodiment 1.
[0166] In this embodiment, the computer device 400 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. For example, it can be a rack server, blade server, tower server, or cabinet server (including standalone servers or server clusters composed of multiple servers), etc. Figure 4 As shown, the computer device 400 includes, but is not limited to, at least: a memory 410, a processor 420, and a network interface 430 that can communicate and be linked with each other via a system bus. Wherein:
[0167] The memory 410 includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 410 may be an internal storage module of the computer device 400, such as the hard disk or memory of the computer device 400. In other embodiments, the memory 410 may also be an external storage device of the computer device 400, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Of course, the memory 410 may include both the internal storage module and the external storage device of the computer device 400. In this embodiment, the memory 410 is typically used to store the operating system and various application software installed on the computer device 400, such as program code for video playback methods. In addition, the memory 410 can also be used to temporarily store various types of data that have been output or will be output.
[0168] In some embodiments, processor 420 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. Processor 420 is typically used to control the overall operation of computer device 400, such as performing control and processing related to data interaction or communication with computer device 400. In this embodiment, processor 420 is used to run program code stored in memory 410 or process data.
[0169] Network interface 430 may include a wireless network interface or a wired network interface, which is typically used to establish a communication link between computer device 400 and other computer devices. For example, network interface 430 is used to connect computer device 400 to an external terminal via a network, establishing a data transmission channel and communication link between computer device 400 and the external terminal. The network may be an intranet, the Internet, Global System for Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.
[0170] It should be pointed out that, Figure 4 Only a computer device with components 410-430 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0171] In this embodiment, the traffic allocation method stored in memory 410 can also be divided into one or more program modules and executed by one or more processors (processor 420 in this embodiment) to complete the present invention.
[0172] Example 4
[0173] This embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the audio equalizer adjustment method in this embodiment.
[0174] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.
[0175] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limitations; therefore, other examples of exemplary embodiments may have different values.
[0176] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0177] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for adjusting an audio equalizer, characterized in that, The method includes: Acquire audio file information and decode the audio file information to obtain PCM audio data; the audio file information includes sampling rate, bit depth, and number of channels; The maximum amplitude of the PCM audio data is obtained based on the bit depth of the audio file information. The decibel level of the PCM audio data is calculated in real time using a decibel formula and the maximum amplitude. The audio signal gain parameter is then dynamically adjusted based on the decibel level. The decibel formula is as follows: Lp Where Lp is the decibel value of the PCM audio data. The sound amplitude of PCM audio data. The maximum amplitude of the PCM audio data; Configure the filter parameters, and calculate the filter coefficients based on the filter parameters and the audio signal gain parameters; wherein, the filter parameters include filter type, frequency, gain parameter, and quality factor. The calculation method for the filter coefficients differs for different types of filters. The filter coefficients include... , , , , and ; The PCM audio data is filtered and adjusted according to the filtering coefficients.
2. The method for adjusting an audio equalizer according to claim 1, characterized in that, Decoding the audio file information to obtain PCM audio data includes: The audio data is decoded to obtain the PCM audio data.
3. The method for adjusting an audio equalizer according to claim 1, characterized in that, The step of calculating the filter coefficients based on the filter parameters and the audio signal gain parameters includes: The intermediate variables used to calculate the filter coefficients are calculated according to the following formula: ; ; ,in, For audio signal gain parameters, For frequency points, Sampling rate, For quality factors, A, , alpha These are all intermediate variables used to calculate the filter coefficients.
4. The method for adjusting an audio equalizer according to claim 1, characterized in that, The step of filtering and adjusting the PCM audio data according to the filtering coefficients includes: The filter is a second-order IIR filter connected in series, and the PCM audio data is filtered and adjusted according to the time-domain formula. The time-domain formula is: ,in, For the input of the filter, For the output of the filter, , , , , and These are the filter coefficients of the filter.
5. An adjustment device for an audio equalizer, characterized in that, The device includes: The acquisition module is used to acquire audio file information and decode the audio file information to obtain PCM audio data; the audio file information includes sampling rate, bit depth and number of channels; The calculation module is used to obtain the maximum amplitude of the PCM audio data based on the bit depth of the audio file information, calculate the decibel level of the PCM audio data in real time using a decibel formula and the maximum amplitude, and dynamically adjust the audio signal gain parameter based on the decibel level; wherein, the decibel formula is: Lp Where Lp is the decibel value of the PCM audio data. The sound amplitude of PCM audio data. The maximum amplitude of the PCM audio data; A configuration module is used to configure the filter parameters of the filter and calculate the filter coefficients of the filter based on the filter parameters and the audio signal gain parameters. The adjustment module is used to perform filtering and adjustment processing on the PCM audio data according to the filtering coefficients.
6. The apparatus according to claim 5, characterized in that, The acquisition module is specifically used for: The audio data is decoded to obtain the PCM audio data.
7. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the adjustment method of the audio equalizer according to any one of claims 1-4.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the adjustment method for the audio equalizer according to any one of claims 1-4.
Citation Information
Patent Citations
Digital audio equalizer
CN109245739A
Audio data processing method and device, terminal equipment and storage medium
CN113342304A