A method for switching sound effects, an electronic device, and a storage medium
By setting up a sound effect switching interface and cascading multiple sound effect processing modules in electronic devices, the problem of monotonous sound effects in electronic devices is solved, enabling the switching and automatic recognition of multiple sound effect modes, thus improving the user's auditory experience.
Patent Information
- Application Number
- CN202211634015.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-12-19
AI Technical Summary
Existing electronic devices typically only have one sound effect, which makes it difficult to meet the diverse sound effect requirements of different application scenarios, resulting in a poor listening experience for users.
A method for switching sound effects is provided, which allows users to select or automatically identify application scenarios and switch sound effect modes by setting a sound effect switching interface in electronic devices, and uses multiple sound effect processing modules cascaded to achieve multiple sound effect modes.
It meets users' sound effect needs in different application scenarios, improves the listening experience, realizes the switching and automatic recognition of multiple sound effect modes, and enhances the user experience.
Smart Images

Figure CN118233824B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio processing technology, and in particular to a sound effect switching method, electronic device, and storage medium. Background Technology
[0002] Sound effects are artificially created or enhanced sounds used to improve the sound processing of artistic or other content in movies, video games, music, or other media. Targeted sound effect processing is applied in different scenarios, and each sound effect has its own advantages and optimal application scenarios.
[0003] Most electronic devices in the current technology are single-effect devices. Because each sound effect has different characteristics, it is difficult for a single sound effect to meet the sound needs of different scenarios, resulting in a poor listening experience for users. Summary of the Invention
[0004] This application provides a sound effect switching method, an electronic device, and a storage medium, which solves the problem that existing electronic devices only have one sound effect and cannot meet the sound effect requirements of different application scenarios.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] In a first aspect, this application provides a sound effect switching method, which is applied to an electronic device and includes:
[0007] The electronic device presents a sound effect switching interface to the user, which includes multiple sound effect mode function options. When the user triggers a target mode function option among the multiple sound effect modes, the electronic device responds to the trigger operation of the target mode function option, obtains the target sound effect mode corresponding to the target mode function option, and switches the electronic device's sound effect mode to the target sound effect mode.
[0008] By setting up a sound effect switching interface in electronic devices, users can select sound effect modes according to their actual needs. The electronic devices can switch sound effect modes based on the user's selection, thereby meeting the different sound effect needs of users in different application scenarios of the electronic devices.
[0009] In some possible implementations, the sound effect switching interface also includes a smart sound effect mode option. When the user triggers the smart sound effect mode option, the electronic device responds by automatically identifying the application scenario of the electronic device; after identifying the application scenario, it determines the target sound effect mode corresponding to the application scenario and switches the electronic device's sound effect mode to the target sound effect mode.
[0010] In intelligent sound effect mode, electronic devices can automatically identify the application scenario and automatically switch to the sound effect mode corresponding to the application scenario, thus further meeting the different sound effect needs of users in different application scenarios of electronic devices.
[0011] In some possible implementations, identifying the application scenarios of electronic devices can be achieved in the following ways:
[0012] The operating status of the electronic device is obtained; and based on the operating status of the electronic device, the application scenario of the electronic device is determined.
[0013] In some possible implementations, the operating state of the electronic device includes the applications running on the electronic device. Based on the operating state of the electronic device, the application scenario of the electronic device is determined. Specifically, this can be done in the following ways:
[0014] Based on the target identifier of the application running on the electronic device and the pre-defined correspondence between application identifiers and scene identifiers, the target scene corresponding to the target identifier is determined; then, the target scene is used as the application scene of the electronic device. Therefore, this application can determine the target scene of the running application based on the identifier of the running application and the pre-defined correspondence between application identifiers and scene identifiers.
[0015] In some possible implementations, switching the sound effect mode of an electronic device to the target sound effect mode specifically includes switching the sound effect link corresponding to the electronic device's sound effect mode to the sound effect link corresponding to the target sound effect mode. Different sound effect modes can be implemented by different sound effect links, thus switching the sound effect mode of an electronic device can be achieved by switching the sound effect link.
[0016] In some possible implementations, before switching the electronic device's sound effect mode to the target sound effect mode, the method provided in this application further includes constructing sound effect links corresponding to each sound effect mode. That is, this application achieves different sound effect modes by constructing different sound effect links.
[0017] In some possible implementations, the method for constructing the audio effect link corresponding to each audio effect mode can be to first obtain the configuration parameters corresponding to each audio effect mode, and then construct the audio effect link corresponding to the target audio effect mode according to the configuration parameters of each audio effect mode. Different audio effect modes have different configuration parameters, and different audio effect links can be constructed according to different configuration parameters.
[0018] In some possible implementations, the sound effect links corresponding to the target sound effect mode are constructed according to the configuration parameters corresponding to each sound effect mode. Specifically, the sub-sound effect links that make up each sound effect mode are cascaded according to the configuration parameters corresponding to each sound effect mode to construct the sound effect links corresponding to the target sound effect mode. Different sound effect links correspond to different sound effects, and different sound effect modes can be achieved by cascading multiple sub-sound effect links.
[0019] Secondly, this application provides an electronic device comprising: a processor and a memory; one or more computer programs stored in the memory, the one or more computer programs including instructions; when the instructions are executed by the processor, the electronic device performs the sound effect switching method as described in any possible design of the first aspect above. This electronic device, by setting a sound effect switching interface, supports users in selecting sound effect modes according to actual needs. The electronic device can switch sound effect modes based on the user's selection, thereby meeting the user's different sound effect needs in different application scenarios of the electronic device.
[0020] Thirdly, this application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform a sound effect switching method as described in any of the possible designs in the first aspect above.
[0021] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description
[0022] Figure 1 This is a schematic diagram illustrating the implementation process of an audio switching method provided in an embodiment of this application;
[0023] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0024] Figure 3This is a software structure block diagram of an electronic device according to an embodiment of this application;
[0025] Figure 4 A schematic diagram of a user interface for using an electronic device, provided as an embodiment of this application;
[0026] Figure 5 This is a flowchart illustrating the single-effect processing method in the existing technology;
[0027] Figure 6 A flowchart illustrating a multi-sound-effects processing method provided in an embodiment of this application;
[0028] Figure 7 This is a schematic diagram of a multi-sound effect parameter configuration process provided in an embodiment of this application. Detailed Implementation
[0029] The terms "first," "second," and "third," etc., used in this application specification, claims, and drawings are used to distinguish different objects, not to limit a specific order.
[0030] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0031] To ensure clarity and conciseness in the description of the following embodiments, a brief introduction to the related technologies is given first:
[0032] Sound effects are artificially created or enhanced sounds used to improve the sound processing of artistic or other content in movies, video games, music, or other media. Different scenarios require specific sound effects processing, and each sound effect has its own advantages and optimal application scenarios.
[0033] DTS is an abbreviation for "Digital Theatre System." It's a high-quality, multi-track surround sound technology used for film and music. DTS employs highly efficient data compression based on sound correlation, achieving a sampling rate of 192kHz at 24-bit. In contrast, CDs use linear PCM encoding, with a sampling rate of only 44.1kHz at 16-bit.
[0034] The main benefits of listening to music with DTS sound effects are threefold: firstly, the sound feels enhanced; secondly, the sound becomes richer and fuller; and thirdly, the sound becomes more three-dimensional, with a stronger sense of surround sound. Overall, DTS doesn't require large music files or discriminatory audio formats; it can perfectly enhance the sound of any audio file, making it more pleasing, three-dimensional, and with outstanding effects.
[0035] Most electronic devices in the current technology are single-effect devices. Since the sound effect requirements are different in different scenarios, it is difficult for a single sound effect to meet the needs of different scenarios, resulting in a poor listening experience for users.
[0036] In view of this, embodiments of this application provide an audio switching method, which is applied to an electronic device. For details of the implementation process, please refer to [link to implementation details]. Figure 1 . Figure 1 This is a schematic diagram illustrating the implementation process of an audio switching method provided in an embodiment of this application.
[0037] When developing electronic devices, several scenarios can be pre-defined to differentiate between different scenarios based on usage. For example, in this embodiment, five application scenarios are pre-defined: voice enhancement scenario, music scenario, game scenario, movie scenario, and other scenarios. Scenarios that do not fall under the categories of voice enhancement scenario, music scenario, game scenario, or movie scenario are classified as other scenarios.
[0038] Users can choose a specific sound effect mode based on the actual application scenario. For example, when the user's application scenario is a game, they can choose the game sound effect mode; when the user's application scenario is a movie, they can choose the movie sound effect mode. Users can select the corresponding sound effect mode for different scenarios, thus obtaining a better auditory experience.
[0039] Users can also select Smart Mode in the sound effect mode settings interface of their electronic devices. In this mode, the electronic device automatically identifies the user's application scenario and then assigns a corresponding sound effect mode based on the identified scenario. For example, when a user is listening to music, in Smart Mode, the electronic device will identify that the user's application scenario is a music scenario and then assign the corresponding sound effect mode to that scenario, providing the user with a better listening experience.
[0040] One possible implementation method for identifying application scenarios is to pre-classify various software programs, assigning each program to a specific application scenario. When a user opens a particular program, the system can automatically identify the user's application scenario based on the opened program.
[0041] Other methods can be used to identify application scenarios, and the methods for identifying application scenarios mentioned in the above embodiments are not limited to those described above.
[0042] Different sound effect modes can be achieved by cascading different sound effect processing modules after the first sound effect processing module. It should be noted that the first sound effect processing module is typically used to perform DTS sound effect processing on the audio data.
[0043] The specific implementation process of different sound effects is illustrated with examples. For instance, the voice enhancement mode can be implemented using the sound effect processing module corresponding to cascaded sound effect 1; the music mode can be implemented using the sound effect processing module corresponding to cascaded sound effect 2; the game mode can be implemented using the sound effect processing module corresponding to cascaded sound effect 2 and the sound effect processing module corresponding to sound effect N; the movie mode can be implemented using the sound effect processing module corresponding to cascaded sound effect 1, the sound effect processing module corresponding to sound effect 2, and the sound effect processing module corresponding to sound effect N; other modes can be implemented using the sound effect processing module corresponding to cascaded sound effect 1 and the sound effect processing module corresponding to sound effect N.
[0044] In this way, by cascading other different sound effect processing modules after the first sound effect processing module, a variety of sound effects can be achieved; different sound effects can be used in different application scenarios, or different sound effects can be used in the same scenario. This can meet the diverse needs of users for sound effects, giving users a better listening experience.
[0045] In some embodiments, the electronic device may be a mobile phone, tablet computer, desktop computer, laptop computer, ultra-mobile personal computer (UMPC), handheld computer, netbook, personal digital assistant (PDA), wearable electronic device, smartwatch, etc. This application does not impose any special limitations on the specific form of the aforementioned electronic device. In this embodiment, the structure of the electronic device may be as follows: Figure 2 As shown, Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0046] like Figure 2 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a display screen 194, etc.
[0047] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0048] The processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, in this application, the processor 110 may obtain the target sound effect mode corresponding to the target application based on user-defined sound effect mode function options, and switch the sound effect mode of the target application to the target sound effect mode.
[0049] The controller can serve as the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.
[0050] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0051] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0052] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to sensors, chargers, flashlights, cameras, etc., in the sensor 180 through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor in the touch sensor 180 through the I2C interface, enabling the processor 110 to communicate with the touch sensor through the I2C bus interface and realize the touch function of the electronic device.
[0053] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0054] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0055] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0056] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device to display images.
[0057] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0058] USB port 130 is a USB standard compliant interface, which can be a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic devices, and can also be used for data transfer between electronic devices and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0059] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0060] Electronic devices implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0061] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N displays 194, where N is a positive integer greater than 1.
[0062] The display screen 194 of an electronic device can display a series of graphical user interfaces (GUIs), which serve as the main screen of the electronic device. Generally, the size of the display screen 194 is fixed, and only a limited number of controls can be displayed on it. A control is a GUI element, a software component contained within an application, that controls all the data processed by the application and the interactive operations related to that data. Users can interact with controls through direct manipulation, thereby reading or editing information related to the application. Generally, controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0063] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.
[0064] An ISP (Image Signal Processor) processes data fed back from the camera. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's image sensor. The light signal is converted into an electrical signal, which is then transmitted to the ISP for processing, transforming it into a visible image. The ISP can also perform algorithmic optimizations on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature for the shooting scene. In some embodiments, the ISP can be integrated into the camera itself.
[0065] A camera is used to capture still images or videos. An object is projected onto a photosensitive element by an optical image generated through a lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP (Image Signal Processor) for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP (Digital Signal Processor) for processing. The DSP converts the digital image signal into image signals in standard formats such as RGB and YUV. In some embodiments, the electronic device may include one or N cameras, where N is a positive integer greater than 1.
[0066] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device is selecting a frequency, a DSP can perform a Fourier transform on the frequency energy.
[0067] Video codecs are used to compress or decompress digital video. Electronic devices can support one or more video codecs. This allows the electronic device to play or record video in various encoded formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0068] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0069] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0070] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 121. For example, in this embodiment, processor 110 can execute instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, phone book, etc.). In addition, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in internal memory 121 and / or instructions stored in memory disposed in the processor.
[0071] Electronic devices can implement audio functions such as music playback and recording through audio modules 170, speakers 170A, receivers 170B, microphones 170C, headphone jacks 170D, and application processors.
[0072] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 can be located in the processor 110, or some functional modules of the audio module 170 can be located in the processor 110. In this embodiment, the audio module 170 can also process audio data to obtain sound data with various effects.
[0073] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic devices can listen to music or make hands-free calls through the speaker 170A. When a user opens an application on their electronic device, the speaker 170A will play the processed sound data from the application, according to the sound effect mode selected by the user. The sound effect played corresponds to the sound effect mode set by the user.
[0074] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When an electronic device answers a phone call or voice message, the receiver 170B can be brought close to the ear to hear the voice.
[0075] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic devices can have at least one microphone 170C. In some embodiments, electronic devices can have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic devices can have three, four, or more microphones 170C, enabling sound signal collection, noise reduction, sound source identification, and directional recording, among other functions.
[0076] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0077] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. The electronic device can receive button input and generate key signal inputs related to user settings and function control of the electronic device.
[0078] The operating system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses the layered architecture Android system as an example to illustrate the software structure of an electronic device.
[0079] Figure 3 This is a software structure block diagram of an electronic device according to an embodiment of this application.
[0080] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, the hardware abstraction layer, and the kernel layer.
[0081] The application layer can include a series of application packages. For example... Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, and games.
[0082] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, audio hub system, etc.
[0083] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0084] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0085] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0086] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).
[0087] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0088] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0089] The audio hub system is used to configure various parameters of the sound effect mode according to the user's selected mode and the application scenario corresponding to the selected application when the user opens an application with sound playback function, and then pass the configured parameters of the sound effect mode to the audio hardware abstraction layer.
[0090] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0091] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0092] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0093] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0094] The Surface Manager is used to manage the display subsystem and provides the blending of two-dimensional and three-dimensional layers for multiple applications.
[0095] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0096] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0097] A 2D graphics engine is a drawing engine for 2D drawing.
[0098] The Hardware Abstraction Layer (HAL) is the interface layer located between the operating system kernel and the hardware circuitry. Its purpose is to abstract the hardware, providing the operating system with a virtual hardware platform that is hardware-independent and portable across multiple platforms. From a software and hardware testing perspective, both software and hardware testing can be performed separately based on the HAL, making parallel testing possible. In other words, the actions that control the hardware are placed within the HAL.
[0099] In this embodiment, the hardware abstraction layer specifically refers to the audio hardware abstraction layer, which is used to drive the hardware to produce sound using various parameters in the sound effect mode configured by the audio central system. The hardware here can be a speaker 170A.
[0100] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0101] It should be noted that although the embodiments of this application are illustrated using the Android system as an example, the basic principles are also applicable to electronic devices based on operating systems such as iOS and Windows.
[0102] See Figure 4 , Figure 4 This is a schematic diagram of a user interface for using an electronic device, provided as an embodiment of this application.
[0103] Users can set sound effect modes in the sound effect switching interface of their electronic devices. This interface includes multiple sound effect mode options and a smart mode option. User-configurable sound effect modes include: smart mode and custom mode. The custom mode supports user selection of modes such as: vocal enhancement mode, music mode, game mode, movie mode, and others. For example, if a user selects music mode, when they open a particular application, the sound played by that application will be based on the music mode effect.
[0104] Users can also set the sound effect mode to smart mode in the sound effect mode settings interface of the electronic device. In this way, when the user clicks an icon on the electronic device, for example, when the user clicks the "video" icon, the electronic device will automatically identify which scenario the user is using. If the scenario where the user is playing video is identified as "other scenarios", the electronic device will automatically assign the "other mode" sound effect mode to "other scenarios". This makes the sound playback effect more in line with the user's application scenario and brings the user a better auditory experience.
[0105] Specifically, when the user sets the sound effect mode to smart mode, the electronic device first identifies the current application scenario. Specifically, it determines the application scenario corresponding to the target identifier based on the application running on the device, using the target identifier of the running application and the pre-defined correspondence between application identifiers and scenario identifiers. Then, the electronic device switches the audio mode to the audio mode corresponding to the current application scenario.
[0106] The following section, in conjunction with the accompanying drawings, details the specific implementation process of the sound effect switching solution provided in this application.
[0107] See Figure 5 , Figure 5 This is a flowchart illustrating the single-effect processing method in existing technologies.
[0108] The audio mix in the diagram can be understood as the raw audio data used to play sound in various application software. This audio data can be stereo or multi-channel data, including 5.1-channel, 7.1-channel, etc. Three buffer modules are used to buffer the audio mix data: a mixing buffer module, an effects buffer module, and a dropout buffer module.
[0109] First, a mixing buffer module stores data without added sound effects. Then, sound effects are added to the mixed data, and the buffer data with the first sound effect added is stored in the effects buffer module. Finally, the mixed data is stored in the sink buffer module so that the sink buffer module can output the mixed data with the first sound effect added. The first sound effect is usually a DTS sound effect, meaning that in current technology, only DTS sound effect processing is usually applied to the audio data.
[0110] It can be seen that the existing technology can only add one sound effect to the mixed data, resulting in a monotonous sound data effect that is difficult to meet users' needs for diverse sound effects.
[0111] See Figure 6 , Figure 6 This is a flowchart illustrating a multi-sound-effect processing method provided in an embodiment of this application.
[0112] The embodiments of this application and Figure 5 The main difference between the proposed solutions lies in the different sound effect processing procedures for the audio data.
[0113] The audio mixing in this embodiment can also be understood as the raw audio data used for playing sound in various application software. This audio data can be stereo data or multi-channel data, including 5.1 channel data, 7.1 channel data, etc. Three buffer modules are used to buffer the audio mixing data: a mixing buffer module, an effects buffer module, and a dropout buffer module.
[0114] S601, mixing data.
[0115] Mix data is data without added sound effects.
[0116] S602, Store the mixed audio data in the mixing buffer module.
[0117] First, the mixing cache module is used to store the data without sound effects; then sound effects are added to the mixed data.
[0118] S603. Store the audio data with the added first sound effect in the effect cache module.
[0119] First, the mixed data is processed by adding a first sound effect, which is usually a DTS sound effect, that is, adding a DTS sound effect to the mixed data.
[0120] S604. Store the audio data with the added first sound effect in the sinking cache module.
[0121] Then, the audio data with the first sound effect added is stored in the sinking cache module.
[0122] S605: Add a second sound effect to the audio data for which the first sound effect has been added.
[0123] Specifically, based on the user's actual needs for the mix data, a second sound effect can be added to the mix data. This second sound effect can consist of multiple sound effects, with multiple sound effect processing modules cascading together. This allows for different sound effect processing of the mix data, resulting in different playback effects. For example, if the user selects game mode, then the sound effects added to the mix would be sound effect 1, sound effect 2, and sound effect N.
[0124] S606. Store the audio data with the added second sound effect in the effect cache module.
[0125] If the user selects a second sound effect that includes sound effect 2 and sound effect N, the sound data of the added sound effects 1, 2, and N will be stored in the effect cache module. If the user selects movie mode, the sound effects added to the mix will be sound effect 1, sound effect 2, and sound effect N; then the sound data of the added sound effects 1, 2, and N will be stored in the effect cache module.
[0126] S607. Store the audio data with the added second sound effect in the sinking cache module.
[0127] Finally, the audio data with the corresponding sound effects added is stored in the sinking cache module so that the sinking cache module can output the mixed data with the corresponding sound effects added.
[0128] Figure 6 Only the audio data processing process of the first audio effect processing module cascading with one other audio effect processing module is shown. If multiple other audio effect processing modules are cascaded, the audio data processing process is the same as that of cascading with one other audio effect processing module.
[0129] As can be seen from this, the solution provided in this application supports the cascading of multiple sound effect processing modules. By cascading multiple sound effect processing modules, a variety of different sound playback effects can be achieved, that is, multiple sound effect modes are realized, so that users can select the corresponding sound effect mode according to their actual needs, thereby satisfying users' various needs for sound effects.
[0130] See Figure 7 , Figure 7 This is a schematic diagram of a multi-sound effect parameter configuration process provided in an embodiment of this application.
[0131] This application mainly describes the implementation process of the multi-sound effect parameter configuration process at the software level.
[0132] A user opens an application.
[0133] Before opening an application, users can set a sound effect mode in the electronic device's sound effect switching interface. They can choose a specific sound effect mode, and when the application is opened, the sound effect played will be the one selected. Alternatively, users can choose a smart mode. In smart mode, when an application is opened, the electronic device automatically recognizes the application's context and selects the appropriate sound effect mode.
[0134] In some possible implementations, identifying the application scenario of an electronic device can be achieved by using the processor in the electronic device to obtain the operating state of the electronic device, which includes the applications running on the electronic device. In other words, the usage scenario of the electronic device can be identified by identifying the applications running on the electronic device.
[0135] In some possible implementations, the target scenario corresponding to the target identifier can be determined based on the target identifier of the application running on the electronic device and the pre-defined correspondence between the application identifier and the scenario identifier, and the target scenario can be used as the application scenario of the electronic device.
[0136] In some possible implementations, a pre-defined mapping between application identifiers and scene identifiers can categorize applications, with each category corresponding to a scene. Each application has a corresponding application identifier; each scene also has a corresponding scene identifier, thus achieving a one-to-one correspondence between applications and scenes.
[0137] It should be noted that users do not need to select the sound effect mode every time they open the application; the sound effect mode setting is only required when the user needs to adjust the sound effect mode.
[0138] The audio hub system acquires the audio stream of the target application.
[0139] This embodiment of the application takes the user's selection of a smart mode as an example. When a user opens an application, the electronic device recognizes that the application scenario corresponding to that application is a movie scenario, and the corresponding sound effect mode for the movie scenario is movie mode. The application opened by the user is then designated as the target application. Consequently, the audio hub system in the application framework layer acquires the audio stream of the target application and then performs mixing processing on the audio stream.
[0140] The audio central system performs mixing processing on the audio stream.
[0141] Mixing is a step in music production that integrates sounds from multiple sources into a single stereo or mono track. In this embodiment, the purpose of mixing the audio stream is to match the audio stream with the channel links.
[0142] The processed audio stream is transmitted via the audio channel link.
[0143] After the audio stream is mixed and processed into an audio stream that matches the channel link, it is transmitted through the channel link.
[0144] The audio control system determines the audio parameters that need to be cascaded.
[0145] Since the target application corresponds to a movie scene, and the sound effect mode corresponding to the movie scene is movie sound effects, the audio central system determines that the sound effect parameters corresponding to the cascaded sound effect processing modules are sound effect 1, sound effect 2 and sound effect N, and cascades the sound effect modules corresponding to these three sound effect parameters to process the audio stream in sequence.
[0146] The audio control system acquires the configuration of sound effect parameters.
[0147] Once the audio central system determines that the audio effect parameters to be cascaded include audio effect 1, audio effect 2, and audio effect N, it retrieves the storage address of the audio effect parameter corresponding to audio effect 1 from the audio effect parameter address storage module, and then sends the retrieved audio effect parameter storage address to the audio central system extension module. The audio central system extension module, based on the received storage address of the audio effect parameter corresponding to audio effect 1, retrieves the corresponding audio effect parameter from the audio effect parameter storage module and returns the audio effect parameter corresponding to audio effect 1 to the audio central system.
[0148] The process of obtaining the sound effect parameters corresponding to sound effect 2 follows the same method. Specifically, the audio central system obtains the storage address of the sound effect parameters corresponding to sound effect 2 from the sound effect parameter address storage module, and then sends the obtained sound effect parameter storage address to the audio central system extension module. The audio central system extension module, based on the received storage address of the sound effect parameters corresponding to sound effect 2, obtains the sound effect parameters corresponding to sound effect 2 from the sound effect parameter storage module, and returns the sound effect parameters corresponding to sound effect 2 to the audio central system.
[0149] The process of obtaining the sound effect parameters corresponding to sound effect N follows the same method. Specifically, the audio central system obtains the storage address of the sound effect parameters corresponding to sound effect N from the sound effect parameter address storage module, and then sends the obtained sound effect parameter storage address to the audio central system extension module. The audio central system extension module, based on the received sound effect parameter storage address, obtains the sound effect parameters corresponding to sound effect N from the sound effect parameter storage module and returns the sound effect parameters corresponding to sound effect N to the audio central system.
[0150] The audio central system uses various sound effect parameters to construct sound effect processing modules and cascades these modules. Each sound effect processing module includes a sound effect link.
[0151] After acquiring the sound effect parameters corresponding to each sound effect, the audio central system constructs sound effect processing modules based on these parameters. These modules are then cascaded with the DTS sound effect processing module to process the audio stream data.
[0152] Taking the movie mode as an example, after the audio control system obtains the audio parameters corresponding to audio effect 1, audio effect 2, and audio effect N, it constructs audio effect links corresponding to audio effect 1, audio effect 2, and audio effect N respectively based on these parameters. Since each audio effect mode can be composed of other audio effect links required by cascading DTS audio effect links, the constructed audio effect links corresponding to audio effect 1, audio effect 2, and audio effect N are cascaded with DTS audio effect links to form the audio effect links for movie mode. Each audio effect link is encapsulated in its respective audio effect processing module; therefore, cascading the audio effect links is equivalent to cascading the audio effect processing modules.
[0153] The audio hub system uses cascaded audio processing modules to process audio stream data.
[0154] The audio central system uses cascaded sound effect processing modules to process the audio stream data, resulting in processed audio data that conforms to movie sound effects.
[0155] After processing the audio data, the audio central system sends a command to the audio hardware abstraction layer, which instructs the audio hardware abstraction layer to drive the hardware to produce sound.
[0156] After the audio central system processes the audio stream data using various cascaded sound effects, it sends instructions to the audio hardware abstraction layer to instruct the audio hardware abstraction layer to drive the hardware to produce sound.
[0157] The audio hardware abstraction layer drives the hardware to produce sound.
[0158] After receiving a command from the audio central system, the audio hardware abstraction layer drives the hardware to produce sound. In this embodiment, the hardware can be a speaker. The sound effect emitted by this hardware is a movie sound effect.
[0159] In this embodiment, by cascading various audio effect processing modules, multiple cascaded audio effect processing modules are used to process audio stream data, achieving different sound effects for the audio stream in different application scenarios. This satisfies users' diverse needs for sound effects.
[0160] In some possible implementations, if the user selects a sound effect mode that does not require the cascading of multiple sound effect processing modules, for example, if the user selects a music sound effect mode, only sound effect 2 is needed. The specific implementation process is the same as that of cascading sound effect processing modules, and will not be elaborated here.
[0161] In some possible implementations, during the processing of audio data by multiple cascaded audio processing modules, the audio data input to each audio effect parameter can be either stereo or multi-channel data.
[0162] In some possible implementations, multiple cascaded audio processing modules can handle audio data in various formats, such as 44.1K 32bit float, 48K 32bit float, and 48K 24bit.
[0163] This embodiment also provides an electronic device, which includes: a processor and a memory;
[0164] The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the electronic device performs the sound effect switching method described in the above embodiments.
[0165] This embodiment also provides a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the relevant method steps described in the above embodiment to implement the sound effect switching method described in the above embodiment.
[0166] The solution provided in this application mainly employs the following steps to achieve sound effect switching:
[0167] A sound effect switching interface is presented, which includes multiple sound effect mode function options;
[0168] In response to a trigger operation on a target mode function option among the plurality of sound effect mode function options, the target sound effect mode corresponding to the target mode function option is obtained;
[0169] Switch the sound effect mode of the electronic device to the target sound effect mode.
[0170] When a user is using an application, they can select a sound effect mode on the electronic device's sound effect switching interface. Alternatively, the device can be set to automatically switch to the sound effect mode corresponding to the application scenario. This allows users to choose different sound playback effects when using different applications, or even multiple different sound playback effects when using the same application, thus satisfying diverse sound playback needs.
[0171] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0172] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0173] In the several embodiments provided in this example, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0174] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0175] Furthermore, in each embodiment of this invention, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0176] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments. The aforementioned storage medium includes various media capable of storing program code, such as flash memory, portable hard disk, read-only memory, random access memory, magnetic disk, or optical disk.
[0177] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A sound effect switching method, characterized in that, Applied to electronic devices, the method includes: A sound effect switching interface is presented, which includes multiple sound effect mode function options; In response to a trigger operation on a target mode function option among the plurality of sound effect mode function options, the target sound effect mode corresponding to the target mode function option is obtained; the target sound effect mode includes a sound effect mode corresponding to a voice enhancement scene, a sound effect mode corresponding to a music scene, a sound effect mode corresponding to a game scene, a sound effect module corresponding to a movie scene, or a sound effect mode corresponding to other scenes, wherein the other scenes are application scenarios provided by the electronic device other than the voice enhancement scene, the music scene, the game scene, and the movie scene; Acquire the audio data corresponding to the target mode function option, mix the audio data, and store the mixed audio stream in the mixing buffer module; Determine the cascaded sound effects corresponding to the target sound effect mode. For different target sound effect modes, the sound effects contained in the cascaded sound effects are not completely the same or completely different. Obtain the storage address of the sound effect parameters corresponding to the sound effect to be cascaded, and obtain the sound effect parameters corresponding to the sound effect to be cascaded from the sound effect parameter storage module according to the storage address; A sound effect processing module corresponding to the sound effect to be cascaded is constructed based on the sound effect parameters; the sound effect processing module includes a sound effect link. The audio effect link in the audio effect processing module is cascaded with the audio effect link in the DTS audio effect processing module of the digital cinema system to obtain the cascaded audio effect processing module corresponding to the target audio effect mode. The cascaded audio effect processing module processes the audio stream to obtain audio data corresponding to the target audio effect mode. The audio stream is processed according to the cascaded audio processing module, including: The DTS audio effect processing module adds DTS audio effects to the audio stream and stores the audio data after adding the DTS audio effects in the effect cache module and the sink cache module. The audio data after adding the DTS audio effect is processed by the audio effect processing module corresponding to the audio effect to be cascaded, and the audio data after adding the audio effect to be cascaded is stored in the effect cache module and the sinking cache module.
2. The method according to claim 1, characterized in that, The sound effect switching interface also includes a smart sound effect mode option, and the method further includes: In response to a trigger operation on the intelligent sound effect mode function option, the application scenario of the electronic device is identified; Determine the target sound effect mode corresponding to the application scenario of the electronic device; Switch the sound effect mode of the electronic device to the target sound effect mode.
3. The method according to claim 2, characterized in that, The identification of the application scenarios of the electronic device includes: Obtain the operating status of the electronic device; The application scenario of the electronic device is determined based on its operating status.
4. The method according to claim 3, characterized in that, The operating state of the electronic device includes the applications running on the electronic device; determining the application scenario of the electronic device based on its operating state includes: Based on the target identifier of the application running on the electronic device and the pre-defined correspondence between the application identifier and the scene identifier, the target scene corresponding to the target identifier is determined; The target scenario is used as the application scenario for the electronic device.
5. An electronic device, characterized in that, include: Processor and memory; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the electronic device performs the sound effect switching method as described in any one of claims 1-4.
6. A computer storage medium, characterized in that, Includes computer instructions, which, when executed on an electronic device, cause the electronic device to perform the sound effect switching method as described in any one of claims 1-4.
Citation Information
Patent Citations
Comprehensive effector and sound effect output method
CN110706678A
Sound effect scene control method, terminal and storage medium
CN111552453A
Sound effect mode switching method, device and equipment and computer readable medium
CN115202607A
Scene sound effect control method, and electronic device
US20190102141A1