CN-115657994-B - Frequency band adjusting method, device, storage medium and apparatus
Abstract
The invention discloses a frequency band adjusting method, equipment, a storage medium and a device, wherein the method comprises the following steps: the scale value marks are adjusted to obtain a target frequency band mark and a target scale value mark, a frequency band value is obtained from a frequency band array according to the target frequency band mark, a frequency band to be adjusted is determined according to the frequency band value, a scale value is obtained from a scale bar array according to the target scale value mark, and the frequency band to be adjusted is adjusted according to the scale value. According to the invention, the scale value marks are transmitted from the application layer to the kernel layer through one interface, the kernel layer adjusts the scale value marks to obtain the target frequency band marks and the target scale value marks, then the frequency band to be adjusted is determined according to the frequency band marks obtained by the target frequency band marks, the frequency band to be adjusted is adjusted according to the scale values obtained by the target scale value marks, and the frequency band of the self-defined equalizer is adjusted by transmitting a single parameter through one interface, so that the consumption of CPU performance is reduced.
Inventors
- XU XIN
- WU YONGSHENG
Assignees
- 武汉凡鱼科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20220921
Claims (6)
- 1. A method for adjusting a frequency band, the method comprising the steps of: adjusting the scale value marks to obtain target frequency band marks and target scale value marks; acquiring a frequency band value from a frequency band array according to the target frequency band label, and determining a frequency band to be adjusted according to the frequency band value; According to the target scale value marks, scale values are obtained from a scale bar array, and the frequency band to be adjusted is adjusted according to the scale values; the step of adjusting the scale value marks to obtain the target frequency band marks and the target scale value marks comprises the following steps: Obtaining scale value marks on the frequency band according to the adjusted frequency band; acquiring the total number of frequency bands, and determining the range of the adjustable total number according to the total number of the frequency bands and the total number of the scale points; When the scale value marks belong to the adjustable total number range, obtaining a target frequency band mark and a target scale value mark according to the total number of scale points and the scale value marks; Or, rounding the total number of scale points according to the scale value marks to obtain target frequency band marks; obtaining a target scale value mark number by taking the remainder of the total number of the scale points according to the scale value mark number; Before the step of adjusting the scale value marks to obtain the target frequency band marks and the target scale value marks, the method further comprises the following steps: When receiving an adjustment instruction of an equalizer interface, calling an objective function setting parameter according to an audio control class to obtain a scale value mark; And transmitting the scale value marks from the hal layer to the kernel layer through the target node.
- 2. The method for adjusting a frequency band according to claim 1, wherein the step of obtaining a frequency band value from a frequency band array according to the target frequency band number and determining the frequency band to be adjusted according to the frequency band value comprises: generating a frequency band array according to the total number of the frequency bands; and acquiring a frequency band value from the frequency band array according to the target frequency band label, and determining a frequency band to be adjusted according to the frequency band value.
- 3. The method for adjusting a frequency band according to claim 1, wherein the step of obtaining a scale value from an array of scale bars according to a target scale value label and adjusting the frequency band to be adjusted according to the scale value comprises: Generating a scale bar array according to the total number of the scale points; And obtaining a scale value from the scale bar array according to a target scale value mark number, and adjusting the frequency band to be adjusted according to the scale value.
- 4. A frequency band adjustment device comprising a memory, a processor and a frequency band adjustment program stored on the memory and executable on the processor, the frequency band adjustment program when executed by the processor implementing the steps of the frequency band adjustment method according to any one of claims 1 to 3.
- 5. A storage medium having stored thereon a frequency band adjustment program which, when executed by a processor, implements the steps of the frequency band adjustment method according to any one of claims 1 to 3.
- 6. The frequency band adjusting device is characterized by comprising a data acquisition module, a frequency band determining module and a frequency band adjusting module; The data acquisition module is used for adjusting the scale value marks to obtain target frequency band marks and target scale value marks; The frequency band determining module is used for acquiring a frequency band value from a frequency band array according to the target frequency band label and determining a frequency band to be adjusted according to the frequency band value; the frequency band adjusting module is used for acquiring scale values from the scale bar array according to target scale value marks and adjusting the frequency band to be adjusted according to the scale values; the data acquisition module is also used for acquiring scale value marks on the frequency band according to the adjusted frequency band; The data acquisition module is also used for acquiring the total number of the frequency bands, determining an adjustable total number range according to the total number of the frequency bands and the total number of the scale points, and acquiring a target frequency band mark and a target scale value mark according to the total number of the scale points and the scale value mark when the scale value mark belongs to the adjustable total number range; the data acquisition module is also used for or rounding the total number of the scale points according to the scale value marks to obtain target frequency band marks; the data acquisition module is also used for calling the setting parameters of the objective function according to the audio control class when receiving the adjusting instruction of the equalizer interface to obtain the scale value marks, and transmitting the scale value marks from the hal layer to the kernel layer through the objective node.
Description
Frequency band adjusting method, device, storage medium and apparatus Technical Field The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a storage medium, and a device for adjusting a frequency band. Background With the development of technology, the vehicle-mounted multimedia entertainment central control system is more and more intelligent, and most of audio aspects support the function of a custom equalizer. To compensate for the deficiencies of the sound frequencies of the speakers, car audio typically provides an Equalizer (EQ) for modification to the user, wherein the common equalizer is of the type 5, 7, 10, 13, 15 or even higher. Typically, the Android audio portion uses AudioManager's SETPARAMETERS application to HAL settings, and HAL layer operation snd kcontrol interfaces parameters to kernel layer, which is the method used to customize equalizer settings. For the control of the custom equalizer, usually, one frequency band sliding bar corresponds to one interface control, so that the accuracy of the stay points of the scale bars on all frequency bands and the configuration of the current custom equalizer is often ensured, when the sliding of one frequency band sliding bar is changed, the scale values on the frequency bands of the custom equalizer are required to be adjusted according to the interfaces of other frequency bands, and parameter configuration is required to be set, but when the number of the frequency bands is too large, each frequency band needs to be adjusted according to the corresponding interfaces, so that the CPU performance consumption is too high. The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art. Disclosure of Invention The invention mainly aims to provide a frequency band adjusting method, equipment, a storage medium and a device, and aims to solve the technical problem of overhigh CPU consumption caused by parameter transmission through a plurality of interfaces. In order to achieve the above object, the present invention provides a frequency band adjustment method, including the steps of: adjusting the scale value marks to obtain target frequency band marks and target scale value marks; acquiring a frequency band value from a frequency band array according to the target frequency band label, and determining a frequency band to be adjusted according to the frequency band value; and obtaining a scale value from the scale bar array according to the target scale value mark number, and adjusting the frequency band to be adjusted according to the scale value. Optionally, the step of adjusting the scale value label to obtain the target frequency band label and the target scale value label includes: Obtaining scale value marks on the frequency band according to the adjusted frequency band; and obtaining a target frequency band label and a target scale value label according to the total number of scale points and the scale value label. Optionally, the step of obtaining the target frequency band label and the target scale value label according to the total number of scale points and the scale value label includes: acquiring the total number of frequency bands, and determining an adjustable total number range according to the total number of frequency bands and the total number of scale points; And when the scale value marks belong to the adjustable total number range, obtaining a target frequency band mark and a target scale value mark according to the total number of the scale points and the scale value marks. Optionally, the step of obtaining the target frequency band label and the target scale value label according to the total number of scale points and the scale value label further includes: rounding the total number of scale points according to the scale value marks to obtain target frequency band marks; And obtaining a target scale value mark by taking the remainder of the total number of the scale points according to the scale value mark. Optionally, the step of obtaining a frequency band value from the frequency band array according to the target frequency band label and determining the frequency band to be adjusted according to the frequency band value includes: generating a frequency band array according to the total number of the frequency bands; and acquiring a frequency band value from the frequency band array according to the target frequency band label, and determining a frequency band to be adjusted according to the frequency band value. Optionally, the step of obtaining the scale value from the scale bar array according to the target scale value label and adjusting the frequency band to be adjusted according to the scale value includes: Generating a scale bar array according to the total number of the scale points; And obtaining a scale v