CN108024016A - volume adjusting method, device, storage medium and electronic equipment - Google Patents
volume adjusting method, device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN108024016A CN108024016A CN201711250473.7A CN201711250473A CN108024016A CN 108024016 A CN108024016 A CN 108024016A CN 201711250473 A CN201711250473 A CN 201711250473A CN 108024016 A CN108024016 A CN 108024016A
- Authority
- CN
- China
- Prior art keywords
- volume
- value
- initialization
- audio peripheral
- access
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/60—Substation equipment, e.g. for use by subscribers including speech amplifiers
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Environmental & Geological Engineering (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
本申请公开了一种音量调节方法、装置、存储介质及电子设备。所述音量调节方法包括:当进入音量初始化模式时,实时检测是否有音频外设接入,若检测到有音频外设接入,则获取所述音频外设的接入方式,根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。本申请实施例当接入音频外设时,通过将当前音量值自动调节至预设初始化值,以对电子设备的音量进行初始化处理,可以有效保护用户的听力。
The application discloses a volume adjustment method, device, storage medium and electronic equipment. The volume adjustment method includes: when entering the volume initialization mode, detect in real time whether there is an audio peripheral access, if it is detected that there is an audio peripheral access, then obtain the access mode of the audio peripheral, and according to the audio The preset initialization value corresponding to the access mode of the peripheral device is used to adjust the volume of the electronic device. In this embodiment of the present application, when an audio peripheral is connected, the current volume value is automatically adjusted to a preset initialization value to initialize the volume of the electronic device, which can effectively protect the user's hearing.
Description
技术领域technical field
本申请涉及移动通信技术领域,尤其涉及移动设备技术领域,具体涉及一种音量调节方法、装置、存储介质及电子设备。The present application relates to the technical field of mobile communication, in particular to the technical field of mobile equipment, and in particular to a volume adjustment method, device, storage medium and electronic equipment.
背景技术Background technique
随着电子技术的发展,人们在使用电子设备的过程中通常会利用音频外设来增强电子设备的视听体验,比如听音乐,看视频等。音频外设,比如耳机,是一对转换单元,通过接受媒体播放器或接收器所发出的电信号,利用贴近耳朵的扬声器将所述电信号转化成可以听到的音波。音频外设在接入时音量值可能存在偏大或偏小的情况。若音量偏大,则可能造成用户耳膜刺痛,产生耳鸣现象,损伤用户健康。若音量偏小,则需要用户手动去调节音量,造成中间一段音频信号传递不良的过渡期,影响用户体验。故需进一步改进。With the development of electronic technology, people usually use audio peripherals to enhance the audio-visual experience of electronic equipment during the use of electronic equipment, such as listening to music and watching videos. Audio peripherals, such as earphones, are a pair of conversion units that receive electrical signals from a media player or receiver and convert the electrical signals into audible sound waves using speakers close to the ear. When the audio peripherals are connected, the volume value may be too high or too low. If the volume is too high, it may cause the user's eardrum to tingle, produce tinnitus, and damage the user's health. If the volume is too low, the user needs to manually adjust the volume, resulting in a transitional period of poor audio signal transmission in the middle, affecting user experience. Therefore need further improvement.
发明内容Contents of the invention
本申请实施例提供一种音量调节方法、装置、存储介质及电子设备,能够有效保护用户的听力。Embodiments of the present application provide a volume adjustment method, device, storage medium, and electronic equipment, which can effectively protect a user's hearing.
本申请实施例提供一种音量调节方法,应用于电子设备中,所述方法包括:An embodiment of the present application provides a volume adjustment method, which is applied to an electronic device, and the method includes:
当进入音量初始化模式时,实时检测是否有音频外设接入;When entering the volume initialization mode, detect in real time whether there is an audio peripheral connected;
若检测到有音频外设接入,则获取所述音频外设的接入方式;If it is detected that an audio peripheral is connected, the access method of the audio peripheral is acquired;
根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。Adjust the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral.
本申请实施例还提供一种音量调节装置,所述装置包括:The embodiment of the present application also provides a volume adjustment device, the device includes:
检测模块,用于当进入音量初始化模式时,实时检测是否有音频外设接入;The detection module is used to detect in real time whether there is an audio peripheral access when entering the volume initialization mode;
第一获取模块,用于若检测到有音频外设接入,则获取所述音频外设的接入方式;The first obtaining module is used to obtain the access mode of the audio peripheral if it is detected that an audio peripheral is connected;
调节模块,用于根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。An adjustment module, configured to adjust the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral.
本申请实施例还提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如上所述的音量调节方法。The embodiment of the present application also provides a storage medium, on which a computer program is stored, and when the computer program is run on a computer, the computer is made to execute the volume adjustment method as described above.
本申请实施例还提供一种电子设备,包括存储器和处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行如上所述的音量调节方法。An embodiment of the present application further provides an electronic device, including a memory and a processor, and the processor is used to execute the volume adjustment method as described above by invoking a computer program stored in the memory.
本申请实施例通过当进入音量初始化模式时,实时检测是否有音频外设接入,若检测到有音频外设接入,则获取所述音频外设的接入方式,根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。本申请实施例当接入音频外设时,通过将当前音量值自动调节至预设初始化值,以对电子设备的音量进行初始化处理,可以有效保护用户的听力。In the embodiment of the present application, when entering the volume initialization mode, it is detected in real time whether there is an audio peripheral access, and if an audio peripheral access is detected, the access method of the audio peripheral is obtained, and according to the audio peripheral The preset initialization value corresponding to the access mode is used to adjust the volume of the electronic device. In the embodiment of the present application, when an audio peripheral is connected, the volume of the electronic device is initialized by automatically adjusting the current volume value to a preset initialization value, which can effectively protect the user's hearing.
附图说明Description of drawings
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其它有益效果显而易见。The technical solutions and other beneficial effects of the present application will be apparent through the detailed description of the specific embodiments of the present application below in conjunction with the accompanying drawings.
图1为本申请实施例提供的一种音量调节装置的应用场景示意图。FIG. 1 is a schematic diagram of an application scenario of a volume adjustment device provided by an embodiment of the present application.
图2为本申请实施例提供的一种音量调节方法的流程示意图。Fig. 2 is a schematic flow chart of a volume adjustment method provided by an embodiment of the present application.
图3为本申请实施例提供的一种音量调节方法的另一流程示意图。FIG. 3 is another schematic flowchart of a volume adjustment method provided by an embodiment of the present application.
图4为本申请实施例提供的一种音量调节方法的又一流程示意图。FIG. 4 is another schematic flow chart of a volume adjustment method provided by an embodiment of the present application.
图5为本申请实施例提供的一种音量调节方法的再一流程示意图。FIG. 5 is another schematic flowchart of a volume adjustment method provided by an embodiment of the present application.
图6为本申请实施例提供的一种音量调节装置的结构示意图。FIG. 6 is a schematic structural diagram of a volume adjustment device provided by an embodiment of the present application.
图7为本申请实施例提供的一种音量调节装置的另一结构示意图。FIG. 7 is another schematic structural diagram of a volume adjustment device provided by an embodiment of the present application.
图8为本申请实施例提供的一种音量调节装置的又一结构示意图。FIG. 8 is another schematic structural diagram of a volume adjustment device provided by an embodiment of the present application.
图9为本申请实施例提供的一种音量调节装置的再一结构示意图。FIG. 9 is another schematic structural diagram of a volume adjustment device provided by an embodiment of the present application.
图10为本申请实施例提供的一种电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图11为本申请实施例提供的一种电子设备的另一结构示意图。FIG. 11 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅用于解释本申请,而非对本申请的限定。另外,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific embodiments described here are only used to explain the present application, but not to limit the present application. In addition, for the convenience of description, only some structures related to the present application are shown in the drawings but not all structures. 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.
本申请中的术语“第一”和“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是可选地还包括没有列出的步骤或模块,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。The terms "first" and "second" in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but optionally also includes steps or modules that are not listed, or optionally includes For other steps or modules inherent in these processes, methods, products or devices.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
在现有技术中,音频外设在接入时音量值可能存在偏大或偏小的情况。若音量偏大,则可能造成用户耳膜刺痛,产生耳鸣现象,损伤用户健康。若音量偏小,则需要用户手动去调节音量,造成中间一段音频信号传递不良的过渡期,影响用户体验。其中,所述电子设备可以是智能手机、平板电脑、台式电脑、笔记本电脑、或者掌上电脑等设备。In the prior art, when an audio peripheral is connected, the volume value may be too high or too low. If the volume is too high, it may cause the user's eardrum to tingle, produce tinnitus, and damage the user's health. If the volume is too low, the user needs to manually adjust the volume, resulting in a transitional period of poor audio signal transmission in the middle, affecting user experience. Wherein, the electronic device may be a smart phone, a tablet computer, a desktop computer, a notebook computer, or a palmtop computer and the like.
具体的,请参阅图1,图1为本申请实施例提供的一种音量调节装置的应用场景示意图。可以在电子设备600中设置一个音量初始化的软件开关610,该软件开关610用于实现对音频外设音量初始化功能的管控。比如,若该软件开关610打开,电子设备600进入音量初始化模式,并实时检测是否有音频外设100接入,若检测到有音频外设100接入,则获取该音频外设100的接入方式,并根据该音频外设100的接入方式对应的预设初始化值,调节将该电子设备600的音量,在接入音频外设100时对电子设备600的音量执行初始化动作。若该软件开关610关闭,电子设备600的音量执行默认方案,比如,该默认方案为手动调节初始音量。Specifically, please refer to FIG. 1 . FIG. 1 is a schematic diagram of an application scenario of a volume adjustment device provided by an embodiment of the present application. A volume initialization software switch 610 may be set in the electronic device 600, and the software switch 610 is used to control the volume initialization function of the audio peripheral. For example, if the software switch 610 is turned on, the electronic device 600 enters the volume initialization mode, and detects in real time whether there is an audio peripheral 100 connected, and if it is detected that the audio peripheral 100 is connected, the access of the audio peripheral 100 is obtained mode, and according to the preset initialization value corresponding to the access mode of the audio peripheral 100, adjust the volume of the electronic device 600, and perform an initialization action on the volume of the electronic device 600 when the audio peripheral 100 is connected. If the software switch 610 is turned off, the volume of the electronic device 600 executes a default scheme, for example, the default scheme is to manually adjust the initial volume.
本申请实施例提供的一种音量调节方法的执行主体,可以为本申请实施例提供的一种音量调节装置,或者集成了所述音量调节装置的电子设备(譬如智能手机、平板电脑、台式电脑、笔记本电脑、智能穿戴设备等),所述音量调节装置可以采用硬件或者软件的方式实现。The execution subject of a volume adjustment method provided in the embodiment of the present application may be a volume adjustment device provided in the embodiment of the application, or an electronic device (such as a smart phone, a tablet computer, a desktop computer) that integrates the volume adjustment device , notebook computer, smart wearable device, etc.), the volume adjustment device can be realized by hardware or software.
请参阅图2,图2为本申请实施例提供的一种音量调节方法的流程示意图。所述方法应用于电子设备中,所述方法包括:Please refer to FIG. 2 . FIG. 2 is a schematic flowchart of a volume adjustment method provided by an embodiment of the present application. The method is applied in an electronic device, and the method includes:
步骤101,当进入音量初始化模式时,实时检测是否有音频外设接入。若是,则执行步骤102;若否,则执行步骤104。Step 101, when entering the volume initialization mode, detect in real time whether there is an audio peripheral connected. If yes, execute step 102; if not, execute step 104.
例如,如图1所示,可以在电子设备600中设置一个音量初始化的软件开关610,该软件开关610用于实现对音频外设音量初始化功能的管控。比如,若该软件开关610打开,电子设备600进入音量初始化模式,并实时检测是否有音频外设接入。若检测到有音频外设接入,则执行步骤102;若无音频外设接入,则执行步骤104。For example, as shown in FIG. 1 , a software switch 610 for volume initialization may be set in the electronic device 600 , and the software switch 610 is used to control the volume initialization function of the audio peripheral. For example, if the software switch 610 is turned on, the electronic device 600 enters the volume initialization mode, and detects in real time whether there is an audio peripheral connected. If it is detected that an audio peripheral is connected, then step 102 is performed; if no audio peripheral is connected, then step 104 is performed.
步骤102,获取所述音频外设的接入方式。Step 102, acquiring the access mode of the audio peripheral.
例如,音频外设可以包括有线音频外设和无线音频外设,比如该有线音频外设包括有线耳机、有线音箱等,比如该无线音频外设可以包括蓝牙耳机、蓝牙音箱、FM调频耳机、红外线无线耳机等。则音频外设的接入方式可以对应包括有线接入和无线接入。比如,无线接入可以包括蓝牙接入、红外线接入、FM调频接入等。For example, the audio peripherals can include wired audio peripherals and wireless audio peripherals, such as the wired audio peripherals include wired headphones, wired speakers, etc., such as the wireless audio peripherals can include Bluetooth headsets, Bluetooth speakers, FM FM headphones, infrared Wireless headphones and more. Then, the access mode of the audio peripheral may include wired access and wireless access. For example, wireless access may include Bluetooth access, infrared access, FM frequency modulation access, and the like.
步骤103,根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。Step 103, adjusting the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral.
其中,音频外设可以包括有线音频外设和无线音频外设,有线音频外设和无线音频外设对于同样的电子设备音量值,由于在传输过程中存在不同的路径损耗,因此两者最终传递到用户耳朵处的实际音量值是有差异的。因此,本申请实施例可以支持多种音频外设的初始化音量值的设置,即可以预先设置多个预设初始值。其中,预先设置的多个预设初始值与音频外设的不同接入方式相对应。Among them, the audio peripherals can include wired audio peripherals and wireless audio peripherals. For the same electronic device volume value, the wired audio peripherals and wireless audio peripherals have different path losses in the transmission process, so the two finally transmit The actual volume value to the user's ear is different. Therefore, the embodiment of the present application can support setting of initial volume values of various audio peripherals, that is, multiple preset initial values can be set in advance. Wherein, the preset multiple preset initial values correspond to different access modes of the audio peripherals.
例如,当电子设备检测到接入的是有线音频外设时,则调用有线音频外设对应的预设初始化值;当电子设备检测到接入的是无线音频外设时,则调用无线音频外设对应的预设初始化值。For example, when the electronic device detects that a wired audio peripheral is connected, it calls the preset initialization value corresponding to the wired audio peripheral; when the electronic device detects that a wireless audio peripheral is connected, it calls the wireless audio peripheral Set the corresponding preset initialization value.
在一些实施例中,若所述接入方式为有线接入,则将所述电子设备的当前音量值调节至有线初始化音量值;若所述接入方式为无线接入,则将所述电子设备的当前音量值调节至无线初始化音量值。In some embodiments, if the access method is wired access, adjust the current volume value of the electronic device to the wired initial volume value; if the access method is wireless access, then adjust the electronic device The current volume value of the device is adjusted to the wireless initialization volume value.
例如,有线初始化音量值与无线初始化音量值可以设置相同的值,也可以设置为不同的值。例如预先设置的有线初始化音量值大于无线初始化音量值,或者预先设置的有线初始化音量值小于无线初始化音量值。进一步的,无线初始化音量值还可以根据不同的无线接入方式进一步设置多个无线初始化音量值,比如由于蓝牙接入的音频外设的路径损耗小于红外线接入或者FM调频接入的音频外设的路径损耗,则可以预先设置蓝牙接入对应的无线初始化音量值小于红外线接入或者FM调频接入对应的无线初始化音量值。For example, the wired initialization volume value and the wireless initialization volume value may be set to the same value, or may be set to different values. For example, the preset wired initialization volume value is greater than the wireless initialization volume value, or the preset wired initialization volume value is smaller than the wireless initialization volume value. Further, the wireless initialization volume value can further set multiple wireless initialization volume values according to different wireless access methods, for example, because the path loss of the audio peripherals connected by Bluetooth is smaller than that of the audio peripherals connected by infrared rays or FM frequency modulation path loss, you can pre-set the wireless initialization volume value corresponding to Bluetooth access to be smaller than the wireless initialization volume value corresponding to infrared access or FM access.
在一些实施例中,预设初始值只在音频外设每次接入时调用,在接入音频外设时通过调用预设初始化值对电子设备进行音量初始化处理之后,自动退出音量初始化模式,以将音量调节权限则移交给用户,音量大小由用户自行调节。比如,电子设备600在接入音频外设100时通过调用预设初始化值对电子设备600进行音量初始化处理之后,自动关闭软件开关610。例如,还可以在音频外设100与电子设备600断开连接时,再次打开软件开关610,以使得电子设备600进入音量初始化模式,为音频外设100再次接入时的音量初始化做准备。In some embodiments, the preset initial value is only called every time the audio peripheral is connected, and after the volume initialization process is performed on the electronic device by calling the preset initialization value when the audio peripheral is connected, the volume initialization mode is automatically exited, The authority to adjust the volume is handed over to the user, and the volume is adjusted by the user. For example, when the electronic device 600 is connected to the audio peripheral 100 , the electronic device 600 automatically turns off the software switch 610 after performing volume initialization processing on the electronic device 600 by calling a preset initialization value. For example, when the audio peripheral 100 is disconnected from the electronic device 600, the software switch 610 can be turned on again, so that the electronic device 600 enters the volume initialization mode, and prepares for the volume initialization when the audio peripheral 100 is connected again.
步骤104,不进行音量初始化处理。Step 104, do not perform volume initialization processing.
其中,若无音频外设接入,则不调用任何预设初始化值,不进行音量初始化处理。Wherein, if no audio peripheral is connected, no preset initialization value is called, and volume initialization processing is not performed.
在一些实施例中,在所述获取所述音频外设的接入方式之后,还包括:In some embodiments, after the acquisition of the access mode of the audio peripheral, it further includes:
获取所述电子设备当前的应用场景;Obtaining the current application scenario of the electronic device;
根据所述音频外设的接入方式以及所述电子设备当前的应用场景对应的预设初始化值,调节将所述电子设备的音量。Adjust the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the current application scene of the electronic device.
在一些实施例中,在所述获取所述音频外设的接入方式之后,还包括:In some embodiments, after the acquisition of the access mode of the audio peripheral, it further includes:
获取所述音频外设的设备类型;Obtain the device type of the audio peripheral;
根据所述音频外设的接入方式以及所述设备类型对应的预设初始化值,调节将所述电子设备的音量。Adjust the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the device type.
在一些实施例中,在所述根据所述音频外设的接入方式对应的预设初始化值,调节所述电子设备的音量之后,还包括:In some embodiments, after adjusting the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral, it further includes:
退出所述音量初始化模式,并检测是否存在人工调节音量的情形;Exit the volume initialization mode, and detect whether there is a situation of manually adjusting the volume;
若存在人工调节音量的情形,则获取所述人工调节音量的人工调节次数以及人工调节音量值;If there is a situation of manually adjusting the volume, the number of times of manual adjustment of the manual volume adjustment and the value of the manual volume adjustment are obtained;
若所述人工调节次数以及人工调节音量值达到预设条件,则将所述预设初始化值更新为所述人工调节音量值的平均值。If the number of times of manual adjustment and the manually adjusted volume value reach a preset condition, the preset initialization value is updated to an average value of the manually adjusted volume value.
上述所有的技术方案,可以采用任意结合形成本申请的可选实施例,在此不再一一赘述。All the above-mentioned technical solutions may be combined in any way to form optional embodiments of the present application, which will not be repeated here.
本申请实施例通过当进入音量初始化模式时,实时检测是否有音频外设接入,若检测到有音频外设接入,则获取所述音频外设的接入方式,根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。本申请实施例当接入音频外设时,通过将当前音量值自动调节至预设初始化值,以对电子设备的音量进行初始化处理,可以有效保护用户的听力。In the embodiment of the present application, when entering the volume initialization mode, it is detected in real time whether there is an audio peripheral access, and if an audio peripheral access is detected, the access method of the audio peripheral is obtained, and according to the audio peripheral The preset initialization value corresponding to the access mode is used to adjust the volume of the electronic device. In the embodiment of the present application, when an audio peripheral is connected, the volume of the electronic device is initialized by automatically adjusting the current volume value to a preset initialization value, which can effectively protect the user's hearing.
请参阅图3,图3为本申请实施例提供的一种音量调节方法的另一流程示意图。所述方法还包括:Please refer to FIG. 3 . FIG. 3 is another schematic flowchart of a volume adjustment method provided by an embodiment of the present application. The method also includes:
步骤201,当进入音量初始化模式时,实时检测是否有音频外设接入。若是,则执行步骤202;若否,则执行步骤205。Step 201, when entering the volume initialization mode, detect in real time whether there is an audio peripheral connected. If yes, go to step 202; if not, go to step 205.
例如,如图1所示,可以在电子设备600中设置一个音量初始化的软件开关610,该软件开关610用于实现对音频外设音量初始化功能的管控。比如,若该软件开关610打开,电子设备600进入音量初始化模式,并实时检测是否有音频外设接入。若检测到有音频外设接入,则执行步骤202;若无音频外设接入,则执行步骤205。For example, as shown in FIG. 1 , a software switch 610 for volume initialization may be set in the electronic device 600 , and the software switch 610 is used to control the volume initialization function of the audio peripheral. For example, if the software switch 610 is turned on, the electronic device 600 enters the volume initialization mode, and detects in real time whether there is an audio peripheral connected. If it is detected that an audio peripheral is connected, then step 202 is performed; if no audio peripheral is connected, then step 205 is performed.
步骤202,获取所述音频外设的接入方式。Step 202, acquiring the access mode of the audio peripheral.
例如,音频外设可以包括有线音频外设和无线音频外设,比如该有线音频外设包括有线耳机、有线音箱等,比如该无线音频外设可以包括蓝牙耳机、蓝牙音箱、FM调频耳机、红外线无线耳机等。则音频外设的接入方式可以对应包括有线接入和无线接入。比如,无线接入可以包括蓝牙接入、红外线接入、FM调频接入等。For example, the audio peripherals can include wired audio peripherals and wireless audio peripherals, such as the wired audio peripherals include wired headphones, wired speakers, etc., such as the wireless audio peripherals can include Bluetooth headsets, Bluetooth speakers, FM FM headphones, infrared Wireless headphones and more. Then, the access mode of the audio peripheral may include wired access and wireless access. For example, wireless access may include Bluetooth access, infrared access, FM frequency modulation access, and the like.
步骤203,获取所述电子设备当前的应用场景。Step 203, acquiring the current application scenario of the electronic device.
其中,电子设备可以在多个应用场景中使用音频外设,例如,所述应用场景可以包括通话、音乐、视频、游戏等。用户在不同的应用场景中对音频外设的音量值的要求可以不相同。Wherein, the electronic device may use audio peripherals in multiple application scenarios, for example, the application scenarios may include call, music, video, game and so on. Users may have different requirements for volume values of audio peripherals in different application scenarios.
步骤204,根据所述音频外设的接入方式以及所述电子设备当前的应用场景对应的预设初始化值,调节将所述电子设备的音量。Step 204, adjust the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the current application scene of the electronic device.
其中,音频外设可以包括有线音频外设和无线音频外设,有线音频外设和无线音频外设对于同样的电子设备音量值,由于在传输过程中存在不同的路径损耗,因此两者最终传递到用户耳朵处的实际音量值是有差异的。而且,用户在不同的应用场景中对应不同的音量值带给用户的体验也不同,因此,本申请实施例可以支持多种音频外设的初始化音量值的设置,即可以预先设置多个预设初始值。其中,预先设置的多个预设初始值可以与音频外设的不同接入方式以及电子设备的不同应用场景相对应。例如,如表1所示,可以在电子设备中预先设置多个预设初始化值,其中,每一预设初始化值分别与所述音频外设的接入方式以及所述电子设备的应用场景相对应。Among them, the audio peripherals can include wired audio peripherals and wireless audio peripherals. For the same electronic device volume value, the wired audio peripherals and wireless audio peripherals have different path losses in the transmission process, so the two finally transmit The actual volume value to the user's ear is different. Moreover, users experience different experiences corresponding to different volume values in different application scenarios. Therefore, the embodiment of the present application can support the setting of initial volume values of various audio peripherals, that is, multiple presets can be preset. initial value. Wherein, the preset multiple preset initial values may correspond to different access modes of audio peripherals and different application scenarios of electronic devices. For example, as shown in Table 1, multiple preset initialization values can be preset in the electronic device, wherein each preset initialization value is respectively related to the access method of the audio peripheral and the application scenario of the electronic device. correspond.
表1Table 1
例如,当电子设备检测到接入的是有线音频外设时,则调用有线音频外设及当前的应用场景对应的预设初始化值。比如,音频外设的接入方式为有线接入,当前的应用场景为游戏,则调用预设初始化值d。当电子设备检测到接入的是无线音频外设时,则调用无线音频外设及当前的应用场景对应的预设初始化值。比如,音频外设的接入方式为无线接入,当前的应用场景为音乐,则调用预设初始化值f。For example, when the electronic device detects that a wired audio peripheral is connected, it invokes a preset initialization value corresponding to the wired audio peripheral and the current application scenario. For example, if the access mode of the audio peripheral is wired access, and the current application scenario is a game, the preset initialization value d is called. When the electronic device detects that the wireless audio peripheral is connected, it invokes the preset initialization value corresponding to the wireless audio peripheral and the current application scenario. For example, if the access method of the audio peripheral is wireless access, and the current application scenario is music, the preset initialization value f is called.
在一些实施例中,预设初始值只在音频外设每次接入时调用,在接入音频外设时通过调用预设初始化值对电子设备进行音量初始化处理之后,自动退出音量初始化模式,以将音量调节权限则移交给用户,音量大小由用户自行调节。比如,电子设备600在接入音频外设100时通过调用预设初始化值对电子设备600进行音量初始化处理之后,自动关闭软件开关610。例如,还可以在音频外设100与电子设备600断开连接时,再次打开软件开关610,以使得电子设备600进入音量初始化模式,为音频外设100再次接入时的音量初始化做准备。In some embodiments, the preset initial value is only called every time the audio peripheral is connected, and after the volume initialization process is performed on the electronic device by calling the preset initialization value when the audio peripheral is connected, the volume initialization mode is automatically exited, The authority to adjust the volume is handed over to the user, and the volume is adjusted by the user. For example, when the electronic device 600 is connected to the audio peripheral 100 , the electronic device 600 automatically turns off the software switch 610 after performing volume initialization processing on the electronic device 600 by calling a preset initialization value. For example, when the audio peripheral 100 is disconnected from the electronic device 600, the software switch 610 can be turned on again, so that the electronic device 600 enters the volume initialization mode, and prepares for the volume initialization when the audio peripheral 100 is connected again.
步骤205,不进行音量初始化处理。In step 205, the volume initialization process is not performed.
其中,若无音频外设接入,则不调用任何预设初始化值,不进行音量初始化处理。Wherein, if no audio peripheral is connected, no preset initialization value is called, and volume initialization processing is not performed.
本申请实施例通过当进入音量初始化模式时,实时检测是否有音频外设接入,若检测到有音频外设接入,则获取所述音频外设的接入方式以及所述电子设备当前的应用场景,根据所述音频外设的接入方式以及所述电子设备当前的应用场景对应的预设初始化值,调节将所述电子设备的音量。本申请实施例当接入音频外设时,根据所述音频外设的接入方式以及所述电子设备当前的应用场景对应的预设初始化值,对电子设备的音量进行初始化处理,可以有效保护用户的听力。In the embodiment of the present application, when entering the volume initialization mode, it is detected in real time whether there is an audio peripheral access, and if an audio peripheral access is detected, the access method of the audio peripheral and the current status of the electronic device are acquired. In the application scenario, the volume of the electronic device is adjusted according to the access mode of the audio peripheral and the preset initialization value corresponding to the current application scenario of the electronic device. In this embodiment of the present application, when an audio peripheral is connected, the volume of the electronic device is initialized according to the access method of the audio peripheral and the preset initialization value corresponding to the current application scene of the electronic device, which can effectively protect user's hearing.
请参阅图4,图4为本申请实施例提供的一种音量调节方法的又一流程示意图。所述方法包括:Please refer to FIG. 4 . FIG. 4 is another schematic flowchart of a volume adjustment method provided by an embodiment of the present application. The methods include:
步骤301,当进入音量初始化模式时,实时检测是否有音频外设接入。若是,则执行步骤302;若否,则执行步骤305。Step 301, when entering the volume initialization mode, detect in real time whether there is an audio peripheral connected. If yes, go to step 302; if not, go to step 305.
例如,如图1所示,可以在电子设备600中设置一个音量初始化的软件开关610,该软件开关610用于实现对音频外设音量初始化功能的管控。比如,若该软件开关610打开,电子设备600进入音量初始化模式,并实时检测是否有音频外设接入。若检测到有音频外设接入,则执行步骤302;若无音频外设接入,则执行步骤305。For example, as shown in FIG. 1 , a software switch 610 for volume initialization may be set in the electronic device 600 , and the software switch 610 is used to control the volume initialization function of the audio peripheral. For example, if the software switch 610 is turned on, the electronic device 600 enters the volume initialization mode, and detects in real time whether there is an audio peripheral connected. If it is detected that an audio peripheral is connected, step 302 is performed; if no audio peripheral is connected, step 305 is performed.
步骤302,获取所述音频外设的接入方式。Step 302, acquiring the access mode of the audio peripheral.
例如,音频外设可以包括有线音频外设和无线音频外设,比如该有线音频外设包括有线耳机、有线音箱等,比如该无线音频外设可以包括蓝牙耳机、蓝牙音箱、FM调频耳机、红外线无线耳机等。则音频外设的接入方式可以对应包括有线接入和无线接入。比如,无线接入可以包括蓝牙接入、红外线接入、FM调频接入等。For example, the audio peripherals can include wired audio peripherals and wireless audio peripherals, such as the wired audio peripherals include wired headphones, wired speakers, etc., such as the wireless audio peripherals can include Bluetooth headsets, Bluetooth speakers, FM FM headphones, infrared Wireless headphones and more. Then, the access mode of the audio peripheral may include wired access and wireless access. For example, wireless access may include Bluetooth access, infrared access, FM frequency modulation access, and the like.
步骤303,获取所述音频外设的设备类型。Step 303, acquiring the device type of the audio peripheral.
其中,所述音频外设可以包括多个设备类型。比如,所述设备类型包括耳机、音箱、功放机、多媒体控制台、调音台等。不同设备类型的音频外设所带来的音效及用途会存在差别。用户对不同设备类型的音频外设的要求可以不相同。Wherein, the audio peripherals may include multiple device types. For example, the device types include earphones, speakers, power amplifiers, multimedia consoles, mixers, and the like. The sound effects and uses of audio peripherals of different device types will be different. Users may have different requirements for audio peripherals of different device types.
步骤304,根据所述音频外设的接入方式以及所述设备类型对应的预设初始化值,调节将所述电子设备的音量。Step 304, adjust the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the device type.
其中,音频外设可以包括有线音频外设和无线音频外设,有线音频外设和无线音频外设对于同样的电子设备音量值,由于在传输过程中存在不同的路径损耗,因此两者最终传递到用户耳朵处的实际音量值是有差异的。而且,不同设备类型的音频外设所带来的音效及用途会存在差别,用户对不同设备类型的音频外设的要求可以不相同,因此,本申请实施例可以支持多种音频外设的初始化音量值的设置,即可以预先设置多个预设初始值。其中,预先设置的多个预设初始值可以与音频外设的不同接入方式以及不同设备类型相对应。例如,如表2所示,可以在电子设备中预先设置多个预设初始化值,其中,每一预设初始化值分别与所述音频外设的接入方式以及设备类型相对应。Among them, the audio peripherals can include wired audio peripherals and wireless audio peripherals. For the same electronic device volume value, the wired audio peripherals and wireless audio peripherals have different path losses in the transmission process, so the two finally transmit The actual volume value to the user's ear is different. Moreover, the sound effects and uses of audio peripherals of different device types will be different, and users may have different requirements for audio peripherals of different device types. Therefore, the embodiment of the present application can support the initialization of multiple audio peripherals The setting of the volume value means that multiple preset initial values can be set in advance. Wherein, the preset multiple preset initial values may correspond to different access modes of audio peripherals and different device types. For example, as shown in Table 2, multiple preset initialization values may be preset in the electronic device, where each preset initialization value corresponds to the access mode and device type of the audio peripheral.
表2Table 2
例如,当电子设备检测到接入的是有线音频外设时,则调用该有线音频外设的设备类型对应的预设初始化值。比如,音频外设的接入方式为有线接入,音频外设的设备类型为耳机,则调用预设初始化值A。当电子设备检测到接入的是无线音频外设时,则调用该无线音频外设的设备类型对应的预设初始化值。比如,音频外设的接入方式为无线接入,音频外设的设备类型为音箱,则调用预设初始化值G。For example, when the electronic device detects that a wired audio peripheral is connected, the preset initialization value corresponding to the device type of the wired audio peripheral is invoked. For example, if the access mode of the audio peripheral is wired access, and the device type of the audio peripheral is earphone, then the preset initialization value A is called. When the electronic device detects that a wireless audio peripheral is connected, the preset initialization value corresponding to the device type of the wireless audio peripheral is invoked. For example, if the access mode of the audio peripheral is wireless access, and the device type of the audio peripheral is a speaker, the preset initialization value G is called.
在一些实施例中,还可以进一步获取所述电子设备当前的应用场景,根据所述音频外设的接入方式和设备类型以及所述电子设备当前的应用场景对应的预设初始化值,调节将所述电子设备的音量。其中,可以预先设置多个预设初始值,预先设置的多个预设初始值可以与音频外设的不同接入方式和设备类型以及电子设备的不同应用场景相对应。例如,如表3所示,可以在电子设备中预先设置多个预设初始化值,其中,每一预设初始化值分别与所述音频外设的接入方式和设备类型以及所述电子设备的应用场景相对应。In some embodiments, the current application scenario of the electronic device may be further obtained, and the adjustment will be adjusted according to the access method and device type of the audio peripheral and the preset initialization value corresponding to the current application scenario of the electronic device The volume of the electronic device. Wherein, multiple preset initial values may be preset, and the preset multiple preset initial values may correspond to different access modes and device types of audio peripherals and different application scenarios of electronic devices. For example, as shown in Table 3, multiple preset initialization values can be preset in the electronic device, wherein each preset initialization value is related to the access method and device type of the audio peripheral and the electronic device's corresponding to the application scenario.
表3table 3
在一些实施例中,预设初始值只在音频外设每次接入时调用,在接入音频外设时通过调用预设初始化值对电子设备进行音量初始化处理之后,自动退出音量初始化模式,以将音量调节权限则移交给用户,音量大小由用户自行调节。比如,电子设备600在接入音频外设100时通过调用预设初始化值对电子设备600进行音量初始化处理之后,自动关闭软件开关610。例如,还可以在音频外设100与电子设备600断开连接时,再次打开软件开关610,以使得电子设备600进入音量初始化模式,为音频外设100再次接入时的音量初始化做准备。In some embodiments, the preset initial value is only called every time the audio peripheral is connected, and after the volume initialization process is performed on the electronic device by calling the preset initialization value when the audio peripheral is connected, the volume initialization mode is automatically exited, The authority to adjust the volume is handed over to the user, and the volume is adjusted by the user. For example, when the electronic device 600 is connected to the audio peripheral 100 , the electronic device 600 automatically turns off the software switch 610 after performing volume initialization processing on the electronic device 600 by calling a preset initialization value. For example, when the audio peripheral 100 is disconnected from the electronic device 600, the software switch 610 can be turned on again, so that the electronic device 600 enters the volume initialization mode, and prepares for the volume initialization when the audio peripheral 100 is connected again.
步骤305,不进行音量初始化处理。Step 305, do not perform volume initialization processing.
本申请实施例通过当进入音量初始化模式时,实时检测是否有音频外设接入,若检测到有音频外设接入,则获取所述音频外设的接入方式以及所述音频外设的设备类型,根据所述音频外设的接入方式以及所述设备类型对应的预设初始化值,调节将所述电子设备的音量。本申请实施例当接入音频外设时,根据所述音频外设的接入方式以及设备类型对应的预设初始化值,对电子设备的音量进行初始化处理,可以有效保护用户的听力。In the embodiment of the present application, when entering the volume initialization mode, it is detected in real time whether there is an audio peripheral access, and if an audio peripheral access is detected, the access method of the audio peripheral and the address of the audio peripheral are acquired. Device type, adjusting the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the device type. In this embodiment of the present application, when an audio peripheral is connected, the volume of the electronic device is initialized according to the access method of the audio peripheral and the preset initialization value corresponding to the device type, which can effectively protect the user's hearing.
请参阅图5,图5为本申请实施例提供的一种音量调节方法的再一流程示意图。所述方法包括:Please refer to FIG. 5 . FIG. 5 is another schematic flowchart of a volume adjustment method provided by an embodiment of the present application. The methods include:
步骤401,当进入音量初始化模式时,实时检测是否有音频外设接入。若是,则执行步骤402;若否,则执行步骤409。Step 401, when entering the volume initialization mode, detect in real time whether there is an audio peripheral connected. If yes, go to step 402; if not, go to step 409.
例如,如图1所示,可以在电子设备600中设置一个音量初始化的软件开关610,该软件开关610用于实现对音频外设音量初始化功能的管控。比如,若该软件开关610打开,电子设备600进入音量初始化模式,并实时检测是否有音频外设接入。若检测到有音频外设接入,则执行步骤402;若无音频外设接入,则执行步骤409。For example, as shown in FIG. 1 , a software switch 610 for volume initialization may be set in the electronic device 600 , and the software switch 610 is used to control the volume initialization function of the audio peripheral. For example, if the software switch 610 is turned on, the electronic device 600 enters the volume initialization mode, and detects in real time whether there is an audio peripheral connected. If it is detected that an audio peripheral is connected, step 402 is performed; if no audio peripheral is connected, step 409 is performed.
步骤402,获取所述音频外设的接入方式。Step 402, acquiring the access mode of the audio peripheral.
例如,音频外设可以包括有线音频外设和无线音频外设,比如该有线音频外设包括有线耳机、有线音箱等,比如该无线音频外设可以包括蓝牙耳机、蓝牙音箱、FM调频耳机、红外线无线耳机等。则音频外设的接入方式可以对应包括有线接入和无线接入。比如,无线接入可以包括蓝牙接入、红外线接入、FM调频接入等。For example, the audio peripherals can include wired audio peripherals and wireless audio peripherals, such as the wired audio peripherals include wired headphones, wired speakers, etc., such as the wireless audio peripherals can include Bluetooth headsets, Bluetooth speakers, FM FM headphones, infrared Wireless headphones and more. Then, the access mode of the audio peripheral may include wired access and wireless access. For example, wireless access may include Bluetooth access, infrared access, FM frequency modulation access, and the like.
步骤403,根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。Step 403, adjusting the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral.
其中,音频外设可以包括有线音频外设和无线音频外设,有线音频外设和无线音频外设对于同样的电子设备音量值,由于在传输过程中存在不同的路径损耗,因此两者最终传递到用户耳朵处的实际音量值是有差异的。因此,本申请实施例可以支持多种音频外设的初始化音量值的设置,即可以预先设置多个预设初始值。其中,预先设置的多个预设初始值与音频外设的不同接入方式相对应。Among them, the audio peripherals can include wired audio peripherals and wireless audio peripherals. For the same electronic device volume value, the wired audio peripherals and wireless audio peripherals have different path losses in the transmission process, so the two finally transmit The actual volume value to the user's ear is different. Therefore, the embodiment of the present application can support setting of initial volume values of various audio peripherals, that is, multiple preset initial values can be set in advance. Wherein, the preset multiple preset initial values correspond to different access modes of the audio peripherals.
例如,当电子设备检测到接入的是有线音频外设时,则调用有线音频外设对应的预设初始化值;当电子设备检测到接入的是无线音频外设时,则调用无线音频外设对应的预设初始化值。For example, when the electronic device detects that a wired audio peripheral is connected, it calls the preset initialization value corresponding to the wired audio peripheral; when the electronic device detects that a wireless audio peripheral is connected, it calls the wireless audio peripheral Set the corresponding preset initialization value.
在一些实施例中,若所述接入方式为有线接入,则将所述电子设备的当前音量值调节至有线初始化音量值;若所述接入方式为无线接入,则将所述电子设备的当前音量值调节至无线初始化音量值。In some embodiments, if the access method is wired access, adjust the current volume value of the electronic device to the wired initial volume value; if the access method is wireless access, then adjust the electronic device The current volume value of the device is adjusted to the wireless initialization volume value.
例如,有线初始化音量值与无线初始化音量值可以设置相同的值,也可以设置为不同的值。例如预先设置的有线初始化音量值大于无线初始化音量值,或者预先设置的有线初始化音量值小于无线初始化音量值。进一步的,无线初始化音量值还可以根据不同的无线接入方式进一步设置多个无线初始化音量值,比如蓝牙接入对应的无线初始化音量值小于红外线接入或者FM调频接入对应的无线初始化音量值。For example, the wired initialization volume value and the wireless initialization volume value may be set to the same value, or may be set to different values. For example, the preset wired initialization volume value is greater than the wireless initialization volume value, or the preset wired initialization volume value is smaller than the wireless initialization volume value. Further, the wireless initialization volume value can further set multiple wireless initialization volume values according to different wireless access methods, for example, the wireless initialization volume value corresponding to Bluetooth access is smaller than the wireless initialization volume value corresponding to infrared access or FM access .
步骤404,退出所述音量初始化模式。Step 404, exit the volume initialization mode.
其中,预设初始值只在音频外设每次接入时调用,在接入音频外设时通过调用预设初始化值对电子设备进行音量初始化处理之后,自动退出音量初始化模式,以将音量调节权限则移交给用户,音量大小由用户自行调节。比如,电子设备600在接入音频外设100时通过调用预设初始化值对电子设备600进行音量初始化处理之后,自动关闭软件开关610。例如,还可以在音频外设100与电子设备600断开连接时,再次打开软件开关610,以使得电子设备600进入音量初始化模式,为音频外设100再次接入时的音量初始化做准备。Among them, the preset initial value is only called every time the audio peripheral is connected, and after the volume initialization process is performed on the electronic device by calling the preset initialization value when the audio peripheral is connected, the volume initialization mode is automatically exited to adjust the volume. The authority is handed over to the user, and the volume is adjusted by the user. For example, when the electronic device 600 is connected to the audio peripheral 100 , the electronic device 600 automatically turns off the software switch 610 after performing volume initialization processing on the electronic device 600 by calling a preset initialization value. For example, when the audio peripheral 100 is disconnected from the electronic device 600, the software switch 610 can be turned on again, so that the electronic device 600 enters the volume initialization mode, preparing for the volume initialization when the audio peripheral 100 is connected again.
步骤405,检测是否存在人工调节音量的情形。若是,则执行步骤406;若否,则结束。Step 405, detecting whether there is a situation of manually adjusting the volume. If yes, execute step 406; if no, end.
其中,在退出所述音量初始化模式之后,检测是否存在人工调节音量的情形,以此监测用户在使用音频外设过程中的使用偏好。Wherein, after exiting the volume initialization mode, it is detected whether there is a situation of manually adjusting the volume, so as to monitor the user's preference in the process of using the audio peripheral.
步骤406,获取所述人工调节音量的人工调节次数以及人工调节音量值。Step 406, acquiring the number of times of manual adjustment of the manual volume adjustment and the value of the manual volume adjustment.
可以理解的是,当退出所述音量初始化模式后,用户可能在使用过程中发现自动调整的初始化音量值并不是最合适的音量值,则用户会对音量初始化处理后的音量再次进行人工调节,当发生人工调节音量的情形时,记录每一次人工调节的音量值以及调节次数。It is understandable that after exiting the volume initialization mode, the user may find that the automatically adjusted initialization volume value is not the most suitable volume value during use, and the user will manually adjust the volume after the volume initialization process again. When the volume is manually adjusted, the volume value of each manual adjustment and the number of adjustments are recorded.
步骤407,判断所述人工调节次数以及人工调节音量值是否达到预设条件。若是,则执行步骤408;若否,则结束。Step 407, judging whether the number of times of manual adjustment and the volume value of manual adjustment meet a preset condition. If yes, execute step 408; if no, end.
比如,当所述人工调节次数达到预设次数,且每两个人工调节音量值之间的差值在阈值范围内时,判定所述人工调节次数以及人工调节音量值达到预设条件,则执行步骤408。比如,预设次数为3次,音量值从小到大用0-100的数值表示,当所述人工调节次数达到3次,阈值为5,第1次人工调节音量值30,第2次人工调节音量值31,第2次人工调节音量值32,每两个上述人工调节音量值之间的差值在5以内时,判定所述人工调节次数以及人工调节音量值达到预设条件。For example, when the number of manual adjustments reaches the preset number and the difference between every two manual volume adjustments is within the threshold range, it is determined that the number of manual adjustments and the manual volume adjustment meet the preset conditions, and then execute Step 408. For example, the preset number of times is 3, and the volume value is represented by a value of 0-100 from small to large. When the number of manual adjustments reaches 3 times, the threshold is 5. The first manual adjustment volume value is 30, and the second manual adjustment The volume value is 31, and the volume value of the second manual adjustment is 32. When the difference between each two manually adjusted volume values is within 5, it is determined that the number of manual adjustments and the manually adjusted volume value meet the preset conditions.
步骤408,将所述预设初始化值更新为所述人工调节音量值的平均值。Step 408, updating the preset initialization value to the average value of the manually adjusted volume value.
其中,可以将所述人工调节音量值的平均值确定为与用户的使用偏好对应的音量值,则将所述预设初始化值更新为所述人工调节音量值的平均值。当所述电子设备在下一次进入音量初始化模式时,根据更新后的预设初始化值调节所述电子设备的音量,以使得下一次进行音量初始化处理的音量值更接近用户的使用偏好。Wherein, the average value of the manually adjusted volume value may be determined as the volume value corresponding to the user's usage preference, and then the preset initialization value is updated to the average value of the manually adjusted volume value. When the electronic device enters the volume initialization mode next time, the volume of the electronic device is adjusted according to the updated preset initialization value, so that the volume value for the next volume initialization process is closer to the user's preference.
步骤409,不进行音量初始化处理。Step 409, do not perform volume initialization processing.
本申请实施例通过当进入音量初始化模式时,实时检测是否有音频外设接入,若检测到有音频外设接入,则获取所述音频外设的接入方式,根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量,并根据退出音量初始化模式后用户手动调节音量的使用习惯更新预设初始化值,以供再次进行音量初始化时调用更新后的预设初始值,以使得音量初始化处理更接近用户的使用偏好,可以有效保护用户的听力,提升用户体验。In the embodiment of the present application, when entering the volume initialization mode, it is detected in real time whether there is an audio peripheral access, and if an audio peripheral access is detected, the access method of the audio peripheral is obtained, and according to the audio peripheral The preset initialization value corresponding to the access method, adjust the volume of the electronic device, and update the preset initialization value according to the user's habit of manually adjusting the volume after exiting the volume initialization mode, so as to call the updated volume when the volume is initialized again The preset initial value of , so that the volume initialization process is closer to the user's preference, which can effectively protect the user's hearing and improve the user experience.
本申请实施例还提供一种音量调节装置,如图6所示,图6为本申请实施例提供的一种音量调节装置的结构示意图。所述音量调节装置50包括检测模块51,第一获取模块52,以及调节模块55。The embodiment of the present application further provides a volume adjusting device, as shown in FIG. 6 , which is a schematic structural diagram of a volume adjusting device provided in the embodiment of the present application. The volume adjustment device 50 includes a detection module 51 , a first acquisition module 52 , and an adjustment module 55 .
其中,所述检测模块51,用于当进入音量初始化模式时,实时检测是否有音频外设接入。Wherein, the detection module 51 is configured to detect in real time whether there is an audio peripheral connected when entering the volume initialization mode.
所述第一获取模块52,用于若检测到有音频外设接入,则获取所述音频外设的接入方式。The first acquiring module 52 is configured to acquire the access mode of the audio peripheral if it is detected that an audio peripheral is connected.
所述调节模块55,用于根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。The adjustment module 55 is configured to adjust the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral.
本申请实施例通过当进入音量初始化模式时,检测模块51实时检测是否有音频外设接入,若检测到有音频外设接入,则第一获取模块52获取所述音频外设的接入方式,调节模块55根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。本申请实施例当接入音频外设时,通过音量调节装置50将当前音量值自动调节至预设初始化值,以对电子设备的音量进行初始化处理,可以有效保护用户的听力。In the embodiment of the present application, when entering the volume initialization mode, the detection module 51 detects in real time whether there is an audio peripheral access, and if an audio peripheral access is detected, the first acquisition module 52 acquires the access of the audio peripheral mode, the adjustment module 55 adjusts the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral. In this embodiment of the present application, when an audio peripheral is connected, the volume adjustment device 50 automatically adjusts the current volume value to a preset initialization value to initialize the volume of the electronic device, which can effectively protect the user's hearing.
请参阅图7,图7为本申请实施例提供的一种音量调节装置的另一结构示意图。所述音量调节装置50包括检测模块51,第一获取模块52,第二获取模块53,以及调节模块55。Please refer to FIG. 7 . FIG. 7 is another schematic structural diagram of a volume adjustment device provided by an embodiment of the present application. The volume adjustment device 50 includes a detection module 51 , a first acquisition module 52 , a second acquisition module 53 , and an adjustment module 55 .
其中,所述检测模块51,用于当进入音量初始化模式时,实时检测是否有音频外设接入。Wherein, the detection module 51 is configured to detect in real time whether there is an audio peripheral connected when entering the volume initialization mode.
所述第一获取模块52,用于若检测到有音频外设接入,则获取所述音频外设的接入方式。The first acquiring module 52 is configured to acquire the access mode of the audio peripheral if it is detected that an audio peripheral is connected.
所述第二获取模块53,用于获取所述电子设备当前的应用场景。The second acquiring module 53 is configured to acquire the current application scenario of the electronic device.
所述调节模块55,用于根据所述音频外设的接入方式以及所述电子设备当前的应用场景对应的预设初始化值,调节将所述电子设备的音量。The adjustment module 55 is configured to adjust the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the current application scene of the electronic device.
本申请实施例通过当进入音量初始化模式时,检测模块51实时检测是否有音频外设接入,若检测到有音频外设接入,则第一获取模块52获取所述音频外设的接入方式,第二获取模块53获取所述电子设备当前的应用场景,调节模块55根据所述音频外设的接入方式以及所述电子设备当前的应用场景对应的预设初始化值,调节将所述电子设备的音量。本申请实施例当接入音频外设时,音量调节装置50根据所述音频外设的接入方式以及所述电子设备当前的应用场景对应的预设初始化值,对电子设备的音量进行初始化处理,可以有效保护用户的听力。In the embodiment of the present application, when entering the volume initialization mode, the detection module 51 detects in real time whether there is an audio peripheral access, and if an audio peripheral access is detected, the first acquisition module 52 acquires the access of the audio peripheral mode, the second acquisition module 53 acquires the current application scene of the electronic device, and the adjustment module 55 adjusts the Electronic device volume. In the embodiment of the present application, when the audio peripheral is connected, the volume adjustment device 50 initializes the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the current application scene of the electronic device. , can effectively protect the user's hearing.
请参阅图8,图8为本申请实施例提供的一种音量调节装置的又一结构示意图。所述音量调节装置50包括检测模块51,第一获取模块52,第三获取模块54,以及调节模块55。Please refer to FIG. 8 . FIG. 8 is another schematic structural diagram of a volume adjustment device provided by an embodiment of the present application. The volume adjustment device 50 includes a detection module 51 , a first acquisition module 52 , a third acquisition module 54 , and an adjustment module 55 .
其中,所述检测模块51,用于当进入音量初始化模式时,实时检测是否有音频外设接入。Wherein, the detection module 51 is configured to detect in real time whether there is an audio peripheral connected when entering the volume initialization mode.
所述第一获取模块52,用于若检测到有音频外设接入,则获取所述音频外设的接入方式。The first acquiring module 52 is configured to acquire the access mode of the audio peripheral if it is detected that an audio peripheral is connected.
所述第三获取模块53,用于获取所述音频外设的设备类型。The third acquiring module 53 is configured to acquire the device type of the audio peripheral.
所述调节模块55,用于根据所述音频外设的接入方式以及所述设备类型对应的预设初始化值,调节将所述电子设备的音量。The adjustment module 55 is configured to adjust the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the device type.
本申请实施例通过当进入音量初始化模式时,检测模块51实时检测是否有音频外设接入,若检测到有音频外设接入,则第一获取模块52获取所述音频外设的接入方式,第三获取模块53获取所述音频外设的设备类型,调节模块55根据所述音频外设的接入方式以及所述设备类型对应的预设初始化值,调节将所述电子设备的音量。本申请实施例当接入音频外设时,音量调节装置50根据所述音频外设的接入方式以及设备类型对应的预设初始化值,对电子设备的音量进行初始化处理,可以有效保护用户的听力。In the embodiment of the present application, when entering the volume initialization mode, the detection module 51 detects in real time whether there is an audio peripheral access, and if an audio peripheral access is detected, the first acquisition module 52 acquires the access of the audio peripheral mode, the third acquisition module 53 acquires the device type of the audio peripheral, and the adjustment module 55 adjusts the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the device type . In the embodiment of the present application, when an audio peripheral is connected, the volume adjustment device 50 initializes the volume of the electronic device according to the access method of the audio peripheral and the preset initialization value corresponding to the device type, which can effectively protect the user's hearing.
请参阅图9,图9为本申请实施例提供的一种音量调节装置的再一结构示意图。所述音量调节装置50包括检测模块51,第一获取模块52,调节模块55,处理模块56,第四获取模块57,以及更新模块58。Please refer to FIG. 9 . FIG. 9 is another structural schematic diagram of a volume adjustment device provided by an embodiment of the present application. The volume adjustment device 50 includes a detection module 51 , a first acquisition module 52 , an adjustment module 55 , a processing module 56 , a fourth acquisition module 57 , and an update module 58 .
其中,所述检测模块51,用于当进入音量初始化模式时,实时检测是否有音频外设接入。Wherein, the detection module 51 is configured to detect in real time whether there is an audio peripheral connected when entering the volume initialization mode.
所述第一获取模块52,用于若检测到有音频外设接入,则获取所述音频外设的接入方式。The first acquiring module 52 is configured to acquire the access mode of the audio peripheral if it is detected that an audio peripheral is connected.
所述调节模块55,用于根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。The adjustment module 55 is configured to adjust the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral.
所述处理模块56,用于退出所述音量初始化模式,并检测是否存在人工调节音量的情形。The processing module 56 is configured to exit the volume initialization mode, and detect whether there is a situation of manually adjusting the volume.
所述第四获取模块57,用于若存在人工调节音量的情形,则获取所述人工调节音量的人工调节次数以及人工调节音量值。The fourth obtaining module 57 is configured to obtain the number of times of manual adjustment of the manual volume adjustment and the value of the manual volume adjustment if there is a situation of manual volume adjustment.
所述更新模块58,用于若所述人工调节次数以及人工调节音量值达到预设条件,则将所述预设初始化值更新为所述人工调节音量值的平均值。The update module 58 is configured to update the preset initialization value to the average value of the manually adjusted volume value if the number of times of manual adjustment and the manually adjusted volume value meet preset conditions.
本申请实施例的音量调节装置50当进入音量初始化模式时,实时检测是否有音频外设接入,若检测到有音频外设接入,则获取所述音频外设的接入方式,根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量,并根据退出音量初始化模式后用户手动调节音量的使用习惯更新预设初始化值,以供再次进行音量初始化时调用更新后的预设初始值,以使得音量初始化处理更接近用户的使用偏好,可以有效保护用户的听力,提升用户体验。When the volume adjustment device 50 of the embodiment of the present application enters the volume initialization mode, it detects in real time whether there is an audio peripheral access, and if it detects that there is an audio peripheral access, then obtains the access method of the audio peripheral, and according to the Adjust the volume of the electronic device according to the preset initialization value corresponding to the access method of the audio peripheral, and update the preset initialization value according to the user's habit of manually adjusting the volume after exiting the volume initialization mode, so as to initialize the volume again The updated preset initial value is called from time to time, so that the volume initialization process is closer to the user's preference, which can effectively protect the user's hearing and improve user experience.
上述所有的技术方案,可以采用任意结合形成本申请的可选实施例,在此不再一一赘述。All the above-mentioned technical solutions may be combined in any way to form optional embodiments of the present application, which will not be repeated here.
本申请实施例还提供一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器调用所述存储器中存储的所述计算机程序,执行本申请任一实施例所述的音量调节方法。The embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and operable on the processor, and the processor invokes the computer program stored in the memory to execute the present invention. Apply the volume adjustment method described in any embodiment.
该电子设备可以是智能手机、平板电脑、掌上电脑等设备。如图10所示,电子设备600包括有一个或者一个以上处理核心的处理器601、有一个或一个以上计算机可读存储介质的存储器602及存储在存储器上并可在处理器上运行的计算机程序。其中,处理器601与存储器602电性连接。本领域技术人员可以理解,图中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The electronic device may be a smart phone, a tablet computer, a palmtop computer or the like. As shown in FIG. 10 , an electronic device 600 includes a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, and a computer program stored on the memory and operable on the processor. . Wherein, the processor 601 is electrically connected with the memory 602 . Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.
处理器601是电子设备600的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器602内的应用程序,以及调用存储在存储器602内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or loading the application program stored in the memory 602 and calling the data stored in the memory 602, the processor 601 executes the electronic Various functions and processing data of the equipment, so as to monitor the electronic equipment as a whole.
在本申请实施例中,电子设备600中的处理器601会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器602中,并由处理器601来运行存储在存储器602中的应用程序,从而实现各种功能:In this embodiment of the application, the processor 601 in the electronic device 600 will follow the steps below to load the instructions corresponding to the process of one or more application programs into the memory 602, and the processor 601 will run the instructions stored in the memory. 602, so as to realize various functions:
当进入音量初始化模式时,实时检测是否有音频外设接入;When entering the volume initialization mode, detect in real time whether there is an audio peripheral connected;
若检测到有音频外设接入,则获取所述音频外设的接入方式;If it is detected that an audio peripheral is connected, the access method of the audio peripheral is obtained;
根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量。Adjust the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral.
在一些实施例中,处理器601用于所述根据所述音频外设的接入方式对应的预设初始化值,调节将所述电子设备的音量,包括:In some embodiments, the processor 601 is configured to adjust the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral, including:
若所述接入方式为有线接入,则将所述电子设备的当前音量值调节至有线初始化音量值;If the access mode is wired access, adjusting the current volume value of the electronic device to the wired initialization volume value;
若所述接入方式为无线接入,则将所述电子设备的当前音量值调节至无线初始化音量值。If the access mode is wireless access, adjusting the current volume value of the electronic device to a wireless initialization volume value.
在一些实施例中,处理器601用于在所述获取所述音频外设的接入方式之后,还包括:In some embodiments, the processor 601 is configured to, after the acquisition of the access method of the audio peripheral, further include:
获取所述电子设备当前的应用场景;Obtaining the current application scenario of the electronic device;
根据所述音频外设的接入方式以及所述电子设备当前的应用场景对应的预设初始化值,调节将所述电子设备的音量。Adjust the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the current application scene of the electronic device.
在一些实施例中,处理器601用于在所述获取所述音频外设的接入方式之后,还包括:In some embodiments, the processor 601 is configured to, after the acquisition of the access method of the audio peripheral, further include:
获取所述音频外设的设备类型;Obtain the device type of the audio peripheral;
根据所述音频外设的接入方式以及所述设备类型对应的预设初始化值,调节将所述电子设备的音量。Adjust the volume of the electronic device according to the access mode of the audio peripheral and the preset initialization value corresponding to the device type.
在一些实施例中,处理器601用于在所述根据所述音频外设的接入方式对应的预设初始化值,调节所述电子设备的音量之后,还包括:In some embodiments, the processor 601 is configured to, after adjusting the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral, further include:
退出所述音量初始化模式,并检测是否存在人工调节音量的情形;Exit the volume initialization mode, and detect whether there is a situation of manually adjusting the volume;
若存在人工调节音量的情形,则获取所述人工调节音量的人工调节次数以及人工调节音量值;If there is a situation of manually adjusting the volume, the number of times of manual adjustment of the manual volume adjustment and the value of the manual volume adjustment are obtained;
若所述人工调节次数以及人工调节音量值达到预设条件,则将所述预设初始化值更新为所述人工调节音量值的平均值。If the number of times of manual adjustment and the manually adjusted volume value reach a preset condition, the preset initialization value is updated to an average value of the manually adjusted volume value.
在一些实施例中,如图11所示,电子设备600还包括:显示屏603、射频电路604、音频电路605、输入单元606以及电源607。其中,处理器601分别与显示屏603、射频电路604、音频电路605、输入单元606以及电源607电性连接。本领域技术人员可以理解,图11中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。In some embodiments, as shown in FIG. 11 , the electronic device 600 further includes: a display screen 603 , a radio frequency circuit 604 , an audio circuit 605 , an input unit 606 and a power supply 607 . Wherein, the processor 601 is electrically connected with the display screen 603 , the radio frequency circuit 604 , the audio circuit 605 , the input unit 606 and the power supply 607 respectively. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 11 is not limited to the electronic device, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
显示屏603可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示屏603为触控显示屏时,也可以作为输入单元的一部分实现输入功能。The display screen 603 can be used to display information input by or provided to the user and various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. When the display screen 603 is a touch display screen, it can also be used as a part of the input unit to realize the input function.
射频电路604可用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 604 can be used to send and receive radio frequency signals to establish wireless communication with network equipment or other electronic equipment through wireless communication, and to send and receive signals with network equipment or other electronic equipment.
音频电路605可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。The audio circuit 605 can be used to provide an audio interface between the user and the electronic device through a speaker or a microphone.
输入单元606可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The input unit 606 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
电源607用于给电子设备600的各个部件供电。在一些实施例中,电源607可以通过电源管理系统与处理器601逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power supply 607 is used to supply power to various components of the electronic device 600 . In some embodiments, the power supply 607 may be logically connected to the processor 601 through a power management system, so that functions such as charging, discharging, and power consumption management may be implemented through the power management system.
尽管图11中未示出,电子设备600还可以包括摄像头、传感器、无线保真模块、蓝牙模块等,在此不再赘述。Although not shown in FIG. 11 , the electronic device 600 may also include a camera, a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.
本申请实施例中,所述音量调节装置与上文实施例中的一种音量调节方法属于同一构思,在所述音量调节装置上可以运行所述音量调节方法实施例中提供的任一方法,其具体实现过程详见所述音量调节方法实施例,此处不再赘述。In the embodiment of the present application, the volume adjustment device and the volume adjustment method in the above embodiment belong to the same idea, any method provided in the volume adjustment method embodiment can be run on the volume adjustment device, For the specific implementation process, refer to the embodiment of the volume adjustment method, and details will not be repeated here.
本申请实施例还提供一种存储介质,所述存储介质存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述任一实施例中的音量调节方法。An embodiment of the present application further provides a storage medium, the storage medium stores a computer program, and when the computer program is run on a computer, the computer is made to execute the volume adjustment method in any of the above embodiments.
需要说明的是,对本申请所述音量调节方法而言,本领域普通测试人员可以理解实现本申请实施例所述音量调节方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如所述音量调节方法的实施例的流程。其中,所述存储介质可为磁碟、光盘、只读存储器(ROM,ReadOnly Memory)、随机存取记忆体(RAM,Random Access Memory)等。It should be noted that, for the volume adjustment method described in this application, ordinary testers in the field can understand that all or part of the process of implementing the volume adjustment method described in the embodiment of this application can be completed by controlling related hardware through computer programs. , the computer program may be stored in a computer-readable storage medium, such as stored in a memory of an electronic device, and executed by at least one processor in the electronic device, and the execution process may include the volume adjustment method The flow of the embodiment. Wherein, the storage medium may be a magnetic disk, an optical disk, a read only memory (ROM, ReadOnly Memory), a random access memory (RAM, Random Access Memory) and the like.
对本申请实施例的所述音量调节装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读存储介质中,所述存储介质譬如为只读存储器,磁盘或光盘等。For the volume adjustment device in the embodiment of the present application, each functional module may be integrated into one processing chip, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium, such as read-only memory, magnetic disk or optical disk.
以上对本申请实施例所提供的一种音量调节方法、装置、存储介质及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的技术方案及其核心思想;本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例的技术方案的范围。A volume adjustment method, device, storage medium, and electronic equipment provided by the embodiments of the present application have been described above in detail. In this paper, specific examples are used to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only It is used to help understand the technical solutions and core ideas of the present application; those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and These modifications or replacements do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.
Claims (12)
- A kind of 1. volume adjusting method, applied in electronic equipment, it is characterised in that the described method includes:When entering volume initialization pattern, detect whether that audio peripheral hardware accesses in real time;If having detected, audio peripheral hardware accesses, and obtains the access way of the audio peripheral hardware;According to the corresponding default initialization value of the access way of the audio peripheral hardware, adjust the volume of the electronic equipment.
- 2. volume adjusting method as claimed in claim 1, it is characterised in that the access way according to the audio peripheral hardware Corresponding default initialization value, is adjusted the volume of the electronic equipment, including:If the access way is access in radio, the current volume value of the electronic equipment is adjusted to wired initialization volume Value;If the access way is wireless access, the current volume value of the electronic equipment is adjusted to wireless initialization volume Value.
- 3. volume adjusting method as claimed in claim 1, it is characterised in that in the access side for obtaining the audio peripheral hardware After formula, further include:Obtain the current application scenarios of the electronic equipment;According to the corresponding default initialization of the current application scenarios of the access way of the audio peripheral hardware and the electronic equipment Value, is adjusted the volume of the electronic equipment.
- 4. volume adjusting method as claimed in claim 1, it is characterised in that in the access side for obtaining the audio peripheral hardware After formula, further include:Obtain the device type of the audio peripheral hardware;According to the access way of the audio peripheral hardware and the corresponding default initialization value of the device type, adjust the electricity The volume of sub- equipment.
- 5. volume adjusting method as claimed in claim 1, it is characterised in that in the access side according to the audio peripheral hardware The corresponding default initialization value of formula, after the volume for adjusting the electronic equipment, further includes:The volume initialization pattern is exited, and detects whether that there are the situation of manual adjustment volume;If there are the situation of manual adjustment volume, the manual adjustment number and manual adjustment of the manual adjustment volume are obtained Volume value;If the manual adjustment number and manual adjustment volume value reach preset condition, the default initialization value is updated For the average value of the manual adjustment volume value.
- 6. a kind of volume adjustment device, it is characterised in that described device includes:Detection module, for when entering volume initialization pattern, having detected whether that audio peripheral hardware accesses in real time;First acquisition module, if for having detected that audio peripheral hardware accesses, obtains the access way of the audio peripheral hardware;Adjustment module, for the corresponding default initialization value of access way according to the audio peripheral hardware, is adjusted the electronics The volume of equipment.
- 7. volume adjustment device as claimed in claim 6, it is characterised in that the adjustment module, is used for:If the access way is access in radio, the current volume value of the electronic equipment is adjusted to wired initialization volume Value;If the access way is wireless access, the current volume value of the electronic equipment is adjusted to wireless initialization volume Value.
- 8. volume adjustment device as claimed in claim 6, it is characterised in that described device further includes:Second acquisition module, the application scenarios current for obtaining the electronic equipment;The adjustment module, the application scenarios current for the access way according to the audio peripheral hardware and the electronic equipment Corresponding default initialization value, is adjusted the volume of the electronic equipment.
- 9. volume adjustment device as claimed in claim 6, it is characterised in that described device further includes:3rd acquisition module, for obtaining the device type of the audio peripheral hardware;The adjustment module, it is corresponding default initial for the access way according to the audio peripheral hardware and the device type Change value, is adjusted the volume of the electronic equipment.
- 10. volume adjustment device as claimed in claim 6, it is characterised in that described device further includes:Processing module, for exiting the volume initialization pattern, and detects whether that there are the situation of manual adjustment volume;4th acquisition module, if for there are the situation of manual adjustment volume, obtaining the artificial of the manual adjustment volume and adjusting Save number and manual adjustment volume value;Update module, will be described pre- if reaching preset condition for the manual adjustment number and manual adjustment volume value If initialization value is updated to the average value of the manual adjustment volume value.
- 11. a kind of storage medium, is stored thereon with computer program, it is characterised in that when the computer program is in computer During upper operation so that the computer performs such as claim 1-5 any one of them volume adjusting methods.
- 12. a kind of electronic equipment, including memory and processor, it is characterised in that the processor is by calling the storage The computer program stored in device, for performing such as claim 1-5 any one of them volume adjusting methods.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711250473.7A CN108024016B (en) | 2017-12-01 | 2017-12-01 | Volume adjusting method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711250473.7A CN108024016B (en) | 2017-12-01 | 2017-12-01 | Volume adjusting method and device, storage medium and electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108024016A true CN108024016A (en) | 2018-05-11 |
| CN108024016B CN108024016B (en) | 2021-02-19 |
Family
ID=62078147
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711250473.7A Active CN108024016B (en) | 2017-12-01 | 2017-12-01 | Volume adjusting method and device, storage medium and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108024016B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114374767A (en) * | 2022-01-17 | 2022-04-19 | Oppo广东移动通信有限公司 | Volume adjustment method, volume adjustment device, electronic device and storage medium |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7133531B2 (en) * | 2001-02-27 | 2006-11-07 | Nissim Karpenstein | Device using analog controls to mix compressed digital audio data |
| CN103544971A (en) * | 2013-07-09 | 2014-01-29 | Tcl集团股份有限公司 | Volume self-adaption control method and volume self-adaption control system |
| KR20140038179A (en) * | 2012-09-20 | 2014-03-28 | 삼성전자주식회사 | Method for volume controlling an electronic device thereof |
| CN103986813A (en) * | 2014-05-26 | 2014-08-13 | 深圳市中兴移动通信有限公司 | Volume setting method and mobile terminal |
| CN104363510A (en) * | 2014-10-29 | 2015-02-18 | 深圳市金立通信设备有限公司 | Terminal |
| CN105872180A (en) * | 2016-03-28 | 2016-08-17 | 乐视控股(北京)有限公司 | Method and device for adjusting volume of terminal device |
| US20160247364A1 (en) * | 2015-02-23 | 2016-08-25 | Google Inc. | Occupancy Based Volume Adjustment |
| CN106528036A (en) * | 2016-10-09 | 2017-03-22 | 腾讯科技(深圳)有限公司 | Volume adjusting method and device |
| CN107231473A (en) * | 2017-05-23 | 2017-10-03 | 努比亚技术有限公司 | A kind of audio output regulation and control method, equipment and computer-readable recording medium |
-
2017
- 2017-12-01 CN CN201711250473.7A patent/CN108024016B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7133531B2 (en) * | 2001-02-27 | 2006-11-07 | Nissim Karpenstein | Device using analog controls to mix compressed digital audio data |
| KR20140038179A (en) * | 2012-09-20 | 2014-03-28 | 삼성전자주식회사 | Method for volume controlling an electronic device thereof |
| CN103544971A (en) * | 2013-07-09 | 2014-01-29 | Tcl集团股份有限公司 | Volume self-adaption control method and volume self-adaption control system |
| CN103986813A (en) * | 2014-05-26 | 2014-08-13 | 深圳市中兴移动通信有限公司 | Volume setting method and mobile terminal |
| CN104363510A (en) * | 2014-10-29 | 2015-02-18 | 深圳市金立通信设备有限公司 | Terminal |
| US20160247364A1 (en) * | 2015-02-23 | 2016-08-25 | Google Inc. | Occupancy Based Volume Adjustment |
| CN105872180A (en) * | 2016-03-28 | 2016-08-17 | 乐视控股(北京)有限公司 | Method and device for adjusting volume of terminal device |
| CN106528036A (en) * | 2016-10-09 | 2017-03-22 | 腾讯科技(深圳)有限公司 | Volume adjusting method and device |
| CN107231473A (en) * | 2017-05-23 | 2017-10-03 | 努比亚技术有限公司 | A kind of audio output regulation and control method, equipment and computer-readable recording medium |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114374767A (en) * | 2022-01-17 | 2022-04-19 | Oppo广东移动通信有限公司 | Volume adjustment method, volume adjustment device, electronic device and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108024016B (en) | 2021-02-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11632621B2 (en) | Method for controlling volume of wireless headset, and computer-readable storage medium | |
| CN106155623B (en) | A kind of audio collocation method, system and relevant device | |
| CN106126159B (en) | Audio stream processing method and mobile terminal | |
| CN103414982B (en) | A kind of method and apparatus that sound is provided | |
| CN108430003A (en) | Sound effect compensation method and device, readable storage medium and terminal | |
| CN109918039B (en) | A kind of volume adjustment method and mobile terminal | |
| CN107171412B (en) | Method and device for dynamically adjusting charging current, mobile terminal and storage medium | |
| CN109150221B (en) | A wearable device master-slave switching method and related products | |
| CN108897516B (en) | A kind of wearable device volume adjustment method and related products | |
| CN108040313A (en) | A kind of play parameter control method and electronic equipment | |
| CN107562406A (en) | A kind of volume adjusting method, mobile terminal and computer-readable recording medium | |
| CN108769387A (en) | Application control method and related equipment | |
| CN106126163A (en) | A method and terminal for adjusting sound effects | |
| CN106126165B (en) | A kind of audio stream processing method and mobile terminal | |
| CN107948874A (en) | A kind of terminal control method, mobile terminal | |
| WO2020113525A1 (en) | Playing control method and apparatus, and computer-readable storage medium and electronic device | |
| CN108882084B (en) | Wearable equipment electric quantity balancing method and related product | |
| CN108834013B (en) | Wearable equipment electric quantity balancing method and related product | |
| CN107734121B (en) | Volume control method and device, storage medium and electronic equipment | |
| CN107220163A (en) | Mobile terminal, management method thereof, and computer-readable storage medium | |
| CN110058837B (en) | Audio output method and terminal | |
| CN107343095B (en) | Call volume control method, device, storage medium and terminal | |
| CN111541975B (en) | Audio signal adjustment method and electronic device | |
| CN108668018A (en) | Mobile terminal, volume control method and related product | |
| CN109348366B (en) | A method and mobile terminal for realizing volume adjustment using electrical parameters |
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 | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant |