CN115550820A - Loudspeaker control method, device, electronic device and storage medium - Google Patents
Loudspeaker control method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN115550820A CN115550820A CN202211305011.1A CN202211305011A CN115550820A CN 115550820 A CN115550820 A CN 115550820A CN 202211305011 A CN202211305011 A CN 202211305011A CN 115550820 A CN115550820 A CN 115550820A
- Authority
- CN
- China
- Prior art keywords
- speaker
- performance
- loudspeaker
- volume
- change
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 230000004044 response Effects 0.000 claims abstract description 32
- 230000000694 effects Effects 0.000 abstract description 28
- 230000006870 function Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 230000007423 decrease Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 230000035945 sensitivity Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000003321 amplification Effects 0.000 description 1
- 230000002238 attenuated effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 238000013021 overheating Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R9/00—Transducers of moving-coil, moving-strip, or moving-wire type
- H04R9/06—Loudspeakers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R9/00—Transducers of moving-coil, moving-strip, or moving-wire type
- H04R9/02—Details
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2400/00—Loudspeakers
- H04R2400/11—Aspects regarding the frame of loudspeaker transducers
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
Description
技术领域technical field
本申请属于终端技术领域,具体涉及一种扬声器控制方法、装置、电子设备及存储介质。The present application belongs to the technical field of terminals, and in particular relates to a loudspeaker control method, device, electronic equipment and storage medium.
背景技术Background technique
随着各类短视频的兴起,电子设备在生活中扮演者愈发重要的角色。越来越多的电子设备中配置了两个或者更多的扬声器,通过对配置的扬声器进行控制以获取更好的立体声效果。但相关的扬声器控制方法,在对扬声器进行调整后,扬声器输出的立体声外放效果还有待提高。With the rise of various short videos, electronic devices play an increasingly important role in life. More and more electronic devices are equipped with two or more speakers, and better stereo effects can be obtained by controlling the configured speakers. However, in the related loudspeaker control method, after the loudspeaker is adjusted, the stereo output effect of the loudspeaker output needs to be improved.
发明内容Contents of the invention
鉴于上述问题,本申请提出了一种扬声器控制方法、装置、电子设备以及存储介质,以实现改善上述问题。In view of the above problems, the present application proposes a loudspeaker control method, device, electronic equipment, and storage medium, so as to improve the above problems.
第一方面,本申请实施例提供了一种扬声器控制方法,应用于电子设备,所述电子设备包括第一扬声器和第二扬声器,所述第一扬声器的性能低于所述第二扬声器的性能,所述方法包括:在所述第二扬声器的性能高于预设性能情况下,响应于音量级数的变化,控制所述第一扬声器输出的音量保持不变;同时控制所述第二扬声器输出的音量随所述音量级数的变化而变化。In a first aspect, an embodiment of the present application provides a speaker control method applied to an electronic device, the electronic device includes a first speaker and a second speaker, and the performance of the first speaker is lower than that of the second speaker , the method includes: when the performance of the second speaker is higher than a preset performance, in response to a change in the volume level, controlling the output volume of the first speaker to remain constant; simultaneously controlling the second speaker The output volume changes with the change of the volume level.
第二方面,本申请实施例提供了一种扬声器控制装置,运行于电子设备,所述电子设备包括第一扬声器和第二扬声器,所述第一扬声器的性能低于所述第二扬声器的性能,所述装置包括:第一控制单元,用于在所述第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,控制所述第一扬声器输出的音量保持不变;第二控制单元,用于同时控制所述第二扬声器输出的音量随所述音量级数的变化而变化。In a second aspect, an embodiment of the present application provides a speaker control device that runs on an electronic device, the electronic device includes a first speaker and a second speaker, and the performance of the first speaker is lower than that of the second speaker , the device includes: a first control unit, configured to control the output volume of the first speaker to remain constant in response to a change in the volume level when the performance of the second speaker is higher than a preset performance ; The second control unit is used to simultaneously control the volume output by the second loudspeaker to change with the change of the volume level.
第三方面,本申请实施例提供了一种电子设备,包括一个或多个处理器以及存储器;一个或多个程序,其中所述一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述的方法。In a third aspect, the embodiment of the present application provides an electronic device, including one or more processors and memory; one or more programs, wherein the one or more programs are stored in the memory and configured as Executed by the one or more processors, the one or more programs are configured to execute the above method.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码运行时执行上述的方法。In a fourth aspect, the embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, wherein the above method is executed when the program code is running.
本申请实施例提供了一种扬声器控制方法、装置、电子设备及存储介质。在第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,控制第一扬声器输出的音量保持不变,同时控制第二扬声器输出的音量随音量级数的变化而变化。通过上述方法,在第二扬声器的性能超过预设性能的情况下,响应于音量级数的变化,控制第一扬声器的输出保持恒定,同时充分提升第二扬声器的性能,从而使得第一扬声器和第二扬声器能输出均衡的立体声效果,提升了用户体验。Embodiments of the present application provide a loudspeaker control method, device, electronic equipment, and storage medium. In the case that the performance of the second speaker is higher than the preset performance, in response to the change of the volume level, the volume output by the first speaker is controlled to remain constant, while the volume output by the second speaker is controlled to change with the change of the volume level . Through the above method, when the performance of the second speaker exceeds the preset performance, in response to the change of the volume level, the output of the first speaker is controlled to remain constant, and at the same time, the performance of the second speaker is fully improved, so that the first speaker and the The second speaker can output a balanced stereo effect, which improves the user experience.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1示出了本申请一实施例提出的一种扬声器控制方法的应用场景示意图;FIG. 1 shows a schematic diagram of an application scenario of a loudspeaker control method proposed by an embodiment of the present application;
图2示出了本申请一实施例提出的智能功率放大器的全桥逆变电路的示意图;FIG. 2 shows a schematic diagram of a full-bridge inverter circuit of an intelligent power amplifier proposed by an embodiment of the present application;
图3示出了本申请一实施例提出的智能功率放大器的全桥逆变电路分时导通的示意图;Fig. 3 shows a schematic diagram of the time-sharing conduction of the full-bridge inverter circuit of the intelligent power amplifier proposed by an embodiment of the present application;
图4示出了本申请一实施例提出的一种扬声器控制方法的流程图;FIG. 4 shows a flow chart of a speaker control method proposed by an embodiment of the present application;
图5示出了本申请一实施例提出的音量曲线配置的示意图;Fig. 5 shows a schematic diagram of volume curve configuration proposed by an embodiment of the present application;
图6示出了本申请另一实施例提出的一种扬声器控制方法的流程图;FIG. 6 shows a flow chart of a speaker control method proposed in another embodiment of the present application;
图7示出了本申请再一实施例提出的一种扬声器控制方法的流程图;Fig. 7 shows a flow chart of a speaker control method proposed by another embodiment of the present application;
图8示出了本申请再一实施例提出中的驱动电路的示意图;FIG. 8 shows a schematic diagram of a driving circuit proposed in another embodiment of the present application;
图9示出了本申请又一实施例提出的一种扬声器控制方法的流程图;FIG. 9 shows a flow chart of a speaker control method proposed in another embodiment of the present application;
图10示出了本申请又一实施例提出的一种扬声器控制方法的流程图;FIG. 10 shows a flow chart of a speaker control method proposed in another embodiment of the present application;
图11示出了本申请实施例提出的一种扬声器控制装置的结构框图;Fig. 11 shows a structural block diagram of a loudspeaker control device proposed by the embodiment of the present application;
图12示出了本申请实施例提出的一种扬声器控制装置的结构框图;Fig. 12 shows a structural block diagram of a loudspeaker control device proposed in the embodiment of the present application;
图13示出了本申请实时中的用于执行根据本申请实施例的扬声器控制方法的电子设备的结构框图;FIG. 13 shows a structural block diagram of an electronic device for executing a loudspeaker control method according to an embodiment of the present application in real time in the present application;
图14示出了本申请实时中的用于保存或者携带实现根据本申请实施例的扬声器控制方法的程序代码的存储单元。Fig. 14 shows a storage unit used for storing or carrying program codes for realizing the speaker control method according to the embodiment of the application in real time of the application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
随着电子技术的发展,诸如智能手机等电子设备在用户的日常生活中使用地越来越频繁。其中,电子设备的音频播放功能是用户在使用电子设备的过程中,使用最多的功能之一。例如,在用户使用电子设备欣赏影视剧、听音乐、玩游戏、进行语音通话或者视频通话等过程中,都会使用到电子设备的音频播放功能。从而,用户对电子设备进行音频播放时的发声效果提出了更高的要求。比如,在使用电子设备的音频外放功能时,电子设备可以通过设置的扬声器输出立体声外放效果。With the development of electronic technology, electronic devices such as smart phones are used more and more frequently in daily life of users. Among them, the audio playing function of the electronic device is one of the functions most used by users in the process of using the electronic device. For example, when a user uses an electronic device to enjoy movies, TV shows, listen to music, play games, make voice calls or video calls, etc., the audio playback function of the electronic device will be used. Therefore, users put forward higher requirements on the sound effect when the electronic device plays audio. For example, when using the audio output function of the electronic device, the electronic device may output a stereo output effect through the set speaker.
但是,局限于电子设备的轻薄和便携性,单个扬声器的配置已经难以满足用户日益提升的音频外放场景需求,如响度和环绕感等。为了提升和改善电子设备的外放效果,越来越多的电子设备均配置了两个或者更多的扬声器以获取更好的立体声效果。但受限于电子设备轻薄的机身,以及电子设备中设置的多摄像头和大电池对于电子设备有限的内部空间的挤压,很难在电子设备上集成上下两个完全对称的扬声器来实现良好的立体声效果。However, limited by the thinness and portability of electronic devices, the configuration of a single speaker has been difficult to meet the increasing needs of users for audio playback scenarios, such as loudness and surround feeling. In order to enhance and improve the loudspeaker effect of electronic devices, more and more electronic devices are equipped with two or more speakers to obtain better stereo effects. However, limited by the thin and light body of the electronic device, and the squeeze of the limited internal space of the electronic device by the multi-camera and large battery installed in the electronic device, it is difficult to integrate two completely symmetrical speakers on the electronic device to achieve good performance. stereo effect.
当前主流程的配置大体上都是在电子设备的上方设置一个性能稍弱的扬声器实现手持话筒的听筒功能,在电子设备的下方设置一个性能更好的扬声器辅助输出立体声外放效果。基于当前电子设备扬声器系统的配置,在大部分外放场景下,往往需要降低性能更好的那个扬声器的最佳性能来均衡立体声外放效果,而一般在调整扬声器的性能时,都是通过调整电子设备的音量键来调整,而调整电子设备的音量键时,电子设备中设置的两个扬声器的性能往往是同步调整的,始终都存在“上弱下强”的非对称听感,用户体验较差。其中,调整电子设备的音量键时,电子设备中设置的两个扬声器的性能往往是同步调整的,指的是电子设备中设置的两个扬声器的性能同时随音量键的调整增加或降低;“上弱下强”的非对称听感是由于电子设备的上方设置的扬声器的性能较弱,而电子设备的下方设置的扬声器的性能更好一点。The current configuration of the main process is generally to install a speaker with a weaker performance above the electronic device to realize the receiver function of the handheld microphone, and to install a speaker with better performance below the electronic device to assist in stereo output. Based on the configuration of the speaker system of the current electronic equipment, in most loudspeaker scenarios, it is often necessary to reduce the best performance of the speaker with better performance to balance the stereo loudspeaker effect. When adjusting the volume keys of electronic equipment, the performance of the two speakers installed in the electronic equipment is often adjusted synchronously, and there is always an asymmetric sense of hearing of "weak at the top and strong at the bottom". poor. Among them, when the volume key of the electronic device is adjusted, the performance of the two speakers set in the electronic device is often adjusted synchronously, which means that the performance of the two speakers set in the electronic device increases or decreases simultaneously with the adjustment of the volume key; " The asymmetric sense of hearing of "weak at the top and strong at the bottom" is due to the fact that the performance of the speakers installed above the electronic equipment is weak, while the performance of the speakers installed below the electronic equipment is better.
因此,发明人提出了本申请中的扬声器控制方法、装置、电子设备及存储介质。在第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,控制第一扬声器输出的音量保持不变,同时控制第二扬声器输出的音量随音量级数的变化而变化。通过上述方法,在第二扬声器的性能超过预设性能的情况下,响应于音量级数的变化,控制第一扬声器的输出保持恒定,同时充分提升第二扬声器的性能,从而使得第一扬声器和第二扬声器能输出均衡的立体声效果,提升了用户体验。Therefore, the inventor proposes a loudspeaker control method, device, electronic device and storage medium in the present application. In the case that the performance of the second speaker is higher than the preset performance, in response to the change of the volume level, the volume output by the first speaker is controlled to remain constant, while the volume output by the second speaker is controlled to change with the change of the volume level . Through the above method, when the performance of the second speaker exceeds the preset performance, in response to the change of the volume level, the output of the first speaker is controlled to remain constant, and at the same time, the performance of the second speaker is fully improved, so that the first speaker and the The second speaker can output a balanced stereo effect, which improves the user experience.
下面针对本发明实施提供的扬声器控制方法的应用环境进行介绍:The following introduces the application environment of the loudspeaker control method provided by the implementation of the present invention:
请参阅图1,本发明实施提供的扬声器控制方法可以应用于如图1所示的电子设备100,电子设备100中可以包括两个或多个扬声器。示例性的,如图1所示,电子设备100可以包括第一扬声器110以及第二扬声器120两个扬声器。其中,第一扬声器110和第二扬声器120的性能可以相同也可以不同。可选的,第一扬声器110的性能可以高于第二扬声器120的性能;第一扬声器110的性能也可以低于第二扬声器120的性能;第一扬声器110的性能也可以等于第二扬声器120的性能。在第一扬声器110的性能等于第二扬声器120的性能时,通过第一扬声器110和第二扬声器120可以输出均衡的立体声。因此,第一扬声器110的性能和第二扬声器120的性能不同的情况下,为了可以输出均衡的立体声,给用户良好的声效体验,可以通过对第一扬声器110或第二扬声器120的性能进行调整,使得在调整后,通过第一扬声器110和第二扬声器120可以输出的均衡的立体声。Referring to FIG. 1 , the speaker control method provided by the implementation of the present invention can be applied to the
在本申请实施例中,第一扬声器110和第二扬声器120均可以有两个接线柱(两根引线),当电子设备100中只有第一扬声器110或第二扬声器120使用时两根引脚不分正负极性;当电子设备100中的第一扬声器110和第二扬声器120同时使用时两根引脚有极性之分。In the embodiment of the present application, both the first speaker 110 and the second speaker 120 can have two binding posts (two leads), and when only the first speaker 110 or the second speaker 120 is used in the
在本申请实施例中,如图1所示,在电子设备100中,第一扬声器110可以设置于电子设备100的上端,第二扬声器120可以设置于电子设备100的下端,且第一扬声器110和第二扬声器120可以采用单独的智能功率放大器(Smart PA)驱动运行,如智能功率放大器1驱动第一扬声器110运行,智能功率放大器2驱动第二扬声器120运行。In the embodiment of the present application, as shown in FIG. 1 , in the
智能功率放大器一般采用全桥逆变电路。智能功率放大器的全桥逆变电路可参见图2,包括:Q1、Q2、Q3和Q4四个开关管,每个开关管的输入端和输出端均连接一个二极管。开关管Q1和开关管Q3的输入端接入直流电压VBOOST,开关管Q2和开关管Q4的输出端接地。开关管Q1和Q2的公共端作为SPK-P端,开关管Q3和Q4的公共端作为SPK-N端,SPK-P端和SPK-N端连接扬声器。Intelligent power amplifiers generally use a full-bridge inverter circuit. The full-bridge inverter circuit of the intelligent power amplifier can be seen in Fig. 2, including four switching tubes of Q1, Q2, Q3 and Q4, each switching tube is connected with a diode at the input end and the output end. The input terminals of the switching tube Q1 and the switching tube Q3 are connected to the DC voltage VBOOST, and the output terminals of the switching tube Q2 and the switching tube Q4 are grounded. The common terminal of the switch tubes Q1 and Q2 is used as the SPK-P terminal, the common terminal of the switch tubes Q3 and Q4 is used as the SPK-N terminal, and the SPK-P terminal and the SPK-N terminal are connected to the speaker.
图2展示的开关管Q1至开关管Q4是NPN型晶体管,输入端是指NPN型晶体管的集电极,输出端则指NPN型晶体管的发射极,控制端则指NPN型晶体管的基极。但开关管Q1至开关管Q4还可以采用其他形式的开关管。The switching tubes Q1 to Q4 shown in FIG. 2 are NPN transistors, the input end refers to the collector of the NPN transistor, the output end refers to the emitter of the NPN transistor, and the control end refers to the base of the NPN transistor. But the switch tubes Q1 to Q4 can also use other forms of switch tubes.
可选的,在智能功率放大器中,四个开关管分时导通,为扬声器提供电压,供其运行。具体的,如图3所示,第一阶段:开关管Q1和Q4导通,开关管Q2和Q3截止,直流电压VBOOST沿①指示的方向为扬声器供电。第二阶段:开关管Q1和Q4截止,开关管Q2和Q3导通,直流电压VBOOST沿②指示的方向为扬声器供电。Optionally, in the intelligent power amplifier, the four switch tubes are turned on in time sharing to provide voltage for the speaker to operate. Specifically, as shown in FIG. 3 , in the first stage: the switching tubes Q1 and Q4 are turned on, the switching tubes Q2 and Q3 are turned off, and the DC voltage VBOOST supplies power to the speaker along the direction indicated by ①. The second stage: the switch tubes Q1 and Q4 are cut off, the switch tubes Q2 and Q3 are turned on, and the DC voltage VBOOST supplies power to the speaker along the direction indicated by ②.
需要说明的是,该电子设备100除了可以为图1中所示的智能手机外,还可以为车机设备、可穿戴电子设备、平板电脑、(桌面型、膝上型)笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、手持计算机、上网本、个人数字助理(PersonalDigital Assistant,PDA)、智能音箱等可以配置有两个或多个扬声器的设备。It should be noted that, in addition to the smart phone shown in FIG. Personal computers (Ultra-mobile Personal Computer, UMPC), handheld computers, netbooks, personal digital assistants (Personal Digital Assistant, PDA), smart speakers and other devices can be configured with two or more speakers.
下面将结合附图具体描述本申请的各实施例。Various embodiments of the present application will be described in detail below with reference to the accompanying drawings.
请参阅图4,本申请实施例提供的一种扬声器控制方法,应用于如图1所示的电子设备,所述方法包括:Please refer to FIG. 4, a loudspeaker control method provided in an embodiment of the present application is applied to the electronic device shown in FIG. 1, and the method includes:
步骤S110:在所述第二扬声器的性能高于预设性能情况下,响应于音量级数的变化,控制所述第一扬声器输出的音量保持不变。Step S110: In the case that the performance of the second speaker is higher than the preset performance, in response to the change of the volume level, control the volume output by the first speaker to remain unchanged.
在本申请实施例中,电子设备包括包括第一扬声器和第二扬声器。其中,第一扬声器和第二扬声器为非对称扬声器。In this embodiment of the present application, the electronic device includes a first speaker and a second speaker. Wherein, the first speaker and the second speaker are asymmetrical speakers.
在本申请实施例中,第一扬声器和第二扬声器为非对称扬声器指的是第一扬声器和第二扬声器的最佳性能不同。可选的,第一扬声器为两个扬声器中性能较低的扬声器,第二扬声器为两个扬声器中性能较高的扬声器,也就是说,在本申请实施例中,第一扬声器的最佳性能低于第二扬声器的最佳性能。In this embodiment of the present application, the fact that the first speaker and the second speaker are asymmetrical speakers means that the best performances of the first speaker and the second speaker are different. Optionally, the first speaker is a speaker with a lower performance among the two speakers, and the second speaker is a speaker with a higher performance among the two speakers. That is to say, in this embodiment of the application, the best performance of the first speaker Below the best performance of the second speaker.
作为一种方式,扬声器是扬声系统中的关键部位,扬声器的放声质量主要由扬声器的性能指标决定。在本申请实施例中,可以通过扬声器的性能指标的数值来表征扬声器的性能优劣。扬声器的性能指标可以包括额定功率、额定阻抗、频率特性、谐波失真、灵敏度、指向性等。As a method, the loudspeaker is a key part of the sound system, and the sound reproduction quality of the loudspeaker is mainly determined by the performance index of the loudspeaker. In the embodiment of the present application, the performance of the loudspeaker may be characterized by the numerical value of the performance index of the loudspeaker. The performance index of the loudspeaker may include rated power, rated impedance, frequency characteristics, harmonic distortion, sensitivity, directivity, etc.
其中,扬声器的额定功率是指扬声器能长时间工作的输出功率,又称为不失真功率,它一般标在扬声器后端的铭牌上。当扬声器工作于额定功率时,音圈不会产生过热或机械动过载等现象,发出的声音没有显示失真。额定功率是一种平均功率,而实际上扬声器工作在变功率状态,它随输入音频信号强弱而变化,在弱音乐及声音信号中,峰值脉冲信号会超过额定功率很多倍,由于持续时间较短而不会损坏扬声器,但有可能出现失真。因此,为保证在峰值脉冲出现时仍能很好获得音质,扬声器须保留足够的功率余量。一般扬声器能随的最大功率是额定功率的24倍。Among them, the rated power of the speaker refers to the output power that the speaker can work for a long time, also known as the undistorted power, which is generally marked on the nameplate at the rear of the speaker. When the speaker works at the rated power, the voice coil will not produce overheating or mechanical overload, and the sound will not show distortion. The rated power is an average power, but in fact the speaker works in a variable power state, which changes with the strength of the input audio signal. In weak music and sound signals, the peak pulse signal will exceed the rated power many times. Short enough not to damage speakers, but with the potential for distortion. Therefore, in order to ensure that the sound quality can still be obtained well when the peak pulse occurs, the speaker must retain sufficient power headroom. The maximum power that a general speaker can handle is 24 times the rated power.
扬声器的额定阻抗是指声扬器在额定状态下,施加在声扬器输入端的电压与流过扬声器的电流的比值。现在,扬声器的额定阻抗一般有2、4、8、16、32欧等几种。扬声器额定阻抗是在输入400Hz信号电压情况下测得的。The rated impedance of the speaker refers to the ratio of the voltage applied to the input terminal of the speaker to the current flowing through the speaker in the rated state. Now, the rated impedance of the speaker is generally 2, 4, 8, 16, 32 ohms and so on. The rated impedance of the loudspeaker is measured under the condition of inputting 400Hz signal voltage.
扬声器的频率特性是衡量扬声器放音频带宽的指标。高保真放音系统要求扬声器系统应能重放10Hz~2000Hz的人耳可听音域。由于用单只扬声器不易实现该音域,故目前高保真音箱系统采用高、中、低三种扬声器来实现全频带重放覆盖。此外,高保真声扬器的频率特性应尽量趋于平坦,否则会引入重放的频率失真。高保真放音系统要求声扬器在放音频率范围内频率特性不平坦度小于10dB。The frequency characteristic of the speaker is an index to measure the audio frequency bandwidth of the speaker. The high-fidelity playback system requires that the speaker system should be able to reproduce the audible range of 10Hz to 2000Hz. Since it is difficult to achieve this range with a single speaker, the current high-fidelity speaker system uses three types of speakers, high, medium, and low, to achieve full-band playback coverage. In addition, the frequency characteristics of the high-fidelity speaker should be as flat as possible, otherwise it will introduce frequency distortion of playback. The high-fidelity playback system requires that the unevenness of the frequency characteristics of the speaker in the playback frequency range is less than 10dB.
扬声器的失真有很多种,常见的有谐波失真(多由扬声器磁场不均匀以及振动系统的畸变而引起,常在低频时产生)、互调失真(因两种不同频率的信号同时加入扬声器,互相调制音频的音质劣化)和瞬时失真(因振动系统的的惯性不能紧跟信号的变化而变化,从而引起信号失真)等。扬声器的谐波失真是指重放时,增加了原信号中没有的谐波成分。扬声器的谐波失真来源于磁体磁场不均匀,振动膜的特性、音圈位移等非线性失真。目前较好的扬声器的谐波失真指标不大于5%。There are many kinds of speaker distortion, the common ones are harmonic distortion (mostly caused by the uneven magnetic field of the speaker and the distortion of the vibration system, often at low frequencies), intermodulation distortion (because two signals of different frequencies are added to the speaker at the same time, The sound quality of intermodulated audio is degraded) and instantaneous distortion (because the inertia of the vibration system cannot follow the change of the signal, thus causing signal distortion), etc. The harmonic distortion of the speaker refers to the addition of harmonic components that were not in the original signal during playback. The harmonic distortion of the speaker comes from the non-uniform magnetic field of the magnet, the characteristics of the diaphragm, and the nonlinear distortion such as the displacement of the voice coil. At present, the harmonic distortion index of better speakers is not more than 5%.
扬声器的灵敏度通常是指输入功率为1W时的噪声电压时,在扬声器轴向正面1m处所测得的声压大小。灵敏度是衡量扬声器对音频信号中的细节是否能巨细无遗地重放的指标。扬声器的灵敏度越高,则扬声器对音频信号中的细节均能做出响应。作为HiFi扬声器的灵敏度应大于86dB/W。The sensitivity of the loudspeaker usually refers to the sound pressure measured at the front 1m of the axial direction of the loudspeaker when the input power is the noise voltage of 1W. Sensitivity is a measure of how well a speaker reproduces details in an audio signal. The more sensitive a speaker is, the better it responds to details in the audio signal. As a HiFi speaker, the sensitivity should be greater than 86dB/W.
扬声器对不同方向上的辐射,其声压频率特性是不同的,这种特性成为扬声器的指向性。它与扬声器的口径有关,扬声器的口径大时,扬声器的指向性尖,扬声器的口径小时,扬声器的指向性宽。扬声器的指向性还与频率有关,一般而言,对250Hz以下的低频信号,没有明显的指向性;对于1.5kHz以下的高频信号则有明显的指向性。The loudspeaker has different sound pressure frequency characteristics for radiation in different directions, and this characteristic becomes the directivity of the loudspeaker. It is related to the caliber of the speaker. When the caliber of the speaker is large, the directivity of the speaker is sharp, and when the caliber of the speaker is small, the directivity of the speaker is wide. The directivity of the speaker is also related to the frequency. Generally speaking, there is no obvious directivity for low-frequency signals below 250Hz; there is obvious directivity for high-frequency signals below 1.5kHz.
在本申请实施例中,预设性能可以为两个扬声器中,性能较弱的扬声器对应的最佳性能。其中,最佳性能可以为预先设置的上述性能指标中的任一指标的最大值,或者为对上述性能指标进行综合评定后,为上述不同的性能指标设置的不同的值。比如,若第一扬声器的最佳性能低于第二扬声器的最佳性能,那么预设性能就可以是第一扬声器的最佳性能。具体的,可以将第一扬声器的最大额定功率设置为预设性能;也可以将第一扬声器对应的性能特性进行加权求和后得到的值设置为预设性能,在此不做具体限定。In the embodiment of the present application, the preset performance may be the best performance corresponding to the speaker with weaker performance among the two speakers. Wherein, the best performance may be the maximum value of any one of the above-mentioned performance indexes set in advance, or may be different values set for the above-mentioned different performance indexes after comprehensive evaluation of the above-mentioned performance indexes. For example, if the best performance of the first speaker is lower than the best performance of the second speaker, then the preset performance may be the best performance of the first speaker. Specifically, the maximum rated power of the first speaker may be set as the preset performance; or a value obtained by weighted summation of performance characteristics corresponding to the first speaker may be set as the preset performance, which is not specifically limited here.
可选的,预设性能也可以为通过建模方式来确定,匹配第一扬声器和第二扬声器的性能均衡点,将该性能均衡点对应的性能作为预设性能。具体的,匹配第一扬声器的最佳性能和调整第二扬声器至性能接近时,为确定的预设性能。Optionally, the preset performance may also be determined by modeling, match the performance balance point of the first speaker and the second speaker, and use the performance corresponding to the performance balance point as the preset performance. Specifically, when matching the best performance of the first speaker and adjusting the performance of the second speaker so that the performance is close, it is a determined preset performance.
其中,在通过建模方式确定预设性能时,由于第一扬声器的最佳性能低于第二扬声器的最佳性能,因此,可以先将第一扬声器和第二扬声器的性能分别调整至各自对应的最佳性能后,保持第一扬声器的最佳性能不变,再逐步降低第二扬声器的性能,找到第一扬声器和第二扬声器的性能均衡点,从而将该性能均衡点对应的性能确定为预设性能。Wherein, when determining the preset performance by modeling, since the best performance of the first speaker is lower than the best performance of the second speaker, the performance of the first speaker and the second speaker can be adjusted to their corresponding After the best performance of the first speaker, keep the best performance of the first speaker unchanged, and then gradually reduce the performance of the second speaker, find the performance balance point of the first speaker and the second speaker, and then determine the performance corresponding to the performance balance point as Default performance.
进一步的,对于大部分用户而言,在用电子设备的音频外放功能时,在比较安静的环境中,更在意声音的质量,即需要扬声器输出的效果声扬均衡,声音清晰舒适;而在嘈杂环境中,往往会把音量键调整到最大,需要更大的响度来满足用户可以获取电子设备外放的声音内容,对声扬和音质的需求会降低。为了可以改善非对称立体声效果,提升电子设备的外放效果,可以通过两个智能功率放大器来分别驱动第一扬声器和第二扬声器工作,并分别为第一扬声器和第二扬声器设置单独的音量曲线配置,从而使得在用户调整音量键时,第一扬声器和第二扬声器由原来的同步变化切换为单独变化,使得第一扬声器和第二扬声器随音量键的变化而单独降低或保持输出效果,从而在大部分场景下非对称声扬器也能输出均衡的立体声效果。也就是说,当检测到用户调整音量键时,根据音量键的调整,通过两个扬声器各自对应的音量曲线配置,将第一扬声器输出的音量调节至其对应的音量曲线中对应音量级数对应的音量大小;将第二扬声器输出的音量调节至其对应的音量曲线中对应音量级数对应的音量大小。Furthermore, for most users, when using the audio output function of electronic equipment, in a relatively quiet environment, they are more concerned about the quality of the sound, that is, the effect of the speaker output is required to be balanced, and the sound is clear and comfortable; while in a noisy environment In the environment, the volume key is often adjusted to the maximum, and greater loudness is required to satisfy the user to obtain the sound content of the electronic device, and the demand for sound and sound quality will be reduced. In order to improve the asymmetric stereo effect and enhance the loudspeaker effect of electronic equipment, two smart power amplifiers can be used to drive the first speaker and the second speaker respectively, and set separate volume curves for the first speaker and the second speaker Configuration, so that when the user adjusts the volume key, the first speaker and the second speaker switch from the original synchronous change to an independent change, so that the first speaker and the second speaker independently reduce or maintain the output effect with the change of the volume key, thereby Asymmetric speakers can also output balanced stereo effects in most scenarios. That is to say, when it is detected that the user adjusts the volume key, according to the adjustment of the volume key, through the corresponding volume curve configurations of the two speakers, the volume output by the first speaker is adjusted to correspond to the corresponding volume level in the corresponding volume curve. the volume of the second loudspeaker; adjust the volume output by the second speaker to the volume corresponding to the corresponding volume level in the corresponding volume curve.
在本申请实施例中,第一扬声器和第二扬声器对应的音量曲线配置不同。其中,音量曲线用于表征音量级数和音量大小之间的线性关系。音量级数和音量键的调整对应,音量级数中的每一级对应音量键的一次调节。也就是说,音量键调节一次,音量级数变换一次。In the embodiment of the present application, volume curve configurations corresponding to the first speaker and the second speaker are different. Among them, the volume curve is used to represent the linear relationship between the volume level and the volume. The volume level corresponds to the adjustment of the volume key, and each level in the volume level corresponds to one adjustment of the volume key. That is to say, the volume key is adjusted once, and the volume level is changed once.
示例性的,如图5所示,图5为为第一扬声器和第二扬声器单独设置的音量曲线。其中,图5中的上扬声器为本申请实施例中的第一扬声器,图5中的下扬声器为本申请实施例中的第二扬声器。从图5中的数据可以看出,第一扬声器和第二扬声器各自对应的音量曲线不同,同一个音量级数对应的音量大小不同。通过图5中的数据还可以知道,在音量级数为12时,第一扬声器的性能达到最佳性能,和第二扬声器的性能接近,因此可以将音量级数12确定为性能均衡点,将该性能均衡点对应的性能确定为预设性能。Exemplarily, as shown in FIG. 5 , FIG. 5 is a volume curve separately set for the first speaker and the second speaker. Wherein, the upper speaker in FIG. 5 is the first speaker in the embodiment of the present application, and the lower speaker in FIG. 5 is the second speaker in the embodiment of the present application. It can be seen from the data in FIG. 5 that the volume curves corresponding to the first speaker and the second speaker are different, and the volume levels corresponding to the same volume level are different. It can also be known from the data in Figure 5 that when the volume level is 12, the performance of the first speaker reaches the best performance, which is close to the performance of the second speaker, so the
作为一种方式,当检测到第二扬声器的性能高于预设性能,且第一扬声器的性能处于最高性能时,若检测到音量级数的变化,保持第一扬声器输出的音量保持不变。也就是说,检测到第一扬声器和第二扬声器的性能均在性能均衡点对应的性能以上,则控制第一扬声器的性能保持不变。无论是检测到音量级数的增加,还是检测到音量级数的降低,第一扬声器的性能均保持不变。As a manner, when it is detected that the performance of the second speaker is higher than the preset performance and the performance of the first speaker is at the highest performance, if a change in the volume level is detected, the volume output by the first speaker remains unchanged. That is to say, if it is detected that the performances of the first speaker and the second speaker are both above the performance corresponding to the performance balance point, then the performance of the first speaker is controlled to remain unchanged. Whether an increase or a decrease in the volume level is detected, the performance of the first speaker remains the same.
步骤S120:同时控制所述第二扬声器输出的音量随所述音量级数的变化而变化。Step S120: Simultaneously controlling the volume output by the second speaker to vary with the volume level.
在本申请实施例中,当检测到音量级数变化时,控制第二扬声器输出的音量随音量级数的变化而变化。具体的,若检测到音量级数增加,控制第二扬声器输出的音量增加;若检测到音量级数降低,控制第二扬声器输出的音量降低。通过上述方式,可以尽可能保证第一扬声器和第二扬声器均衡输出,同时在大音量时充分发挥第二扬声器的性能以提升整体响度满足用户需求。In the embodiment of the present application, when a change in the volume level is detected, the volume output by the second speaker is controlled to change according to the change in the volume level. Specifically, if it is detected that the volume level increases, the volume output by the second speaker is controlled to increase; if it is detected that the volume level decreases, the volume output by the second speaker is controlled to decrease. Through the above method, the balanced output of the first speaker and the second speaker can be guaranteed as much as possible, and at the same time, the performance of the second speaker can be fully utilized at high volume to improve the overall loudness to meet user needs.
本申请提供的一种扬声器控制方法,在第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,控制第一扬声器输出的音量保持不变,同时控制第二扬声器输出的音量随音量级数的变化而变化。通过上述方法,在第二扬声器的性能超过预设性能的情况下,响应于音量级数的变化,控制第一扬声器的输出保持恒定,同时充分提升第二扬声器的性能,从而使得第一扬声器和第二扬声器能输出均衡的立体声效果,提升了用户体验。A speaker control method provided by the present application, in the case that the performance of the second speaker is higher than the preset performance, in response to the change of the volume level, the volume output by the first speaker is controlled to remain unchanged, and the output of the second speaker is controlled at the same time The volume of the volume changes with the change of the volume level. Through the above method, when the performance of the second speaker exceeds the preset performance, in response to the change of the volume level, the output of the first speaker is controlled to remain constant, and at the same time, the performance of the second speaker is fully improved, so that the first speaker and the The second speaker can output a balanced stereo effect, which improves the user experience.
请参阅图6,本申请实施例提供的一种扬声器控制方法,应用于如图1所示的电子设备,所述方法包括:Please refer to FIG. 6, a loudspeaker control method provided by an embodiment of the present application is applied to the electronic device shown in FIG. 1, and the method includes:
步骤S210:在所述第二扬声器的性能低于所述预设性能的情况下,响应于所述音量级数的变化,控制所述第一扬声器输出的音量和所述第二扬声器输出的音量随所述音量级数的变化而同步变化。Step S210: In the case that the performance of the second speaker is lower than the preset performance, in response to the change of the volume level, control the volume output by the first speaker and the volume output by the second speaker It changes synchronously with the change of the volume level.
在本申请实施例中,若检测到第二扬声器的性能低于预设性能,且第一扬声器的性能也低于该预设性能,则响应于音量级数的变化,控制第一扬声器和第二扬声器输出的音量均随音量级数的变化而同步变化。In the embodiment of the present application, if it is detected that the performance of the second speaker is lower than the preset performance, and the performance of the first speaker is also lower than the preset performance, the first speaker and the second speaker are controlled in response to the change of the volume level. The output volume of the two speakers changes synchronously with the change of the volume level.
作为一种方式,控制所述第一扬声器输出的音量和所述第二扬声器输出的音量随所述音量级数的变化而同步变化,包括:控制所述第一扬声器输出的音量和所述第二扬声器输出的音量随所述音量级数的降低,同时衰减相同幅度;或者,控制所述第一扬声器输出的音量和所述第二扬声器输出的音量随所述音量级数的增加,同时增加相同幅度。As a manner, controlling the volume output by the first speaker and the volume output by the second speaker to change synchronously with the change of the volume level includes: controlling the volume output by the first speaker and the volume output by the second speaker The volume output by the two loudspeakers is simultaneously attenuated by the same magnitude as the volume level decreases; or, the volume output by the first speaker and the volume output by the second speaker are controlled to increase simultaneously with the increase in the volume level same magnitude.
也就是说,在上述情况下,若检测到音量级数降低,则同时降低第一扬声器和第二扬声器输出的音量;若检测到音量级数增加,则同时增加第一扬声器和第二扬声器输出的音量。That is to say, in the above case, if it is detected that the volume level decreases, the volume output by the first speaker and the second speaker will be reduced at the same time; if the volume level is detected to increase, the output volume of the first speaker and the second speaker will be increased volume.
本申请提供的一种扬声器控制方法,在第二扬声器的性能低于预设性能的情况下,响应于音量级数的变化,控制第一扬声器输出的音量和第二扬声器输出的音量随音量级数的变化而同步变化。通过上述方法,在第二扬声器的性能低于第一扬声器的最佳性能的情况下,控制第一扬声器和第二扬声器输出的音量同步变化,可以使得第一扬声器和第二扬声器可以输出均衡的立体声效果,提升用户体验。In the speaker control method provided by the present application, when the performance of the second speaker is lower than the preset performance, in response to the change of the volume level, the volume output by the first speaker and the volume output by the second speaker are controlled with the volume level. The change of the number changes synchronously. Through the above method, when the performance of the second speaker is lower than the best performance of the first speaker, the volumes output by the first speaker and the second speaker are controlled to change synchronously, so that the first speaker and the second speaker can output balanced Stereo effect to enhance user experience.
请参阅图7,本申请实施例提供的一种扬声器控制方法,应用于如图1所示的电子设备,所述方法包括:Please refer to FIG. 7, a loudspeaker control method provided by an embodiment of the present application is applied to the electronic device shown in FIG. 1, and the method includes:
步骤S310:获取所述第一扬声器的最佳性能。Step S310: Obtain the best performance of the first speaker.
步骤S320:将所述最佳性能作为所述预设性能。Step S320: Use the best performance as the preset performance.
在本申请实施例中,可以将第一扬声器的最佳性能直接作为预设性能。In the embodiment of the present application, the best performance of the first speaker may be directly used as the preset performance.
步骤S330:在所述第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,通过所述第一功率放大器驱动所述第一扬声器工作,以控制所述第一扬声器输出的音量保持不变。Step S330: When the performance of the second speaker is higher than the preset performance, in response to the change of the volume level, drive the first speaker to work through the first power amplifier, so as to control the first speaker The volume of the output remains unchanged.
在本申请实施例中,为了提升电子设备的外放效果。可以通过两个功率放大器来驱动不同的扬声器工作。具体的,如图8所示,图8为本申请实施例中的驱动电路示意图。在本申请实施例中,驱动电路可以微控制单元(Microcontroller Unit,MCU)、第一功率放大器(PA1)、第二功率放大器(PA2)、第一扬声器(SPK1)以及第二扬声器(SPK2)。其中,微控制单元可以通过I2C总线分别为第一功率放大器(PA1)和第二功率放大器(PA2)进行选址。同时,微控制单元可以通过集成电路内置音频总线(Inter-IC Sound,I2S)连接第一功率放大器(PA1)、第二功率放大器(PA2)、第一扬声器(SPK1)以及第二扬声器(SPK2)。其中,在连接时,如图9所示,微控制单元、第一功率放大器(PA1)和第一扬声器(SPK1)形成一条通路,以通过第一功率放大器(PA1)驱动第一扬声器(SPK1);微控制单元、第二功率放大器(PA2)和第二扬声器(SPK2)形成一条通路,以通过第二功率放大器(PA2)和第二扬声器(SPK2)。In the embodiment of the present application, in order to improve the external playback effect of the electronic device. Different speakers can be driven by two power amplifiers. Specifically, as shown in FIG. 8 , FIG. 8 is a schematic diagram of a driving circuit in an embodiment of the present application. In the embodiment of the present application, the driving circuit may be a Microcontroller Unit (MCU), a first power amplifier (PA1), a second power amplifier (PA2), a first speaker (SPK1) and a second speaker (SPK2). Wherein, the micro control unit can respectively select addresses for the first power amplifier (PA1) and the second power amplifier (PA2) through the I2C bus. At the same time, the micro control unit can connect the first power amplifier (PA1), the second power amplifier (PA2), the first speaker (SPK1) and the second speaker (SPK2) through the integrated circuit built-in audio bus (Inter-IC Sound, I2S) . Wherein, when connected, as shown in Figure 9, the micro control unit, the first power amplifier (PA1) and the first speaker (SPK1) form a path to drive the first speaker (SPK1) through the first power amplifier (PA1) ; The micro control unit, the second power amplifier (PA2) and the second speaker (SPK2) form a path to pass through the second power amplifier (PA2) and the second speaker (SPK2).
在本申请实施例中,第一功率放大器和第二功率放大器中配置有单独的音量曲线,用于满足不同场景下为扬声器提供不同的音频参数,为用户提供更好的声音效果。In the embodiment of the present application, separate volume curves are configured in the first power amplifier and the second power amplifier to provide speakers with different audio parameters in different scenarios and provide users with better sound effects.
作为一种方式,在通过第一功率放大器驱动第一扬声器工作,以控制第一扬声器输出的音量保持不变时,可以控制第一功率放大器以恒定功率驱动第一扬声器工作,从而控制第一扬声器输出的音量保持不变。As a method, when the first speaker is driven by the first power amplifier to control the output volume of the first speaker to remain constant, the first power amplifier can be controlled to drive the first speaker to work with a constant power, thereby controlling the first speaker The volume of the output remains unchanged.
步骤S340:同时通过所述第二功率放大器驱动所述第二扬声器工作,以控制所述第二扬声器输出的音量随所述音量级数的变化而变化。Step S340: Simultaneously drive the second speaker to work through the second power amplifier, so as to control the output volume of the second speaker to change with the change of the volume level.
在本申请实施例中,在通过第二功率放大器驱动第二扬声器工作,以控制第二扬声器输出的音量随音量级数的变化而变化时,可以控制第二功率放大器以不同的功率驱动第二扬声器工作,从而控制第二扬声器在不同的功率下输出不同大小的音量。In the embodiment of the present application, when the second speaker is driven by the second power amplifier to control the output volume of the second speaker to change with the volume level, the second power amplifier can be controlled to drive the second speaker with different power. The loudspeaker works so as to control the second loudspeaker to output volumes of different sizes under different powers.
本申请提供的一种扬声器控制方法,首先获取第一扬声器的最佳性能,将该最佳性能最为预设性能,然后在第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,通过第一功率放大器驱动第一扬声器工作,以控制第一扬声器输出的音量保持不变,同时通过第二功率放大器驱动第二扬声器工作,以控制第二扬声器输出的音量随音量级数的变化而变化。通过上述方法,通过不同的功率放大器对不同的扬声器进行驱动,可以确保在使用电子设备的外放功能时,有足够的驱动能力,保障最优的系统音效。再者,在第二扬声器的性能超过预设性能的情况下,响应于音量级数的变化,控制第一扬声器的输出保持恒定,同时充分提升第二扬声器的性能,从而使得第一扬声器和第二扬声器能输出均衡的立体声效果,提升了用户体验。In a speaker control method provided by the present application, the best performance of the first speaker is obtained first, and the best performance is set as the preset performance, and then when the performance of the second speaker is higher than the preset performance, responding to the volume level The number changes, the first speaker is driven by the first power amplifier to control the output volume of the first speaker to remain constant, and the second speaker is driven by the second power amplifier to control the output volume of the second speaker with the volume level. changes with the number. Through the above method, different speakers are driven by different power amplifiers, which can ensure sufficient driving capability when using the external speaker function of the electronic device, and ensure optimal system sound effects. Furthermore, when the performance of the second speaker exceeds the preset performance, in response to the change of the volume level, the output of the first speaker is controlled to remain constant, and at the same time, the performance of the second speaker is fully improved, so that the first speaker and the second speaker The two speakers can output a balanced stereo effect, which improves the user experience.
请参阅图9,本申请实施例提供的一种扬声器控制方法,应用于如图1所示的电子设备,所述方法包括:Please refer to FIG. 9, a loudspeaker control method provided in an embodiment of the present application is applied to the electronic device shown in FIG. 1, and the method includes:
步骤S410:获取当前的外放场景。Step S410: Obtain the current playback scene.
在本申请实施例中,在不同的外放场景中,用户对立体声效果的要求是不同的,因此可以预先为不同的外放场景设置不同的音频参数,以满足不同外放场景下用户对立体声效果的不同需求。In the embodiment of this application, in different playback scenarios, users have different requirements for stereo effects, so different audio parameters can be set in advance for different playback scenarios to meet the needs of users in different playback scenarios. Different needs for effects.
作为一种方式,外放场景可以包括听音乐场景、看视频场景、打电话场景等,在此不做具体限定。每一种外放场景通常可以与电子设备中的某个应用程序关联,因此,可以通过检测电子设备中正在运行的应用程序来确定当前的外放场景。比如,看视频场景可以与电子设备中的视频播放应用程序关联,因此,可以通过检测电子设备中的视频播放应用程序是否在运行来确定当前是否为视频播放场景。As a manner, the external playback scene may include a music listening scene, a video watching scene, a phone call scene, etc., which are not specifically limited here. Each playing scene can usually be associated with a certain application program in the electronic device, therefore, the current playing scene can be determined by detecting the running application program in the electronic device. For example, watching a video scene may be associated with a video playing application in the electronic device, therefore, it may be determined whether the current video playing scene is by detecting whether the video playing application in the electronic device is running.
可选的,也可以为不同的外放场景设置不同的场景标识,进而通过确定是否检测到对应的应用标识来确定当前的外放场景具体是哪一种。Optionally, it is also possible to set different scene identifiers for different playback scenarios, and then determine which one is the current playback scenario by determining whether the corresponding application identifier is detected.
当然确定当前的外放场景的方式可以在检测到电子设备处于外放模式的情况下执行。Of course, the manner of determining the current playback scene may be performed when it is detected that the electronic device is in the playback mode.
在本申请实施例中,电子设备中可以设置一个目标控件,用于控制电子设备是否切换到外放模式。当检测到目标控件处于第一状态时,确定电子设备处于外放模式,当检测到目标控件处于第二状态时,确定电子设备未处于外放模式。其中,第一状态表征目标控件处于运行状态,第二状态表征目标控件处于空闲状态。In the embodiment of the present application, a target control may be set in the electronic device to control whether the electronic device switches to the external playback mode. When it is detected that the target control is in the first state, it is determined that the electronic device is in the external release mode; when it is detected that the target control is in the second state, it is determined that the electronic device is not in the external release mode. Wherein, the first state indicates that the target control is in the running state, and the second state indicates that the target control is in the idle state.
步骤S420:获取与所述外放场景对应的音频参数。Step S420: Obtain audio parameters corresponding to the playback scene.
在本申请实施例中,音频参数可以包括声道数、量化位数、采样频率以及码率等。在不同的外放场景中,上述音频参数的值可以设置得不同。In the embodiment of the present application, the audio parameters may include the number of channels, quantization bits, sampling frequency, bit rate, and so on. In different playback scenarios, the values of the above audio parameters may be set differently.
作为一种方式,可以预先建立外放场景和音频参数的对应关系,进而在确定了当前的外放场景后,可以通过该对应关系确定对应的音频参数。As a manner, the corresponding relationship between the playback scene and the audio parameter can be established in advance, and then after the current playback scene is determined, the corresponding audio parameter can be determined through the corresponding relationship.
步骤S430:在所述第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,基于所述音频参数,通过所述第一功率放大器驱动所述第一扬声器以所述音频参数工作,以控制所述第一扬声器输出的音量保持不变。Step S430: In the case that the performance of the second speaker is higher than the preset performance, in response to the change of the volume level, based on the audio parameter, drive the first speaker to the The audio parameter works to control the output volume of the first speaker to remain constant.
在本申请实施例中,在确定了当前外放场景对应的音频参数后,可以通过第一功率放大器驱动第一扬声器以该音频参数进行工作,并且在检测到第二扬声器的性能高于预设性能的情况下,响应于音量键的调整,控制第一扬声器输出的音量保持不变。In the embodiment of the present application, after determining the audio parameters corresponding to the current loudspeaker scene, the first speaker can be driven by the first power amplifier to work with the audio parameters, and when it is detected that the performance of the second speaker is higher than the preset In the case of performance, in response to the adjustment of the volume key, the volume of the output of the first speaker is controlled to remain constant.
步骤S440:同时基于所述音频参数,通过所述第二功率放大器驱动所述第二扬声器以所述音频参数工作,以控制所述第二扬声器输出的音量随所述音量级数的变化而变化。Step S440: At the same time, based on the audio parameter, drive the second speaker to work with the audio parameter through the second power amplifier, so as to control the volume output by the second speaker to change with the change of the volume level .
在本申请实施例中,在确定了当前外放场景对应的音频参数后,可以通过第二功率放大器驱动第二扬声器以该音频参数进行工作,并且在检测到第二扬声器的性能高于预设性能的情况下,响应于音量键的调整,控制第二扬声器输出的音量随音量键的调整而动态变化。In the embodiment of the present application, after determining the audio parameters corresponding to the current loudspeaker scene, the second speaker can be driven by the second power amplifier to work with the audio parameters, and when it is detected that the performance of the second speaker is higher than the preset In the case of performance, in response to the adjustment of the volume key, the volume output by the second speaker is controlled to dynamically change with the adjustment of the volume key.
本申请提供的一种扬声器控制方法,首先获取当前的外放场景,然后获取与该外放场景对应的音频参数,从而在第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,基于音频参数,通过第一功率放大器驱动第一扬声器以该音频参数工作,以控制第二扬声器输出的音量保持不变,同时基于该音频参数,通过第二功率放大器驱动第二扬声器以该音频参数工作,以控制第二扬声器输出的音量随音量级数的变化而变化。通过上述方式,在不同的外放场景,通过不同的音频参数来控制扬声器工作,从而可以保证不同外放场景下的音效。再者在第二扬声器的性能超过预设性能的情况下,响应于音量级数的变化,控制第一扬声器的输出保持恒定,同时充分提升第二扬声器的性能,从而使得第一扬声器和第二扬声器能输出均衡的立体声效果,提升了用户体验。A loudspeaker control method provided by the present application first acquires the current loudspeaker scene, and then acquires the audio parameters corresponding to the loudspeaker scene, so that when the performance of the second loudspeaker is higher than the preset performance, in response to the volume level Based on the audio parameter, the first speaker is driven by the first power amplifier to work with the audio parameter to control the output volume of the second speaker to remain constant, and at the same time, based on the audio parameter, the second speaker is driven by the second power amplifier Work with this audio parameter to control the output volume of the second speaker to change with the volume level. Through the above method, different audio parameters are used to control the work of the loudspeaker in different loudspeaking scenes, so as to ensure sound effects in different loudspeaking scenes. Furthermore, when the performance of the second speaker exceeds the preset performance, in response to the change of the volume level, the output of the first speaker is controlled to remain constant, and at the same time, the performance of the second speaker is fully improved, so that the first speaker and the second speaker The speaker can output a balanced stereo effect, which improves the user experience.
请参阅图10,本申请实施例提供的一种扬声器控制方法,应用于如图1所示的电子设备,所述方法包括:Please refer to FIG. 10, a loudspeaker control method provided in the embodiment of the present application is applied to the electronic device shown in FIG. 1, and the method includes:
步骤S510:获取当前的外放场景。Step S510: Obtain the current playback scene.
步骤S520:获取与所述外放场景对应的音频参数。Step S520: Obtain audio parameters corresponding to the playback scene.
步骤S530:在所述第二扬声器的性能低于所述预设性能的情况下,响应于音量级数的变化,基于所述音频参数,通过所述第一功率放大器驱动所述第一扬声器以所述音频参数工作,通过所述第二功率放大驱动所述第二声扬器以所述音频参数工作,以控制所述第一扬声器输出的音量和所述第二扬声器输出的音量随所述音量级数的变化而同步变化。Step S530: In the case that the performance of the second speaker is lower than the preset performance, in response to a change in the volume level, based on the audio parameter, drive the first speaker through the first power amplifier to The audio parameter works, and the second speaker is driven to work with the audio parameter through the second power amplification, so as to control the volume output by the first speaker and the volume output by the second speaker with the volume The change of the series changes synchronously.
在本申请实施例中,在确定了当前外放场景对应的音频参数后,可以通过第一功率放大器驱动第一扬声器以该音频参数进行工作,同时通过第二功率放大器驱动第二扬声器以该音频参数进行工作。In this embodiment of the application, after determining the audio parameters corresponding to the current loudspeaker scene, the first speaker can be driven by the first power amplifier to work with the audio parameters, and the second speaker can be driven by the second power amplifier to work with the audio parameters. parameters to work.
在检测到第二扬声器的性能低于预设性能的情况下,控制第一扬声器和第二扬声器输出的音量随音量键的调整而变化。When it is detected that the performance of the second speaker is lower than the preset performance, the volumes output by the first speaker and the second speaker are controlled to change with the adjustment of the volume key.
本申请提供的一种扬声器控制方法,首先获取当前的外放场景,然后获取与该外放场景对应的音频参数,从而在第二扬声器的性能低于预设性能的情况下,响应于音量级数的变化,控制第一扬声器输出的音量和第二扬声器输出的音量随音量级数的变化而同步变化。通过上述方法,在第二扬声器的性能低于第一扬声器的最佳性能的情况下,控制第一扬声器和第二扬声器输出的音量同步变化,可以使得第一扬声器和第二扬声器可以输出均衡的立体声效果,提升用户体验。A loudspeaker control method provided by the present application first acquires the current loudspeaker scene, and then acquires the audio parameters corresponding to the loudspeaker scene, so that when the performance of the second loudspeaker is lower than the preset performance, in response to the volume level The volume of the output of the first speaker and the volume of the second speaker are controlled to change synchronously with the change of the volume level. Through the above method, when the performance of the second speaker is lower than the best performance of the first speaker, the volumes output by the first speaker and the second speaker are controlled to change synchronously, so that the first speaker and the second speaker can output balanced Stereo effect to enhance user experience.
请参阅图11,本申请实施例提供的一种扬声器控制装置600,运行于电子设备,所述电子设备包括第一扬声器和第二扬声器,所述第一扬声器的性能低于所述第二扬声器的性能,所述装置600包括:Please refer to FIG. 11 , a speaker control device 600 provided by an embodiment of the present application runs on an electronic device, and the electronic device includes a first speaker and a second speaker, and the performance of the first speaker is lower than that of the second speaker. performance, the device 600 includes:
第一功率放大器610,用于在所述第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,控制所述第一扬声器输出的音量保持不变。The first power amplifier 610 is configured to control the output volume of the first speaker to remain constant in response to a change in the volume level when the performance of the second speaker is higher than a preset performance.
作为一种方式,第一功率放大器610具体用于在所述第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,通过所述第一功率放大器驱动所述第一扬声器工作,以控制所述第一扬声器输出的音量保持不变。As a manner, the first power amplifier 610 is specifically configured to drive the first loudspeaker through the first power amplifier in response to a change in the volume level when the performance of the second speaker is higher than a preset performance. The speaker works to control the output volume of the first speaker to remain constant.
可选的,第一功率放大器610具体用于获取当前的外放场景;获取与所述外放场景对应的音频参数;在所述第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,基于所述音频参数,通过所述第一功率放大器驱动所述第一扬声器以所述音频参数工作,以控制所述第二扬声器输出的音量保持不变。Optionally, the first power amplifier 610 is specifically used to acquire the current loudspeaker scene; acquire audio parameters corresponding to the loudspeaker scene; and respond to the The change of the volume level is based on the audio parameter, and the first power amplifier is used to drive the first speaker to work with the audio parameter, so as to control the output volume of the second speaker to remain unchanged.
第二功率放大器620,用于同时控制所述第二扬声器输出的音量随所述音量级数的变化而变化。The second power amplifier 620 is configured to simultaneously control the output volume of the second speaker to change with the change of the volume level.
作为一种方式,第二功率放大器620具体用于同时通过所述第二功率放大器驱动所述第二扬声器工作,以控制所述第二扬声器输出的音量随所述音量级数的变化而变化。As a manner, the second power amplifier 620 is specifically configured to drive the second speaker to work through the second power amplifier at the same time, so as to control the volume output by the second speaker to change with the change of the volume level.
可选的,第二功率放大器620还用于基于所述音频参数,通过所述第二功率放大器驱动所述第二扬声器以所述音频参数工作,以控制所述第二扬声器输出的音量随所述音量级数的变化而变化。Optionally, the second power amplifier 620 is also used to drive the second speaker to work with the audio parameter through the second power amplifier based on the audio parameter, so as to control the output volume of the second speaker to vary. Varies with changes in the volume levels described above.
请参阅图12,所述装置600还可以包括:Referring to FIG. 12, the device 600 may also include:
第三控制单元630,用于在所述第二扬声器的性能低于所述预设性能的情况下,响应于所述音量级数的变化,控制所述第一扬声器输出的音量和所述第二扬声器输出的音量随所述音量级数的变化而同步变化。The third control unit 630 is configured to control the volume output by the first speaker and the volume output by the second speaker in response to the change of the volume level when the performance of the second speaker is lower than the preset performance. The volume output by the two loudspeakers changes synchronously with the change of the volume level.
作为一种方式,第三控制单元630具体用于控制所述第一扬声器输出的音量和所述第二扬声器输出的音量随所述音量级数的降低,同时衰减相同幅度;或者,控制所述第一扬声器输出的音量和所述第二扬声器输出的音量随所述音量级数的增加,同时增加相同幅度。As a manner, the third control unit 630 is specifically configured to control the volume output by the first speaker and the volume output by the second speaker to decrease with the volume level, and attenuate the same range at the same time; or, control the The volume output by the first loudspeaker and the volume output by the second loudspeaker increase at the same time as the volume level increases.
性能获取单元640,用于获取所述第一扬声器的最佳性能;将所述最佳性能作为所述预设性能。The performance obtaining unit 640 is configured to obtain the best performance of the first speaker; use the best performance as the preset performance.
需要说明的是,本申请中装置实施例与前述方法实施例是相互对应的,装置实施例中具体的原理可以参见前述方法实施例中的内容,此处不再赘述。It should be noted that the device embodiments in this application correspond to the foregoing method embodiments, and the specific principles in the device embodiments can refer to the content in the foregoing method embodiments, which will not be repeated here.
下面将结合图13对本申请提供的一种电子设备进行说明。An electronic device provided by the present application will be described below with reference to FIG. 13 .
请参阅图13,基于上述的扬声器控制方法、装置,本申请实施例还提供的另一种可以执行前述扬声器控制方法的电子设备800。电子设备800包括相互耦合的一个或多个(图中仅示出一个)处理器802、存储器804以及网络模块806。其中,该存储器804中存储有可以执行前述实施例中内容的程序,而处理器802可以执行该存储器804中存储的程序。Referring to FIG. 13 , based on the above-mentioned speaker control method and apparatus, the embodiment of the present application also provides another
其中,处理器802可以包括一个或者多个处理核。处理器802利用各种接口和线路连接整个电子设备800内的各个部分,通过运行或执行存储在存储器804内的指令、程序、代码集或指令集,以及调用存储在存储器804内的数据,执行电子设备800的各种功能和处理数据。可选地,处理器802可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(ProgrammableLogic Array,PLA)中的至少一种硬件形式来实现。处理器802可集成中央处理器(CentralProcessing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器802中,单独通过一块通信芯片进行实现。Wherein, the
存储器804可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。存储器804可用于存储指令、程序、代码、代码集或指令集。存储器804可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备800在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The
所述网络模块806用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯,例如和音频播放设备进行通讯。所述网络模块806可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。所述网络模块806可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。例如,网络模块806可以与基站进行信息交互。The
请参考图14,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读存储介质900中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 14 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program codes are stored in the computer-readable storage medium 900, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.
计算机可读存储介质900可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质900包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质900具有执行上述方法中的任何方法步骤的程序代码910的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码910可以例如以适当形式进行压缩。The computer readable storage medium 900 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 900 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The computer-readable storage medium 900 has a storage space for
本申请提供的一种扬声器控制方法、装置、电子设备以及存储介质,在第二扬声器的性能高于预设性能的情况下,响应于音量级数的变化,控制第一扬声器输出的音量保持不变,同时控制第二扬声器输出的音量随音量级数的变化而变化。通过上述方法,在第二扬声器的性能超过预设性能的情况下,响应于音量级数的变化,控制第一扬声器的输出保持恒定,同时充分提升第二扬声器的性能,从而使得第一扬声器和第二扬声器能输出均衡的立体声效果,提升了用户体验。The present application provides a loudspeaker control method, device, electronic equipment, and storage medium. When the performance of the second loudspeaker is higher than the preset performance, the volume output by the first loudspeaker is controlled to keep constant in response to the change of the volume level. change, and at the same time control the output volume of the second speaker to change with the change of the volume level. Through the above method, when the performance of the second speaker exceeds the preset performance, in response to the change of the volume level, the output of the first speaker is controlled to remain constant, and at the same time, the performance of the second speaker is fully improved, so that the first speaker and the The second speaker can output a balanced stereo effect, which improves the user experience.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。Embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementations, and the above-mentioned specific implementations are only illustrative, rather than restrictive, and those of ordinary skill in the art will Under the enlightenment of the present invention, without departing from the gist of the present invention and the protection scope of the claims, many forms can also be made, all of which belong to the protection of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211305011.1A CN115550820A (en) | 2022-10-24 | 2022-10-24 | Loudspeaker control method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211305011.1A CN115550820A (en) | 2022-10-24 | 2022-10-24 | Loudspeaker control method, device, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115550820A true CN115550820A (en) | 2022-12-30 |
Family
ID=84718544
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211305011.1A Pending CN115550820A (en) | 2022-10-24 | 2022-10-24 | Loudspeaker control method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115550820A (en) |
-
2022
- 2022-10-24 CN CN202211305011.1A patent/CN115550820A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104521247B (en) | Hearing aid and noise resisting method and device for Bluetooth headset | |
CN102413402A (en) | Audio frequency control method of audio frequency output device and audio frequency output device | |
CN103078997A (en) | Mobile terminal volume setting method, system and mobile terminal | |
EP3038255B1 (en) | An intelligent volume control interface | |
CN106101350A (en) | A kind of mobile terminal and call method thereof | |
CN102857228A (en) | Electronic equipment and audio output control method thereof | |
CN102104815A (en) | Auto-tuning earphone and earphone tuning method | |
CN107621933B (en) | Audio playing method and device and related medium product | |
CN104618595A (en) | Call manner switching method and device | |
CN114143660B (en) | Wireless earphone control method and device and electronic equipment | |
CN111770404A (en) | Recording method, device, electronic device and readable storage medium | |
CN100531242C (en) | Sound reproduction device and method in portable electronic equipment | |
US20240015438A1 (en) | Managing low frequencies of an output signal | |
CN111552452A (en) | Method, apparatus and storage medium for matching audio output parameters | |
WO2023284406A1 (en) | Call method and electronic device | |
CN113347307B (en) | Method for suppressing leakage, related device and computer readable storage medium | |
CN111324331A (en) | Interactive message prompting method and device, electronic device and storage medium | |
WO2017156880A1 (en) | Terminal audio parameter management method, apparatus and system | |
CN102576560B (en) | electronic audio device | |
CN115550820A (en) | Loudspeaker control method, device, electronic device and storage medium | |
WO2023051083A1 (en) | Audio control method, electronic device, and audio playback system | |
CN105872182A (en) | Method for increasing sending loudness of microphone, and electronic terminal | |
CN105472128A (en) | Call control method and call control device | |
CN113689890B (en) | Method, device and storage medium for converting multichannel signal | |
JP2006157611A (en) | Terminal device and method of controlling same |
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 |