CN113660599A - Loudspeaker control method and device, mobile terminal and storage medium - Google Patents

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

Info

Publication number
CN113660599A
CN113660599A CN202010357019.7A CN202010357019A CN113660599A CN 113660599 A CN113660599 A CN 113660599A CN 202010357019 A CN202010357019 A CN 202010357019A CN 113660599 A CN113660599 A CN 113660599A
Authority
CN
China
Prior art keywords
scene
mobile terminal
loudspeaker
sound effect
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.)
Granted
Application number
CN202010357019.7A
Other languages
Chinese (zh)
Other versions
CN113660599B (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

Images

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

Abstract

The application discloses a control method and a control 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 used for collecting scene data of a scene where the mobile terminal is located, the at least two loudspeakers are used for generating stereo sound effect when working simultaneously, and the method comprises the following steps: when the mobile terminal plays audio through the two speakers, detecting the power consumption of the mobile terminal; when the power consumption of the mobile terminal is larger than the specified power consumption, scene data are collected through the sensor; determining the current scene of the mobile terminal according to the scene data, wherein different scenes have different requirements on the stereo sound effect; according to the current scene, at least one loudspeaker of the at least two loudspeakers is turned off, and/or the volume of 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

Loudspeaker control method and device, mobile terminal and storage medium
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to a method and an apparatus for controlling a speaker, a mobile terminal, and a storage medium.
Background
With rapid progress of the technology level and the living standard, mobile terminals have gradually become an important tool indispensable 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 audio through a loudspeaker, larger power consumption is 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 speaker control method, device, mobile terminal and storage medium.
In a first aspect, an embodiment of the present application provides a speaker control method, which is applied to a mobile terminal, where the mobile terminal includes at least two speakers and a sensor for acquiring scene data of a scene where the mobile terminal is located, and the at least two speakers are used to generate a stereo sound effect when working simultaneously, where the method includes: detecting the power consumption of the mobile terminal when the mobile terminal plays audio through the loudspeaker; when the power consumption of the mobile terminal is larger than the specified power consumption, acquiring scene data through the sensor; determining the current scene of the mobile terminal according to the scene data, wherein different scenes have different requirements on the stereo sound effect; and according to the current scene, reducing the output power of the loudspeaker to turn off at least one loudspeaker of the at least two loudspeakers, and/or reducing the volume of at least one loudspeaker.
In a second aspect, an embodiment of the present application provides a speaker control apparatus, which is applied to a mobile terminal, where the mobile terminal includes at least two speakers and a sensor for acquiring scene data of a scene where the mobile terminal is located, and the at least two speakers are used to generate stereo sound effects when working simultaneously, and the apparatus includes: 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 audio through a 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 the current scene where the mobile terminal is located according to the scene data, wherein different scenes have different requirements on the stereo sound effect; the power control module is used for turning off at least one loudspeaker of the at least two loudspeakers and/or reducing the volume of at least one loudspeaker according to the current scene.
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, wherein the one or more program codes are 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 as provided in the first aspect above.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be called by a processor to execute the method for controlling a speaker provided in the first aspect.
According to the scheme provided by the application, when the mobile terminal plays audio through the loudspeaker of the mobile terminal, the power consumption of the mobile terminal is detected, when the power consumption of the mobile terminal is larger than the specified 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 different scenes have different requirements on the stereo sound effect, 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 specified 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, the output power of the loudspeaker is reduced, and the power consumption brought to the mobile terminal by the loudspeaker is reduced, the cruising ability of the mobile terminal is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
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 present application.
Fig. 4 shows a flowchart of a method of controlling a loudspeaker according to a further embodiment of the present application.
Fig. 5 shows a flowchart of a method of controlling a loudspeaker according to yet 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 method of controlling a speaker according to an embodiment of the present application.
Fig. 8 is a storage unit of an embodiment of the present application 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 make the technical solutions better understood by those skilled in the art, 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.
With the development of mobile terminals, the functions of the mobile terminals are more and more. In general, a mobile terminal may play audio through a speaker, for example, music sound is output through the speaker, and video sound is output through the speaker.
And, with the demand of people becoming higher and higher, the broadcast effect of the speaker of mobile terminal is better and better. For example, the mobile terminal can realize the playing effect of stereo sound, improve the loudness of sound, and the like by arranging a plurality of speakers; for another example, the mobile terminal is provided with a speaker with better output performance to improve the playing effect.
After long-term research, the inventor finds that while the loudspeaker in the mobile terminal is continuously updated and improved, the power consumption caused by the loudspeaker playing audio is larger and larger, and influences are caused on standby and endurance of the mobile terminal.
In view of the above problems, the inventor provides a method and an apparatus for controlling a speaker, a mobile terminal, and a storage medium, which are provided in the embodiments of the present application, and can reduce output power of the speaker according to a scene where the mobile terminal is located when power consumption of the mobile terminal is greater than a specified power consumption, so as to reduce power consumption of the mobile terminal caused by the speaker and improve cruising ability of the mobile terminal. A 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 can be a smart phone, a tablet computer, a smart watch, and the like, 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 disclosure, in which 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 used for outputting 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, and the like, where the sound sensor may collect ambient sound of a scene where the mobile terminal is located, the brightness sensor may collect ambient brightness of the scene where the mobile terminal is located, the GPS sensor may be configured to detect a location where the mobile terminal is located, the ambient sound, the ambient brightness, the location, and the like collected by the sensor 140 may be used as scene data of the scene where the mobile terminal is located, and are used to determine the scene where the mobile terminal 100 is located, for example, that the mobile terminal 100 is located in an indoor scene or an outdoor scene, and for example, that the mobile terminal 100 is located in a scene with strong ambient noise or a scene with weak ambient noise. Of course, the particular type of sensor 140 used to collect scene data may not be limiting. It should be understood that other sensors may also be disposed in the mobile terminal 100, such as a temperature sensor for detecting a temperature inside the mobile terminal (e.g., a battery panel temperature, a motherboard temperature), and so on.
In the embodiment of the present application, the number of the speakers 130 provided in the mobile terminal 100 may not be limited, and may be plural, and the plural speakers 130 are used to generate a stereo sound effect when working together. For example, in the mobile terminal 100 shown in fig. 1, the mobile terminal 100 includes two speakers 130, wherein 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 the speakers 130 is plural, the position where each speaker 130 is disposed may not be limited.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for controlling a speaker according to an embodiment of the present 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) equipped with the speaker control apparatus 400. The mobile terminal comprises a plurality of loudspeakers and a sensor used for collecting scene data of a scene where the mobile terminal is located, and the loudspeakers are used for generating stereo sound effects when working together. The following will describe a specific flow of the present embodiment by taking a mobile terminal as an example. As will be described in detail with respect to the flow shown in fig. 2, the method for controlling a speaker may specifically include the following steps:
step S110: and when the mobile terminal plays audio through the loudspeaker, detecting the power consumption of the mobile terminal.
In the embodiment of the application, the mobile terminal can detect the condition of playing audio, and when the condition of playing audio is detected, determine whether to output sound by the loudspeaker. The mobile terminal can detect whether an application plays audio or whether an audio decoder works, and the like, and determine whether the audio is played. In some manners, when the mobile terminal detects that the mobile terminal is in an audio playing condition, it may detect whether an external audio playing device (e.g., a wired headset, a bluetooth sound device, etc.) is connected, and if the mobile terminal is not connected with an external audio part device, the mobile terminal may play audio using a speaker, so that it may be determined that the mobile terminal currently plays audio through the speaker; in other manners, the mobile terminal may also determine a current sound output mode (e.g., an earphone mode, a play-out mode, etc.), and if the current sound output mode is the play-out mode, it may be determined that the mobile terminal is currently playing audio through the speaker.
In the embodiment of the application, when the mobile terminal plays 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 caused by the loudspeaker can be reduced by subsequently adjusting the output power of the loudspeaker.
In some embodiments, the mobile terminal may determine its current power consumption by detecting a power consumption condition, an internal temperature condition, an operating condition of a sensor with large power consumption, and the like. And the mobile terminal can detect whether the power consumption is larger than the specified power consumption, wherein the power consumption represents the situation that the power consumption of the mobile terminal is larger and the current power consumption needs to be reduced. As an embodiment, the mobile terminal may count power consumption in a specified time period before the current time to determine the current power consumption of the mobile terminal, where the specified time period may be 10 minutes, 20 minutes, and the like, and 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, wherein if the power consumption of the mobile terminal is larger than the specified power consumption, the current power consumption of the mobile terminal may be determined to be larger. The specific value specifying power consumption may not be limiting. As another embodiment, the mobile terminal may detect the temperature inside the mobile terminal, and regard a case where the temperature is greater than a specified temperature as a case where the power consumption is greater than a specified power consumption, that is, as a case where the power consumption is greater, where a specific value of the specified temperature may not be limited, and may be, for example, 30 degrees, 35 degrees, and the like. As another embodiment, the mobile terminal may detect an application running thereon, determine current power consumption according to power consumption occupied by the application in the past running, and compare the current power consumption with the specified power consumption to determine whether the current power consumption of the mobile terminal is larger; as another implementation manner, the mobile terminal may determine, according to power consumption occupied by the application in the past operation, a target application whose power consumption during operation is greater than specified power consumption, and determine, each time the mobile terminal determines whether current power consumption is greater than the specified power consumption, whether the target application is in an operation state, and if the target application is in the operation state, determine that the power consumption of the mobile terminal is greater than the specified power consumption. As still another embodiment, the mobile terminal may detect whether a sensor with large power consumption therein is working, for example, may detect whether a GPS (Global Positioning System) sensor is in a working state, and if in the working state, 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 specified power consumption, acquiring scene data through the sensor.
In some embodiments, when the mobile terminal determines that the power consumption of the mobile terminal is greater than the specified power consumption, scene data may be collected by a sensor to determine a current scene and reduce the power of a speaker according to the current scene. The mobile terminal can control the sensor for acquiring the scene data of the scene where the mobile terminal is located to work so as to acquire the scene data of the scene where the mobile terminal is located, and the acquired scene data is obtained from the sensor. The scene data is used for the mobile terminal to determine the scene where the mobile terminal is located so as to control the operation of the loudspeaker according to the scene where the mobile terminal 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 for the stereo sound effect, that is, the requirements of different scenes for the stereo sound effect are different, so that the scene where the mobile terminal is located can be determined subsequently, the output power of the loudspeaker can be controlled according to different scenes, the stereo sound effect of the scene can be met by the loudspeaker, 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, and the scene data may reflect a requirement of a use state of the mobile terminal for a stereo sound effect, so that a current scene where the mobile terminal is located may be determined.
Of course, the scene data may also be used to represent an influence of the current scene on sound propagation, that is, different scenes have different influence on sound propagation, and the scene data may also include an environmental sound of a scene where the mobile terminal is located, an environmental brightness of the scene where the mobile terminal is located, a location where the mobile terminal is located, and the like.
Step S130: and determining the current scene of the mobile terminal according to the scene data, wherein different scenes have different requirements on the stereo sound effect.
In the embodiment of the application, after the mobile terminal acquires the scene data, the current scene where the mobile terminal is located can be determined according to the scene data, and the scene can be divided according to different requirements on the stereo sound effect, so that the mobile terminal can subsequently determine the scene with different requirements on the stereo sound effect according to the scene data. The mobile terminal can pre-store scenes with different requirements for the stereo effect, and can compare the scene data with scene data corresponding to different scenes according to the scene data to determine the current scene where the mobile terminal is located. For example, the mobile terminal also stores the corresponding relationship between different scenes and scene data, and the current scene where the mobile terminal is located can be determined by using the acquired scene data and the corresponding relationship; for another example, a scene recognition model trained in advance is set in the mobile terminal, and the scene recognition model is obtained by training an initial model with a large amount of training data, where the training data may include a plurality of pieces of scene data and a scene labeled to each piece of scene data, and the mobile terminal may input the obtained pieces of scene data to the scene recognition model, so as to obtain a current scene where the mobile terminal is located.
Step S140: according to the current scene, at least one loudspeaker of the at least two loudspeakers is turned off, and/or the volume of at least one loudspeaker is reduced.
In some embodiments, at least one of the at least two speakers may be turned off and/or the volume of at least one speaker may be reduced depending on the determined current scene, since different scenes may have different requirements for the stereo effect. The mobile terminal can reduce the output power of the loudspeaker by different sizes according to different scenes according to different requirements of different scenes on the stereo effect. For example, for a scene that does not require stereo sound effect, at least one speaker may be turned off, or the volume of other speakers may be reduced while at least one speaker is turned off; for scenes where a stereo sound effect is desired, the volume of at least one speaker may be reduced. Therefore, the sound output by the loudspeaker after the output power is reduced can meet the requirement of a scene on the stereo sound effect, the requirement of a user on the playing effect of the audio is met, the power consumption caused 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, and the cruising ability of the mobile terminal is improved.
The control method of the loudspeaker provided by the embodiment of the application, when the power consumption of the mobile terminal is larger than the specified power consumption, according to the difference of the demands of the scene where the mobile terminal is located on the stereo sound effect, the loudspeaker is closed and/or the volume of the loudspeaker is reduced, so that under the scene where the demands on the stereo sound effect are different, the sound output by the loudspeaker of the mobile terminal can be matched with the scene, the demands of the scene on the stereo sound effect are met, the demands of a user on the audio playing effect 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 improved.
Referring to fig. 3, fig. 3 is a flow chart illustrating a method for controlling a speaker according to 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. 3, and the method for controlling the speaker may specifically include the following steps:
step S210: and when the mobile terminal plays audio through the loudspeaker, detecting the power consumption of the mobile terminal.
In the embodiment of the present application, step S210 may refer to the contents of the foregoing embodiments, which are not described herein again.
Step S220: and when the power consumption of the mobile terminal is larger than the specified power consumption, acquiring scene data through the sensor.
In this embodiment of the present application, when the mobile terminal detects that audio is played through a speaker, before performing steps S210 to S250, it may further 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 process from step S210 to step S250 is executed, and if the mobile terminal is not in the preset control mode, the process 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, the user does not want the mobile terminal to control the output power of the loudspeaker, and when the user wants to control the output power by the mobile terminal, the preset control mode can be turned off; and the user hopes that the mobile terminal controls the output power of the loudspeaker, and saves the power consumption of the mobile terminal, and can select to start the preset control mode.
Step S230: and determining the current scene of the mobile terminal according to the scene data, wherein different scenes have different requirements on the stereo sound effect.
In some implementations, the scene data can 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 a current scene where the mobile terminal is located is a scene needing 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 located is a scene with the non-required stereo sound effect.
In this embodiment, if the mobile terminal is in a landscape state, i.e. the screen of the mobile terminal is in a landscape mode, in this case, the mobile terminal is usually playing music, video and game scenes, so that the user usually needs to play a stereo sound; and mobile terminal is in the state of putting of erecting the screen, and when mobile terminal's screen was in the mode of erecting the screen promptly, under this condition, mobile terminal was for output condition such as suggestion audio frequency, conversation audio frequency most of the time, therefore mobile terminal was when erecting screen broadcast state, need not carry out stereophonic broadcast most of the time. Therefore, whether the current scene is the scene requiring the stereo sound effect can be determined according to the horizontal screen placing state or the vertical screen placing state of the mobile terminal. A gravity sensor may be provided in the mobile terminal. 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 located is a scene needing 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 located is a scene with the non-required stereo sound effect.
In this embodiment, when the mobile terminal is in a mobile state, the mobile terminal is usually in a walking state, a running state, or the like, and at this time, the user often does not have a requirement on the stereo sound effect, so that when the mobile terminal is in the mobile state, it can be determined that the current scene is a scene requiring the stereo sound effect; otherwise, when the mobile terminal is in a motion state, it may be determined that the current scene where the mobile terminal is located is a scene of the sound effect of the non-required stereo. 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 with the non-demand stereo sound effect of the mobile terminal, closing at least one loudspeaker of the at least two loudspeakers.
In the embodiment of the application, after the mobile terminal determines the current scene where the mobile terminal is located, the mobile terminal may manage and control at least two speakers according to the current scene. Specifically, when the current scene is a scene in which the mobile terminal is in an undesirable stereo sound effect, at least one speaker is turned off. Since the stereo sound effect is not required in the current scene, one or more speakers may be selected to be turned off to reduce power consumption caused by the speakers. In addition, in some scenarios, it may even be possible to leave only one speaker (e.g., the main speaker) active, while choosing to turn off the other speakers to further reduce power consumption.
In some embodiments, considering that a user may also need a stereo sound effect in some special cases, and the user needs the stereo sound effect usually when multimedia audio is played, the mobile terminal may determine the audio type of the audio when the current scene is a scene without the need for the stereo sound effect; performing turning off at least one speaker 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, the at least two loudspeakers are controlled to work simultaneously, and the volume of the at least one loudspeaker is reduced, so that the requirement of a user on stereo sound effect can be effectively guaranteed, and the condition that the stereo sound effect cannot be generated due to the fact that the mobile terminal controls the loudspeakers to be closed by mistake is generated.
In this embodiment, the audio types may be divided according to application scenarios, wherein the audio types may include: the voice communication system comprises a multimedia type, an alert tone type, a communication voice type and the like, wherein the multimedia type audio can comprise music, video, game audio and the like, the alert tone type audio can comprise a telephone alert tone, an application alert tone, a short message alert tone and the like, and the communication voice type audio can comprise voice of a communication scene such as a digital communication and a network communication.
Step S250: and when the current scene is a scene in which the mobile terminal needs stereo sound effect, controlling the at least two loudspeakers to work simultaneously and reducing the volume of the at least one loudspeaker.
In the embodiment of the application, when the mobile terminal determines that the mobile terminal is in a scene requiring the stereo sound effect, the mobile terminal can control at least two speakers to work simultaneously in order to ensure the normal stereo sound effect, but because the current power consumption of the mobile terminal is higher, the output power of the speakers can be reduced in a mode of reducing the volume of the speakers, and then the power consumption of the speakers is reduced. Wherein the mobile terminal may decrease the volume of one or more speakers.
In some embodiments, the mobile terminal determining that the mobile terminal is in a scene requiring a stereo sound effect, and reducing the volume of the 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 smaller than the second distance, reducing the volume of a loudspeaker used for providing left channel sound effect in at least two loudspeakers; and if the first distance is larger than the second distance, reducing the volume of the loudspeaker for providing the sound effect of the right channel in the at least two loudspeakers.
In this embodiment, because the stereo sound effect is obtained by fusing the sounds of different channels after being transmitted into the corresponding ears, the user can feel the stereo sound effect, and therefore, the mobile terminal can adjust the volume of the speaker of the left channel sound effect down without changing the volume of the speaker of the right channel sound effect if the left ear is closer to the mobile terminal by determining the distance between the two ears of the user, so that the volumes of the sounds of the two channels actually perceived by the user are substantially the same, 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 acquire a depth image of a face of the user through the depth camera, and determine distances from the left ear and the right ear of the user to the mobile terminal respectively according to the depth image, and of course, the distances from the left ear and the right ear of the user to the mobile terminal may also be acquired in other modes, which is not limited herein.
In some embodiments, the mobile terminal determining that the mobile terminal is in a scene requiring a stereo sound effect, and reducing the volume of the 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 loudspeaker which is closest to the left ear in the at least two loudspeakers according to the distance of the left ear relative to each loudspeaker; determining a second loudspeaker closest to the right ear in the at least two loudspeakers according to the distance of the right ear relative to each loudspeaker; and reducing the volume of the other loudspeakers except the first loudspeaker and the second loudspeaker in the at least two loudspeakers.
In some modes, the mobile terminal can acquire a depth image of a face of a user through the depth camera, determine distances from a left ear and a right ear of the user to the depth camera of the mobile terminal respectively according to the depth image, and then determine distances from the left ear and the right ear of the user to each speaker respectively according to a pre-stored spatial position relationship (relative position, distance and the like) between the depth camera and each speaker by the mobile terminal. Different from the previous embodiment, when the number of the speakers of the mobile terminal is more than two, the mobile terminal may select two speakers to be respectively used as the speaker for the left channel sound effect and the speaker for the right channel, and the selected volume of the first speaker and the second speaker is not changed according to the distance between each ear and the speaker, and the other speakers except the two speakers may perform corresponding volume reduction, so as to better satisfy the requirement of the user for the stereo sound effect and reduce the power consumption brought by the speakers.
The control method of the loudspeaker provided by the embodiment of the application has the advantages that when the power consumption of the mobile terminal is larger than the specified power consumption, according to the difference of the demands of the scene where the mobile terminal is located on the stereo sound effect, when the current scene is the scene needing the stereo sound effect, only the volume of the loudspeaker is reduced, when the current scene is the scene needing the stereo sound effect, at least one loudspeaker is closed, so that under the scenes with the different demands on the stereo sound effect, the sound output by the loudspeaker of the mobile terminal can be matched with the scene, the demands of the scene on the stereo sound effect are met, the demands of a user on the audio playing effect 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 improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for controlling a speaker according to 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. 4, and the method for controlling the speaker may specifically include the following steps:
step S310: and when the mobile terminal plays audio through the loudspeaker, detecting the power consumption of the mobile terminal.
Step S320: and when the power consumption of the mobile terminal is larger than the specified power consumption, acquiring scene data through the sensor.
In the embodiment of the present application, step S310 and step S320 may refer to the contents of the foregoing embodiments, and are not described herein again.
Step S330: and determining the current scene of the mobile terminal according to the scene data, wherein different scenes have different requirements on the stereo sound effect.
In the embodiment of the present application, the scene in which the mobile terminal is located may be divided according to the degree of reduction of sound energy, that is, the amount of influence on the volume effect of sound, in addition to the difference in the stereo sound effect. That is, the mobile terminal may determine, according to the scene data, that the current scene is a scene requiring a stereo sound effect or a scene not requiring a stereo sound effect, and may also determine that the current scene is a scene divided according to an influence amount on a volume effect of sound. When the mobile terminal is in different divided scenes and the loudspeaker outputs sound with the same output power, the sound volume effect actually felt by the user is different. Therefore, after the mobile terminal determines the scene where the mobile terminal is located, if the power consumption brought by the loudspeaker needs to be reduced, the output power of the loudspeaker can be controlled according to the influence of different scenes on sound propagation. For example, the scene may be an indoor scene, an outdoor scene, etc.; for another example, the scene may be a scene corresponding to environmental noise of different intensity levels, or the like.
In some embodiments, the scene in which the mobile terminal is located may be divided into an indoor scene and an outdoor scene, and it can be understood that, under the condition that the speakers are at the same output power, the loudness that the user can feel when the mobile terminal is located in the indoor scene to play audio is generally better than the loudness that the user can feel when the mobile terminal is located in the indoor scene to play audio. Thus, by dividing the scenes in this way, the output power of the speakers 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 location of GPS positioning, and the like.
Step S340: and determining that the current scene is the scene of the non-required stereo sound effect.
Step S350: and when the current scene is an indoor scene, closing at least one loudspeaker of the at least two loudspeakers, and simultaneously reducing the volume of at least one loudspeaker in the working state.
Step S360: and when the current scene is an outdoor scene, at least one loudspeaker in the at least two loudspeakers is closed.
In the embodiment of the application, because the sound volume effect of the mobile terminal 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 requirement on stereo sound effect, if the current scene is an indoor scene, at least one loudspeaker in at least two loudspeakers can be closed, and the volume of at least one loudspeaker in the loudspeakers in a working state is reduced, so that the power consumption of the loudspeakers 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 and a user cannot hear the sound after the output power is reduced is avoided.
Further, considering that turning off the speakers may have an effect on sound playing, the effect will be amplified when the mobile terminal is in an outdoor scene, and therefore, in the outdoor scene, it may be to turn off at least one speaker and raise the volume of at least one speaker in an operating state. For example, the mobile terminal includes a main speaker and a sub-speaker, which may be turned off and the volume of the main speaker raised during an outdoor scene.
Step S370: and determining that the current scene is a scene in which the mobile terminal is in need of stereo sound effect.
Step S380: and when the current scene is an indoor scene, controlling the at least two loudspeakers to work simultaneously and reducing the volume of the at least one loudspeaker.
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 the stereo sound effect, because the sound volume effect is lower than that of an indoor scene when the mobile terminal is in an outdoor scene, if the current scene is an indoor scene, because the stereo sound effect needs to be ensured, the simultaneous working of at least two loudspeakers can be controlled, and the volume of at least one loudspeaker is reduced; and if the current scene is an outdoor scene, the at least two loudspeakers can be controlled to work simultaneously without reducing the volume of the loudspeakers, so that the receiving of the sound by the 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 and a user cannot hear the sound clearly after the output power is reduced is avoided.
According to the control method of the loudspeaker, when the power consumption of the mobile terminal is larger than the specified power consumption, according to different requirements of a scene where the mobile terminal is located on the stereo sound effect, when the current scene is the scene requiring the stereo sound effect, only the volume of the loudspeaker is reduced, and when the current scene is the scene not requiring the stereo sound effect, at least one loudspeaker is closed. And when controlling the loudspeaker, still consider the influence of indoor scene and outdoor scene to the sound propagation, further control to indoor and outdoor scene for the sound of speaker output can match with the scene, satisfy the demand of user to the stereo effect, also avoid reducing output power after, the sound of speaker output can't adapt to the scene, and make the phenomenon that the user can't hear the sound take place, also effectual reduction mobile terminal's consumption, avoid the great condition of mobile terminal's consumption to take place constantly, 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, and the method for controlling the speaker may specifically include the following steps:
step S410: and when the mobile terminal plays audio through the loudspeaker, detecting the power consumption of the mobile terminal.
Step S420: and when the power consumption of the mobile terminal is larger than the specified power consumption, acquiring scene data through the sensor.
In the embodiment of the present application, step S410 and step S420 may refer to the contents of the foregoing embodiments, and are not described herein again.
Step S430: and determining the current scene of the mobile terminal according to the scene data, wherein different scenes have different requirements on the stereo sound effect.
In the embodiment of the application, the scene where the mobile terminal is located may also be divided into a target scene of weak environmental noise and a scene of other strong environmental noise. If the volume of the environmental noise is greater than the preset volume, determining the scene of the environmental noise as weak; if the volume of the environmental noise is less than or equal to the preset volume, the scene of the environmental noise with other intensity can be determined. The specific magnitude of the preset volume may not be limited, and may be, for example, 40 db, or 45 db. It can be understood that, under the condition that the loudspeakers are at the same output power, the loudness that the user can feel when the mobile terminal plays the audio in the scene with weak environmental noise is generally better than the loudness that the user can feel when the mobile terminal plays the audio in the scene with strong environmental noise. Therefore, by dividing the scenes, the output power of the speaker can be adjusted for different scenes.
Step S440: and when the current scene is a scene without the requirement of stereo sound effect and the current scene is a target scene, closing at least one loudspeaker of the at least two loudspeakers and reducing the volume of at least one loudspeaker in the loudspeakers in a working state, wherein the volume of the environmental noise of the target scene is lower than that of a preset volume scene.
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 of the mobile terminal in the environment with other environmental noise with strong intensity, when the current scene is a scene without a stereo sound effect and is a target scene, the mobile terminal can turn off at least one speaker of the at least two speakers and simultaneously reduce the volume of at least one speaker of the speakers in a working state; when the current scene is a scene of the non-required stereo sound effect and the current scene is not a target scene, only at least one speaker of the at least two speakers may be turned off. 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 in which the mobile terminal is in need of stereo sound effect and the current scene is the target scene, controlling the at least two loudspeakers to work simultaneously and reducing the volume of the at least one loudspeaker.
Because the sound volume effect of the mobile terminal in the environment with weak environmental noise is higher than the sound volume effect of the mobile terminal in the environment with other environmental noise with strong intensity, when the current scene is a scene requiring stereo sound effect and the current scene is a target scene, the stereo sound effect is required 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 is not a target scene, the at least two loudspeakers can be controlled to work simultaneously without reducing the volume of the loudspeakers. Therefore, the power consumption of the loudspeaker can be reduced, the sound output by the loudspeaker can be matched with a scene, the requirement of a user on the 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 and the user cannot hear the sound clearly after the output power is reduced is avoided.
In some embodiments, an indoor scene, an outdoor scene, and a target scene may also be combined, that is, when adjusting the output power of the speaker, both the indoor or outdoor situation and the actual ambient 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 the first number of speakers may be reduced while controlling the operation of at least two speakers, and if the mobile terminal is in the indoor scene but not in the target scene, the volume of the second number of speakers may be reduced, where the first number is greater than the second number; when the current scene is a scene requiring stereo sound effects, if the mobile terminal is not in an indoor scene but in a target scene, the volume of the speakers of the third number can be reduced while controlling the at least two speakers to work, and if the mobile terminal is neither in the indoor scene nor in the target scene, the volume of the speakers of the fourth number can be reduced, wherein the third number is greater than the second number, and the fourth number is greater than the third number.
Specifically, when the current scene is a scene that does not require stereo sound effect, if the mobile terminal is in an indoor scene and a target scene, the volume of the fifth number of speakers may be reduced while at least one speaker is turned off, and if the mobile terminal is in the indoor scene but not in the target scene, the volume of the sixth number of speakers may be reduced, where the fifth number is greater than the sixth number; when the current scene is a scene requiring stereo sound effects, if the mobile terminal is not in an indoor scene but in a target scene, the volume of the seventh number of speakers may be reduced while at least one speaker is turned off, and if the mobile terminal is neither in the indoor scene nor in the target scene, the volume of the eighth number of speakers may be reduced, where 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 power consumption of the speaker in different scenes may be controlled by adjusting the volume to 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 specified power consumption, according to different requirements of a scene where the mobile terminal is located on the stereo sound effect, when the current scene is the scene requiring the stereo sound effect, only the volume of the loudspeaker is reduced, and when the current scene is the scene not requiring the stereo sound 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, make the sound of loudspeaker output can match with the scene, satisfy the demand of user to the stereo effect, also avoid reducing output power after, the sound of loudspeaker output can't adapt to the scene, and the phenomenon that makes the user can't hear the sound clearly takes place, also effectual the consumption of mobile terminal has been reduced, avoid the great condition of consumption of mobile terminal to take place continuously, and then promoted the duration of the mobile terminal.
Referring to fig. 6, a block diagram of a control apparatus 400 for a speaker according to an embodiment of the present disclosure is shown. The control device 400 of the speaker applies the above-mentioned mobile terminal, which includes at least two speakers and a sensor for collecting scene data of a scene where the mobile terminal is located, wherein the at least two speakers are used for generating stereo sound effect when working simultaneously. The speaker control apparatus 400 includes: a power consumption detection module 410, a data acquisition module 420, a scenario 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 a current scene where the mobile terminal is located according to the scene data, where different scenes have different requirements on stereo sound effects; 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 embodiments, 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 of the at least two loudspeakers when the current scene is a scene in which the mobile terminal is not in need of stereo sound effect; the second control unit is used for controlling the at least two loudspeakers to work simultaneously and reducing the volume of the at least one loudspeaker when the current scene is a scene in which the mobile terminal needs stereo sound effect.
As an embodiment, the first control unit may specifically be configured to: when the current scene is a scene of non-demand stereo sound effect and the current scene is an indoor scene, turning off at least one loudspeaker of the at least two loudspeakers and simultaneously reducing the volume of at least one loudspeaker of the loudspeakers in the working state; and when the current scene is a scene without the requirement of stereo sound effect and the current scene is an outdoor scene, closing at least one loudspeaker of the at least two loudspeakers.
As another embodiment, the second control unit may be specifically configured to: when the current scene is a scene in which the mobile terminal is in need of stereo sound effect and the current scene is an indoor scene, controlling the at least two loudspeakers to work simultaneously and reducing the volume of the at least one loudspeaker; and when the current scene is a scene in which the mobile terminal is in need of stereo sound effect and the current scene is an outdoor scene, controlling the at least two loudspeakers to work simultaneously.
As another embodiment, the first control unit may specifically be configured to: and when the current scene is a scene without the requirement of stereo sound effect and the current scene is a target scene, closing at least one loudspeaker of the at least two loudspeakers and reducing the volume of at least one loudspeaker in the loudspeakers in a working state, wherein the volume of the environmental noise of the target scene is lower than that of a preset volume scene. The second control unit may specifically be configured to: and when the current scene is a scene in which the mobile terminal is in need of stereo sound effect and the current scene is the target scene, controlling the at least two loudspeakers to work simultaneously and reducing the volume of the at least one loudspeaker.
In some embodiments, 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 can also be used for controlling the at least two loudspeakers to work simultaneously and reducing the volume of at least one loudspeaker when the audio type is a multimedia audio type.
In some embodiments, the second control unit may be specifically configured to: acquiring a first distance between the left ear of the 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 smaller than the second distance, reducing the volume of a loudspeaker used for providing left channel sound effect in the at least two loudspeakers; and if the first distance is larger than the second distance, reducing the volume of the loudspeaker which is used for providing the sound effect of the right channel in the at least two loudspeakers.
In other embodiments, the second control unit may also be specifically configured to: 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 loudspeaker which is closest to the left ear in the at least two loudspeakers as a loudspeaker for providing left channel sound effect according to the distance of the left ear relative to each loudspeaker; determining a second loudspeaker which is closest to the right ear in the at least two loudspeakers as a loudspeaker for providing a right channel sound effect according to the distance between the right ear and each loudspeaker; reducing the volume of the other of the at least two speakers except the first speaker and the second speaker.
In some embodiments, the scene data comprises gravity sensing data. The context 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 a current scene where the mobile terminal is located is a scene needing 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 located is a scene with the non-demand stereo sound effect.
In other embodiments, the scene data includes motion data. The scene determining module may be specifically configured to determine, when it is detected that the mobile terminal is in a stationary state according to the motion data, that a current scene where the mobile terminal is located is a scene requiring a 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 located is a scene with the non-required stereo sound effect. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules 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.
In summary, according to the scheme provided by the application, when the mobile terminal plays audio through the speaker thereof, the power consumption of the mobile terminal is detected, when the power consumption of the mobile terminal is greater than the specified 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 different scenes have different requirements on the stereo sound effect, then at least one speaker of the at least two speakers is turned off 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 greater than the specified power consumption, at least one speaker of the at least two speakers is turned off according to the scene where the requirements on the stereo sound effect are different, and/or the volume of the at least one speaker is reduced, thereby reducing the output power of the speaker, and further reducing the power consumption brought to the mobile terminal by the speaker, the cruising ability of the mobile terminal is improved.
Referring to fig. 7, a block diagram of a mobile terminal according to an embodiment of the present application is shown. The mobile terminal 100 may be a mobile terminal capable of running an application, such as a smart phone, a tablet computer, or a smart watch. The mobile terminal 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores. The processor 110 interfaces with various components throughout the mobile terminal 100 using various interfaces and lines, and 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 using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. 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 various method embodiments described below, and the like. The storage data area may also store data created by the mobile terminal 100 in use, such as a phonebook, audio-video data, chat log data, and the like.
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 a program code that can be called by a processor to execute the method described in the above-described method embodiments.
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. Alternatively, the computer-readable storage medium 800 includes a non-volatile computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A speaker control method is applied to a mobile terminal, the mobile terminal comprises at least two speakers and a sensor for collecting scene data of a scene where the mobile terminal is located, the at least two speakers are used for generating stereo sound effects when working simultaneously, and the method comprises the following steps:
detecting the power consumption of the mobile terminal when the mobile terminal plays audio through the loudspeaker;
when the power consumption of the mobile terminal is larger than the specified power consumption, acquiring scene data through the sensor;
determining the current scene of the mobile terminal according to the scene data, wherein different scenes have different requirements on the stereo sound effect;
according to the current scene, at least one loudspeaker of the at least two loudspeakers is turned off, and/or the volume of at least one loudspeaker is reduced.
2. The method of claim 1, wherein said turning off at least one speaker of said at least two speakers and/or reducing a volume of at least one speaker according to said current scene comprises:
when the current scene is a scene with no requirement on stereo sound effect of the mobile terminal, closing at least one loudspeaker of the at least two loudspeakers;
and when the current scene is a scene in which the mobile terminal needs stereo sound effect, controlling the at least two loudspeakers to work simultaneously and reducing the volume of the at least one loudspeaker.
3. The method of claim 2, wherein turning off at least one speaker of the at least two speakers when the current scene is a scene in which the mobile terminal is in an undesired stereo sound effect comprises:
when the current scene is a scene of non-demand stereo sound effect and the current scene is an indoor scene, turning off at least one loudspeaker of the at least two loudspeakers and simultaneously reducing the volume of at least one loudspeaker of the loudspeakers in the working state;
when the current scene is a scene with non-demand stereo sound effect and the current scene is an outdoor scene, closing at least one loudspeaker of the at least two loudspeakers;
when the current scene is a scene in which the mobile terminal needs stereo sound effect, controlling the at least two speakers to work simultaneously and reducing the volume of the at least one speaker, including:
and when the current scene is a scene in which the mobile terminal is in need of stereo sound effect and the current scene is an indoor scene, controlling the at least two loudspeakers to work simultaneously and reducing the volume of the at least one loudspeaker.
4. The method of claim 2, wherein turning off at least one speaker of the at least two speakers when the current scene is a scene in which the mobile terminal is in an undesired stereo sound effect comprises:
when the current scene is a scene without a stereo sound effect requirement and the current scene is a target scene, closing at least one loudspeaker of the at least two loudspeakers and reducing the volume of at least one loudspeaker in the loudspeakers in a working state, wherein the volume of the environmental noise of the target scene is lower than the scene with preset volume;
when the current scene is a scene in which the mobile terminal needs stereo sound effect, controlling the at least two speakers to work simultaneously and reducing the volume of the at least one speaker, including:
and when the current scene is a scene in which the mobile terminal is in need of stereo sound effect and the current scene is the target scene, controlling the at least two loudspeakers to work simultaneously and reducing the volume of the at least one loudspeaker.
5. The method of any of claims 2-4, wherein reducing the volume of at least one speaker comprises:
acquiring a first distance between the left ear of the 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 smaller than the second distance, reducing the volume of a loudspeaker used for providing left channel sound effect in the at least two loudspeakers;
and if the first distance is larger than the second distance, reducing the volume of the loudspeaker which is used for providing the sound effect of the right channel in the at least two loudspeakers.
6. The method of any of claims 2-4, wherein reducing the volume of at least one speaker comprises:
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 loudspeaker which is closest to the left ear in the at least two loudspeakers as a loudspeaker for providing left channel sound effect according to the distance of the left ear relative to each loudspeaker;
determining a second loudspeaker which is closest to the right ear in the at least two loudspeakers as a loudspeaker for providing a right channel sound effect according to the distance between the right ear and each loudspeaker;
reducing the volume of the other of the at least two speakers except the first speaker and the second speaker.
7. The method according to claim 1, wherein the scene data includes gravity sensing data or motion data, and the determining the current scene of the mobile terminal according to the scene data includes:
when the mobile terminal is detected to be in a horizontal screen state according to the gravity sensing data or when the mobile terminal is detected to be in a static state according to the motion data, determining that a current scene where the mobile terminal is located 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 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 located is a scene with the non-demand stereo sound effect.
8. A speaker control device applied to a mobile terminal, the mobile terminal including at least two speakers and a sensor for collecting scene data of a scene where the mobile terminal is located, the at least two speakers being operated simultaneously to generate stereo sound effect, the device comprising: 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 the current scene where the mobile terminal is located according to the scene data, wherein different scenes have different requirements on the stereo sound effect;
the power control module is used for turning off at least one loudspeaker of the at least two loudspeakers and/or reducing the volume of at least one loudspeaker according to the current scene.
9. A mobile terminal, comprising:
one or more processors;
a memory;
one or more program codes, wherein the one or more program codes are 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 any of claims 1-7.
10. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 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 true CN113660599A (en) 2021-11-16
CN113660599B 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)

