WO2020048216A1 - 音效调整方法、装置、电子设备以及存储介质 - Google Patents

音效调整方法、装置、电子设备以及存储介质 Download PDF

Info

Publication number
WO2020048216A1
WO2020048216A1 PCT/CN2019/094933 CN2019094933W WO2020048216A1 WO 2020048216 A1 WO2020048216 A1 WO 2020048216A1 CN 2019094933 W CN2019094933 W CN 2019094933W WO 2020048216 A1 WO2020048216 A1 WO 2020048216A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
sound
target application
running
audio
Prior art date
Application number
PCT/CN2019/094933
Other languages
English (en)
French (fr)
Inventor
李亚军
许钊铵
冷文华
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2020048216A1 publication Critical patent/WO2020048216A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/167Audio in a user interface, e.g. using voice commands for navigating, audio feedback

Definitions

  • the present application relates to the technical field of electronic devices, and more particularly, to a sound effect adjustment method, device, electronic device, and storage medium.
  • this application proposes a sound effect adjustment method, device, electronic device, and storage medium to solve the above problems.
  • an embodiment of the present application provides a sound effect adjustment method applied to an electronic device.
  • the method includes: detecting whether the electronic device is running a target application program, wherein the target application program can output when the target application program is running. Audio; when the electronic device is running the target application, obtain a current environmental sound of the environment in which the electronic device is located; and adjust the electronic device's Output sound effects.
  • an embodiment of the present application provides a sound effect adjusting device applied to an electronic device.
  • the device includes a detection module for detecting whether the electronic device runs a target application program, where the target application program Audio can be output during runtime; an acquisition module for acquiring the current environmental sound of the environment in which the electronic device is located when the electronic device is running the target application; an adjustment module for acquiring the current environmental sound based on the current environmental sound Adjusting an output sound effect of the electronic device during the running of the target application.
  • an embodiment of the present application provides an electronic device including a memory and a processor.
  • the memory is coupled to the processor, the memory stores instructions, and is executed when the instructions are executed by the processor.
  • the processor executes the above method.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores program code, and executes the foregoing method when the program code is run by a processor.
  • FIG. 1 is a schematic flowchart of a sound effect adjustment method according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a sound effect adjustment method according to another embodiment of the present application.
  • FIG. 3 shows a schematic flowchart of step S250 of the sound effect adjustment method provided by the embodiment shown in FIG. 2 of the present application;
  • FIG. 4 is a schematic flowchart of a sound effect adjustment method according to another embodiment of the present application.
  • FIG. 5 is a schematic flowchart of step S340 of the sound effect adjustment method provided by the embodiment shown in FIG. 4 of the present application;
  • FIG. 6 shows a module block diagram of a sound effect adjustment device provided by an embodiment of the present application
  • FIG. 7 shows a block diagram of an electronic device according to an embodiment of the present application for performing a sound effect adjustment method according to an embodiment of the present application
  • FIG. 8 illustrates a storage unit for saving or carrying a program code for implementing a sound effect adjustment method according to an embodiment of the present application.
  • the audio architecture of electronic devices is similar to the audio architecture of computers.
  • Processor and built-in audio CODEC codec
  • the processor converts it into an I2S signal, transmits it to a CODEC, converts it to an analog signal, and then plays it.
  • sound effects refer to the effects produced by sound, and to enhance the realism, atmosphere or theatrical information of the scene.
  • Noises or sounds added to the vocal cords are artificially produced or enhanced sounds used to enhance the sound processing of movies, video games, music, or other media art or other content.
  • video game sound effects refer to Percussion, running, gunfire, etc. Therefore, with the development of electronic device technology, more and more electronic devices begin to provide sound effect output.
  • the current electronic device's sound effect function is mainly used by the user to manually select and set the sound effect mode of a certain scene according to their own preferences.
  • the conventional and fixed processing method does not consider the influence of external factors. For example, if the influence of different environmental sounds is not considered, the output sound effect is fixed.
  • the inventor has discovered through long-term research and proposed a sound effect adjustment method, device, electronic device, and storage medium provided in the embodiments of the present application.
  • the electronic device is adjusted to run the target application program according to the environmental sound of the environment where the electronic device is located.
  • Time output sound effects to achieve automatic and quick configuration of the output sound effects of electronic devices, improve the output sound effect and user experience.
  • the specific sound effect adjustment method is described in detail in subsequent embodiments.
  • FIG. 1 is a schematic flowchart of a sound effect adjustment method according to an embodiment of the present application.
  • the sound effect adjustment method is used to adjust the output sound effect of the electronic device when running the target application program according to the ambient sound of the environment in which the electronic device is located, to automatically and quickly configure the output sound effect of the electronic device, and to improve the effect of the output sound effect and the user experience.
  • the sound effect adjustment method is applied to a sound effect adjustment device 200 as shown in FIG. 6 and an electronic device 100 (FIG. 7) configured with the sound effect adjustment device 200.
  • an electronic device is taken as an example to describe the specific process of this embodiment.
  • the electronic device applied in this embodiment may be a smart phone, a tablet computer, a wearable electronic device, a vehicle-mounted device, a gateway, etc. This is not specifically limited.
  • the process shown in FIG. 1 will be described in detail below.
  • the sound effect adjustment method may specifically include the following steps:
  • Step S110 It is detected whether a target application is running on the electronic device, wherein the target application can output audio when running.
  • the applications running on the electronic device may include applications running on the foreground of the electronic device, applications running on the background of the electronic device, or applications running on the foreground and background of the electronic device.
  • an application running in the foreground refers to an application that can usually interact with the user.
  • An application that can run in the foreground is suspended when it is not visible (such as a game).
  • An application running in the background refers to the user Interaction is very limited. Except during the configuration, its other lifetimes are hidden (such as SMS auto-response program and alarm clock program); applications that are switched between the foreground and background of the electronic device are those that can be used in the foreground and background. Switch between applications at will. Understandably, when the application program is not killed, it indicates that the application program runs on the electronic device.
  • the electronic device may run only one application or multiple applications at the same time.
  • the application may run in the foreground of the electronic device and in the background of the electronic device. Or switch operation in the foreground and background of the electronic device; when the electronic device runs multiple applications at the same time, the multiple applications can all run in the background of the electronic device, and one of the multiple applications is in the foreground of the electronic device Run, the remaining applications run in the background of the electronic device or one of the multiple applications is switched between the foreground and background of the electronic device, and the remaining applications run in the background of the electronic device, which are not limited here.
  • a target application program is determined from the application programs.
  • the target application program may include a single application program or multiple application programs, which is not limited herein.
  • the target application can output audio when it is running, that is, the target application has at least audio output.
  • the target application can include a music playback application and a video playback application. , Call application, game application, etc., the target application can output audio data, and can also output audio data and image data at the same time.
  • Step S120 when the electronic device is running the target application program, obtain a current environmental sound of an environment in which the electronic device is located.
  • the electronic device when it is determined that the electronic device is running a target application, it is characterized that the electronic device is outputting audio or will output audio at a certain time in the future. Therefore, as a method, it can be determined that the electronic device is running.
  • the target application program When the target application program is executed, the current environmental sound of the environment in which the electronic device is located is executed to be obtained.
  • the target application is an application that has an audio output when running, such as a music playing application, a video playing application, a calling application, and the like
  • the electronic device runs a target
  • the application program is in use
  • the electronic device is outputting audio
  • the current environment sound of the environment in which the electronic device is located is correspondingly executed.
  • the target application is a game application, an instant messaging application, etc.
  • an application program with audio output whether the electronic device has audio output is detected first, and when it is detected that the electronic device has audio output, then the current environmental sound of the environment in which the electronic device is located is executed.
  • an instant messaging application is used as an example for description.
  • the instant messaging application may include WeChat, QQ, etc.
  • WeChat can output audio data during running, such as voice chat or Video chat, at the same time, it can also not output audio data at runtime, such as text chat. Therefore, when the electronic device runs such a target application program, when it is determined that the electronic device has an audio output at this time, the current environmental sound of the environment in which the electronic device is located may be acquired.
  • the electronic device includes at least an electronic device body and a sound receiving device disposed on the electronic device body.
  • the sound receiving device is configured to receive the ambient sound at the location of the electronic device, and transmit the ambient sound to the processor for analysis and processing to Acquire the current ambient sound, where the ambient sound may include car sounds, human voices, bird voices, music sounds, and the like, which are not limited herein.
  • the smart terminal may use a microphone as a radio receiver.
  • the smart terminal may include at least a voice call microphone. Among them, the voice call microphone is mainly used to receive the environmental sound of the electronic device.
  • the current ambient sound may include a sound volume, a sound intensity, and the like.
  • the current location information of the electronic device is detected, wherein the current location information of the electronic device may be obtained through positioning, and as one way, it may be through a location-based service (LBS) and / or a global positioning system (Global Positioning System, GPS) to obtain the current position of the electronic device. Understandably, since the position of the electronic device may change at any time, in this embodiment, the position information of the electronic device is obtained in real time, so that when the current position of the electronic device changes, the LBS and / or GPS can obtain the current position information of the electronic device in real time according to the change of the position of the electronic device.
  • LBS location-based service
  • GPS Global Positioning System
  • the preset range may be manually set by a user and may be factory-set by the electronic device at the factory.
  • the configuration may also be performed by the electronic device according to the environment, which is not limited herein.
  • the preset range may be 10m, 5m, 3m, 2m, etc., which is not limited herein.
  • the number of other electronic devices in the preset range may be one or multiple.
  • the other electronic device obtains the environment sound of its environment within a preset time period, for example, it is detected whether the other electronic device obtains the environment of its environment within the first 30s of the current time.
  • Audio wherein, when other electronic equipment obtains the environmental sound of its environment within a preset period of time, the electronic device acquires the environmental sound obtained by the other electronic device and uses it as the current environmental sound of the electronic device, thereby Acquire the current environmental sound of the environment in which the electronic device is located.
  • the acquired environmental sounds may be issued in the form of a broadcast, so that the electronic device located within the preset range of the other electronic device receives the broadcast message, thereby Based on the broadcast message, the environmental sound of the environment in which other electronic devices are located is obtained.
  • Step S130 Adjust the output sound effect of the electronic device during the running of the target application based on the current ambient sound.
  • the output sound effect of the electronic device during the running of the target application can be adjusted based on the current environmental sound.
  • the electronic device may increase or decrease the output sound effect of the electronic device during the running of the target application based on the current ambient sound.
  • the noise representing the environment in which the electronic is located is too high.
  • the output sound effect of the program is greatly interfered by the current environmental sound, that is, improving the output sound effect of the electronic device will also be interfered by the current environmental sound, and it will increase the current environmental sound of the environment. Interference is caused by others, so the output sound effect of the electronic device during the running of the target application can be correspondingly reduced.
  • the noise representing the environment in which the electronic device is located is low.
  • the target application is being When the electronic device is running, its output sound effect is less disturbed by the current ambient sound.
  • the output sound effect of the electronic device during the running of the target application can be maintained, or the electronic device's performance during the running of the target application can be slightly improved. Output sound effects to ensure that the adjustment of the output sound effects will not interfere with others.
  • the electronic device may establish a mapping relationship between the ambient sound and the output sound effect in advance, and generate a mapping relationship table for storage in the electronic device, as shown in Table 1.
  • the mapping relationship between the ambient sound and the output sound effect may be manually associated by a user, may be automatically associated by an electronic device, or automatically associated by a server, etc., and is not limited herein.
  • the mapping relationship between the ambient sound and the output sound effect may include one ambient sound corresponding to one output sound effect, or one ambient sound interval corresponding to one output sound effect, and the like is not limited herein.
  • the current environmental sound and a plurality of environmental sounds stored in the mapping relationship table are compared one by one to obtain an environmental sound or an environmental sound interval matching the current environmental sound, and then According to the mapping relationship table, the output sound effect corresponding to the environmental sound is found, so that the output sound effect corresponding to the current environmental sound can be obtained, so as to adjust the electronic device's operation when the target application is run according to the environmental sound of the environment in which the electronic device is located.
  • Output sound effects realize automatic and quick configuration of output sound effects of electronic devices, improve the output sound effect and user experience.
  • the sound effect adjustment method detects whether an electronic device has a target application running, wherein the target application can output audio when running, and when the electronic device runs a target application, obtaining an environment in which the electronic device is located.
  • the current environmental sound based on the current environmental sound, adjusts the output sound effect of the electronic device during the running of the target application, thereby adjusting the output sound effect of the electronic device when running the target application according to the environmental sound of the environment of the electronic device, and realizes automatic and quick Configure the output sound effects of electronic devices to improve the output sound effect and user experience.
  • FIG. 2 is a schematic flowchart of a sound effect adjustment method according to another embodiment of the present application.
  • the sound effect adjustment method is applied to the above-mentioned electronic device, and the process shown in FIG. 2 will be described in detail below.
  • the method may specifically include the following steps:
  • Step S210 It is detected whether a target application is running on the electronic device, wherein the target application can output audio when running.
  • step S210 For a detailed description of step S210, please refer to step S110, and details are not described herein again.
  • Step S220 When the target application is running on the electronic device, identify the type of the target application.
  • the electronic device may establish a mapping relationship between an application and a type in advance, and generate a mapping relationship table for storage in the electronic device, as shown in Table 2.
  • the mapping relationship between the application and the type may be manually associated by a user, may be automatically associated by an electronic device, or automatically associated by a server, and is not limited herein.
  • the mapping relationship between applications and types may include one application corresponding to one type, or multiple applications corresponding to one type, etc., which are not limited here.
  • the mapping relationship may be WeChat and QQ corresponds to one type respectively, and it can also correspond to the same type for WeChat and QQ.
  • the target application After determining the target application running on the electronic device, the target application is compared with a plurality of applications stored in the mapping relationship table one by one to obtain an application matching the target application, and then according to the The mapping relationship table looks up the type corresponding to the application, so that the type of the target application can be obtained. For example, when the mapping relationship table includes the mapping relationship between WeChat and instant messaging, that is, WeChat is stored under the application in the mapping relationship table, and the instant messaging class is stored under the type, which is related to WeChat and instant messaging. Then, when the target application is WeChat, the target application can be matched with the application stored in the mapping relationship table. It is understandable that the target application can be matched with WeChat in the mapping relationship table. It was further found that the type of the target application was an instant messaging class.
  • the type of the application close to the target application may be used as the type of the target application by searching for an application close to the type of the target application, so as to obtain the target application. Describe the type of target application.
  • the package name of the target application can be obtained. Since the package name includes various information related to the application, the package name can be analyzed to obtain the package name included in the package name. The manufacturer of the target application, and then finds other applications produced by the manufacturer, looks up the type of the other application in the mapping relationship table, and uses the type of the other application as the type of the target application.
  • the Android system is taken as an example.
  • the version number of the application program is configured in the AndroidManifest.xml file
  • the PackageInfo class encapsulates all the information obtained from the configuration file. , Describes the overall information of the package contents. Therefore, you can use the versionName property of the PackageInfo object to get the version number of the application, and you can get the PackageInfo object through the PackageManager object, where PackageManager is a class that retrieves various information about related application packages that are currently installed on the device, PackageManager The getPackageInfo method in the object can get the PackageInfo object. This method needs to pass two parameters: the application package name and the condition.
  • the package name of an application can be obtained by the getPackageName () method of Activity or Context (Activity inherits from Context), and adding can have many settings, usually set to 0. Finally, the PackageManager object is obtained.
  • the Context object provides the getPackageManager () method to obtain the object. Therefore, the package name of the target application can be obtained based on the above method.
  • Step S230 When the type of the target application is a game type, obtain the current environmental sound of the environment in which the electronic device is located.
  • the target application may include multiple types.
  • the target application may be a music playback type, a video playback type, an instant messaging type, a text reading type, or
  • the type of the target application is identified as a game type, such as a game type, the current environmental sound of the environment in which the electronic device is located is correspondingly obtained.
  • Step S240 Determine whether the current ambient sound exceeds a sound threshold.
  • the electronic device presets and stores a sound threshold, and the sound threshold is used as a basis for determining the current ambient sound. It can be understood that when the current ambient sound of the environment in which the electronic device is located is obtained, the value of the current ambient sound is compared with the sound threshold to determine whether the current ambient sound exceeds the sound threshold, where, when When the value of the current environmental sound is greater than the sound threshold, it can be characterized that the current environmental sound exceeds the sound threshold, and when the value of the current environmental sound is not greater than the sound threshold, it can be characterized that the current environmental sound does not exceed the sound threshold.
  • Step S250 When the current ambient sound exceeds the sound threshold, adjust an output sound effect of the electronic device during the running of the target application based on the current ambient sound.
  • the electronic device may adjust the electronic device based on the current ambient sound. The output sound effect while the target application is running.
  • FIG. 3 is a schematic flowchart of step S250 of the sound effect adjustment method provided by the embodiment shown in FIG. 2 of the present application.
  • the process shown in FIG. 3 will be described in detail below.
  • the method may specifically include the following steps:
  • Step S251 When the current ambient sound exceeds the sound threshold, it is detected whether a headphone is connected to the electronic device.
  • the electronic device includes a headset call mode and a non-headphone call mode, wherein the non-headphone call mode includes a hands-free mode and a handset mode, and is used to play a voice signal sent by the electronic device during a call, a video, or the like.
  • the call mode of the electronic device can be detected by judging whether the electronic device is connected to a headset.
  • the call mode of the electronic device can be determined by checking the status of the headset connection hole of the electronic device. For example, when the headset of the electronic device is connected When the earphone is connected to the hole, the first state value is returned. When the earphone in the connection hole is unplugged, the second state value is returned.
  • the Android system sends a broadcast when the headset is inserted and pulled out of the connection hole. Therefore, the electronic device can determine whether the headset is currently connected and the call mode of the electronic device by monitoring the broadcast.
  • Step S252 when the electronic device is connected with the headset, turn on a sound effect setting for the audio stream of the target application, and adjust the electronic device during the target application running process based on the current environmental sound Output sound effects.
  • the electronic device When the electronic device is connected with a headset, the electronic device is less affected by the current ambient sound during the running of the target application, and its output sound effect can be transmitted to the user's ear with less interference, so it can be turned on.
  • the sound effect settings for the audio stream of the target application to improve the output sound effect. It can be understood that, at this time, the output sound effect of the electronic device during the running of the target application can be adjusted based on the current environment. For example, when the current environment sound is high, it can correspondingly improve the electronic device's performance during the running of the target application.
  • Step S253 When the electronic device is not connected to the headset, turn off a sound effect setting for an audio stream of the target application.
  • the electronic device when the electronic device is not connected with a headset, it means that the electronic device is greatly interfered by the current environmental sound during the running of the target application program, and its output sound effect is transmitted to the user's ear under a large interference, and the output sound effect is The effect of the adjustment is poor, so the sound effect setting of the audio stream for the target application can be turned off to further reduce the power consumption of the electronic device.
  • the sound effect adjustment method provided in this embodiment detects whether a target application is running on an electronic device, where the target application can output audio when running, and when the electronic device is running a target application, identifying the type of the target application, When the type of the target application is a game type, obtain the current environmental sound of the environment where the electronic device is located, determine whether the current environmental sound exceeds the sound threshold, and when the environmental sound exceeds the sound threshold, adjust the electronic device based on the current environmental sound Compared with the sound effect adjustment method shown in FIG. 1, the output sound effect during the running of the target application program is adjusted in this embodiment when the environmental sound of the electronic device exceeds the sound threshold to reduce the power consumption of the electronic device and improve the electronic performance. Applicability of equipment.
  • the sound effect setting for the audio stream of the target application is turned on, and when the environmental sound of the electronic device exceeds the sound threshold and no headphones are connected, the target application is turned off Audio stream audio settings to further reduce the power consumption of electronic devices and improve the user experience.
  • FIG. 4 is a schematic flowchart of a sound effect adjustment method according to another embodiment of the present application.
  • the sound effect adjustment method is applied to the above electronic device.
  • the electronic device is provided with multiple audio channels, and each of the multiple audio channels corresponds to a different sound processing algorithm.
  • the process shown in FIG. 4 will be described in detail below.
  • the method may specifically include the following steps:
  • Step S310 Detect whether the electronic device is running a target application program, wherein the target application program can output audio when running.
  • Step S320 When the target application is running on the electronic device, identify the type of the target application.
  • Step S330 When the type of the target application is a game type, obtain a current environmental sound of an environment in which the electronic device is located.
  • steps S310 to S330 please refer to steps S210 to S230, and details are not described herein again.
  • Step S340 Select at least one audio channel from the plurality of audio channels as a target audio channel based on the current ambient sound.
  • the electronic device is provided with multiple audio channels, and each of the multiple audio channels corresponds to a different audio processing algorithm.
  • the electronic device is separately based on the existing structure of the audio system. Different scenes add different audio channels, where each audio channel refers to different sounds going through different channels.
  • each audio channel refers to different sounds going through different channels.
  • the data can have different sound effects when it is output, for example, different volume, different loudness, different kinds of sound, etc.
  • the audio path is used as the target audio path; if the current ambient sound is high and the volume of the output sound effect is required to be low, an audio path that can output a lower volume from multiple audio paths is selected as the target audio path.
  • At least one audio path corresponding to the type is obtained.
  • the audio data of the target application is analyzed to obtain a sound type in the audio data, and then at least one audio channel is selected as the target audio channel from the multiple audio channels according to the analyzed result, that is, , An application can correspond to multiple audio channels.
  • the audio data includes only one type of sound
  • only one of the audio channels may be selected as the target audio channel; when the audio data includes multiple types of sound, multiple audio channels may be selected
  • the path serves as the target audio path.
  • the game application may include sound types such as striking sound, running sound, gun sound, etc. Therefore, the striking sound, the striking sound, Corresponding audio channels such as running sounds and gun sounds are used as target audio channels to transmit the percussion sounds, running sounds, gun sounds, etc., so that different audio data is processed by different sound effect processing algorithms, and the processing effect is better.
  • each application program can also have a separate audio channel, that is, one application program corresponds to one audio channel, and the audio channels corresponding to each application program have different sound effects processing according to the type of application program.
  • Algorithm therefore, after obtaining the type of the application program corresponding to the package name, according to the type, obtain the audio channel corresponding to the target application program as the target audio channel.
  • the target application as a game application as an example, based on the game application, an audio channel is determined as a target audio channel of the game application from a plurality of audio channels, and the electronic device is running when the electronic device is running. Output sound effects during the target application process.
  • FIG. 5 is a schematic flowchart of step S340 of the sound effect adjustment method provided by the embodiment shown in FIG. 4 of the present application.
  • the process shown in FIG. 5 will be described in detail below.
  • the method may specifically include the following steps:
  • Step S341 Determine a current audio path corresponding to the current ambient sound according to a preset relationship table, where the preset relationship table includes a corresponding relationship between the ambient sound and the audio path.
  • the electronic device may establish a mapping relationship between the ambient sound and the audio path in advance, and generate a mapping relationship table for storage in the electronic device, as shown in Table 3.
  • the mapping relationship between the ambient sound and the audio channel may be manually associated by a user, may be automatically associated by an electronic device, or automatically associated by a server, and is not limited herein.
  • mapping relationship table searches for an audio channel corresponding to the environmental sound, so as to obtain an audio channel corresponding to the current environmental sound.
  • Step S342 Determine the current audio path as the target audio path.
  • Step S350 transmitting the output audio effect of the electronic device during the running of the target application program through the target audio path.
  • the target audio channel includes at least one audio channel.
  • the original audio data is processed by the audio effect processing algorithm corresponding to the audio channel to obtain corresponding output sound effects.
  • the output audio effects of the electronic device during the running of the target application program can be transmitted through the target audio channel, and the original audio data can be processed differently to obtain each sound. Different output sound effects, better processing effect.
  • the sound effect adjustment method provided in this embodiment detects whether a target application is running on an electronic device, where the target application can output audio when running, and when the electronic device is running a target application, identifying the type of the target application,
  • the type of the target application is a game type
  • the current ambient sound of the environment in which the electronic device is located is obtained, and at least one audio channel is selected from multiple audio channels as the target audio channel based on the current environmental sound, and transmitted through the target audio channel
  • the output sound effect of the electronic device during the running of the target application program is compared with the sound effect adjustment method shown in FIG. 1.
  • multiple audio processing algorithms with different audio channels are set to conveniently and quickly adjust the output sound effect. To enhance the effect of output sound effects.
  • FIG. 6 illustrates a block diagram of a sound effect adjusting apparatus 200 provided by an embodiment of the present application.
  • the sound effect adjusting device 200 is applied to the above-mentioned electronic equipment.
  • the sound effect adjustment device 200 includes a detection module 210, an acquisition module 220, and an adjustment module 230, where:
  • the detection module 210 is configured to detect whether the electronic device runs a target application program, wherein the target application program can output audio when running.
  • the obtaining module 220 is configured to obtain a current environmental sound of an environment in which the electronic device is located when the electronic device runs the target application program. Further, the acquisition module 220 includes: an identification submodule and an acquisition submodule, wherein:
  • the identification sub-module is configured to identify a type of the target application when the electronic device runs the target application.
  • An acquisition submodule is configured to acquire a current environmental sound of an environment in which the electronic device is located when the type of the target application is a game type.
  • An adjusting module 230 is configured to adjust an output sound effect of the electronic device during the running of the target application based on the current ambient sound. Further, the adjustment module 230 includes: a judgment sub-module and an adjustment sub-module, wherein:
  • a judging sub-module is configured to judge whether the current ambient sound exceeds a sound threshold.
  • An adjustment sub-module is configured to adjust an output sound effect of the electronic device during the running of the target application based on the current environment sound when the current environment sound exceeds the sound threshold. Further, the adjustment sub-module includes a detection unit, an opening unit, and a closing unit, wherein:
  • a detection unit is configured to detect whether an earphone is connected to the electronic device when the current ambient sound exceeds the sound threshold.
  • An enabling unit configured to enable a sound effect setting for an audio stream of the target application when the electronic device is connected to the headset, and adjust the electronic device to run in the target application based on the current ambient sound Output sound effects during the process.
  • the opening unit includes: a lifting subunit, wherein:
  • the boosting subunit is configured to boost the output sound effect of the electronic device during the running of the target application based on the current ambient sound.
  • the closing unit is configured to close a sound effect setting for an audio stream of the target application when the electronic device is not connected to the headset.
  • the electronic device is provided with multiple audio channels, each of the multiple audio channels corresponds to a different sound processing algorithm, and the adjustment module 230 further includes a selection sub-module and a transmission sub-module, among them:
  • a selection sub-module is configured to select at least one audio channel as a target audio channel from the multiple audio channels based on the current ambient sound. Further, the selection submodule includes:
  • the determining unit is configured to determine a current audio path corresponding to the current ambient sound according to a preset relationship table, where the preset relationship table includes a corresponding relationship between the ambient sound and the audio path.
  • the determining unit is further configured to determine the current audio path as the target audio path.
  • a transmission submodule configured to transmit an output sound effect of the electronic device during the running of the target application program through the target audio path.
  • the coupling between the modules may be electrical, mechanical, or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist separately physically, or two or more modules may be integrated into one module.
  • the above integrated modules may be implemented in the form of hardware or software functional modules.
  • the sound effect adjustment device provided in the embodiment of the present application includes a detection module, an acquisition module, and an adjustment module.
  • the detection module is configured to detect whether the electronic device is running a target application program, and the target application program can output audio when running.
  • the obtaining module is configured to obtain the current environmental sound of the environment in which the electronic device is located when the electronic device is running the target application, and the adjustment module is configured to adjust the electronic device in the electronic device based on the current environmental sound.
  • the output sound effect during the running of the target application program so as to adjust the output sound effect of the electronic device when running the target application program according to the environmental sound of the environment in which the electronic device is located, realize automatic and quick configuration of the output sound effect of the electronic device, and improve the effect of the output sound effect. user experience.
  • FIG. 7 is a structural block diagram of an electronic device 100 according to an embodiment of the present application.
  • the electronic device 100 may be an electronic device capable of running an application program, such as a smart phone, a tablet computer, or an e-book.
  • the electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, where one or more application programs may be stored in the memory 120 and configured to be implemented by one Or multiple processors 110 execute, and one or more programs are configured to execute the method as described in the foregoing method embodiment.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts in the entire electronic device 100, and executes or executes instructions, programs, code sets, or instruction sets stored in the memory 120 by calling or executing data stored in the memory 120 to execute Various functions and processing data of the electronic device 100.
  • the processor 110 may use at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). To implement a hardware form.
  • the processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • modem modem
  • the CPU mainly handles the operating system, user interface, and application programs; the GPU is responsible for rendering and rendering of the displayed content; the modem is used for wireless communication. It can be understood that the modem may not be integrated into the processor 110, and may be implemented by a single communication chip.
  • the memory 120 may include Random Access Memory (RAM), and may also include Read-Only Memory.
  • the memory 120 may be used to store instructions, programs, codes, code sets, or instruction sets.
  • the memory 120 may include a program storage area and a data storage area.
  • the memory 104 may store a sound effect adjustment device.
  • the sound effect adjusting device may be the aforementioned device 200.
  • the storage program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), and instructions for implementing the following method embodiments. Wait.
  • the storage data area may also store data (such as phonebook, audio and video data, and chat history data) created by the terminal 100 during use.
  • FIG. 8 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 300 stores program code, which can be called by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 300 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.
  • the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 300 has a storage space of a program code 310 that executes any of the method steps in the above method. These program codes can be read from or written into one or more computer program products.
  • the program code 310 may be compressed, for example, in a suitable form.
  • the sound effect adjustment method, device, electronic device, and storage medium detect whether the electronic device is running a target application program, where the target application program can output audio when the electronic device is running and When the target application program obtains the current environmental sound of the environment in which the electronic device is located, and adjusts the output sound effect of the electronic device during the running of the target application based on the current environmental sound, thereby adjusting the electronic device in accordance with the environmental sound of the environment in which the electronic device is located.
  • the output sound effect when running the target application program can automatically and quickly configure the output sound effect of the electronic device to improve the output sound effect and the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Telephone Function (AREA)

