CN113660599B - Speaker control method and device, mobile terminal and storage medium - Google Patents

Speaker control method and device, mobile terminal and storage medium Download PDF

Info

Publication number
CN113660599B
CN113660599B CN202010357019.7A CN202010357019A CN113660599B CN 113660599 B CN113660599 B CN 113660599B CN 202010357019 A CN202010357019 A CN 202010357019A CN 113660599 B CN113660599 B CN 113660599B
Authority
CN
China
Prior art keywords
scene
mobile terminal
speaker
speakers
volume
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010357019.7A
Other languages
Chinese (zh)
Other versions
CN113660599A (en
Inventor
程杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010357019.7A priority Critical patent/CN113660599B/en
Publication of CN113660599A publication Critical patent/CN113660599A/en
Application granted granted Critical
Publication of CN113660599B publication Critical patent/CN113660599B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04SSTEREOPHONIC SYSTEMS 
    • H04S7/00Indicating arrangements; Control arrangements, e.g. balance control
    • H04S7/30Control circuits for electronic adaptation of the sound field
    • H04S7/308Electronic adaptation dependent on speaker or headphone connection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0274Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04SSTEREOPHONIC SYSTEMS 
    • H04S2400/00Details of stereophonic systems covered by H04S but not provided for in its groups
    • H04S2400/13Aspects of volume control, not necessarily automatic, in stereophonic sound systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application discloses a control method and device of a loudspeaker, a mobile terminal and a storage medium, wherein the control method of the loudspeaker is applied to the mobile terminal, the mobile terminal comprises at least two loudspeakers and a sensor for collecting scene data of a scene where the mobile terminal is located, and the at least two loudspeakers are used for generating stereo sound effect when working simultaneously, and the method comprises the following steps: detecting the power consumption of the mobile terminal when the mobile terminal plays the audio through the two speakers; when the power consumption of the mobile terminal is larger than the designated power consumption, acquiring scene data through the sensor; determining a current scene in which the mobile terminal is positioned according to the scene data, wherein the requirements of different scenes on stereo sound effect are different; and according to the current scene, at least one loudspeaker of the at least two loudspeakers is turned off, and/or the volume of the at least one loudspeaker is reduced. The method can reduce the power consumption brought by the loudspeaker and improve the cruising ability of the mobile terminal.

Description

Speaker control method and device, mobile terminal and storage medium
Technical Field
The present application relates to the field of mobile terminals, and in particular, to a method and apparatus for controlling a speaker, a mobile terminal, and a storage medium.
Background
With rapid progress in the technological and living standards, mobile terminals have gradually become an indispensable important tool in life and work. The current mobile terminals have various functions, and most mobile terminals can realize the function of audio playing. Through the audio playing function of the mobile terminal, people can play music, videos and the like by using the mobile terminal, but when the mobile terminal plays the audio through a loudspeaker, larger power consumption can be caused, and the cruising ability of the mobile terminal is influenced.
Disclosure of Invention
In view of the above problems, the present application provides a method and apparatus for controlling a speaker, a mobile terminal, and a storage medium.
In a first aspect, an embodiment of the present application provides a method for controlling a speaker, which is applied to a mobile terminal, where the mobile terminal includes at least two speakers and a sensor for collecting scene data of a scene where the mobile terminal is located, where the at least two speakers are used to generate stereo sound effects when working simultaneously, and the method includes: detecting the power consumption of the mobile terminal when the mobile terminal plays the audio through the loudspeaker; when the power consumption of the mobile terminal is larger than the designated power consumption, acquiring scene data through the sensor; determining a current scene in which the mobile terminal is positioned according to the scene data, wherein the requirements of different scenes on stereo sound effect are different; according to the current scene, reducing the output power of the speaker to turn off at least one speaker of the at least two speakers, and/or reducing the volume of at least one speaker.
In a second aspect, an embodiment of the present application provides a control device for a speaker, which is applied to a mobile terminal, where the mobile terminal includes at least two speakers and a sensor for collecting scene data of a scene where the mobile terminal is located, where the at least two speakers are used to generate stereo sound effects when working simultaneously, and the device includes: the mobile terminal comprises a power consumption detection module, a data acquisition module, a scene determination module and a power control module, wherein the power consumption detection module is used for detecting the power consumption of the mobile terminal when the mobile terminal plays audio through the loudspeaker; the data acquisition module is used for acquiring scene data through the sensor when the power consumption of the mobile terminal is greater than the specified power consumption; the scene determining module is used for determining a current scene in which the mobile terminal is positioned according to the scene data, wherein the requirements of different scenes on stereo sound effect are different; the power control module is used for turning off at least one loudspeaker of the at least two loudspeakers according to the current scene and/or reducing the volume of the at least one loudspeaker.
In a third aspect, an embodiment of the present application provides a mobile terminal, including: one or more processors; a memory; one or more program codes stored in the memory and configured to be executed by the one or more processors, the one or more program codes configured to perform the method of controlling a speaker provided in the first aspect above.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having stored therein program code that is callable by a processor to perform the method of controlling a speaker provided in the first aspect described above.
According to the scheme provided by the application, when the mobile terminal plays the audio through the loudspeaker, the power consumption of the mobile terminal is detected, when the power consumption of the mobile terminal is larger than the appointed power consumption, the scene data of the scene where the mobile terminal is located is acquired through the sensor, the current scene where the mobile terminal is located is determined according to the scene data, wherein the requirements of different scenes on the stereo sound effect are different, then at least one loudspeaker of the at least two loudspeakers is closed according to the current scene, and/or the volume of the at least one loudspeaker is reduced, so that when the power consumption of the mobile terminal is larger than the appointed power consumption, at least one loudspeaker of the at least two loudspeakers is closed according to the scenes with different requirements on the stereo sound effect, and/or the volume of the at least one loudspeaker is reduced, so that the output power of the loudspeaker is reduced, the power consumption of the mobile terminal brought by the loudspeaker is reduced, and the cruising ability of the mobile terminal is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Fig. 2 shows a flow chart of a method of controlling a loudspeaker according to an embodiment of the application.
Fig. 3 shows a flow chart of a method of controlling a loudspeaker according to another embodiment of the application.
Fig. 4 shows a flow chart of a method of controlling a loudspeaker according to a further embodiment of the application.
Fig. 5 shows a flow chart of a control method of a speaker according to still another embodiment of the present application.
Fig. 6 shows a block diagram of a control device of a loudspeaker according to an embodiment of the application.
Fig. 7 is a block diagram of a mobile terminal for performing a control method of a speaker according to an embodiment of the present application.
Fig. 8 is a memory unit for storing or carrying program codes for implementing a control method of a speaker according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
With the development of mobile terminals, the functions of the mobile terminals are increasing. A typical mobile terminal may play audio through a speaker, for example, output music sound through a speaker, output video sound through a speaker, and the like.
And, as the demand of people is higher, the playing effect of the speaker of the mobile terminal is better. For example, the mobile terminal can realize the playing effect of stereo sound, promote the loudness of sound and the like by arranging a plurality of loudspeakers; for another example, the mobile terminal realizes the enhancement of the playing effect by setting a speaker with better output performance.
The inventor has studied for a long time, and found that when a speaker in a mobile terminal is continuously updated and improved, the power consumption caused by playing audio by the speaker is also larger and larger, and the standby and the endurance of the mobile terminal are influenced.
In order to solve the problems, the inventor provides the control method, the device, the mobile terminal and the storage medium of the loudspeaker, which are provided by the embodiment of the application, so that when the power consumption of the mobile terminal is larger than the designated power consumption, the output power of the loudspeaker is reduced according to the scene of the mobile terminal, the power consumption of the loudspeaker brought to the mobile terminal is further reduced, and the cruising ability of the mobile terminal is improved. The specific speaker control method is described in detail in the following embodiments.
The following describes a mobile terminal in an embodiment of the present application. The mobile terminal may be a smart phone, a tablet computer, a smart watch, etc., which is not limited herein.
Referring to fig. 1, fig. 1 shows a schematic structural diagram of a mobile terminal according to an embodiment of the present application, the mobile terminal 100 includes a terminal body 10, a speaker 130 and a sensor 140, and the speaker 130 and the sensor 140 are disposed inside the terminal body 10. The speaker 130 is configured to output a sound corresponding to the audio when the mobile terminal plays the audio. The sensor 140 may include a sound sensor, a brightness sensor, a GPS (global positioning system ) sensor, etc., where the sound sensor may collect ambient sound of a scene where the mobile terminal is located, the brightness sensor may collect ambient brightness, the GPS sensor may be used to detect a position where the mobile terminal is located, the ambient sound, the ambient brightness, the position, etc., collected by the sensor 140 may be used as scene data of the scene where the mobile terminal is located, to determine the scene where the mobile terminal 100 is located, for example, where the mobile terminal 100 is located in an indoor scene, or in an outdoor scene, for example, where the mobile terminal 100 is located in a scene where the ambient noise is strong or where the ambient noise is weak. Of course, the particular type of sensor 140 used to acquire scene data may not be limiting. It should be understood that other sensors may also be provided in the mobile terminal 100, such as a temperature sensor for detecting a temperature inside the mobile terminal (e.g., a battery board temperature, a motherboard temperature), etc.
In the embodiment of the present application, the number of speakers 130 provided in the mobile terminal 100 may be not limited, and may be plural, and plural speakers 130 may be used to generate stereo sound when working together. For example, in the mobile terminal 100 shown in fig. 1, the mobile terminal 100 includes two speakers 130, one speaker 130 is disposed at the top of the terminal body 10, and the other speaker 130 is disposed at the bottom of the terminal body 10. Of course, when the number of speakers 130 is plural, the positions at which the respective speakers 130 are provided are not limited.
Referring to fig. 2, fig. 2 is a flow chart illustrating a method for controlling a speaker according to an embodiment of the application. In a specific embodiment, the speaker control method is applied to the speaker control apparatus 400 shown in fig. 6 and the mobile terminal 100 (fig. 7) configured with the speaker control apparatus 400. The mobile terminal comprises a plurality of speakers and a sensor, wherein the sensors are used for collecting scene data of a scene where the mobile terminal is located, and the speakers are used for generating stereophonic sound effects when working together. The specific flow of the present embodiment will be described below by taking a mobile terminal as an example. The following will describe the flow chart shown in fig. 2 in detail, and the method for controlling the speaker specifically may include the following steps:
Step S110: and detecting the power consumption of the mobile terminal when the mobile terminal plays the audio through the loudspeaker.
In the embodiment of the application, the mobile terminal can detect the condition of playing the audio and determine whether to output the sound by the loudspeaker when detecting the condition of playing the audio. The mobile terminal can detect whether an application plays audio or not, or detect whether an audio decoder works or not, and determine whether the application plays audio or not. In some modes, when the mobile terminal detects that the mobile terminal is in the condition of audio playing, whether an external audio playing device (such as a wired earphone, a Bluetooth sound box and the like) is connected can be detected, if the mobile terminal is not connected with an external audio part device, the mobile terminal plays the audio by adopting a loudspeaker, so that the mobile terminal can be determined to play the audio through the loudspeaker currently; in other embodiments, the mobile terminal may also determine a current sound output mode (e.g., a headset mode, a play-out mode, etc.), and if the current sound output mode is the play-out mode, may determine that the mobile terminal is currently playing audio through a speaker.
In the embodiment of the application, when the mobile terminal plays the audio through the loudspeaker, the power consumption of the mobile terminal can be detected to determine the condition that the power consumption of the mobile terminal is larger, so that the power consumption brought by the loudspeaker can be reduced by adjusting the output power of the loudspeaker later.
In some embodiments, the mobile terminal may determine its current power consumption by detecting a power consumption condition, an internal temperature condition, a working condition of a sensor with larger power consumption, and the like. And the mobile terminal can detect whether the power consumption is greater than the specified power consumption, wherein the power consumption represents a situation that the power consumption of the mobile terminal is greater and the current power consumption needs to be reduced. As an implementation manner, the mobile terminal may count the power consumption in a specified period of time before the current time to determine the current power consumption of the mobile terminal, where the specified period of time may be 10 minutes, 20 minutes, and the like, which is not limited herein. After determining the current power consumption, the mobile terminal may compare the current power consumption with the specified power consumption to determine whether the current power consumption of the mobile terminal is larger, where if the power consumption of the mobile terminal is larger than the specified power consumption, it may be determined that the current power consumption of the mobile terminal is larger. The specific value of the specified power consumption may not be limiting. As another embodiment, the mobile terminal may detect the temperature inside the mobile terminal, and the case that the temperature is greater than the specified temperature is regarded as the case that the power consumption is greater than the specified power consumption, that is, the case that the power consumption is greater, where the specific value of the specified temperature may not be limited, and may be 30 degrees, 35 degrees, and the like, for example. As a further implementation mode, the mobile terminal can detect the running application, determine the current power consumption according to the power consumption occupied by the application in the past running process, and compare the current power consumption with the appointed power consumption to determine whether the current power consumption of the mobile terminal is larger or not; as another implementation mode, the mobile terminal can determine the target application with the power consumption larger than the appointed power consumption in the running process according to the power consumption occupied by the application in the previous running process, and can determine whether the target application is in a running state when the mobile terminal determines whether the current power consumption is larger than the appointed power consumption each time, and can determine that the power consumption of the mobile terminal is larger than the appointed power consumption if the target application is in the running state. As still another embodiment, the mobile terminal may detect whether a sensor having a larger power consumption therein is operated, for example, may detect whether a GPS (global positioning system ) sensor is in an operating state, and if so, determine that the power consumption of the mobile terminal is greater than a specified power consumption. Of course, the manner of specifically determining whether the power consumption of the mobile terminal is greater than the specified power consumption may not be limited.
Step S120: and when the power consumption of the mobile terminal is larger than the designated power consumption, acquiring scene data through the sensor.
In some embodiments, when determining that the power consumption of the mobile terminal is greater than the specified power consumption, the mobile terminal may collect scene data through a sensor to determine a current scene and reduce the power of the speaker according to the current scene. The mobile terminal can control the sensor for collecting the scene data of the scene where the mobile terminal is located to work so as to collect the scene data of the scene where the mobile terminal is located, and the collected scene data is obtained from the sensor. Wherein the scene data is used for the mobile terminal to determine the scene in which it is located in order to control the operation of the speaker according to the scene in which it is located. The scene data can be used for determining the current scene where the mobile terminal is located, and the scene data can be used for representing the requirement condition of the mobile terminal on the stereo sound effect, namely, different scenes have different requirements on the stereo sound effect, so that the scene where the mobile terminal is located can be subsequently determined, the output power of the loudspeaker can be controlled according to the different scenes, the loudspeaker can meet the stereo sound effect of the scene, and meanwhile, the power consumption of the loudspeaker is reduced.
In some embodiments, the scene data may include gravity sensing data of the mobile terminal, motion data of the mobile terminal, and the like, where the scene data may reflect a requirement of a use state of the mobile terminal for stereo sound effects, so that a current scene in which the mobile terminal is located may be determined.
Of course, the scene data may also be used to represent the influence condition of the current scene on sound propagation, that is, the influence condition of different scenes on sound propagation is different, and the scene data may also include environmental sound of the scene where the mobile terminal is located, environmental brightness of the scene where the mobile terminal is located, location where the mobile terminal is located, etc., and the specific scene data may not be limited, for example, the scene data may also include air pressure, how many obstacles obstruct sound propagation, the size of the space where the scene data is located, etc.
Step S130: and determining the current scene of the mobile terminal according to the scene data, wherein the requirements of different scenes on the stereo sound effect are different.
In the embodiment of the application, after the mobile terminal acquires the scene data, the current scene of the mobile terminal can be determined according to the scene data, and the scenes can be divided according to different requirements of the stereo effect, so that the mobile terminal can determine the scenes with different requirements of the stereo effect according to the scene data. The mobile terminal can pre-store scenes with different requirements for the stereo sound effect, and can compare the scene data with the scene data corresponding to different scenes according to the scene data so as to determine the current scene of the mobile terminal. For example, the mobile terminal also stores the corresponding relation between different scenes and scene data, and the current scene of the mobile terminal can be determined by using the acquired scene data and the corresponding relation; for another example, a pre-trained scene recognition model is set in the mobile terminal, the scene recognition model is obtained by training a large amount of training data, the training data can include a plurality of scene data and scenes marked on each scene data, and the mobile terminal can input the acquired scene data into the scene recognition model, so that the current scene in which the mobile terminal is located is obtained.
Step S140: and according to the current scene, at least one loudspeaker of the at least two loudspeakers is turned off, and/or the volume of the at least one loudspeaker is reduced.
In some embodiments, because the requirements for stereo sound effects are different for different scenes, at least one of the at least two speakers may be turned off and/or the volume of the at least one speaker may be reduced based on the determined current scene. The mobile terminal can reduce the output power of the loudspeaker by different magnitudes according to different scenes according to different requirements of different scenes on stereo sound effects. For example, for scenes where stereo sound effects are not required, at least one speaker may be turned off, or at least one speaker may be turned off while the volume of the other speakers is reduced; for scenes where stereo sound effects are desired, the volume of at least one speaker may be reduced. Therefore, the sound output by the loudspeaker with the reduced output power can be suitable for the requirement of scenes on stereo sound effect, the requirement of users on the playing effect of audio is met, the power consumption brought by the loudspeaker is reduced, the power consumption of the mobile terminal is effectively reduced, the situation that the power consumption of the mobile terminal is large is avoided to continuously happen, and the cruising ability of the mobile terminal is further improved.
According to the control method of the loudspeaker, when the power consumption of the mobile terminal is larger than the designated power consumption, the loudspeaker is turned off and/or the volume of the loudspeaker is reduced according to different requirements of scenes where the mobile terminal is located on for stereo sound effects, so that the output sound of the loudspeaker of the mobile terminal can be matched with the scenes under the scenes with different requirements for stereo sound effects, the requirements of the scenes for the stereo sound effects are met, the requirements of users for the playing effects of the audio are met, the power consumption of the mobile terminal is effectively reduced, the situation that the power consumption of the mobile terminal is large is avoided, and the cruising ability of the mobile terminal is further improved.
Referring to fig. 3, fig. 3 is a flow chart illustrating a method for controlling a speaker according to another embodiment of the application. The method for controlling the speaker is applied to the mobile terminal, and will be described in detail with respect to the flow shown in fig. 3, where the method for controlling the speaker specifically includes the following steps:
step S210: and detecting the power consumption of the mobile terminal when the mobile terminal plays the audio through the loudspeaker.
In the embodiment of the present application, step S210 may refer to the content of the foregoing embodiment, and is not described herein.
Step S220: and when the power consumption of the mobile terminal is larger than the designated power consumption, acquiring scene data through the sensor.
In the embodiment of the present application, when the mobile terminal detects that audio is played through a speaker, before executing steps S210 to S250, it may also be determined whether the mobile terminal is in a preset control mode, where the preset control mode is used to control power consumption of the speaker; if the mobile terminal is in the preset control mode, the processes from step S210 to step S250 are executed, and if the mobile terminal is not in the preset control mode, the current flow may be ended. The preset control mode can be turned on or turned off according to the operation of a user, and the requirements of different users can be met by setting the preset control mode, for example, when the user does not want the mobile terminal to control the output power of the loudspeaker and wants to control the loudspeaker by the user, the preset control mode can be turned off; the user hopes that the mobile terminal controls the output power of the loudspeaker, so that the power consumption of the mobile terminal is saved, and the preset control mode can be selected to be started.
Step S230: and determining the current scene of the mobile terminal according to the scene data, wherein the requirements of different scenes on the stereo sound effect are different.
In some implementations, the scene data may include gravity sensing data. The mobile terminal determines the current scene according to the scene data, and the method comprises the following steps: when the mobile terminal is detected to be in a horizontal screen state according to the gravity sensing data, determining that the current scene where the mobile terminal is positioned is a scene requiring stereo sound effect; when the mobile terminal is detected to be in a vertical screen state according to the gravity sensing data, determining that the current scene where the mobile terminal is positioned is a scene with non-required stereo sound effect.
In this embodiment, if the mobile terminal is in a landscape screen arrangement state, that is, when the screen of the mobile terminal is in a landscape screen mode, the mobile terminal is generally a case of playing music, video, or game scenes, so that a user generally needs an effect of playing stereo; the mobile terminal is in a vertical screen placing state, namely when the screen of the mobile terminal is in a vertical screen mode, under the situation, the mobile terminal mostly outputs prompt audio, call audio and other conditions, so that when the mobile terminal is in a vertical screen playing state, stereo playing is mostly not needed. Therefore, according to the state of the mobile terminal in the horizontal screen arrangement state or the vertical screen arrangement state, whether the current scene is a scene requiring stereo sound effect can be determined. The mobile terminal may be provided therein with a gravity sensor. The mobile terminal can determine that the mobile terminal is in a horizontal screen placing state or a vertical screen placing state according to the gravity change detected by the gravity sensor.
In other embodiments, the scene data may include motion data. The mobile terminal determines the current scene of the mobile terminal according to the scene data, and the method comprises the following steps: when the mobile terminal is detected to be in a static state according to the motion data, determining that the current scene where the mobile terminal is positioned is a scene requiring stereo sound effect; when the mobile terminal is detected to be in a moving state according to the motion data, determining that the current scene where the mobile terminal is positioned is a scene with non-required stereo sound effect.
In this embodiment, when the mobile terminal is in a moving state, the mobile terminal is usually in a walking state, a running state or the like, and the user will not need to have stereo effect at this time, so when the mobile terminal is in a moving state, the current scene can be determined as the scene requiring stereo effect; otherwise, when the mobile terminal is in a motion state, the current scene where the mobile terminal is located can be determined to be a scene with non-required stereo sound effect. The mobile terminal can determine that the mobile terminal is in a static state or a moving state according to the angular velocity data detected by the gyroscope sensor, the acceleration data detected by the acceleration sensor and the like.
Of course, the specific detection mode of the scene where the mobile terminal is located may not be limited.
Step S240: and when the current scene is a scene of the mobile terminal in which the stereophonic sound effect is not required, closing at least one loudspeaker in the at least two loudspeakers.
In the embodiment of the application, after determining the current scene in which the mobile terminal is located, the mobile terminal can control at least two speakers according to the current scene. Specifically, when the current scene is a scene where the mobile terminal is in a non-required stereo sound effect, at least one speaker is turned off. Wherein, because the current scene does not need stereo sound effect, one or more speakers can be selected to be turned off, so as to reduce the power consumption brought by the speakers. In addition, in some scenarios, it may even be possible to keep only one speaker (e.g., the main speaker) operating, while the other speakers are selected to be turned off to further reduce power consumption.
In some embodiments, considering that the user may also need a stereo effect in some special cases, and the user needs the stereo effect is usually when playing multimedia audio, when the current scene is a scene that does not need the stereo effect, the mobile terminal may determine the audio type of the audio; performing a closing of at least one of the at least two speakers when the audio type is other than the multimedia audio type; when the audio type is the multimedia audio type, at least two speakers are controlled to work simultaneously, and the volume of at least one speaker is reduced, so that the stereo effect required by a user can be effectively ensured, and the situation that the stereo effect cannot be generated due to the fact that the mobile terminal mistakenly controls the speakers to be closed can be effectively ensured.
In this embodiment, the audio types may be divided according to application scenes, wherein the audio types may include: the multimedia type, the prompting tone type, the conversation tone type and the like, the audio of the multimedia type can comprise music, video, game audio and the like, the audio of the prompting tone type can comprise telephone prompting tone, application prompting tone, short message prompting tone and the like, and the audio of the conversation tone type can comprise voice of conversation scenes such as digital conversation, network conversation and the like.
Step S250: and when the current scene is a scene of the mobile terminal in which the stereo sound effect is required, controlling the at least two speakers to work simultaneously, and reducing the volume of at least one speaker.
In the embodiment of the application, when the mobile terminal determines that the mobile terminal is in a scene requiring stereo sound effect, the mobile terminal can control at least two speakers to work simultaneously in order to ensure normal stereo sound effect, but the current power consumption of the mobile terminal is higher, so that the output power of the speakers can be reduced by reducing the volume of the speakers, and the power consumption of the speakers is further reduced. Wherein the mobile terminal may reduce the volume of one or more speakers.
In some embodiments, the mobile terminal determining that the active terminal is in a scenario requiring stereo sound effects, reducing the volume of at least one speaker may include: acquiring a first distance between the left ear of a user and the mobile terminal and a second distance between the right ear of the user and the mobile terminal; if the first distance is less than the second distance, reducing the volume of a speaker of the at least two speakers that is used to provide the left channel sound effect; if the first distance is greater than the second distance, the volume of the speaker of the at least two speakers that is to provide the right channel sound effect is reduced.
In this embodiment, since the stereo sound effects are fused after the sounds of different channels are transmitted into the corresponding ears, the user can feel the stereo sound effects, so that the mobile terminal can reduce the volume of the speaker of the left channel sound effect and the volume of the speaker of the right channel sound effect without changing by determining the distance between the two ears of the user and the mobile terminal, if the left ear is closer to the mobile terminal, so that the volumes of the sound effects of the two channels actually felt by the user are basically consistent, and the power consumption brought by the speaker is reduced while the requirement of the stereo sound effect of the user is met. In some modes, the mobile terminal may collect a depth image of a face of the user through the depth camera, and determine distances between the left ear and the right ear of the user and the mobile terminal according to the depth image, however, other modes may be used to obtain distances between the left ear and the right ear of the user and the mobile terminal, which is not limited herein.
In some embodiments, the mobile terminal determining that the active terminal is in a scenario requiring stereo sound effects, reducing the volume of at least one speaker may include: acquiring the distance between the left ear of the user and each loudspeaker and the distance between the right ear of the user and each loudspeaker; determining a first speaker closest to the left ear of the at least two speakers according to the distance between the left ear and each speaker; determining a second speaker closest to the right ear of the at least two speakers according to the distance between the right ear and each speaker; the volume of the other speakers except the first speaker and the second speaker of the at least two speakers is reduced.
In some modes, the mobile terminal can acquire a depth image of a face of a user through the depth camera, determine distances between the left ear and the right ear of the user and the depth camera of the mobile terminal according to the depth image, and then determine distances between the left ear and the right ear of the user and each speaker according to a pre-stored spatial position relationship (relative position, distance and the like) between the depth camera and each speaker. Unlike the previous embodiment, when the speaker of the mobile terminal includes more than two speakers, the mobile terminal may select the two speakers as the speaker of the left channel sound effect and the speaker of the right channel sound effect, and the volume of the first speaker and the second speaker selected is not changed according to the distance between each ear and the speaker, and the other speakers except for the two speakers may perform corresponding volume reduction, thereby better satisfying the stereo sound effect of the user and reducing the power consumption brought by the speakers.
According to the control method for the loudspeaker, when the power consumption of the mobile terminal is larger than the designated power consumption, according to the difference of the requirements of the scenes of the mobile terminal on the stereo effect, when the current scene is the scene requiring the stereo effect, only the volume of the loudspeaker is reduced, and when the current scene is the scene not requiring the stereo effect, at least one loudspeaker is closed, so that the output sound of the loudspeaker of the mobile terminal can be matched with the scene under the scenes with different requirements on the stereo effect, the requirements of the scene on the stereo effect are met, the requirement of a user on the playing effect of the audio is met, the power consumption of the mobile terminal is effectively reduced, the situation that the power consumption of the mobile terminal is large is avoided, and the endurance of the mobile terminal is further improved.
Referring to fig. 4, fig. 4 is a flow chart illustrating a method for controlling a speaker according to another embodiment of the application. The method for controlling the speaker is applied to the mobile terminal, and will be described in detail with respect to the flow shown in fig. 4, where the method for controlling the speaker specifically includes the following steps:
step S310: and detecting the power consumption of the mobile terminal when the mobile terminal plays the audio through the loudspeaker.
Step S320: and when the power consumption of the mobile terminal is larger than the designated power consumption, acquiring scene data through the sensor.
In the embodiment of the present application, the step S310 and the step S320 may refer to the content of the foregoing embodiment, and are not described herein.
Step S330: and determining the current scene of the mobile terminal according to the scene data, wherein the requirements of different scenes on the stereo sound effect are different.
In the embodiment of the application, the scene where the mobile terminal is located can be divided according to different stereo sound effects, and also can be divided according to the reduction degree of sound energy, namely, the influence quantity of the sound volume effect. That is, the mobile terminal may determine that the current scene is a scene requiring a stereo effect or a scene not requiring a stereo effect according to the scene data, and may also determine that the current scene is a scene divided according to an influence amount of the sound volume effect on the sound. When the mobile terminal is in different divided scenes, the volume effect actually felt by the user is different when the loudspeaker outputs sound with the same output power. Therefore, after determining the scene where the mobile terminal is located, if the power consumption of the loudspeaker needs to be reduced, the output power of the loudspeaker can be controlled according to the influence of different scenes on sound transmission. For example, the scene may be an indoor scene, an outdoor scene, or the like; for another example, the scene may be a scene corresponding to environmental noise of different intensity levels, or the like.
In some embodiments, the scenes in which the mobile terminal is located may be divided into an indoor scene and an outdoor scene, and it may be understood that, under the condition that the speakers are at the same output power, the loudness of sound that the user can feel when the mobile terminal is in the indoor scene to play audio is generally better than the loudness of sound that the user can feel when the mobile terminal is in the indoor scene to play audio. Therefore, by dividing the scenes, the output power of the speaker can be adjusted for different scenes. In this embodiment, the mobile terminal may determine that the mobile terminal is in an indoor environment or in an outdoor environment through ambient brightness, a GPS-located position, etc.
Step S340: and determining the current scene as the scene with the non-required stereo sound effect.
Step S350: when the current scene is an indoor scene, closing at least one of the at least two speakers, and simultaneously reducing the volume of at least one of the speakers in a working state.
Step S360: and when the current scene is an outdoor scene, at least one loudspeaker of the at least two loudspeakers is closed.
In the embodiment of the application, because the sound volume effect is lower than that of an indoor scene when the mobile terminal is in an outdoor scene, when the current scene is a scene with no-demand stereo sound effect, if the current scene is an indoor scene, at least one of at least two speakers can be turned off, and the sound volume of at least one of the speakers in a working state is reduced, so that the power consumption of the speakers is reduced; and if the current scene is an outdoor scene, at least one of the at least two speakers may be turned off. Therefore, the output power reduced by the loudspeaker when the mobile terminal is in an indoor scene can be larger than the output power reduced by the loudspeaker when the mobile terminal is in an outdoor scene, the power consumption of the loudspeaker can be reduced, the sound output by the loudspeaker can be matched with the scene, the power consumption of the loudspeaker can be reduced as much as possible, and the phenomenon that the sound output by the loudspeaker cannot adapt to the scene after the output power is reduced is avoided, so that a user cannot hear the sound occurs.
Further, considering that the turning off of the speaker may have an effect on sound playing, when the mobile terminal is in an outdoor scene, the effect will be amplified, so that when in the outdoor scene, the at least one speaker may be turned off and the volume of the at least one speaker in an operating state may be raised. For example, the mobile terminal includes a main speaker and a sub speaker, and the sub speaker may be turned off and the volume of the main speaker may be increased when an outdoor scene.
Step S370: and determining the current scene as the scene of the mobile terminal in the requirement of stereo sound effect.
Step S380: and when the current scene is an indoor scene, controlling the at least two speakers to work simultaneously, and reducing the volume of at least one speaker.
Step S390: and when the current scene is an outdoor scene, controlling the at least two loudspeakers to work simultaneously.
In the embodiment of the application, when the current scene is a scene requiring stereo sound effect, the sound volume effect is lower than that of an indoor scene when the mobile terminal is in an outdoor scene, so that if the current scene is an indoor scene, at least two speakers can be controlled to work simultaneously and the sound volume of at least one speaker is reduced because the stereo sound effect is required to be ensured; and if the current scene is an outdoor scene, at least two loudspeakers can be controlled to work simultaneously without reducing the volume of the loudspeakers, so that the receiving of sound by a user is not influenced. Therefore, the output power reduced by the loudspeaker when the mobile terminal is in an indoor scene can be larger than the output power reduced by the loudspeaker when the mobile terminal is in an outdoor scene, the power consumption of the loudspeaker can be reduced, the sound output by the loudspeaker can be matched with the scene, and the phenomenon that the sound output by the loudspeaker cannot adapt to the scene after the output power is reduced and a user cannot hear the sound is avoided.
According to the control method of the loudspeaker, when the power consumption of the mobile terminal is larger than the designated power consumption, according to the different requirements of the scenes where the mobile terminal is located on the stereo effect, when the current scene is the scene requiring the stereo effect, the volume of the loudspeaker is only reduced, and when the current scene is the scene not requiring the stereo effect, at least one loudspeaker is closed. And when controlling the speaker, still consider indoor scene and outdoor scene to the influence of sound propagation, further control indoor and outdoor scene for speaker output's sound can match with the scene, satisfies the demand of user to stereophonic sound effect, also avoids reducing after the output, and the unable adaptation scene of speaker output's sound, and the phenomenon that makes the user can't hear sound takes place, also effectually reduced mobile terminal's consumption, avoided mobile terminal's the great circumstances of consumption to take place continually, and then promoted mobile terminal's duration.
Referring to fig. 5, fig. 5 is a flowchart illustrating a method for controlling a speaker according to still another embodiment of the present application. The method for controlling the speaker is applied to the mobile terminal, and will be described in detail with respect to the flow shown in fig. 5, where the method for controlling the speaker specifically includes the following steps:
Step S410: and detecting the power consumption of the mobile terminal when the mobile terminal plays the audio through the loudspeaker.
Step S420: and when the power consumption of the mobile terminal is larger than the designated power consumption, acquiring scene data through the sensor.
In the embodiment of the present application, step S410 and step S420 may refer to the content of the foregoing embodiment, and are not described herein.
Step S430: and determining the current scene of the mobile terminal according to the scene data, wherein the requirements of different scenes on the stereo sound effect are different.
In the embodiment of the application, the scene where the mobile terminal is located can be divided into a target scene of weak environmental noise and a scene of environmental noise with other intensities. If the volume of the environmental noise is larger than the preset volume, a scene with weak environmental noise can be determined; if the volume of the environmental noise is less than or equal to the preset volume, a scene of the environmental noise of other intensities may be determined. The specific magnitude of the preset sound volume may not be limited, and may be, for example, 40 db, 45 db, or the like. It can be appreciated that, under the condition that the speakers are at the same output power, the loudness of sound that can be perceived by the user when the mobile terminal plays audio in a scene with weak environmental noise is generally better than the loudness of sound that can be perceived by the user when the mobile terminal plays audio in a scene with strong environmental noise. Therefore, the scenes are divided, and the output power of the loudspeaker can be adjusted for different scenes.
Step S440: and when the current scene is a scene with non-required stereo sound effect and the current scene is a target scene, closing at least one of the at least two speakers, and reducing the volume of at least one of the speakers in a working state, wherein the volume of the environmental noise of the target scene is lower than a scene with preset volume.
In the embodiment of the application, because the sound volume effect of the mobile terminal in the environment with weak environmental noise is higher than the sound volume effect in the environment with other environmental noise, when the current scene is a scene with non-required stereo sound effect and the current scene is a target scene, the mobile terminal can turn off at least one of the at least two speakers and simultaneously reduce the sound volume of at least one of the speakers in a working state; when the current scene is a scene of non-desired stereo sound effect and the current scene is not a target scene, at least one speaker of the at least two speakers may be turned off only. Therefore, the power consumption of the loudspeaker can be reduced, the sound output by the loudspeaker can be matched with a scene, the power consumption of the loudspeaker can be reduced as much as possible, and the phenomenon that the sound output by the loudspeaker cannot adapt to the scene and a user cannot hear the sound after the output power is reduced is avoided.
Step S450: and when the current scene is a scene of the mobile terminal in which stereo sound effect is required and the current scene is the target scene, controlling the at least two speakers to work simultaneously, and reducing the volume of at least one speaker.
Because the sound volume effect of the mobile terminal in the environment with weak environmental noise is higher than the sound volume effect in the environment with environmental noise with other intensities, when the current scene is a scene requiring stereo sound effect and the current scene is a target scene, the stereo sound effect needs to be ensured, the sound volume of at least one loudspeaker can be reduced while at least two loudspeakers are controlled to work simultaneously; when the current scene is a scene requiring stereo sound effect and the current scene is not a target scene, at least two speakers can be controlled to work simultaneously without reducing the volume of the speakers. Therefore, the power consumption of the loudspeaker can be reduced, the sound output by the loudspeaker can be matched with the scene, the requirement of a user on stereo sound effect is met, the power consumption of the loudspeaker can be reduced as much as possible, and the phenomenon that the sound output by the loudspeaker cannot adapt to the scene after the output power is reduced, so that the user cannot hear the sound is avoided.
In some embodiments, the indoor scene, the outdoor scene, and the target scene may be combined, that is, when adjusting the output power of the speaker, both the indoor or outdoor situation and the actual environmental noise may be considered.
Specifically, when the current scene is a scene requiring stereo sound effect, if the mobile terminal is in an indoor scene and a target scene, the volume of a first number of speakers can be reduced while controlling at least two speakers to work, and if the mobile terminal is in an indoor scene but not in a target scene, the volume of a second number of speakers can be reduced, wherein the first number is greater than the second number; when the current scene is a scene requiring stereo sound effect, if the mobile terminal is not in an indoor scene but in a target scene, the volume of a third number of speakers can be reduced while controlling at least two speakers to work, and if the mobile terminal is not in an indoor scene or in a target scene, the volume of a fourth number of speakers can be reduced, wherein the third number is larger than the second number, and the fourth number is larger than the third number.
Specifically, when the current scene is a scene requiring no stereo sound effect, if the mobile terminal is in an indoor scene and a target scene, the volume of a fifth number of speakers may be reduced while at least one speaker is turned off, and if the mobile terminal is in an indoor scene but not in a target scene, the volume of a sixth number of speakers may be reduced, wherein the fifth number is greater than the sixth number; when the current scene is a scene requiring stereo sound effect, if the mobile terminal is not in an indoor scene but in a target scene, the volume of a seventh number of speakers may be reduced while at least one speaker is turned off, and if the mobile terminal is not in an indoor scene or in a target scene, the volume of an eighth number of speakers may be reduced, wherein the seventh number is greater than the sixth number and the eighth number is greater than the seventh number.
Of course, in the above manner, the control of the power consumption of the speaker in different scenes can also be achieved by adjusting the volume of different degrees.
According to the loudspeaker control method provided by the embodiment of the application, when the power consumption of the mobile terminal is larger than the designated power consumption, according to the different requirements of the scene where the mobile terminal is located on the stereo effect, when the current scene is the scene requiring the stereo effect, the volume of the loudspeaker is only reduced, and when the current scene is the scene not requiring the stereo effect, at least one loudspeaker is closed. And when controlling the loudspeaker, still consider the influence of environmental noise to sound propagation, further control to the target scene of weak environmental noise, further reduce the consumption of loudspeaker for the sound of speaker output can match with the scene, satisfies the demand of user to stereophonic sound effect, also avoids reducing after the output, and the unable adaptation scene of sound of speaker output, and the phenomenon emergence of messenger's user's unable sound of hearing, also effectually reduced the consumption of mobile terminal, avoided the great circumstances of consumption of mobile terminal to continuously take place, and then promoted mobile terminal's duration.
Referring to fig. 6, a block diagram of a speaker control device 400 according to an embodiment of the application is shown. The speaker control device 400 is applied to the mobile terminal, and the mobile terminal includes at least two speakers and a sensor for collecting scene data of a scene in which the mobile terminal is located, where the at least two speakers are used for generating stereo sound effects when they work simultaneously. The speaker control device 400 includes: a power consumption detection module 410, a data acquisition module 420, a scene determination module 430, and a power control module 440. The power consumption detection module 410 is configured to detect power consumption of the mobile terminal when the mobile terminal plays audio through the speaker; the data acquisition module 420 is configured to acquire scene data through the sensor when the power consumption of the mobile terminal is greater than a specified power consumption; the scene determining module 430 is configured to determine, according to the scene data, a current scene in which the mobile terminal is located, where requirements of different scenes on stereo sound effects are different; the power control module 440 is configured to turn off at least one speaker of the at least two speakers and/or reduce the volume of at least one speaker according to the current scene.
In some implementations, the power control module 440 may include: a first control unit and a second control unit. The first control unit is used for closing at least one loudspeaker in the at least two loudspeakers when the current scene is a scene of the mobile terminal in which the stereo sound effect is not required; and the second control unit is used for controlling the at least two speakers to work simultaneously and reducing the volume of at least one speaker when the current scene is a scene of the mobile terminal in which the stereo sound effect is required.
As an embodiment, the first control unit may be specifically configured to: when the current scene is a scene with non-required stereo sound effect and the current scene is an indoor scene, closing at least one of the at least two speakers, and reducing the volume of at least one of the speakers in a working state; and when the current scene is a scene with non-required stereo sound effect and the current scene is an outdoor scene, closing at least one loudspeaker in the at least two loudspeakers.
As another embodiment, the second control unit may be specifically configured to: when the current scene is a scene of the mobile terminal in which stereo sound effect is required and the current scene is an indoor scene, controlling the at least two speakers to work simultaneously, and reducing the volume of at least one speaker; and when the current scene is a scene of the mobile terminal in which stereo sound effect is required and the current scene is an outdoor scene, controlling the at least two speakers to work simultaneously.
As a further embodiment, the first control unit may be specifically configured to: and when the current scene is a scene with non-required stereo sound effect and the current scene is a target scene, closing at least one of the at least two speakers, and reducing the volume of at least one of the speakers in a working state, wherein the volume of the environmental noise of the target scene is lower than a scene with preset volume. The second control unit may be specifically configured to: and when the current scene is a scene of the mobile terminal in which stereo sound effect is required and the current scene is the target scene, controlling the at least two speakers to work simultaneously, and reducing the volume of at least one speaker.
In some implementations, the power control module 440 may also include an audio determination unit. The audio determining unit is used for determining the audio type of the audio before the first control unit turns off at least one loudspeaker of the at least two loudspeakers; when the audio type is other than the multimedia audio type, the first control unit turns off at least one speaker of the at least two speakers; the second control unit may be further configured to control the at least two speakers to operate simultaneously when the audio type is a multimedia audio type, and reduce the volume of at least one speaker.
In some embodiments, the second control unit may be specifically configured to: acquiring a first distance between the left ear of a user and the mobile terminal and a second distance between the right ear of the user and the mobile terminal; if the first distance is less than the second distance, reducing the volume of a speaker of the at least two speakers for providing left channel sound effects; and if the first distance is greater than the second distance, reducing the volume of a speaker used for providing the sound effect of the right channel in the at least two speakers.
In other embodiments, the second control unit may also be specifically configured to: the distance between the left ear of the user and each loudspeaker and the distance between the right ear of the user and each loudspeaker are obtained; determining a first speaker closest to the left ear of the at least two speakers as a speaker providing a left channel sound effect according to the distance between the left ear and each speaker; determining a second speaker closest to the right ear from the at least two speakers as a speaker providing a right channel sound effect according to the distance between the right ear and each speaker; and reducing the volume of other speakers except the first speaker and the second speaker in the at least two speakers.
In some embodiments, the scene data comprises gravity sensing data. The scene determination module may be specifically configured to: when the mobile terminal is detected to be in a horizontal screen state according to the gravity sensing data, determining that the current scene where the mobile terminal is positioned is a scene requiring stereo sound effect; and when the mobile terminal is detected to be in a vertical screen state according to the gravity sensing data, determining that the current scene where the mobile terminal is positioned is a scene with non-required stereo sound effect.
In other embodiments, the scene data includes motion data. The scene determining module may be specifically configured to determine, when the mobile terminal is detected to be in a stationary state according to the motion data, that a current scene in which the mobile terminal is located is a scene requiring stereo sound effect; and when the mobile terminal is detected to be in a moving state according to the motion data, determining that the current scene where the mobile terminal is positioned is a scene with non-required stereo sound effect. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In several embodiments provided by the present application, the coupling of the modules to each other may be electrical, mechanical, or other.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
In summary, according to the scheme provided by the application, when the mobile terminal plays the audio through the speaker, the power consumption of the mobile terminal is detected, when the power consumption of the mobile terminal is larger than the designated power consumption, the scene data of the scene where the mobile terminal is located is collected through the sensor, the current scene where the mobile terminal is located is determined according to the scene data, wherein the requirements of different scenes on the stereo effect are different, then at least one speaker of the at least two speakers is closed according to the current scene, and/or the volume of the at least one speaker is reduced, so that when the power consumption of the mobile terminal is larger than the designated power consumption, at least one speaker of the at least two speakers is closed according to the scenes with different requirements on the stereo effect, and/or the volume of the at least one speaker is reduced, so that the output power of the speaker is reduced, the power consumption of the mobile terminal brought by the speaker is reduced, and the cruising ability of the mobile terminal is improved.
Fig. 7 is a block diagram of a mobile terminal according to an embodiment of the present application. The mobile terminal 100 may be a mobile terminal capable of running an application program such as a smart phone, a tablet computer, a smart watch, etc. The mobile terminal 100 of the present application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, wherein the one or more application programs may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more program(s) configured to perform the method as described in the foregoing method embodiments.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall mobile terminal 100 using various interfaces and lines, performs various functions of the mobile terminal 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 110 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 110 and may be implemented solely by a single communication chip.
The Memory 120 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data created by the mobile terminal 100 in use (e.g., phonebook, audio-video data, chat-record data), etc.
Referring to fig. 8, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 800 has stored therein program code which can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 comprises a non-volatile computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be appreciated by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for controlling speakers, applied to a mobile terminal, the mobile terminal including at least two speakers and a sensor for collecting scene data of a scene in which the mobile terminal is located, the at least two speakers being configured to generate a stereophonic sound effect when operated simultaneously, the method comprising:
detecting the power consumption of the mobile terminal when the mobile terminal plays the audio through the loudspeaker;
when the power consumption of the mobile terminal is larger than the designated power consumption, acquiring scene data through the sensor;
determining a current scene in which the mobile terminal is positioned according to the scene data, wherein the requirements of different scenes on stereo sound effect are different;
Turning off at least one speaker of the at least two speakers and/or reducing the volume of the at least one speaker according to the current scene;
wherein said turning off at least one of said at least two speakers and/or lowering the volume of at least one speaker according to said current scene comprises:
when the current scene is a scene requiring stereo sound effect of the mobile terminal, controlling the at least two speakers to work simultaneously, and reducing the volume of at least one speaker;
when the current scene is a scene of the mobile terminal in which stereo sound effect is required, controlling the at least two speakers to work simultaneously, and reducing the volume of at least one speaker, wherein the method comprises the following steps:
when the current scene is a scene of the mobile terminal in which stereo sound effect is required and the current scene is an indoor scene, controlling the at least two speakers to work simultaneously, and reducing the volume of at least one speaker; or alternatively
When the current scene is a scene of the mobile terminal in which stereo sound effect is required and the current scene is a target scene, controlling the at least two speakers to work simultaneously and reducing the volume of at least one speaker, wherein the volume of the environmental noise of the target scene is lower than a preset volume.
2. The method of claim 1, wherein the turning off at least one of the at least two speakers and/or the lowering of the volume of at least one speaker according to the current scene further comprises:
and when the current scene is a scene of the mobile terminal in which the stereophonic sound effect is not required, closing at least one loudspeaker in the at least two loudspeakers.
3. The method of claim 2, wherein turning off at least one of the at least two speakers when the current scene is a scene in which the mobile terminal is in an unwanted stereo sound effect, comprises:
when the current scene is a scene with non-required stereo sound effect and the current scene is an indoor scene, closing at least one of the at least two speakers, and reducing the volume of at least one of the speakers in a working state;
and when the current scene is a scene with non-required stereo sound effect and the current scene is an outdoor scene, closing at least one loudspeaker in the at least two loudspeakers.
4. The method of claim 2, wherein turning off at least one of the at least two speakers when the current scene is a scene in which the mobile terminal is in an unwanted stereo sound effect, comprises:
And when the current scene is a scene with non-required stereo sound effect and the current scene is the target scene, closing at least one loudspeaker in the at least two loudspeakers, and reducing the volume of at least one loudspeaker in the working state.
5. The method of any of claims 2-4, wherein the reducing the volume of at least one speaker comprises:
acquiring a first distance between the left ear of a user and the mobile terminal and a second distance between the right ear of the user and the mobile terminal;
if the first distance is less than the second distance, reducing the volume of a speaker of the at least two speakers for providing left channel sound effects;
and if the first distance is greater than the second distance, reducing the volume of a speaker used for providing the sound effect of the right channel in the at least two speakers.
6. The method of any of claims 2-4, wherein the reducing the volume of at least one speaker comprises:
the distance between the left ear of the user and each loudspeaker and the distance between the right ear of the user and each loudspeaker are obtained;
determining a first speaker closest to the left ear of the at least two speakers as a speaker providing a left channel sound effect according to the distance between the left ear and each speaker;
Determining a second speaker closest to the right ear from the at least two speakers as a speaker providing a right channel sound effect according to the distance between the right ear and each speaker;
and reducing the volume of other speakers except the first speaker and the second speaker in the at least two speakers.
7. The method of claim 1, wherein the scene data comprises gravity sensing data or motion data, and wherein the determining the current scene in which the mobile terminal is located according to the scene data comprises:
when the mobile terminal is detected to be in a horizontal screen state according to the gravity sensing data or is detected to be in a static state according to the motion data, determining that the current scene where the mobile terminal is positioned is a scene requiring stereo sound effect;
and when the mobile terminal is detected to be in a vertical screen state according to the gravity sensing data or is detected to be in a moving state according to the motion data, determining that the current scene where the mobile terminal is positioned is a scene with non-required stereo sound effect.
8. A control device for a speaker, applied to a mobile terminal, the mobile terminal comprising at least two speakers and a sensor for acquiring scene data of a scene in which the mobile terminal is located, the at least two speakers being operable simultaneously to produce a stereophonic sound effect, the device comprising: the system comprises a power consumption detection module, a data acquisition module, a scene determination module and a power control module, wherein,
The power consumption detection module is used for detecting the power consumption of the mobile terminal when the mobile terminal plays the audio through the loudspeaker;
the data acquisition module is used for acquiring scene data through the sensor when the power consumption of the mobile terminal is greater than the specified power consumption;
the scene determining module is used for determining a current scene in which the mobile terminal is positioned according to the scene data, wherein the requirements of different scenes on stereo sound effect are different;
the power control module is used for turning off at least one loudspeaker of the at least two loudspeakers according to the current scene and/or reducing the volume of the at least one loudspeaker;
the power control module is further used for controlling the at least two speakers to work simultaneously and reducing the volume of at least one speaker when the current scene is a scene of the mobile terminal in which stereo sound effect is required;
the power control module is further configured to control the at least two speakers to work simultaneously and reduce a volume of at least one speaker when the current scene is a scene where the mobile terminal is in a requirement of stereo sound effect and the current scene is an indoor scene, or control the at least two speakers to work simultaneously and reduce a volume of at least one speaker when the current scene is a scene where the mobile terminal is in a requirement of stereo sound effect and the current scene is a target scene, wherein a volume of environmental noise of the target scene is lower than a preset volume.
9. A mobile terminal, comprising:
one or more processors;
a memory;
one or more program code, wherein the one or more program code is stored in the memory and configured to be executed by the one or more processors, the one or more program code configured to perform the method of any of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, which is callable by a processor for executing the method according to any one of claims 1-7.
CN202010357019.7A 2020-04-29 2020-04-29 Speaker control method and device, mobile terminal and storage medium Active CN113660599B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010357019.7A CN113660599B (en) 2020-04-29 2020-04-29 Speaker control method and device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010357019.7A CN113660599B (en) 2020-04-29 2020-04-29 Speaker control method and device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113660599A CN113660599A (en) 2021-11-16
CN113660599B true CN113660599B (en) 2023-12-01

Family

ID=78488638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010357019.7A Active CN113660599B (en) 2020-04-29 2020-04-29 Speaker control method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113660599B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116782108B (en) * 2023-08-23 2023-11-24 荣耀终端有限公司 Speaker control method, electronic device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412716A (en) * 2016-09-30 2017-02-15 乐视控股(北京)有限公司 Method and apparatus for adjusting multimedia playing effect, and electronic device
CN108521521A (en) * 2018-04-19 2018-09-11 Oppo广东移动通信有限公司 volume adjusting method, mobile terminal and computer readable storage medium
CN108605088A (en) * 2016-12-24 2018-09-28 华为技术有限公司 A kind of camera control method and terminal
CN110167116A (en) * 2019-05-22 2019-08-23 努比亚技术有限公司 Control method, equipment and the computer readable storage medium of wearable device
CN110876180A (en) * 2018-08-31 2020-03-10 Oppo广东移动通信有限公司 Power consumption processing method and device, electronic equipment and computer readable medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160098720A (en) * 2015-02-11 2016-08-19 엘지전자 주식회사 Mobile terminal and method for controlling the same
CN105116766B (en) * 2015-07-09 2017-09-29 广东欧珀移动通信有限公司 A kind of sound box parameter collocation method, mobile terminal, server and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412716A (en) * 2016-09-30 2017-02-15 乐视控股(北京)有限公司 Method and apparatus for adjusting multimedia playing effect, and electronic device
CN108605088A (en) * 2016-12-24 2018-09-28 华为技术有限公司 A kind of camera control method and terminal
CN108521521A (en) * 2018-04-19 2018-09-11 Oppo广东移动通信有限公司 volume adjusting method, mobile terminal and computer readable storage medium
CN110876180A (en) * 2018-08-31 2020-03-10 Oppo广东移动通信有限公司 Power consumption processing method and device, electronic equipment and computer readable medium
CN110167116A (en) * 2019-05-22 2019-08-23 努比亚技术有限公司 Control method, equipment and the computer readable storage medium of wearable device

Also Published As

Publication number Publication date
CN113660599A (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US11251763B2 (en) Audio signal adjustment method, storage medium, and terminal
CN108683798B (en) Sound output control method and mobile terminal
CN107509153B (en) Detection method and device of sound playing device, storage medium and terminal
CN109284080B (en) Sound effect adjusting method and device, electronic equipment and storage medium
EP3846020A1 (en) Sound effect adjusting method and apparatus, electronic device, and storage medium
CN111370018B (en) Audio data processing method, electronic device and medium
CN111638779A (en) Audio playing control method and device, electronic equipment and readable storage medium
CN110876180B (en) Power consumption processing method and device, electronic equipment and computer readable medium
WO2023071425A1 (en) Volume control method and apparatus, and electronic device and storage medium
CN111613213B (en) Audio classification method, device, equipment and storage medium
CN111033614A (en) Volume adjusting method and device, mobile terminal and storage medium
CN107483734B (en) Volume adjusting method and device, terminal equipment and storage medium
CN113660599B (en) Speaker control method and device, mobile terminal and storage medium
CN110058837B (en) Audio output method and terminal
CN113422866B (en) Volume adjusting method and device, storage medium and electronic equipment
CN111988704B (en) Sound signal processing method, device and storage medium
CN111081283A (en) Music playing method and device, storage medium and terminal equipment
CN107506168B (en) Volume adjusting method and device, terminal equipment and storage medium
CN114360546A (en) Electronic equipment and awakening method thereof
CN106331356B (en) Volume control method and terminal
US11388281B2 (en) Adaptive method and apparatus for intelligent terminal, and terminal
CN114710730A (en) Volume prompting method and device, earphone and storage medium
CN116069287A (en) Volume control method and device and electronic equipment
CN109348021B (en) Mobile terminal and audio playing method
CN113905302A (en) Method and device for triggering prompt message and earphone

Legal Events

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