Cited By (1)

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

Citations (7)

* 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
US20170094410A1 (en) * 2015-07-09 2017-03-30 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Speaker parameter configuration method and mobile terminal
US20180032226A1 (en) * 2015-02-11 2018-02-01 Lg Electronics Inc. Mobile terminal and control method therefor
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180032226A1 (en) * 2015-02-11 2018-02-01 Lg Electronics Inc. Mobile terminal and control method therefor
US20170094410A1 (en) * 2015-07-09 2017-03-30 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Speaker parameter configuration method and mobile terminal
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

Cited By (2)

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

Also Published As

Publication number Publication date
CN113660599B (en) 2023-12-01

Similar Documents

Publication Publication Date Title
CN108683798B (en) Sound output control method and mobile terminal
CN109388367B (en) Sound effect adjusting method and device, electronic equipment and storage medium
CN109284080B (en) Sound effect adjusting method and device, electronic equipment and storage medium
CN109151194B (en) Data transmission method, device, electronic equipment and storage medium
CN109101216B (en) Sound effect adjusting method and device, electronic equipment and storage medium
CN110876180B (en) Power consumption processing method and device, electronic equipment and computer readable medium
CN110784858B (en) Bluetooth device control method and device, electronic device and storage medium
CN108810749B (en) Player control method, device, terminal equipment and storage medium
EP3432136A1 (en) Sound effect configuration method and related device
CN109271129B (en) Sound effect adjusting method and device, electronic equipment and storage medium
CN107465824B (en) Volume adjusting method and device, mobile terminal and storage medium
CN109271131B (en) Earphone control method and device, electronic equipment and storage medium
CN111124351B (en) Audio output method, audio output device, electronic equipment and storage medium
WO2017215635A1 (en) Sound effect processing method and mobile terminal
CN111033614B (en) Volume adjusting method and device, mobile terminal and storage medium
WO2023071425A1 (en) Volume control method and apparatus, and electronic device and storage medium
CN107526570B (en) Volume adjusting method and device, terminal equipment and storage medium
WO2022068694A1 (en) Electronic device and wake-up method thereof
CN113660599B (en) Speaker control method and device, mobile terminal and storage medium
CN113422866B (en) Volume adjusting method and device, storage medium and electronic equipment
CN107483734B (en) Volume adjusting method and device, terminal equipment and storage medium
CN107506168B (en) Volume adjusting method and device, terminal equipment and storage medium
EP3886457A1 (en) Information processing device and information processing method
CN111081283A (en) Music playing method and device, storage medium and terminal equipment
CN106331356B (en) Volume control method and terminal

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