Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. In addition, for convenience of description, only a part of structures related to the present application, not all of the structures, is shown in the drawings. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first" and "second", etc. in this application are used to distinguish between different objects and not to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
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 application. The appearances of the 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 explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In the prior art, the volume value of the audio peripheral can be larger or smaller when the audio peripheral is accessed. If the volume is too large, the ear drum of the user may be irritated, tinnitus may occur, and the health of the user may be damaged. If the volume is small, the user is required to manually adjust the volume, which causes a transition period of poor transmission of the middle section of audio signal and affects the user experience. The electronic device may be a smart phone, a tablet computer, a desktop computer, a notebook computer, or a palm computer.
Specifically, please refer to fig. 1, where fig. 1 is a schematic view of an application scenario of a volume adjustment device according to an embodiment of the present application. A volumeinitialization software switch 610 may be provided in theelectronic device 600, and thesoftware switch 610 is used for implementing the control of the volume initialization function of the audio peripheral. For example, if thesoftware switch 610 is turned on, theelectronic device 600 enters a volume initialization mode, and detects whether the audio peripheral 100 is accessed in real time, and if it is detected that the audio peripheral 100 is accessed, obtains an access mode of the audio peripheral 100, adjusts the volume of theelectronic device 600 according to a preset initialization value corresponding to the access mode of the audio peripheral 100, and performs an initialization action on the volume of theelectronic device 600 when the audio peripheral 100 is accessed. If thesoftware switch 610 is turned off, the volume of theelectronic device 600 implements a default scheme, for example, the default scheme is to manually adjust the initial volume.
The execution main body of the volume adjustment method provided by the embodiment of the application can be a volume adjustment device provided by the embodiment of the application, or an electronic device (such as a smart phone, a tablet computer, a desktop computer, a notebook computer, an intelligent wearable device and the like) integrated with the volume adjustment device, and the volume adjustment device can be realized in a hardware or software mode.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a volume adjusting method according to an embodiment of the present disclosure. The method is applied to the electronic equipment and comprises the following steps:
step 101, when entering a volume initialization mode, detecting whether an audio peripheral is accessed in real time. If yes, go tostep 102; if not, go tostep 104.
For example, as shown in fig. 1, a volumeinitialization software switch 610 may be provided in theelectronic device 600, and thesoftware switch 610 is used for implementing the control of the volume initialization function of the audio peripheral. For example, if thesoftware switch 610 is turned on, theelectronic device 600 enters a volume initialization mode and detects whether an audio peripheral is accessed in real time. If detecting that the audio peripheral is accessed, executingstep 102; if no audio peripheral is accessed,step 104 is executed.
And 102, acquiring the access mode of the audio peripheral.
For example, the audio peripheral may include a wired audio peripheral, such as a wired headphone, a wired speaker, etc., and a wireless audio peripheral, such as a bluetooth headphone, a bluetooth speaker, an FM headset, an infrared wireless headphone, etc. The access modes of the audio peripheral device may correspondingly include wired access and wireless access. For example, the wireless access may include bluetooth access, infrared access, FM frequency modulation access, and the like.
And 103, adjusting the volume of the electronic equipment according to a preset initialization value corresponding to the access mode of the audio peripheral.
The audio peripherals can comprise wired audio peripherals and wireless audio peripherals, and the wired audio peripherals and the wireless audio peripherals have different actual volume values which are finally transmitted to the ears of the user for the same electronic equipment volume value due to different path losses in the transmission process. Therefore, the embodiment of the application can support the setting of the initialized volume values of various audio peripherals, namely, a plurality of preset initial values can be preset. The preset initial values correspond to different access modes of the audio peripheral.
For example, when the electronic device detects that the wired audio peripheral is accessed, a preset initialization value corresponding to the wired audio peripheral is called; when the electronic equipment detects that the wireless audio peripheral is accessed, a preset initialization value corresponding to the wireless audio peripheral is called.
In some embodiments, if the access mode is wired access, adjusting the current volume value of the electronic device to a wired initialization volume value; and if the access mode is wireless access, adjusting the current volume value of the electronic equipment to a wireless initialization volume value.
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 may further set a plurality of wireless initialization volume values according to different wireless access modes, for example, because the path loss of the audio peripheral accessed by the bluetooth is smaller than the path loss of the audio peripheral accessed by the infrared ray or the FM frequency modulation, the wireless initialization volume value corresponding to the bluetooth access may be preset to be smaller than the wireless initialization volume value corresponding to the infrared ray access or the FM frequency modulation access.
In some embodiments, the preset initial value is only called when the audio peripheral is accessed each time, and after the volume initialization processing is performed on the electronic device by calling the preset initialization value when the audio peripheral is accessed, the volume initialization mode is automatically exited, so that the volume adjustment authority is handed over to the user, and the volume is adjusted by the user. For example, when theelectronic device 600 accesses the audio peripheral 100, thesoftware switch 610 is automatically turned off after theelectronic device 600 performs the volume initialization processing by calling the preset initialization value. For example, when the audio peripheral 100 is disconnected from theelectronic device 600, thesoftware switch 610 may be turned on again to enable theelectronic device 600 to enter the volume initialization mode, so as to prepare for volume initialization when the audio peripheral 100 is accessed again.
Instep 104, the volume initialization process is not performed.
If no audio peripheral is accessed, no preset initialization value is called, and volume initialization processing is not carried out.
In some embodiments, after the obtaining the access mode of the audio peripheral, the method further includes:
acquiring a current application scene of the electronic equipment;
and adjusting the volume of the electronic equipment according to the access mode of the audio peripheral and a preset initialization value corresponding to the current application scene of the electronic equipment.
In some embodiments, after the obtaining the access mode of the audio peripheral, the method further includes:
acquiring the equipment type of the audio peripheral equipment;
and adjusting the volume of the electronic equipment according to the access mode of the audio peripheral and a preset initialization value corresponding to the equipment type.
In some embodiments, after the adjusting the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral, the method further includes:
exiting the volume initialization mode and detecting whether the situation of manually adjusting the volume exists;
if the situation of manually adjusting the volume exists, acquiring the manual adjustment times of the manually adjusted volume and a manually adjusted volume value;
and if the manual adjustment times and the manual adjustment volume value reach preset conditions, updating the preset initialization value to the average value of the manual adjustment volume value.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
According to the embodiment of the application, when the electronic equipment enters the volume initialization mode, whether the audio peripheral is accessed is detected in real time, if the audio peripheral is detected to be accessed, the access mode of the audio peripheral is obtained, and the volume of the electronic equipment is adjusted according to the preset initialization value corresponding to the access mode of the audio peripheral. When the audio peripheral is accessed, the current volume value is automatically adjusted to the preset initialization value so as to initialize the volume of the electronic equipment, and the hearing of a user can be effectively protected.
Referring to fig. 3, fig. 3 is another schematic flow chart of a volume adjusting method according to an embodiment of the present disclosure. The method further comprises the following steps:
step 201, when entering the volume initialization mode, detecting whether an audio peripheral is accessed in real time. If yes, go to step 202; if not, go to step 205.
For example, as shown in fig. 1, a volumeinitialization software switch 610 may be provided in theelectronic device 600, and thesoftware switch 610 is used for implementing the control of the volume initialization function of the audio peripheral. For example, if thesoftware switch 610 is turned on, theelectronic device 600 enters a volume initialization mode and detects whether an audio peripheral is accessed in real time. If detecting that an audio peripheral is accessed, executingstep 202; if no audio peripheral is accessed,step 205 is executed.
Step 202, obtaining the access mode of the audio peripheral.
For example, the audio peripheral may include a wired audio peripheral, such as a wired headphone, a wired speaker, etc., and a wireless audio peripheral, such as a bluetooth headphone, a bluetooth speaker, an FM headset, an infrared wireless headphone, etc. The access modes of the audio peripheral device may correspondingly include wired access and wireless access. For example, the wireless access may include bluetooth access, infrared access, FM frequency modulation access, and the like.
Step 203, acquiring a current application scene of the electronic device.
Among other things, the electronic device may use the audio peripheral in a number of application scenarios, which may include, for example, telephony, music, video, games, and so on. The user's requirements for the volume value of the audio peripheral may be different in different application scenarios.
And 204, adjusting the volume of the electronic equipment according to the access mode of the audio peripheral and a preset initialization value corresponding to the current application scene of the electronic equipment.
The audio peripherals can comprise wired audio peripherals and wireless audio peripherals, and the wired audio peripherals and the wireless audio peripherals have different actual volume values which are finally transmitted to the ears of the user for the same electronic equipment volume value due to different path losses in the transmission process. Moreover, the user experiences different sound volume values in different application scenes, so that the setting of the initialized sound volume values of various audio peripherals can be supported, that is, a plurality of preset initial values can be preset. The preset initial values may correspond to different access modes of the audio peripheral and different application scenarios of the electronic device. For example, as shown in table 1, a plurality of preset initialization values may be preset in the electronic device, where each preset initialization value corresponds to an access manner of the audio peripheral and an application scenario of the electronic device.
TABLE 1
For example, when the electronic device detects that the wired audio peripheral is accessed, the preset initialization value corresponding to the wired audio peripheral and the current application scene is called. For example, if the access mode of the audio peripheral is wired access and the current application scene is a game, the preset initialization value d is called. And when the electronic equipment detects that the wireless audio peripheral is accessed, calling the wireless audio peripheral and a preset initialization value corresponding to the current application scene. For example, if the access mode of the audio peripheral is wireless access and the current application scene is music, the preset initialization value f is called.
In some embodiments, the preset initial value is only called when the audio peripheral is accessed each time, and after the volume initialization processing is performed on the electronic device by calling the preset initialization value when the audio peripheral is accessed, the volume initialization mode is automatically exited, so that the volume adjustment authority is handed over to the user, and the volume is adjusted by the user. For example, when theelectronic device 600 accesses the audio peripheral 100, thesoftware switch 610 is automatically turned off after theelectronic device 600 performs the volume initialization processing by calling the preset initialization value. For example, when the audio peripheral 100 is disconnected from theelectronic device 600, thesoftware switch 610 may be turned on again to enable theelectronic device 600 to enter the volume initialization mode, so as to prepare for volume initialization when the audio peripheral 100 is accessed again.
Instep 205, the volume initialization process is not performed.
If no audio peripheral is accessed, no preset initialization value is called, and volume initialization processing is not carried out.
According to the embodiment of the application, when the electronic equipment enters the volume initialization mode, whether the audio peripheral is accessed is detected in real time, if the audio peripheral is detected to be accessed, the access mode of the audio peripheral and the current application scene of the electronic equipment are obtained, and the volume of the electronic equipment is adjusted according to the preset initialization value corresponding to the access mode of the audio peripheral and the current application scene of the electronic equipment. When the audio peripheral is accessed, the volume of the electronic equipment is initialized according to the access mode of the audio peripheral and the preset initialization value corresponding to the current application scene of the electronic equipment, so that the hearing of a user can be effectively protected.
Referring to fig. 4, fig. 4 is a schematic flow chart of a volume adjusting method according to an embodiment of the present disclosure. The method comprises the following steps:
step 301, when entering the volume initialization mode, detecting whether an audio peripheral is accessed in real time. If yes, go to step 302; if not, go to step 305.
For example, as shown in fig. 1, a volumeinitialization software switch 610 may be provided in theelectronic device 600, and thesoftware switch 610 is used for implementing the control of the volume initialization function of the audio peripheral. For example, if thesoftware switch 610 is turned on, theelectronic device 600 enters a volume initialization mode and detects whether an audio peripheral is accessed in real time. If detecting that the audio peripheral is accessed, executingstep 302; if no audio peripheral is accessed,step 305 is executed.
Step 302, obtaining the access mode of the audio peripheral.
For example, the audio peripheral may include a wired audio peripheral, such as a wired headphone, a wired speaker, etc., and a wireless audio peripheral, such as a bluetooth headphone, a bluetooth speaker, an FM headset, an infrared wireless headphone, etc. The access modes of the audio peripheral device may correspondingly include wired access and wireless access. For example, the wireless access may include bluetooth access, infrared access, FM frequency modulation access, and the like.
Step 303, obtaining the device type of the audio peripheral.
Wherein the audio peripheral may include a plurality of device types. For example, the device types include earphones, speakers, power amplifiers, multimedia consoles, sound consoles, and the like. The sound effects and uses brought by audio peripherals of different device types can differ. The user's requirements for audio peripherals of different device types may be different.
And 304, adjusting the volume of the electronic equipment according to the access mode of the audio peripheral and a preset initialization value corresponding to the equipment type.
The audio peripherals can comprise wired audio peripherals and wireless audio peripherals, and the wired audio peripherals and the wireless audio peripherals have different actual volume values which are finally transmitted to the ears of the user for the same electronic equipment volume value due to different path losses in the transmission process. Moreover, sound effects and purposes brought by the audio peripherals of different equipment types can be different, and requirements of users on the audio peripherals of different equipment types can be different, so that the method and the device can support setting of the initialized volume values of various audio peripherals, namely, a plurality of preset initial values can be preset. The preset initial values may correspond to different access modes and different device types of the audio peripheral. For example, as shown in table 2, a plurality of preset initialization values may be preset in the electronic device, where each preset initialization value corresponds to an access manner of the audio peripheral and a device type.
TABLE 2
For example, when the electronic device detects that the wired audio peripheral is accessed, the preset initialization value corresponding to the device type of the wired audio peripheral is called. For example, if the access mode of the audio peripheral is wired access, and the device type of the audio peripheral is an earphone, the preset initialization value a is called. When the electronic equipment detects that the wireless audio peripheral equipment is accessed, a preset initialization value corresponding to the equipment type of the wireless audio peripheral equipment is called. For example, if the access mode of the audio peripheral is wireless access, and the device type of the audio peripheral is a sound box, the preset initialization value G is called.
In some embodiments, the current application scenario of the electronic device may be further obtained, and the volume of the electronic device is adjusted according to the access mode and the device type of the audio peripheral and a preset initialization value corresponding to the current application scenario of the electronic device. The preset initial values may correspond to different access modes and device types of the audio peripheral and different application scenarios of the electronic device. For example, as shown in table 3, a plurality of preset initialization values may be preset in the electronic device, where each preset initialization value corresponds to an access manner and a device type of the audio peripheral and an application scenario of the electronic device.
TABLE 3
In some embodiments, the preset initial value is only called when the audio peripheral is accessed each time, and after the volume initialization processing is performed on the electronic device by calling the preset initialization value when the audio peripheral is accessed, the volume initialization mode is automatically exited, so that the volume adjustment authority is handed over to the user, and the volume is adjusted by the user. For example, when theelectronic device 600 accesses the audio peripheral 100, thesoftware switch 610 is automatically turned off after theelectronic device 600 performs the volume initialization processing by calling the preset initialization value. For example, when the audio peripheral 100 is disconnected from theelectronic device 600, thesoftware switch 610 may be turned on again to enable theelectronic device 600 to enter the volume initialization mode, so as to prepare for volume initialization when the audio peripheral 100 is accessed again.
Instep 305, the volume initialization process is not performed.
According to the embodiment of the application, when the electronic equipment enters the volume initialization mode, whether the audio peripheral is accessed is detected in real time, if the audio peripheral is detected to be accessed, the access mode of the audio peripheral and the equipment type of the audio peripheral are obtained, and the volume of the electronic equipment is adjusted according to the access mode of the audio peripheral and the preset initialization value corresponding to the equipment type. When the audio peripheral is accessed, the volume of the electronic equipment is initialized according to the access mode of the audio peripheral and the preset initialization value corresponding to the equipment type, so that the hearing of a user can be effectively protected.
Referring to fig. 5, fig. 5 is a schematic flow chart of a volume adjustment method according to an embodiment of the present disclosure. The method comprises the following steps:
step 401, when entering the volume initialization mode, detecting whether an audio peripheral is accessed in real time. If yes, go to step 402; if not, go to step 409.
For example, as shown in fig. 1, a volumeinitialization software switch 610 may be provided in theelectronic device 600, and thesoftware switch 610 is used for implementing the control of the volume initialization function of the audio peripheral. For example, if thesoftware switch 610 is turned on, theelectronic device 600 enters a volume initialization mode and detects whether an audio peripheral is accessed in real time. If detecting that an audio peripheral is accessed, executingstep 402; if no audio peripheral is accessed,step 409 is executed.
Step 402, obtaining the access mode of the audio peripheral.
For example, the audio peripheral may include a wired audio peripheral, such as a wired headphone, a wired speaker, etc., and a wireless audio peripheral, such as a bluetooth headphone, a bluetooth speaker, an FM headset, an infrared wireless headphone, etc. The access modes of the audio peripheral device may correspondingly include wired access and wireless access. For example, the wireless access may include bluetooth access, infrared access, FM frequency modulation access, and the like.
Step 403, adjusting the volume of the electronic device according to a preset initialization value corresponding to the access mode of the audio peripheral.
The audio peripherals can comprise wired audio peripherals and wireless audio peripherals, and the wired audio peripherals and the wireless audio peripherals have different actual volume values which are finally transmitted to the ears of the user for the same electronic equipment volume value due to different path losses in the transmission process. Therefore, the embodiment of the application can support the setting of the initialized volume values of various audio peripherals, namely, a plurality of preset initial values can be preset. The preset initial values correspond to different access modes of the audio peripheral.
For example, when the electronic device detects that the wired audio peripheral is accessed, a preset initialization value corresponding to the wired audio peripheral is called; when the electronic equipment detects that the wireless audio peripheral is accessed, a preset initialization value corresponding to the wireless audio peripheral is called.
In some embodiments, if the access mode is wired access, adjusting the current volume value of the electronic device to a wired initialization volume value; and if the access mode is wireless access, adjusting the current volume value of the electronic equipment to a wireless initialization volume value.
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 may further set a plurality of wireless initialization volume values according to different wireless access modes, for example, the wireless initialization volume value corresponding to the bluetooth access is smaller than the wireless initialization volume value corresponding to the infrared access or the FM access.
Step 404, exiting the volume initialization mode.
The preset initial value is only called when the audio peripheral is accessed every time, and after the volume initialization processing is carried out on the electronic equipment by calling the preset initialization value when the audio peripheral is accessed, the volume initialization mode is automatically exited, so that the volume adjustment authority is handed over to the user, and the volume is automatically adjusted by the user. For example, when theelectronic device 600 accesses the audio peripheral 100, thesoftware switch 610 is automatically turned off after theelectronic device 600 performs the volume initialization processing by calling the preset initialization value. For example, when the audio peripheral 100 is disconnected from theelectronic device 600, thesoftware switch 610 may be turned on again to enable theelectronic device 600 to enter the volume initialization mode, so as to prepare for volume initialization when the audio peripheral 100 is accessed again.
Step 405, detecting whether a situation of manually adjusting the volume exists. If yes, go to step 406; if not, the process is ended.
After exiting the volume initialization mode, whether the situation of manually adjusting the volume exists is detected, and therefore the use preference of the user in the process of using the audio peripheral is monitored.
And step 406, acquiring the manual adjustment times and the manual adjustment volume value of the manual adjustment volume.
It is understood 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 the use process, and then the user manually adjusts the volume again after the volume initialization process, and when the volume is manually adjusted, the volume value and the number of times of adjustment for each manual adjustment are recorded.
Step 407, determining whether the manual adjustment times and the manual adjustment volume value reach preset conditions. If yes, go to step 408; if not, the process is ended.
For example, when the manual adjustment number of times reaches a preset number of times and the difference between every two manual adjustment volume values is within the threshold range, it is determined that the manual adjustment number of times and the manual adjustment volume value reach a preset condition, and step 408 is executed. For example, the preset number of times is 3, the volume value is represented by a numerical value from small to large of 0 to 100, when the number of times of manual adjustment reaches 3 times, the threshold value is 5, the 1 st manual adjustment volume value is 30, the 2 nd manual adjustment volume value is 31, the 2 nd manual adjustment volume value is 32, and the difference between every two manual adjustment volume values is within 5, it is determined that the number of times of manual adjustment and the manual adjustment volume value reach the preset condition.
And step 408, updating the preset initialization value to the average value of the manually adjusted volume values.
And if the average value of the manually adjusted volume values can be determined as the volume value corresponding to the use preference of the user, updating the preset initialization value to the average value of the manually adjusted volume values. And when the electronic equipment enters a volume initialization mode next time, adjusting the volume of the electronic equipment according to the updated preset initialization value so that the volume value of the next volume initialization processing is closer to the use preference of the user.
Instep 409, the volume initialization process is not performed.
According to the embodiment of the application, whether the audio peripheral is accessed or not is detected in real time when the audio peripheral is accessed in the volume initialization mode, if the audio peripheral is accessed, the audio peripheral is acquired in the access mode, the preset initialization value is adjusted according to the preset initialization value corresponding to the access mode of the audio peripheral, the volume of the electronic equipment is updated according to the use habit of manually adjusting the volume after the audio peripheral is exited from the volume initialization mode, the updated preset initialization value is called for volume initialization again, so that the volume initialization processing is closer to the use preference of a user, the hearing of the user can be effectively protected, and the user experience is improved.
An embodiment of the present application further provides a volume adjustment device, as shown in fig. 6, and fig. 6 is a schematic structural diagram of the volume adjustment device provided in the embodiment of the present application. Thevolume adjusting device 50 includes a detectingmodule 51, a first obtainingmodule 52, and an adjustingmodule 55.
The detectingmodule 51 is configured to detect whether an audio peripheral is accessed in real time when entering a volume initialization mode.
The first obtainingmodule 52 is configured to obtain an access mode of the audio peripheral if it is detected that the audio peripheral is accessed.
The adjustingmodule 55 is configured to adjust the volume of the electronic device according to a preset initialization value corresponding to the access mode of the audio peripheral.
According to the embodiment of the application, when the electronic device enters the volume initialization mode, thedetection module 51 detects whether the audio peripheral is accessed in real time, if the audio peripheral is detected to be accessed, thefirst acquisition module 52 acquires the access mode of the audio peripheral, and theadjustment module 55 adjusts the volume of the electronic device according to the preset initialization value corresponding to the access mode of the audio peripheral. When the audio peripheral is accessed, the current volume value is automatically adjusted to the preset initialization value through thevolume adjusting device 50 so as to initialize the volume of the electronic equipment, and the hearing of a user can be effectively protected.
Referring to fig. 7, fig. 7 is another schematic structural diagram of a volume adjustment device according to an embodiment of the present disclosure. Thevolume adjusting device 50 includes a detectingmodule 51, a first obtainingmodule 52, a second obtainingmodule 53, and an adjustingmodule 55.
The detectingmodule 51 is configured to detect whether an audio peripheral is accessed in real time when entering a volume initialization mode.
The first obtainingmodule 52 is configured to obtain an access mode of the audio peripheral if it is detected that the audio peripheral is accessed.
The second obtainingmodule 53 is configured to obtain a current application scenario of the electronic device.
The adjustingmodule 55 is configured to adjust the volume of the electronic device according to the access mode of the audio peripheral and a preset initialization value corresponding to the current application scenario of the electronic device.
According to the embodiment of the application, when the electronic device enters the volume initialization mode, thedetection module 51 detects whether the audio peripheral is accessed in real time, if the audio peripheral is detected to be accessed, thefirst acquisition module 52 acquires the access mode of the audio peripheral, thesecond acquisition module 53 acquires the current application scene of the electronic device, and theadjustment 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 current application scene of the electronic device. When the audio peripheral is accessed, thevolume adjusting 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, so that the hearing of a user can be effectively protected.
Referring to fig. 8, fig. 8 is a schematic view of another structure of a volume adjustment device according to an embodiment of the present disclosure. Thevolume adjusting device 50 includes a detectingmodule 51, a first obtainingmodule 52, a third obtainingmodule 54, and an adjustingmodule 55.
The detectingmodule 51 is configured to detect whether an audio peripheral is accessed in real time when entering a volume initialization mode.
The first obtainingmodule 52 is configured to obtain an access mode of the audio peripheral if it is detected that the audio peripheral is accessed.
The third obtainingmodule 53 is configured to obtain a device type of the audio peripheral.
The adjustingmodule 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.
According to the embodiment of the application, when the electronic device enters the volume initialization mode, thedetection module 51 detects whether the audio peripheral is accessed in real time, if the audio peripheral is detected to be accessed, thefirst acquisition module 52 acquires the access mode of the audio peripheral, thethird acquisition module 53 acquires the device type of the audio peripheral, and theadjustment 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. When the audio peripheral is accessed, thevolume adjusting 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 device type, so that the hearing of a user can be effectively protected.
Referring to fig. 9, fig. 9 is a schematic view of another structure of a volume adjustment device according to an embodiment of the present disclosure. Thevolume adjusting device 50 includes a detectingmodule 51, a first obtainingmodule 52, an adjustingmodule 55, aprocessing module 56, a fourth obtainingmodule 57, and an updatingmodule 58.
The detectingmodule 51 is configured to detect whether an audio peripheral is accessed in real time when entering a volume initialization mode.
The first obtainingmodule 52 is configured to obtain an access mode of the audio peripheral if it is detected that the audio peripheral is accessed.
The adjustingmodule 55 is configured to adjust the volume of the electronic device according to a preset initialization value corresponding to the access mode of the audio peripheral.
Theprocessing module 56 is configured to exit the volume initialization mode and detect whether a situation of manually adjusting the volume exists.
The fourth obtainingmodule 57 is configured to obtain, if there is a situation that the volume is manually adjusted, a number of times of manually adjusting the volume and a manually adjusted volume value.
The updatingmodule 58 is configured to update the preset initialization value to the average value of the manually adjusted volume values if the manual adjustment times and the manually adjusted volume values reach preset conditions.
Volume adjustment device 50 of this application embodiment is when getting into volume initialization mode, and real-time detection has the access of audio frequency peripheral hardware, if has detected the access of audio frequency peripheral hardware, then acquires the access mode of audio frequency peripheral hardware, according to the initialization value is predetermine that the access mode of audio frequency peripheral hardware corresponds, the regulation will electronic equipment's volume to according to the use habit that exits volume initialization mode back user manual regulation volume update and predetermine the initialization value, call the initial value of predetermineeing after the renewal for when carrying out volume initialization once more, so that volume initialization process is closer user's preference, can effectively protect user's hearing, promotes user experience.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
The embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, where the processor calls the computer program stored in the memory to execute the volume adjusting method according to any embodiment of the present application.
The electronic equipment can be equipment such as a smart phone, a tablet computer and a palm computer. As shown in fig. 10, theelectronic device 600 includes aprocessor 601 with one or more processing cores, amemory 602 with one or more computer-readable storage media, and a computer program stored on the memory and executable on the processor. Theprocessor 601 is electrically connected to thememory 602. Those skilled in the art will appreciate that the electronic device configurations shown in the figures do not constitute limitations of the electronic device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
Theprocessor 601 is a control center of theelectronic device 600, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or loading an application program stored in thememory 602 and calling the data stored in thememory 602, thereby performing overall monitoring of the electronic device.
In this embodiment of the application, theprocessor 601 in theelectronic device 600 loads instructions corresponding to processes of one or more applications into thememory 602, and theprocessor 601 executes the applications stored in thememory 602 according to the following steps, so as to implement various functions:
when entering a volume initialization mode, detecting whether an audio peripheral is accessed in real time;
if the audio peripheral is detected to be accessed, acquiring an access mode of the audio peripheral;
and adjusting the volume of the electronic equipment according to a preset initialization value corresponding to the access mode of the audio peripheral.
In some embodiments, theprocessor 601 is configured to adjust the volume of the electronic device according to a 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 equipment to a wired initialization volume value;
and if the access mode is wireless access, adjusting the current volume value of the electronic equipment to a wireless initialization volume value.
In some embodiments, theprocessor 601 is configured to, after the obtaining the access mode of the audio peripheral, further include:
acquiring a current application scene of the electronic equipment;
and adjusting the volume of the electronic equipment according to the access mode of the audio peripheral and a preset initialization value corresponding to the current application scene of the electronic equipment.
In some embodiments, theprocessor 601 is configured to, after the obtaining the access mode of the audio peripheral, further include:
acquiring the equipment type of the audio peripheral equipment;
and adjusting the volume of the electronic equipment according to the access mode of the audio peripheral and a preset initialization value corresponding to the equipment type.
In some embodiments, theprocessor 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:
exiting the volume initialization mode and detecting whether the situation of manually adjusting the volume exists;
if the situation of manually adjusting the volume exists, acquiring the manual adjustment times of the manually adjusted volume and a manually adjusted volume value;
and if the manual adjustment times and the manual adjustment volume value reach preset conditions, updating the preset initialization value to the average value of the manual adjustment volume value.
In some embodiments, as shown in fig. 11, theelectronic device 600 further comprises: adisplay 603, aradio frequency circuit 604, anaudio circuit 605, aninput unit 606, and apower supply 607. Theprocessor 601 is electrically connected to thedisplay 603, therf circuit 604, theaudio circuit 605, theinput unit 606 and thepower supply 607. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 11 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Thedisplay screen 603 may be used to display information entered by or provided to the user as well as various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. When thedisplay screen 603 is a touch display screen, it can also be used as a part of an input unit to implement an input function.
Therf circuit 604 may be used for transceiving rf signals to establish wireless communication with a network device or other electronic devices via wireless communication, and for transceiving signals with the network device or other electronic devices.
Theaudio circuit 605 may be used to provide an audio interface between the user and the electronic device through a speaker, microphone.
Theinput unit 606 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
Thepower supply 607 is used to power the various components of theelectronic device 600. In some embodiments, thepower supply 607 may be logically coupled to theprocessor 601 through a power management system, such that the power management system may manage charging, discharging, and power consumption management functions.
Although not shown in fig. 11, theelectronic device 600 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, and the like, which are not described in detail herein.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related 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 concept, and any method provided in the embodiment of the volume adjustment method may be operated on the volume adjustment device, and a specific implementation process thereof is described in the embodiment of the volume adjustment method in detail, and is not described herein again.
An embodiment of the present application further provides a storage medium, where a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the volume adjustment method in any one of the above embodiments.
It should be noted that, for the volume adjustment method described in this application, it can be understood by a person skilled in the art that all or part of the process of implementing the volume adjustment method described in this application may be implemented by controlling related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and during the execution, the process of implementing the volume adjustment method may include the process of the embodiment of the volume adjustment method. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the volume adjustment device in the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The volume adjustment method, the volume adjustment device, the storage medium and the electronic device provided by the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understand the technical scheme and the core idea of the present application; those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications or substitutions do not depart from the spirit and scope of the present disclosure as defined by the appended claims.