Abstract

本申请公开了一种音效调整方法、装置、电子设备以及存储介质,涉及电子设备技术领域。该方法应用于电子设备,所述方法包括:检测电子设备是否运行有目标应用程序,其中,目标应用程序在运行时可输出音频,当电子设备运行有目标应用程序时,获取该电子设备所处环境的当前环境音,基于该当前环境音调整电子设备在目标应用程序运行过程中的输出音效。本申请根据电子设备所处环境的环境音调整电子设备在运行目标应用程序时的输出音效,实现自动快捷的配置电子设备的输出音效,提升输出音效的效果以及用户体验。

Description

音效调整方法、装置、电子设备以及存储介质
相关申请的交叉引用
本申请要求于2018年9月4日提交的申请号为201811026569.X的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。
技术领域
本申请涉及电子设备技术领域,更具体地,涉及一种音效调整方法、装置、电子设备以及存储介质。
背景技术
随着科学技术的发展,电子设备已经成为人们日常生活中最常用的电子产品之一。并且,用户经常会通过电子设备听音乐、看视频或玩游戏等,但是,目前电子设备对音频数据的处理方式固定,输出的音效较差,用户体验不佳。
发明内容
鉴于上述问题,本申请提出了一种音效调整方法、装置、电子设备以及存储介质,以解决上述问题。
第一方面,本申请实施例提供了一种音效调整方法,应用于电子设备,所述方法包括:检测所述电子设备是否运行有目标应用程序,其中,所述目标应用程序在运行时可输出音频;当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音;基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。
第二方面,本申请实施例提供了一种音效调整装置,应用于电子设备,所述装置包括:检测模块,用于检测所述电子设备是否运行有目标应用程序,其中,所述目标应用程序在运行时可输出音频;获取模块,用于当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音;调整模块,用于基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。
第三方面,本申请实施例提供了一种电子设备,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行上述方法。
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,在所述程序代码被处理器运行时执行上述方法。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1示出了本申请一实施例提供的音效调整方法的流程示意图;
图2示出了本申请另一实施例提供的音效调整方法的流程示意图;
图3示出了本申请的图2所示的实施例提供的音效调整方法的步骤S250的流程示意图;
图4示出了本申请又一实施例提供的音效调整方法的流程示意图;
图5示出了本申请的图4所示的实施例提供的音效调整方法的步骤S340的流程示意图;
图6示出了本申请实施例提供的音效调整装置的模块框图;
图7示出了本申请实施例用于执行根据本申请实施例的音效调整方法的电子设备的框图;
图8示出了本申请实施例的用于保存或者携带实现根据本申请实施例的音效调整方法的程序代码的存储单元。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
目前,用户对电子设备的要求越来越高,因此,电子设备为了满足用户的需求以及为用户提供方便,开始支持播放音频数据,其中,电子设备的音频架构和计算机的音频架构类似,主要由处理器和内置音频CODEC(编解码器)来完成。具体地,处理器接收音频数据的输入后,转换成I2S信号,并传输至CODEC转换成模拟信号,然后进行播放。
进一步地,为了提升听觉体验,越来越多的用户开始对电子设备的输出音效提出需求,其中,音效是指由声音所制造的效果,是指为增进场面的真实感、气氛或戏剧讯息,而加于声带上的杂音或声音,是人工制造或加强的声音,用来增强对电影、电子游戏、音乐或其他媒体的艺术或其他内容的声音处理,例如,电子游戏音效是指游戏中的打击声、跑步声、枪声等。因此,随着电子设备技术的发展,越来越多的电子设备开始提供音效输出,但是,目前电子设备的音效功能主要是通过用户根据自己的喜好人工选择和设置某种场景的音效模式,采用常规且固定的处理方式,没有考虑外界因素的影响,如没有考虑针对不同环境音的影响,输出音效固定。
针对上述问题,发明人经过长期的研究发现,并提出了本申请实施例提供的音效调整方法、装置、电子设备以及存储介质,根据电子设备所处环境的环境音调整电子设备在运行目标应用程序时的输出音效,实现自动快捷的配置电子设备的输出音效,提升输出音效的效果以及用户体验。其中,具体的音效调整方法在后续的实施例中进行详细的说明。
实施例
请参阅图1,图1示出了本申请一实施例提供的音效调整方法的流程示意图。所述音效调整方法用于根据电子设备所处环境的环境音调整电子设备在运行目标应用程序时的输出音效,实现自动快捷的配置电子设备的输出音效,提升输出音效的效果以及用户体验。在具体的实施例中,所述音效调整方法应用于如图6所示的音效调整装置200以及配置有所述音效调整装置200的电子设备100(图7)。
下面将以电子设备为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的电子设备可以为智能手机、平板电脑、穿戴式电子设备、车载设备、网关等,在此不做具体的限定。下面将针对图1所示的流程进行详细的阐述,所述音效调整方法具体可以包括以下步骤:
步骤S110:检测所述电子设备是否运行有目标应用程序,其中,所述目标应用程序在运行时可输出音频。
在本实施例中,电子设备运行的应用程序可以包括在电子设备的前台运行的应用程序、在电子设备的后台运行的应用程序或在电子设备的前台和后台切换运行的应用程序,在此不做限定。具体的,前台运行的应用程序是指通常可以和用户进行交互,能运行在前台的应用程序,当它不可见时就会被挂起(比如:游戏);后台运行的应用程序是指和用户交互非常有限,除了配置期间,其生存期的其他时间都是隐藏的(比如:SMS自动回复程序和闹钟程序);在电子设备的前台和后台切换运行的应用程序是指可以在前台以及后台之间随意切换的应用程序。可以理解的,当应用程序没有被杀掉(kill)时,表征该应用程序在电子设备上运行。
进一步地,电子设备可以仅运行一个应用程序,也可以同时运行多个应用程序,其中,当电子设备仅运行一个应用程序时,该应用程序可以在电子设备的前台运行、在电子设备的后台运行或在电子设备的前台和后台切换运行;当电子设备同时运行多个应用程序时,该多个应用程序可以均在电子设备的后台运行、多个应用程序中的一个应用程序在电子设备的前台运行,其余应用程序在电子设备的后台运行或多个应用程序中的一个应用程序在电子设备的前台和后台切换运行,其余应用程序在电子设备的后台运行等,在此不做限定。
其中,在获取电子设备运行的应用程序后,从所述应用程序中确定目标应用程序,同样的,该目标应用程序可以包括单个应用程序,也可以包括多个应用程序,在此不做限定。在本实施例中,所述目标应用程序在运行时可输出音频,也就是说,该目标应用程序至少有音频输出,例如,该目标应用程序可以包括音乐播放类应用程序、视频播放类应用程序、通话类应用程序、游戏类应用程序等,该目标应用程序可以输出音频数据,也可以同时输出音频数据和图像数据等。
步骤S120:当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音。
在本实施例中,当确定电子设备运行有目标应用程序时,表征该电子设备正在输出音频或者在接下来的某一时刻将输出音频,因此,作为一种方式,可 以在确定电子设备运行有目标应用程序时,就执行获取所述电子设备所处环境的当前环境音;作为另一种方式,可以检测所述电子设备是否有音频输出,并在检测到所述电子设备有音频输出时,再执行获取所述电子设备所处环境的当前环境音。
具体地,当所述目标应用程序为音乐播放类应用程序、视频播放类应用程序、通话类应用程序等在运行时会有音频输出的应用程序时,则可以认为当所述电子设备运行有目标应用程序时,该电子设备正在输出音频,此时对应执行获取所述电子设备所处环境的当前环境音;当所述目标应用程序为游戏类应用程序、即时通讯类应用程序等在运行时可能有音频输出的应用程序时,首先对所述电子设备是否有音频输出进行检测,其中,当检测到所述电子设备有音频输出时,再执行获取所述电子设备所处环境的当前环境音。在本实施例中,以即时通讯类应用程序为例进行说明,该即时通讯类应用程序可以包括微信、QQ等,以微信为例,其在运行时可以输出音频数据,如进行语音聊天或进行视频聊天,同时,其在运行时也可以不输出音频数据,如进行文字聊天。因此,当所述电子设备运行此类目标应用程序时,可以在确定所述电子设备此时有音频输出时,再获取所述电子设备所处环境的当前环境音。
进一步地,获取电子设备所处环境的当前环境音。作为一种方式,电子设备至少包括电子设备本体和设置于电子设备本体上的收音装置,该收音装置用于接收电子设备所在位置的环境声音,并将该环境声音传输至处理器进行分析处理以获取所述当前环境音,其中,该环境声音可以包括车声、人声、鸟声、音乐声等,在此不做限定。进一步地,以电子设备为智能终端为例,智能终端可以将麦克风作为收音装置,在本实施例中,智能终端至少可以包括语音通话麦克风。其中,语音通话麦克风主要用于接收电子设备所在位置的环境声音,比如录音的时候,把电子设备所在位置的环境声音录进去,将环境声音实时转化为电信号,以分析该环境声音从而获取所述当前环境音。其中,该当前环境音可以包括声音音量、声音强度等。
作为另一种方式,检测所述电子设备的当前位置信息,其中,该电子设备的当前位置信息可以通过定位获取,作为一种方式,可以通过基于位置的服务(LBS)和/或全球定位***(Global Positioning System,GPS)获取电子设备的当前位置。可以理解的,由于所述电子设备的位置可能随时发生变化,因此,在本实施例中,实时获取所述电子设备的位置信息,从而当当前电子设备的位置发生改变时,该LBS和/或GPS可以根据电子设备的位置改变,实时获取该电子设备的当前位置信息。
进一步地,在确定所述电子设备的当前位置信息后,可以获取在该位置信息预设范围内的其他电子设备,其中,该预设范围可以由用户手动设置,可以由所述电子设备在出厂时配置,也可以由所述电子设备根据环境完成配置,在此不做限定。同时,所述预设范围可以为10m、5m、3m、2m等,在此不做限定。其中,在确定预设范围后,对应获取位于该预设范围内的其他电子设备,作为一种方式,该预设范围内的其他电子设备的数量可以为一个,也可以为多个,在此不做限定。
在本实施例中,检测所述其他电子设备在预设时长内是否获取到其所在环境的环境音,例如,检测所述其他电子设备是否在当前时间的前30s内获取到其所在环境的环境音,其中,当其他电子设备在预设时长内获取到其所在环境的环境音时,该电子设备获取所述其他电子设备获取的环境音并将其作为所述电子设备的当前环境音,从而获取所述电子设备所处环境的当前环境音。作为一种方式,在其他电子设备获取到其所在环境的环境音时,可以以广播的形式发出获取的环境音,以使位于该其他电子设备预设范围内的电子设备接收该广播消息,从而基于该广播消息获取其他电子设备所在环境的环境音。
步骤S130:基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。
在本实施例中,当确定所述电子设备所在环境的当前环境音后,可以基于该当前环境音调整电子设备在目标应用程序运行过程中的输出音效。具体地,所述电子设备可以基于该当前环境音增大或减小电子设备在目标应用程序运行过程中的输出音效。作为一种方式,当所述当前环境音过高,如高于电子设备设置的声音阈值或者高于电子设备输出声音时,表征该电子所在环境的噪音过高,此时,若所述目标应用程序正在所述电子设备运行时,其输出音效受到的当前环境音的干扰较大,即提高电子设备的输出音效也会受到当前环境音的干扰,且会增加所处环境的当前环境音,对他人造成干扰,因此,可以对应降低所述电子设备在目标应用程序运行过程中的输出音效。
当所述当前环境音过低,如远低于电子设备设置的声音阈值或者远低于电子设备输出声音时,表征该电子设备所在环境的噪音较低,此时,若所述目标应用程序正在电子设备运行时,其输出音效受到的当前环境音的干扰较小,可以保持所述电子设备在目标应用程序运行过程中的输出音效,或者稍微提升所述电子设备在目标应用程序运行过程中的输出音效,以保证其输出音效的调整不会对他人造成干扰。
作为一种方式,所述电子设备可以预先建立环境音和输出音效之间的映射关系,并生成映射关系表存储在电子设备中,如表1所示。其中,环境音和输出音效之间的映射关系可以由用户手动关联,可以由电子设备自动关联或者由服务器自动关联等,在此不做限定。并且环境音和输出音效之间的映射关系可以包括一个环境音对应一个输出音效,或者一环境音区间对应一个输出音效等,在此不做限定。
进一步地,在确定当前环境音后,将所述当前环境音和映射关系表中预先存储的多个环境音一一对比,以获取与所述当前环境音匹配的环境音或环境音区间,再根据所述映射关系表,查找该环境音对应的输出音效,从而可以获取所述当前环境音对应的输出音效,以实现根据电子设备所处环境的环境音调整电子设备在运行目标应用程序时的输出音效,实现自动快捷的配置电子设备的输出音效,提升输出音效的效果以及用户体验。
表1
环境音 输出音效
A1 B1
A2 B2
A3 B3
本实施例提供的音效调整方法,通过检测电子设备是否运行有目标应用程序,其中,目标应用程序在运行时可输出音频,当电子设备运行有目标应用程序时,获取该电子设备所处环境的当前环境音,基于该当前环境音调整电子设备在目标应用程序运行过程中的输出音效,从而根据电子设备所处环境的环境音调整电子设备在运行目标应用程序时的输出音效,实现自动快捷的配置电子设备的输出音效,提升输出音效的效果以及用户体验。
请参阅图2,图2示出了本申请另一实施例提供的音效调整方法的流程示意图。所述音效调整方法应用于上述电子设备,下面将针对图2所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:
步骤S210:检测所述电子设备是否运行有目标应用程序,其中,所述目标应用程序在运行时可输出音频。
其中,步骤S210的具体描述请参阅步骤S110,在此不再赘述。
步骤S220:当所述电子设备运行有所述目标应用程序时,识别所述目标应用程序的类型。
在本实施例中,所述电子设备可以预先建立应用程序和类型之间的映射关系,并生成映射关系表存储在电子设备中,如表2所示。其中,应用程序和类型之间的映射关系可以由用户手动关联,可以由电子设备自动关联或者由服务器自动关联等,在此不做限定。并且应用程序和类型之间的映射关系可以包括一个应用程序对应一个类型,或者多个应用程序对应一个类型等,在此不做限定,例如,以微信和QQ为例,映射关系可以为微信和QQ分别对应一个类型,也可以为微信和QQ对应同一个类型等。
在确定电子设备运行的目标应用程序后,将所述目标应用程序和映射关系表中预先存储的多个应用程序一一对比,以获取与所述目标应用程序匹配的应用程序,再根据所述映射关系表,查找该应用程序对应的类型,从而可以获取所述目标应用程序的类型。例如,当所述映射关系表中包括微信和即时通讯类的映射关系,也就是说,映射关系表中的应用程序下存储有微信,以及类型下存储有即时通讯类,微信和即时通讯类相关联,那么,当所述目标应用程序为微信时,可以将该目标应用程序与映射关系表中存储的应用程序进行匹配,可以理解的,该目标应用程序可以与映射关系表中的微信匹配,进而查找到该目标应用程序的类型为即时通讯类。
表2
应用程序 类型
C1 D1
C2 D2
C3 D3
作为一种方式,当将所述目标应用程序和映射关系表中预先存储的多个应 用程序一一对比均匹配失败时,也就是说,当所述映射关系表的应用程序下没有存储有与所述目标应用程序匹配的应用程序时,可以通过查找与所述目标应用程序的类型相近的应用程序,将与所述目标应用程序相近的应用程序的类型作为目标应用程序的类型,从而获取所述目标应用程序的类型。其中,在本实施例中,可以获取所述目标应用程序的包名,由于包名包括与应用程序相关的各种信息,因此,可以对所述包名进行分析,获取该包名中包含的目标应用程序的厂家,然后查找该厂家生产的其他应用程序,在所述映射关系表中查找其他应用程序的类型,将所述其他应用程序的类型作为所述目标应用程序的类型。
其中,在本实施例中,以Android***为例,在Android***中,应用程序的版本号是在AndroidManifest.xml文件中进行配置的,而PackageInfo类则封装了从该配置文件中获取的所有信息,描述了包内容的整体信息。因此,可以使用PackageInfo对象的versionName属性获取应用的版本号,且可以通过PackageManager对象来获取PackageInfo对象,其中,PackageManager是一个检索当前已安装在设备上的相关应用程序包的各种信息的类,PackageManager对象中的getPackageInfo方法可以获取PackageInfo对象,该方法需要传递两个参数:应用包名和条件。通常情况下,应用程序的包名可以通过Activity或Context(Activity继承自Context)的getPackageName()方法获取,而添加可以有很多设置,通常设置为0。最后是PackageManager对象的获取,Context对象提供了getPackageManager()方法来获取该对象。因此,基于上述方法可以获取所述目标应用程序的包名。
步骤S230:当所述目标应用程序的类型为游戏类型时,获取所述电子设备所处环境的当前环境音。
在本实施例中,所述目标应用程序可以包括多种类型,例如,所述目标应用程序可以为音乐播放类型、可以为视频播放类型、可以为即时通讯类型、可以为文字阅读类型、可以为游戏类型等,当识别所述目标应用程序的类型为游戏类型时,对应获取所述电子设备所处环境的当前环境音。
步骤S240:判断所述当前环境音是否超过声音阈值。
作为一种方式,所述电子设备预先设置并存储有声音阈值,该声音阈值用于作为当前环境音的判断依据。可以理解的,当获取到电子设备所处环境的当前环境音时,将所述当前环境音的值与所述声音阈值进行比较,以判断该当前环境音是否超过所述声音阈值,其中,当该当前环境音的值大于该声音阈值时,可以表征该当前环境音超过该声音阈值,当该当前环境音的值不大于该声音阈值时,可以表征该当前环境音不超过该声音阈值。
步骤S250:当所述当前环境音超过所述声音阈值时,基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。
其中,当该当前环境音超过该声音阈值时,表征该当前环境音可能对电子设备当前的输出音效造成干扰,因此,作为一种方式,该电子设备可以基于所述当前环境音调整电子设备在目标应用程序运行过程中的输出音效。
请参阅图3,图3示出了本申请的图2所示的实施例提供的音效调整方法的步骤S250的流程示意图。下面将针对图3所示的流程进行详细的阐述, 所述方法具体可以包括以下步骤:
步骤S251:当所述当前环境音超过所述声音阈值时,检测所述电子设备是否连接有耳机。
在本实施例中,电子设备包括耳机通话模式和非耳机通话模式,其中,非耳机通话模式包括免提模式和听筒模式,用于播放电子设备在通话、播放视频等情况下发出的语音信号。在一个实施方式中,可以通过判断电子设备是否连接有耳机的方式检测所述电子设备的通话模式,其中,可以通过查看电子设备的耳机连接孔的状态来判断,例如,当电子设备的耳机连接孔连接耳机时,返回第一状态值,当连接孔内的耳机被拔出时,返回第二状态值,通过检测第一状态值和第二状态值就可以确定当前电子设备是否连接有耳机。作为一种方式,Android***在耳机***和拔出连接孔的时候都会发送广播,所以,电子设备可以通过监听该广播的方式确定当前是否连接有耳机以及电子设备的通话模式。
步骤S252:当所述电子设备连接有所述耳机时,开启针对所述目标应用程序的音频流的音效设置,并基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。
其中,当该电子设备连接有耳机时,表征电子设备在运行目标应用程序的过程中受到当前环境音的干扰较小,其输出音效可以在较小的干扰下传输到用户耳朵,因此,可以开启针对该目标应用程序的音频流的音效设置,以提升输出音效的效果。可以理解的,此时,可以基于当前环境调整电子设备在目标应用程序运行过程中的输出音效,例如,当所述当前环境音较高时,可以对应提升电子设备在目标应用程序运行过程中的输出音效,以弱化当前环境音对输出音效的干扰;当所述当前环境音较低时,可以对应降低电子设备在目标应用程序运行过程中的输出音效,以保证在当前环境音对输出音效干扰较小的情况下,降低电子设备的功耗。
步骤S253:当所述电子设备没有连接有所述耳机时,关闭针对所述目标应用程序的音频流的音效设置。
其中,当该电子设备没有连接有耳机时,表征电子设备在运行目标应用程序的过程中受到当前环境音的干扰较大,其输出音效在较大的干扰下传输到用户耳朵,对输出音效的调整的效果较差,因此,可以关闭针对该目标应用程序的音频流的音效设置,以进一步降低电子设备的功耗。
本实施例提供的音效调整方法,通过检测电子设备是否运行有目标应用程序,其中,目标应用程序在运行时可输出音频,当电子设备运行有目标应用程序时,识别该目标应用程序的类型,当目标应用程的类型为游戏类型时,获取该电子设备所处环境的当前环境音,判断该当前环境音是否超过声音阈值,当该环境音超过声音阈值时,基于该当前环境音调整电子设备在目标应用程序运行过程中的输出音效,相较于图1所示的音效调整方法,本实施例在电子设备的环境音超过声音阈值时再进行调整,以降低电子设备的功耗以及提升电子设备的适用性。同时,在电子设备的环境音超过声音阈值且连接有耳机时,开启针对目标应用程序的音频流的音效设置,在电子设备的环境 音超过声音阈值且没有连接有耳机时,关闭针对目标应用程序的音频流的音效设置,从而进一步降低电子设备的功耗以及提升用户体验。
请参阅图4,图4示出了本申请又一实施例提供的音效调整方法的流程示意图。所述音效调整方法应用于上述电子设备,其中,在本实施例中,电子设备设置有多条音频通路,多条音频通路中的每条音频通路均对应不同的音效处理算法。下面将针对图4所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:
步骤S310:检测所述电子设备是否运行有目标应用程序,其中,所述目标应用程序在运行时可输出音频。
步骤S320:当所述电子设备运行有所述目标应用程序时,识别所述目标应用程序的类型。
步骤S330:当所述目标应用程序的类型为游戏类型时,获取所述电子设备所处环境的当前环境音。
其中,步骤S310-步骤S330的具体描述请参阅步骤S210-步骤S230,在此不再赘述。
步骤S340:基于所述当前环境音从所述多条音频通路中选择至少一条音频通路作为目标音频通路。
在本实施例中,电子设备设置有多条音频通路,多条音频通路中的每条音频通路均对应不同的音频处理算法,具体地,所述电子设备根据音频***现有的构架,单独为不同的场景添加不同的音频通路,其中,每条音频通路是指不同的声音走的是不同的通路。作为一种方式,在获取电子设备所在环境的当前环境音后,获取该环境音对应的至少一条音频通路,可以理解的,每条音频通路对应不同的音效处理算法,经该音频通路传输的音频数据在输出时可以有不同的音效,例如,不同的音量、不同的响度、不同种类的声音等。因此,在本实施例中,在确定电子设备所在环境的当前环境音后,如果当前环境音较低,可输出音效的音量较高,则对应从多条音频通路中选择可输出较高音量的音频通路作为目标音频通路;如果当前环境音较高,需要的输出音效的音量较低,则对应从多条音频通路中选择可输出较小音量的音频通路作为目标音频通路。
进一步地,在获取目标应用程序的类型后,获取该类型对应的至少一条音频通路。具体地,对所述目标应用程序的音频数据进行分析,获取音频数据中的声音种类,再根据分析后的结果从所述多条音频通路中选择至少一条音频通路作为目标音频通路,也就是说,一个应用程序可以对应多条音频通路。作为一种方式,当所述音频数据中只包括一个种类的声音时,可以仅选择其中一条音频通路作为目标音频通路;当所述音频数据中包括多个种类的声音时,可以选择多条音频通路作为目标音频通路。
以所述目标应用程序为游戏类应用程序为例,其中,该游戏类应用程序可以包括打击声、跑步声、枪声等声音种类,因此,可以从多条音频通路中分别选择与打击声、跑步声、枪声等对应的音频通路作为目标音频通路分别传输所述打击声、跑步声、枪声等,从而不同的音频数据通过不同的音效处理算法处 理,处理效果更佳。
当然,在本实施例中,每个应用程序还可以有单独对应的音频通路,也就是说一个应用程序对应一个音频通路,且各个应用程序对应的音频通路根据应用程序的类型设置不同的音效处理算法,因此,在获取包名对应的应用程序的类型后,根据该类型获取与该目标应用程序对应的音频通路作为目标音频通路。以所述目标应用程序为游戏类应用程序为例,基于该游戏类应用程序从多条音频通路中确定一条音频通路作为该游戏类应用程序的目标音频通路,传输所述电子设备在运行所述目标应用程序过程中的输出音效。
请参阅图5,图5示出了本申请的图4所示的实施例提供的音效调整方法的步骤S340的流程示意图。下面将针对图5所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:
步骤S341:根据预设关系表确定所述当前环境音对应的当前音频通路,所述预设关系表中包括环境音和音频通路之间的对应关系。
作为一个实施方式,电子设备可以预先建立环境音和音频通路之间的映射关系,并生成映射关系表存储在电子设备中,如表3所示。其中,环境音和音频通路之间的映射关系可以由用户手动关联,可以由电子设备自动关联或者由服务器自动关联等,在此不做限定。
进一步地,在确定当前环境音后,将所述当前环境音和映射关系表中预先存储的多个环境音一一对比,以获取与所述当前环境音匹配的环境音,再根据所述映射关系表,查找该环境音对应的音频通路,从而可以获取所述当前环境音对应的音频通路。
表3
环境音 音频通路
A1 E1
A2 E2
A3 E3
步骤S342:将所述当前音频通路确定为所述目标音频通路。
步骤S350:通过所述目标音频通路传输所述电子设备在所述目标应用程序运行过程中的输出音效。
可以理解的,目标音频通路至少包括一条音频通路,当音频通路为一条时,则通过该音频通路对应的音效处理算法对原始音频数据进行处理,获得对应的输出音效;当音频通路为多条时,由于每个音频通路对应的独立的音效处理算法,因此,通过目标音频通路传输所述电子设备在目标应用程序运行过程中的输出音效,可以对原始音频数据进行不同的处理,从而得到声音各异的输出音效,处理效果更佳。
本实施例提供的音效调整方法,通过检测电子设备是否运行有目标应用程序,其中,目标应用程序在运行时可输出音频,当电子设备运行有目标应用程序时,识别该目标应用程序的类型,当目标应用程的类型为游戏类型时,获取该电子设备所处环境的当前环境音,基于该当前环境音从多条音频通路 中选择至少一条音频通路作为目标音频通路,通过该目标音频通路传输电子设备在目标应用程序运行过程中的输出音效,相较于图1所示的音效调整方法,本实施例通过设置多条音频处理算法不同的音频通路,以方便且快捷的对输出音效进行调节,提升输出音效的效果。
请参阅图6,图6示出了本申请实施例提供的音效调整装置200的模块框图。音效调整装置200应用于上述电子设备。下面将针对图6所示的框图进行阐述,所述音效调整装置200包括:检测模块210、获取模块220以及调整模块230,其中:
检测模块210,用于检测所述电子设备是否运行有目标应用程序,其中,所述目标应用程序在运行时可输出音频。
获取模块220,用于当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音。进一步地,所述获取模块220包括:识别子模块和获取子模块,其中:
识别子模块,用于当所述电子设备运行有所述目标应用程序时,识别所述目标应用程序的类型。
获取子模块,用于当所述目标应用程序的类型为游戏类型时,获取所述电子设备所处环境的当前环境音。
调整模块230,用于基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。进一步地,所述调整模块230包括:判断子模块和调整子模块,其中:
判断子模块,用于判断所述当前环境音是否超过声音阈值。
调整子模块,用于当所述当前环境音超过所述声音阈值时,基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。进一步地,所述调整子模块包括:检测单元、开启单元以及关闭单元,其中:
检测单元,用于当所述当前环境音超过所述声音阈值时,检测所述电子设备是否连接有耳机。
开启单元,用于当所述电子设备连接有所述耳机时,开启针对所述目标应用程序的音频流的音效设置,并基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。进一步地,所述开启单元包括:提升子单元,其中:
提升子单元,用于基于所述当前环境音提升所述电子设备在所述目标应用程序运行过程中的输出音效。
关闭单元,用于当所述电子设备没有连接有所述耳机时,关闭针对所述目标应用程序的音频流的音效设置。
进一步地,所述电子设备设置有多条音频通路,所述多条音频通路中的每条音频通路均对应不同的音效处理算法,所述调整模块230还包括:选择子模块和传输子模块,其中:
选择子模块,用于基于所述当前环境音从所述多条音频通路中选择至少一条音频通路作为目标音频通路。进一步地,所述选择子模块包括:
确定单元,用于根据预设关系表确定所述当前环境音对应的当前音频通路, 所述预设关系表中包括环境音和音频通路之间的对应关系。
所述确定单元,还用于将所述当前音频通路确定为所述目标音频通路。
传输子模块,用于通过所述目标音频通路传输所述电子设备在所述目标应用程序运行过程中的输出音效。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
本申请实施例提供的音效调整装置包括检测模块、获取模块以及调整模块,其中,检测模块用于检测所述电子设备是否运行有目标应用程序,其中,所述目标应用程序在运行时可输出音频,获取模块用于当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音,调整模块用于基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效,从而根据电子设备所处环境的环境音调整电子设备在运行目标应用程序时的输出音效,实现自动快捷的配置电子设备的输出音效,提升输出音效的效果以及用户体验。
请参阅图7,其示出了本申请实施例提供的一种电子设备100的结构框图。该电子设备100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作***、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。
存储器120可以包括随机存储器(Random Access Memory,RAM),也 可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,例如,存储器104中可以存储有音效调整装置。该音效调整装置可以为前述的装置200。其中,存储程序区可存储用于实现操作***的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
请参阅图8,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质300中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质300可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质300包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质300具有执行上述方法中的任何方法步骤的程序代码310的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码310可以例如以适当形式进行压缩。
综上所述,本申请实施例提供的音效调整方法、装置、电子设备以及存储介质,检测电子设备是否运行有目标应用程序,其中,目标应用程序在运行时可输出音频,当电子设备运行有目标应用程序时,获取该电子设备所处环境的当前环境音,基于该当前环境音调整电子设备在目标应用程序运行过程中的输出音效,从而根据电子设备所处环境的环境音调整电子设备在运行目标应用程序时的输出音效,实现自动快捷的配置电子设备的输出音效,提升输出音效的效果以及用户体验。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种音效调整方法,其特征在于,应用于电子设备,所述方法包括:
    检测所述电子设备是否运行有目标应用程序,其中,所述目标应用程序在运行时可输出音频;
    当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音;
    基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效,包括:
    判断所述当前环境音是否超过声音阈值;
    当所述当前环境音超过所述声音阈值时,基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效。
  3. 根据权利要求2所述的方法,其特征在于,所述判断所述当前环境音是否超过声音阈值,包括:
    将所述当前环境音的值与所述声音阈值进行比较;
    若所述当前环境音的值大于所述声音阈值,判定所述当前环境音超过所述声音阈值;
    若所述当前环境音的值不大于所述声音阈值,判定所述当前环境音不超过所述声音阈值。
  4. 根据权利要求2所述的方法,其特征在于,所述当所述当前环境音超过所述声音阈值时,基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效,包括:
    当所述当前环境音超过所述声音阈值时,检测所述电子设备是否连接有耳机;
    当所述电子设备连接有所述耳机时,开启针对所述目标应用程序的音频流的音效设置,并基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效;
    当所述电子设备没有连接有所述耳机时,关闭针对所述目标应用程序的音频流的音效设置。
  5. 根据权利要求4所述的方法,其特征在于,所述基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效,包括:
    基于所述当前环境音提升所述电子设备在所述目标应用程序运行过程中的输出音效。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述电子设备设置有多条音频通路,所述多条音频通路中的每条音频通路均对应不同的音效处理算法,所述基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效,包括:
    基于所述当前环境音从所述多条音频通路中选择至少一条音频通路作为目标音频通路;
    通过所述目标音频通路传输所述电子设备在所述目标应用程序运行过程中的输出音效。
  7. 根据权利要求6所述的方法,其特征在于,所述基于所述当前环境音从所述多条音频通路中选择至少一条音频通路作为目标音频通路,包括:
    根据预设关系表确定所述当前环境音对应的当前音频通路,所述预设关系表中包括环境音和音频通路之间的对应关系;
    将所述当前音频通路确定为所述目标音频通路。
  8. 根据权利要求5所述的方法,其特征在于,所述基于所述当前环境音从所述多条音频通路中选择至少一条音频通路作为目标音频通路,包括:
    在获取所述目标应用程序的类型后,获取所述目标应用程序的音频数据中的声音种类;
    对所述目标应用程序的音频数据进行分析;
    根据分析结果从所述多条音频通路中选择至少一条音频通路作为目标音频通路。
  9. 根据权利要求8所述的方法,其特征在于,所述根据分析结果从所述多条音频通路中选择至少一条音频通路作为目标音频通路,包括:
    当所述音频数据中只包括一个种类的声音时,选择其中一条音频通路作为目标音频通路;
    当所述音频数据中包括多个种类的声音时,选择多条音频通路作为目标音频通路。
  10. 根据权利要求6-9任一项所述的方法,其特征在于,所述基于所述当前环境音从所述多条音频通路中选择至少一条音频通路作为目标音频通路,包括:
    若所述当前环境音较低,可输出音效的音量较高,从多条音频输出通路中选择可输出较高音量的音频通路作为目标音频通路;
    若所述当前环境音较高,需要的输出音效的音量较低,从多条音频通路中选择可输出较小音量的音频通路作为目标音频通路。
  11. 根据权利要求1所述的方法,其特征在于,所述当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音,包括:
    当所述电子设备运行有所述目标应用程序时,识别所述目标应用程序的类型;
    当所述目标应用程序的类型为游戏类型时,获取所述电子设备所处环境的当前环境音。
  12. 根据权利要求1所述的方法,其特征在于,所述基于所述当前环境音调整所述电子设备在所述目标应用程序运行过程中的输出音效,包括:
    基于所述当前环境音增大或减小所述电子设备在所述目标应用程序运行过程中的输出音效。
  13. 根据权利要求12所述的方法,其特征在于,所述基于所述当前环境音增大或减小所述电子设备在所述目标应用程序运行过程中的输出音效,包括:
    当所述当前环境音高于所述电子设备的声音阈值或者高于所述电子设备的输出声音时,降低所述电子设备在目标应用程序运行过程中的输出音效;
    当所述当前环境音低于所述电子设备的声音阈值或者低于所述电子设备的输出声音时,增大或保持所述电子设备在目标应用程序运行过程中的输出音效。
  14. 根据权利要求1所述的方法,其特征在于,所述检测所述电子设备是否运行有目标应用程序之前,包括:
    获取电子设备运行的应用程序;
    从所述应用程序中确定目标应用程序,所述目标应用程序包括单个应用程序或者多个应用程序。
  15. 根据权利要求1所述的方法,其特征在于,所述当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音,包括:
    当所述电子设备运行有所述目标应用程序时,检测所述电子设备是否有音频输出;
    若检测到所述电子设备有音频输出,获取所述电子设备所处环境的当前环境音。
  16. 根据权利要求1所述的方法,其特征在于,所述当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音,包括:
    当所述电子设备运行有所述目标应用程序时,获取所述电子设备所在环境的环境声音;
    将所述环境声音传输至处理器进行分析处理以获取所述当前环境音,其中,所述当前环境音包括声音音量或声音强度。
  17. 根据权利要求1所述的方法,其特征在于,所述当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音,包括:
    当所述电子设备运行有所述目标应用程序时,获取所述电子设备的当前位置信息;
    获取在所述当前位置信息的位置信息预设范围内的其他电子设备;
    检测所述其他电子设备在预设时长内是否获取到其所在环境的环境音;
    当所述其他电子设备在预设时长内获取到其所在环境的环境音时,获取所述其他电子设备获取的环境音并将其作为所述电子设备的当前环境音,从而获取所述电子设备所处环境的当前环境音。
  18. 一种音效调整装置,其特征在于,应用于电子设备,所述装置包括:
    检测模块,用于检测所述电子设备是否运行有目标应用程序,其中,所述目标应用程序在运行时可输出音频;
    获取模块,用于当所述电子设备运行有所述目标应用程序时,获取所述电子设备所处环境的当前环境音;
    调整模块,用于基于所述当前环境音调整所述电子设备在所述目标应用程 序运行过程中的输出音效。
  19. 一种电子设备,其特征在于,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行如权利要求1-17任一项所述的方法。
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,在所述程序代码被处理器运行时执行如权利要求1-17任一项所述的方法。
PCT/CN2019/094933 2018-09-04 2019-07-05 音效调整方法、装置、电子设备以及存储介质 WO2020048216A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811026569.XA CN109284080B (zh) 2018-09-04 2018-09-04 音效调整方法、装置、电子设备以及存储介质
CN201811026569.X 2018-09-04

Publications (1)

Publication Number Publication Date
WO2020048216A1 true WO2020048216A1 (zh) 2020-03-12

Family

ID=65183971

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/094933 WO2020048216A1 (zh) 2018-09-04 2019-07-05 音效调整方法、装置、电子设备以及存储介质

Country Status (2)

Country Link
CN (1) CN109284080B (zh)
WO (1) WO2020048216A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284080B (zh) * 2018-09-04 2021-01-05 Oppo广东移动通信有限公司 音效调整方法、装置、电子设备以及存储介质
CN111741156A (zh) * 2019-03-25 2020-10-02 奇酷互联网络科技(深圳)有限公司 音频输出方法、移动终端及可穿戴设备
CN111935583B (zh) * 2020-08-24 2022-09-27 Oppo(重庆)智能科技有限公司 耳机模式控制方法、装置、终端设备、***以及存储介质
CN113220123A (zh) * 2021-05-10 2021-08-06 深圳市慧鲤科技有限公司 一种音效控制的方法、装置、电子设备及存储介质
CN113559511A (zh) * 2021-07-26 2021-10-29 歌尔科技有限公司 控制方法、游戏装置、计算机程序产品及可读存储介质
CN114666706B (zh) * 2021-11-30 2024-05-14 北京达佳互联信息技术有限公司 音效增强方法、装置及***
CN116312430B (zh) * 2023-03-20 2024-01-02 广州资云科技有限公司 电音基调控制方法、装置、计算机设备和存储介质
CN117201665B (zh) * 2023-08-26 2024-03-29 哈尔滨师范大学 一种数据处理方法、装置及***

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376689A (zh) * 2015-10-13 2016-03-02 广东欧珀移动通信有限公司 自适应音频播放控制方法和***
CN106375576A (zh) * 2016-08-31 2017-02-01 维沃移动通信有限公司 一种音频通路控制方法及移动终端
CN107193527A (zh) * 2017-05-19 2017-09-22 深圳市金立通信设备有限公司 一种声音控制方法、终端及计算机可读存储介质
CN109284080A (zh) * 2018-09-04 2019-01-29 Oppo广东移动通信有限公司 音效调整方法、装置、电子设备以及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100773539B1 (ko) * 2004-07-14 2007-11-05 삼성전자주식회사 멀티채널 오디오 데이터 부호화/복호화 방법 및 장치
US9202509B2 (en) * 2006-09-12 2015-12-01 Sonos, Inc. Controlling and grouping in a multi-zone media system
TWM487509U (zh) * 2013-06-19 2014-10-01 杜比實驗室特許公司 音訊處理設備及電子裝置
CN105630586B (zh) * 2014-10-30 2020-03-24 联想(北京)有限公司 一种信息处理方法及电子设备
CN104934048A (zh) * 2015-06-24 2015-09-23 小米科技有限责任公司 音效调节方法及装置
CN104951273B (zh) * 2015-06-30 2018-07-03 联想(北京)有限公司 一种信息处理方法、电子设备及***
CN106126163A (zh) * 2016-06-16 2016-11-16 广东欧珀移动通信有限公司 一种调整音效的方法及终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376689A (zh) * 2015-10-13 2016-03-02 广东欧珀移动通信有限公司 自适应音频播放控制方法和***
CN106375576A (zh) * 2016-08-31 2017-02-01 维沃移动通信有限公司 一种音频通路控制方法及移动终端
CN107193527A (zh) * 2017-05-19 2017-09-22 深圳市金立通信设备有限公司 一种声音控制方法、终端及计算机可读存储介质
CN109284080A (zh) * 2018-09-04 2019-01-29 Oppo广东移动通信有限公司 音效调整方法、装置、电子设备以及存储介质

Also Published As

Publication number Publication date
CN109284080B (zh) 2021-01-05
CN109284080A (zh) 2019-01-29

Similar Documents

Publication Publication Date Title
WO2020048216A1 (zh) 音效调整方法、装置、电子设备以及存储介质
WO2020048222A1 (zh) 音效调整方法、装置、电子设备以及存储介质
US10521512B2 (en) Dynamic text-to-speech response from a smart speaker
CN109445740B (zh) 音频播放方法、装置、电子设备及存储介质
JP6489563B2 (ja) 音量調節方法、システム、デバイス及びプログラム
US11810594B2 (en) Method and system for a headset with profanity filter
WO2020048217A1 (zh) 音效调整方法、装置、电子设备以及存储介质
CN110876180B (zh) 功耗处理方法、装置、电子设备及计算机可读介质
WO2017166603A1 (zh) 一种音质调整方法、终端、电子设备及非易失性计算机存储介质
CN109379490B (zh) 音频播放方法、装置、电子设备及计算机可读介质
CN109473095A (zh) 一种智能家居控制***及控制方法
CN109271131B (zh) 耳机控制方法、装置、电子设备及存储介质
CN109379491A (zh) 音频播放方法、装置、电子设备及计算机可读介质
CN111124351B (zh) 音频输出方法、装置、电子设备以及存储介质
US20170033753A1 (en) Volume Control Methods and Devices, and Multimedia Playback Control Methods and Devices
CN113949956A (zh) 降噪处理方法、装置、电子设备、耳机及存储介质
US11580954B2 (en) Systems and methods of handling speech audio stream interruptions
US11122160B1 (en) Detecting and correcting audio echo
EP3886457A1 (en) Information processing device and information processing method
KR20210078682A (ko) 전자장치 및 그 제어방법
CN113660599B (zh) 扬声器的控制方法、装置、移动终端及存储介质
CN114710730A (zh) 音量提示方法、装置、耳机及存储介质
CN113885827A (zh) 音频播放方法、装置、电子设备、计算机可读介质及产品
US11211910B1 (en) Audio gain selection
CN118042348A (zh) 音频处理方法、装置、音频播放设备以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19856561

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19856561

Country of ref document: EP

Kind code of ref document: A1