CN110308888B - Volume control method, electronic equipment and computer readable storage medium - Google Patents

Volume control method, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN110308888B
CN110308888B CN201910573142.XA CN201910573142A CN110308888B CN 110308888 B CN110308888 B CN 110308888B CN 201910573142 A CN201910573142 A CN 201910573142A CN 110308888 B CN110308888 B CN 110308888B
Authority
CN
China
Prior art keywords
earphone
output power
volume control
determining
mapping table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910573142.XA
Other languages
Chinese (zh)
Other versions
CN110308888A (en
Inventor
宋肃
李乐
李应伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910573142.XA priority Critical patent/CN110308888B/en
Publication of CN110308888A publication Critical patent/CN110308888A/en
Application granted granted Critical
Publication of CN110308888B publication Critical patent/CN110308888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application discloses a volume control method, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: when the connection between the electronic equipment and the earphone is detected, a reasonable output power range can be set for different earphone performances, meanwhile, a first mapping table is built according to the hearing feeling of a user on different frequency bands, the first mapping table is pre-stored with optimal volume control parameters of different single-frequency signals, when the output of an audio file is controlled, target volume control parameters corresponding to different single-frequency signals in the audio file are determined from the first mapping table, the output of the audio file is controlled according to the determined target volume control parameters, namely, the optimal volume output can be matched for the signals of each frequency band, the hearing feeling of the user is improved, the output power of the earphone can be ensured not to exceed the maximum output power, and the hearing loss of the user is avoided.

Description

Volume control method, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to control technologies, and in particular, to a volume control method, an electronic device, and a computer readable storage medium.
Background
The existing volume control scheme is to determine the current volume control parameters according to the historical volume control parameters of the electronic equipment; controlling audio signal output according to the current volume control parameter; when the volume adjusting signal is detected, adjusting the current volume control parameter according to the volume adjusting signal to obtain an adjusted volume control parameter; and controlling the output of the audio signal according to the adjusted volume control parameter, and updating the historical volume control parameter by utilizing the adjusted volume control parameter. The volume control scheme is characterized in that the volume control parameters are determined by means of user operation, the intelligent level of the operation process is low, and the volume control cannot be performed on headphones with different performances.
Disclosure of Invention
In order to solve the above technical problems, it is desirable to provide a volume control method, an electronic device, and a computer-readable storage medium.
The technical scheme of the application is realized as follows:
in a first aspect, a volume control method is provided, applied to an electronic device, and the method includes:
when the connection between the electronic equipment and the earphone is detected, determining the maximum output power of the earphone based on the performance parameter of the earphone; wherein the performance parameter comprises at least one of: earphone type, sensitivity and rated power;
when the output of a target audio file is controlled, determining at least one target single-frequency signal contained in the target audio file;
determining a target volume control parameter corresponding to the at least one target single-frequency signal from a preset first mapping table; wherein, the first mapping table comprises at least one mapping relation between single frequency signals and volume control parameters;
and controlling the output of the target audio file based on the target volume control parameter so that the target output power of the earphone does not exceed the maximum output power.
In the above solution, the determining the maximum output power of the earphone based on the performance parameter of the earphone includes: determining a first output power based on the earphone type; determining a power coefficient based on a sensitivity of the headset; determining a second output power based on the power rating of the earphone and the power coefficient; and taking the minimum value of the first output power and the second output power as the maximum output power of the earphone.
In the above solution, the determining the maximum output power of the earphone based on the performance parameter of the earphone includes: determining a power coefficient based on a sensitivity of the headset; determining a second output power based on the power rating of the earphone and the power coefficient; and taking the second output power as the maximum output power of the earphone.
In the above scheme, the method further comprises: when the connection between the electronic equipment and the earphone is detected, the model of the earphone is obtained; acquiring performance parameters of the earphone from a second mapping table based on the model of the earphone; the second mapping table comprises at least one mapping relation between the earphone model number and the performance parameter.
In the above scheme, the method further comprises: respectively controlling the output of the at least one single-frequency signal based on at least two volume control parameters; acquiring a user selection instruction acquired by an input unit, and determining respective corresponding volume control parameters of the at least one single-frequency signal based on the user selection instruction; and establishing the first mapping table by utilizing the volume control parameters corresponding to the at least one single-frequency signal.
In the above solution, the first mapping table includes volume control parameters corresponding to the at least one single frequency signal in different environmental spaces; wherein different ambient spaces correspond to different ambient noise levels.
In the above scheme, the method further comprises: acquiring a volume adjustment instruction in the at least one environment space; adjusting a volume control parameter of at least part of the single-frequency signals in the first mapping table based on the volume adjustment instruction; and storing the adjusted first mapping table.
In a second aspect, there is provided an electronic device, including:
the processing unit is used for determining the maximum output power of the earphone based on the performance parameter of the earphone when the connection with the earphone is detected; wherein the performance parameter comprises at least one of: earphone type, sensitivity and rated power;
the processing unit is further used for determining at least one target single-frequency signal contained in the target audio file when the target audio file is controlled to be output; determining a target volume control parameter corresponding to the at least one target single-frequency signal from a preset first mapping table; wherein, the first mapping table comprises at least one mapping relation between single frequency signals and volume control parameters;
and the output unit is used for controlling the output of the target audio file based on the target volume control parameter so that the target output power of the earphone does not exceed the maximum output power.
In a third aspect, an electronic device is provided, comprising: a processor and a memory configured to store a computer program capable of running on the processor, wherein the processor is configured to perform the steps of the aforementioned method when the computer program is run.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored, wherein the computer program, when being executed by a processor, carries out the steps of the aforementioned method.
By adopting the technical scheme, when the connection between the electronic equipment and the earphone is detected, a reasonable output power range can be set for different earphone performances, meanwhile, a first mapping table is established according to the hearing feeling of a user on different frequency band sounds, the first mapping table is pre-stored with the optimal volume control parameters of different single frequency signals, when the output of an audio file is controlled, the target volume control parameters corresponding to the different single frequency signals in the audio file are determined from the first mapping table, the output of the audio file is controlled according to the determined target volume control parameters, namely, the optimal volume output can be matched for the signals of each frequency band, the hearing feeling of the user is improved, the output power of the earphone is ensured not to exceed the maximum output power, and the harm to the ear hearing of the user is avoided.
Drawings
FIG. 1 is a schematic flow chart of a method for controlling volume according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a second flow chart of a method for controlling volume according to an embodiment of the present application;
fig. 3 is a schematic diagram of a first component structure of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic diagram of a second composition structure of the electronic device in the embodiment of the application.
Detailed Description
For a more complete understanding of the features and technical content of the embodiments of the present application, reference should be made to the following detailed description of the embodiments of the present application, taken in conjunction with the accompanying drawings, which are for purposes of illustration only and not intended to limit the embodiments of the present application.
Example 1
The embodiment of the application provides a volume control method, as shown in fig. 1, the volume control method specifically may include:
step 101: when the connection between the electronic equipment and the earphone is detected, determining the maximum output power of the earphone based on the performance parameter of the earphone; wherein the performance parameter comprises at least one of: earphone type, sensitivity and rated power;
step 102: when the output of a target audio file is controlled, determining at least one target single-frequency signal contained in the target audio file;
step 103: determining a target volume control parameter corresponding to the at least one target single-frequency signal from a preset first mapping table; wherein, the first mapping table comprises at least one mapping relation between single frequency signals and volume control parameters;
step 104: and controlling the output of the target audio file based on the target volume control parameter so that the target output power of the earphone does not exceed the maximum output power.
Here, the execution subject of steps 101 to 104 may be a processor of the electronic device. The electronic device is a device with an audio file playing function, and may be a smart phone, a personal computer (such as a tablet computer, a desktop computer, a notebook computer, a netbook, a palm computer), a mobile phone, an electronic book reader, a portable multimedia player, an audio/video player, a camera, a virtual reality device, a wearable device, and the like.
In some embodiments, a method of obtaining performance parameters of a headset includes: when the connection between the electronic equipment and the earphone is detected, the model of the earphone is obtained; acquiring performance parameters of the earphone from a second mapping table based on the model of the earphone; the second mapping table comprises at least one mapping relation between the earphone model number and the performance parameter. Here, the earphone model is used as the identification information of the earphone, and the performance parameter corresponding to the earphone is determined according to the earphone model.
Detecting that the electronic device establishes connection with the headset, and obtaining the headset model includes, but is not limited to, the following two cases:
first, a connection with the headset is detected for the first time.
When the connection with the earphone is detected for the first time, the determination of the earphone model is automatically detected by the electronic equipment or is determined according to the input information of the user. But when the earphone type selection interface is determined according to the input information of the user, controlling to display an earphone type selection interface, wherein a plurality of earphone type options are displayed on the earphone type selection interface. The display form of the plurality of earphone model options on the earphone model selection interface may be a list form, an icon form or the like. When a selection operation of any earphone model option is detected, the selected earphone model is taken as the model of the earphone. Alternatively, the headset model is entered directly by the user.
And secondly, the connection with the earphone is not detected for the first time, and the earphone model determined when the earphone is connected last time can be directly obtained.
In some embodiments, the determining the maximum output power of the headset based on the performance parameter of the headset comprises: determining a first output power based on the earphone type; determining a power coefficient based on a sensitivity of the headset; determining a second output power based on the power rating of the earphone and the power coefficient; and taking the minimum value of the first output power and the second output power as the maximum output power of the earphone.
In practice, in order to ensure the hearing and hearing of the user, the output power range of the earphone should be smaller than the maximum output power. Here, a generally applicable output power range may be determined based on the type of earphone, and the output power range more matched to the earphone may be determined based further on the sensitivity and rated power of the earphone.
In other embodiments, the determining the maximum output power of the earphone based on the performance parameter of the earphone includes: determining a power coefficient based on a sensitivity of the headset; determining a second output power based on the power rating of the earphone and the power coefficient; and taking the second output power as the maximum output power of the earphone.
Since the output power range determined by the sensitivity and rated power of the earphone is more matched with the earphone, the maximum output power can be determined directly by using the sensitivity and rated power.
In other embodiments, the determining the maximum output power of the earphone based on the performance parameter of the earphone includes: determining a first output power based on the earphone type; and taking the first output power as the maximum output power of the earphone.
Determining a first output power based on the headset type, comprising: determining a first output power from a third mapping table based on the earphone type; the third mapping table includes a mapping relationship between at least one earphone type and the first output power. Or determining a maximum output voltage from a fourth mapping table based on the earphone type; the fourth mapping table comprises at least one mapping relation between earphone type and maximum output voltage; and calculating to obtain first output power based on the maximum output voltage and the impedance of the earphone.
In some embodiments, the method further comprises, prior to step 103: respectively controlling the output of the at least one single-frequency signal based on at least two volume control parameters; acquiring a user selection instruction acquired by an input unit, and determining respective corresponding volume control parameters of the at least one single-frequency signal based on the user selection instruction; and establishing the first mapping table by utilizing the volume control parameters corresponding to the at least one single-frequency signal.
Illustratively, at least two volume control parameters of a single frequency signal are determined based on the maximum output power of the earphone, such that the output power of the earphone when outputting the single frequency signal does not exceed the maximum output power. That is, the volume control parameter determined in advance for each single frequency signal does not cause the output power of the earphone to exceed the preset range.
Here, the sound effect control parameter may be an output voltage of the single frequency signal. Aiming at the hearing experience of a user on different single-frequency signals, when playing single-frequency signals with different output voltages by utilizing one earphone, for example, 300Hz/30mv,300Hz/40mv and 300Hz/60mv are played, the user can select the best output voltage which is most suitable for the 300Hz signals at the UI interface, so that calibration with different frequencies, such as 400Hz,800Hz,1KHz,2KHz and the like, is performed. Therefore, the preferences of the user using a certain earphone in each frequency band are collected and stored in the software calibration file, when the user listens to the audio and the like by using the earphone again next time, the optimal output voltage of each frequency is adjusted according to the previous calibration file by analyzing the frequency components contained in the audio, and the listening feeling of the user is improved.
In practical application, the first mapping table includes volume control parameters corresponding to the at least one single-frequency signal in different environmental spaces; wherein different ambient spaces correspond to different ambient noise levels.
Further, the method further comprises: acquiring a volume adjustment instruction in the at least one environment space; adjusting a volume control parameter of at least part of the single-frequency signals in the first mapping table based on the volume adjustment instruction; and storing the adjusted first mapping table.
That is, in determining the volume control parameter of the single frequency signal, both the listening habit of the user and the playing environment are considered. Thus, the optimal volume control parameters suitable for different playing environments are provided for the user.
Here, since the noise level of the playing environment also affects the hearing of the user, different volume control parameters may be set according to different noise levels, for example, the noise levels may be divided into a first level of 10db to 30db, a second level of 30db to 50db, a third level of 50db to 70db, a fourth level of 70db to 90db, and a fifth level of 90db or more. When the environmental noise level is detected to be larger, the corresponding volume control parameter is also larger, when the noise level is too large (such as a fifth level), the corresponding volume control parameter may enable the output power to exceed the maximum output power, at this time, the audio file is controlled to stop outputting until the environmental noise is reduced to the fourth level or below, and then the audio file is controlled to continue outputting, so that the hearing of a user is prevented from being damaged.
Here, when the target audio file is controlled to be output based on the target volume control parameters, the volume control parameters of different single-frequency signals are the same or different, and the output effect after the single-frequency signals are fused is considered in advance, so that the volume control parameters set for the different single-frequency signals in advance cannot have great influence on the overall output sound effect of the target audio file.
By adopting the technical scheme, when the connection between the electronic equipment and the earphone is detected, a reasonable output power range can be set for different earphone performances, meanwhile, a first mapping table is established according to the hearing feeling of a user on different frequency band sounds, the first mapping table is pre-stored with the optimal volume control parameters of different single frequency signals, when the output of an audio file is controlled, the target volume control parameters corresponding to the different single frequency signals in the audio file are determined from the first mapping table, the output of the audio file is controlled according to the determined target volume control parameters, namely, the optimal volume output can be matched for the signals of each frequency band, the hearing feeling of the user is improved, the output power of the earphone is ensured not to exceed the maximum output power, and the harm to the ear hearing of the user is avoided.
Example two
The embodiment of the application provides a volume control method, as shown in fig. 2, the method specifically may include:
step 201: when the connection between the electronic equipment and the earphone is detected, the model of the earphone is obtained;
here, acquiring the headset model includes, but is not limited to, the following two cases:
the first case, first detection of a connection to the headset.
When the connection with the earphone is detected for the first time, the determination of the earphone model is automatically detected by the electronic equipment or is determined according to the input information of the user. But when the earphone type selection interface is determined according to the input information of the user, controlling to display an earphone type selection interface, wherein a plurality of earphone type options are displayed on the earphone type selection interface. The display form of the plurality of earphone model options on the earphone model selection interface may be a list form, an icon form or the like. When a selection operation of any earphone model option is detected, the selected earphone model is taken as the model of the earphone. Alternatively, the headset model is entered directly by the user.
In the second case, the connection with the earphone is not detected for the first time, and the earphone model determined when the earphone is connected last time can be directly obtained.
Step 202: acquiring performance parameters of the earphone from a second mapping table based on the model of the earphone;
here, the second mapping table includes at least one mapping relationship between the earphone model number and the performance parameter. The performance parameters include at least one of: earphone type, sensitivity, and power rating. Table 1 exemplarily shows the performance parameters for three earphone models.
TABLE 1
Model number Type(s) Sensitivity of Rated power
MH135 Half-in-ear type 105±3db SPL at 1kHz 1mW 1mW
MH130 In-ear type 100±2db SPL at 1kHz 4mW 4mW
XL-5132 Half-in-ear type 100±3db SPL at 1kHz 1mW 1mW
In practical application, the performance parameters of the main stream earphone are obtained in advance and stored in the second mapping table, the second mapping table is stored in the network side, and the user can query the second mapping table according to the earphone model and obtain the corresponding performance parameters.
Step 203: determining a maximum output power of the earphone based on the performance parameter of the earphone; wherein the performance parameter comprises at least one of: earphone type, sensitivity and rated power;
specifically, determining a first output power based on the earphone type; determining a power coefficient based on a sensitivity of the headset; determining a second output power based on the power rating of the earphone and the power coefficient; and taking the minimum value of the first output power and the second output power as the maximum output power of the earphone.
The earphone types include: in-ear, semi-in-ear, head-mounted, etc., different types of headphones correspond to different maximum output voltages. The earphone type is in-ear, and the maximum output voltage is a first output voltage; the earphone type is half in-ear, and the maximum output voltage is second output voltage; the earphone type is a headset, and the maximum output voltage is a third output voltage. The first output voltage, the second output voltage, and the third output voltage are different, e.g., the first output voltage is less than the second output voltage and less than the third output voltage.
Determining a first output power based on the headset type, comprising: determining a first output power from a third mapping table based on the earphone type; the third mapping table includes a mapping relationship between at least one earphone type and the first output power. Or determining a maximum output voltage from a fourth mapping table based on the earphone type; the fourth mapping table comprises at least one mapping relation between earphone type and maximum output voltage; and calculating to obtain first output power based on the maximum output voltage and the impedance of the earphone.
The sensitivity of the earphone is the sound pressure level which can be emitted by the earphone when the earphone inputs 1 milliwatt of power, so that the higher the sensitivity is, the smaller the impedance is, the easier the earphone is to sound and the easier the earphone is to drive, the lower the second output power of the earphone is, and the lower the sensitivity is, the higher the second output power of the earphone is. For example, the earphone model is half in ear type of MH135, the sensitivity is 105+ -3 db, the sensitivity coefficient is 0.6, and the second output power is 0.6mw obtained by multiplying the rated power by the sensitivity coefficient; the earphone model is MH130 in the ear, the sensitivity is 100+ -2 db, the sensitivity coefficient is 0.8, and the second output power is 3.2mw.
Here, a generally applicable output power range is first determined based on the type of earphone, and further an output power range more matched to the earphone is determined based on the sensitivity and rated power of the earphone.
Step 204: when the output of a target audio file is controlled, determining at least one target single-frequency signal contained in the target audio file;
acquiring a target audio file; the frequency analysis is performed on the target audio file, and the target single-frequency signal contained in the target audio file is determined, for example, the frequency of the single-frequency signal is 125Hz, 240Hz, 500Hz, 1kHz,2kHz, 4kHz, 8kHz, and the like.
Step 205: determining a target volume control parameter corresponding to the at least one target single-frequency signal from a preset first mapping table; wherein, the first mapping table comprises at least one mapping relation between single frequency signals and volume control parameters;
in practical application, the method further comprises the following steps: acquiring a volume adjustment instruction in the at least one environment space; adjusting a volume control parameter of at least part of the single-frequency signals in the first mapping table based on the volume adjustment instruction; and storing the adjusted first mapping table.
That is, in determining the volume control parameter of the single frequency signal, both the listening habit of the user and the playing environment are considered. Thus, the optimal volume control parameters suitable for different playing environments are provided for the user.
Step 206: controlling the target audio file output based on the target volume control parameter;
in practical application, the method specifically comprises the following steps: acquiring a volume adjustment instruction acquired by a user output unit; adjusting the target volume control parameter based on the volume adjustment instruction; and controlling the output of the target audio file based on the adjusted target volume control parameter.
That is, when the target audio file is controlled to be output, the volume control parameter can be adjusted based on the volume adjustment instruction of the user so as to achieve the desired volume of the user.
Step 207: and when the output power of the earphone is larger than the maximum output power, controlling and adjusting the volume control parameter of at least part of target single-frequency signals in the target audio file so that the target output power of the earphone does not exceed the maximum output power.
Here, when the volume control is the output voltage, the output power is reduced by reducing the output voltage of the single frequency signal or reducing the output impedance of the earphone when the output power of the earphone is greater than the maximum output power.
Example III
An embodiment of the present application provides an electronic device, as shown in fig. 3, including:
a processing unit 301, configured to determine a maximum output power of an earphone based on a performance parameter of the earphone when a connection with the earphone is detected; wherein the performance parameter comprises at least one of: earphone type, sensitivity and rated power;
the processing unit 301 is further configured to determine at least one target single-frequency signal included in the target audio file when controlling output of the target audio file; determining a target volume control parameter corresponding to the at least one target single-frequency signal from a preset first mapping table; wherein, the first mapping table comprises at least one mapping relation between single frequency signals and volume control parameters;
an output unit 302, configured to control the output of the target audio file based on the target volume control parameter, so that the target output power of the earphone does not exceed the maximum output power.
In some embodiments, the processing unit is specifically configured to determine a first output power based on the earphone type; determining a power coefficient based on a sensitivity of the headset; determining a second output power based on the power rating of the earphone and the power coefficient; and taking the minimum value of the first output power and the second output power as the maximum output power of the earphone.
In some embodiments, the processing unit is specifically configured to determine a power coefficient based on a sensitivity of the earphone; determining a second output power based on the power rating of the earphone and the power coefficient; and taking the second output power as the maximum output power of the earphone.
In some embodiments, the processing unit is further configured to obtain a model of the headset when detecting that the electronic device establishes a connection with the headset; acquiring performance parameters of the earphone from a second mapping table based on the model of the earphone; the second mapping table comprises at least one mapping relation between the earphone model number and the performance parameter.
In some embodiments, the output unit is further configured to control the at least one single frequency signal output based on at least two volume control parameters, respectively;
the processing unit is further used for acquiring the user selection instruction acquired by the input unit and determining the corresponding volume control parameters of the at least one single-frequency signal based on the user selection instruction; and establishing the first mapping table by utilizing the volume control parameters corresponding to the at least one single-frequency signal.
In some embodiments, the first mapping table includes volume control parameters corresponding to the at least one single frequency signal in different environmental spaces; wherein different ambient spaces correspond to different ambient noise levels.
In some embodiments, the processing unit is further configured to obtain a volume adjustment instruction in the at least one environmental space; adjusting a volume control parameter of at least part of the single-frequency signals in the first mapping table based on the volume adjustment instruction; and storing the adjusted first mapping table.
Based on the hardware implementation of each unit in the electronic device, the embodiment of the application further provides another electronic device, as shown in fig. 4, where the electronic device includes: a processor 401 and a memory 402 configured to store a computer program capable of running on the processor;
wherein the processor 401 is configured to execute the method steps of the previous embodiments when running a computer program.
Of course, in actual practice, the various components of the electronic device would be coupled together via a bus system 403, as shown in FIG. 4. It is understood that the bus system 403 is used to enable connected communications between these components. The bus system 403 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled as bus system 403 in fig. 4.
In practical applications, the processor may be at least one of an application specific integrated circuit (ASIC, application Specific Integrated Circuit), a digital signal processing device (DSPD, digital Signal Processing Device), a programmable logic device (PLD, programmable Logic Device), a Field-programmable gate array (Field-Programmable Gate Array, FPGA), a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronic device for implementing the above-mentioned processor function may be other for different apparatuses, and embodiments of the present application are not specifically limited.
The Memory may be a volatile Memory (RAM) such as Random-Access Memory; or a nonvolatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD) or a Solid State Drive (SSD); or a combination of the above types of memories and provide instructions and data to the processor.
Embodiments of the present application also provide a computer-readable storage medium for storing a computer program.
Optionally, the computer readable storage medium may be applied to any electronic device in the embodiments of the present application, and the computer program causes a computer to execute a corresponding flow implemented by a processor in each method in the embodiments of the present application, which is not described herein for brevity.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present invention may be integrated in one processing module, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units. Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: a removable storage device, a read-only memory, a random access memory, a magnetic or optical disk, or other various media capable of storing program code.
The methods disclosed in the several method embodiments provided in the present application may be arbitrarily combined without collision to obtain a new method embodiment.
The features disclosed in the several product embodiments provided in the present application may be combined arbitrarily without conflict to obtain new product embodiments.
The features disclosed in the several method or apparatus embodiments provided in the present application may be arbitrarily combined without conflict to obtain new method embodiments or apparatus embodiments.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A volume control method applied to an electronic device, the method comprising:
when the connection between the electronic equipment and the earphone is detected, determining the maximum output power of the earphone based on the performance parameter of the earphone; wherein the performance parameters include at least: sensitivity and power rating;
when the output of a target audio file is controlled, determining at least one target single-frequency signal contained in the target audio file;
determining a target volume control parameter corresponding to the at least one target single-frequency signal from a preset first mapping table; wherein, the first mapping table comprises at least one mapping relation between single frequency signals and volume control parameters;
and controlling the output of the target audio file based on the target volume control parameter so that the target output power of the earphone does not exceed the maximum output power.
2. The method of claim 1, wherein the performance parameters further comprise: a headset type; the determining the maximum output power of the earphone based on the performance parameter of the earphone comprises:
determining a first output power based on the earphone type;
determining a power coefficient based on a sensitivity of the headset; determining a second output power based on the power rating of the earphone and the power coefficient;
and taking the minimum value of the first output power and the second output power as the maximum output power of the earphone.
3. The method of claim 1, wherein the determining the maximum output power of the headset based on the performance parameter of the headset comprises:
determining a power coefficient based on a sensitivity of the headset;
determining a second output power based on the power rating of the earphone and the power coefficient;
and taking the second output power as the maximum output power of the earphone.
4. The method according to claim 1, wherein the method further comprises:
when the connection between the electronic equipment and the earphone is detected, the model of the earphone is obtained;
acquiring performance parameters of the earphone from a second mapping table based on the model of the earphone; the second mapping table comprises at least one mapping relation between the earphone model number and the performance parameter.
5. The method according to claim 1, wherein the method further comprises:
respectively controlling the output of the at least one single-frequency signal based on at least two volume control parameters;
acquiring a user selection instruction acquired by an input unit, and determining respective corresponding volume control parameters of the at least one single-frequency signal based on the user selection instruction;
and establishing the first mapping table by utilizing the volume control parameters corresponding to the at least one single-frequency signal.
6. The method of claim 5, wherein the first mapping table includes volume control parameters corresponding to the at least one single frequency signal in different environmental spaces; wherein different ambient spaces correspond to different ambient noise levels.
7. The method of claim 6, wherein the method further comprises:
acquiring a volume adjustment instruction in the at least one environment space;
adjusting a volume control parameter of at least part of the single-frequency signals in the first mapping table based on the volume adjustment instruction;
and storing the adjusted first mapping table.
8. An electronic device, the electronic device comprising:
the processing unit is used for determining the maximum output power of the earphone based on the performance parameter of the earphone when the connection with the earphone is detected; wherein the performance parameters include at least: sensitivity and power rating;
the processing unit is further used for determining at least one target single-frequency signal contained in the target audio file when the target audio file is controlled to be output; determining a target volume control parameter corresponding to the at least one target single-frequency signal from a preset first mapping table; wherein, the first mapping table comprises at least one mapping relation between single frequency signals and volume control parameters;
and the output unit is used for controlling the output of the target audio file based on the target volume control parameter so that the target output power of the earphone does not exceed the maximum output power.
9. An electronic device, the electronic device comprising: a processor and a memory configured to store a computer program capable of running on the processor,
wherein the processor is configured to perform the steps of the method of any of claims 1 to 7 when the computer program is run.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
CN201910573142.XA 2019-06-28 2019-06-28 Volume control method, electronic equipment and computer readable storage medium Active CN110308888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910573142.XA CN110308888B (en) 2019-06-28 2019-06-28 Volume control method, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910573142.XA CN110308888B (en) 2019-06-28 2019-06-28 Volume control method, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110308888A CN110308888A (en) 2019-10-08
CN110308888B true CN110308888B (en) 2023-05-23

Family

ID=68078706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910573142.XA Active CN110308888B (en) 2019-06-28 2019-06-28 Volume control method, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110308888B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111083528A (en) * 2019-12-23 2020-04-28 维沃移动通信有限公司 Information playing method, information sending method and electronic equipment
CN112839280B (en) * 2021-01-04 2023-05-26 广州飞傲电子科技有限公司 Automatic earphone volume adjusting method, device, equipment and storage medium
CN113099352B (en) * 2021-03-25 2023-04-07 维沃移动通信有限公司 Audio signal processing method, audio signal processing device, electronic equipment and storage medium
CN115514844A (en) * 2021-06-07 2022-12-23 华为技术有限公司 Volume adjusting method, electronic equipment and system
CN113824835A (en) * 2021-10-25 2021-12-21 Oppo广东移动通信有限公司 Volume control method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102371004B1 (en) * 2015-08-12 2022-03-07 삼성전자 주식회사 Method for processing audio signal and electronic device supporting the same
CN108206980B (en) * 2016-12-20 2020-09-01 成都鼎桥通信技术有限公司 Audio accessory testing method, device and system
CN109656511A (en) * 2018-10-30 2019-04-19 努比亚技术有限公司 A kind of audio frequency playing method, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN110308888A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
CN110308888B (en) Volume control method, electronic equipment and computer readable storage medium
EP2920880B1 (en) Audio loudness control system
EP3255897A1 (en) Method and terminal for configuring noise reduction earphone, and noise reduction earphone
CN105245195B (en) For the technology of distortion reduction multiband compressor reducer protected with sound quality
CN103456332A (en) Audio playing device and volume adjusting method
CN110809214B (en) Audio playing method, audio playing device and terminal equipment
EP3678388A1 (en) Customized audio processing based on user-specific and hardware-specific audio information
EP2715936A1 (en) An apparatus with an audio equalizer and associated method
CN107908388A (en) Method for controlling volume and device, computer installation and computer-readable recording medium
CN103929692B (en) Audio information processing method and electronic equipment
CN107547732A (en) A kind of media play volume adjusting method, device, terminal and storage medium
CN110782884B (en) Far-field pickup noise processing method, device, equipment and storage medium
CN107682802B (en) Method and device for debugging sound effect of audio equipment
CN112947886A (en) Method and device for protecting user hearing and electronic equipment
CN112585998B (en) Headset system and method for simulating audio performance of a headset model
CN108432216B (en) Volume adjustment method and device and electronic equipment
CN108777745A (en) A kind of volume adjusting method and device
KR102110515B1 (en) Hearing aid device of playing audible advertisement or audible data
CN113613122B (en) Volume adjusting method, volume adjusting device, earphone and storage medium
CN116107537A (en) Audio quality adjustment method and device, electronic equipment and storage medium
CN110113694A (en) Method and apparatus for controlling audio broadcasting in the electronic device
CN111176605B (en) Audio output method and electronic equipment
CN115375518A (en) Abnormal paging method and related device
CN112527231B (en) Method and apparatus for audio output device selection
CN109995941B (en) Data adjusting method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant