Audio switching method and device, electronic device, and storage medium

By adjusting the channel position during the audio switching process, using virtual speakers and spatial audio rendering algorithms, the problem of lack of spatial sense of audio switching in the prior art is solved, and an audio experience with a more immersive and realistic sense is achieved.

CN115904302BActive Publication Date: 2025-08-22GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211436797.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2025-08-22
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

The prior art lacks a sense of space when switching audio applications, resulting in poor immersive realism in the user experience and the inability to achieve comprehensive switching through changes in sound size.

Method used

By switching the audio data of each channel of the target audio application from the starting position to the position of the virtual speaker, and initializing the audio data of each channel of the current audio application to the position of the virtual speaker, the spatial audio rendering algorithm is used to adjust the audio and image position to realize the approach and distance process of the sound and image.

Benefits of technology

It improves the sense of space and reality during the audio switching process, enhances the user's immersion, avoids the limitations of only volume adjustment, and increases the comprehensiveness of the audio switching process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115904302B_ABST
    Figure CN115904302B_ABST
Patent Text Reader

Abstract

The embodiments disclosed herein relate to an audio switching method and device, an electronic device, and a storage medium, and relate to the field of audio processing technology. The audio switching method includes: when playing audio data of a current audio application, in response to an audio switching operation, switching the audio data of each channel of a target audio application from a starting position to a virtual speaker position; initializing the audio data of each channel of the current audio application to the virtual speaker position, and updating the position information of each channel until the end position is reached, so as to switch the current audio application to the target audio application. The technical solution in the embodiments disclosed herein can enhance the sense of immersion during the audio switching process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of audio processing technology, and in particular to an audio switching method and device, an electronic device, and a computer-readable storage medium. Background Art

[0002] In various current smart devices, when the system switches audio applications, it generally stops playing the current application or adds a simple fade-out effect, and plays the audio data of the newly opened application directly or adds a simple fade-in effect.

[0003] In the above method, only the volume of the sound can be changed, which has certain limitations. The entire fade-in and fade-out process lacks a sense of space, cannot bring an immersive experience to users, and has a poor sense of reality.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention

[0005] The purpose of the present disclosure is to provide an audio switching method and device, an electronic device, and a storage medium, thereby overcoming, at least to a certain extent, the problem that audio switching has limitations due to the limitations and defects of related technologies.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.

[0007] According to a first aspect of the present disclosure, an audio switching method is provided, comprising: when playing audio data of a current audio application, in response to an audio switching operation, switching the audio data of each channel of a target audio application from a starting position to a position of a virtual speaker; initializing the audio data of each channel of the current audio application to the position of the virtual speaker, and updating the position information of each channel until reaching an end position, so as to switch the current audio application to the target audio application.

[0008] According to a second aspect of the present disclosure, an audio switching device is provided, including: an audio fade-in module, for switching the audio data of each channel of the target audio application from a starting position to a virtual speaker position in response to an audio switching operation when playing the audio data of the current audio application; an audio fade-out module, for initializing the audio data of each channel of the current audio application to the position of the virtual speaker, and updating the position information of each channel until reaching the end position, so as to switch the current audio application to the target audio application.

[0009] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the audio switching method of the first aspect and its possible implementation methods by executing the executable instructions.

[0010] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the audio switching method of the first aspect and possible implementation thereof are implemented.

[0011] The technical solution provided in the embodiments of the present disclosure, on the one hand, can switch the audio data of each channel of the target audio application from the starting position to the position of the virtual speaker of each channel in response to the audio switching operation, and switch the position information of each channel of the current audio application from the position of the virtual speaker of each channel to the end position, so that the sound of the target audio application gradually approaches the user from the original sound and image position until the sound and image move to the position of the virtual speaker, and the sound of the current audio application gradually moves away from the user from the position of the virtual speaker until it moves to the end position, and the fade-in and fade-out process of the sound is processed as a process of approaching and moving away from the sound and image with a sense of space, which can improve the spatial sense and realism of the sound played during the audio switching process, improve the user's sense of immersion, and improve the listening experience. On the other hand, by adjusting the position of the sound and image, the limitation of only being able to adjust the volume can be avoided, and the comprehensiveness of the audio switching process is increased.

[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0014] Figure 1 A schematic diagram shows an application scenario in which the audio switching method according to an embodiment of the present disclosure can be applied.

[0015] Figure 2 A schematic diagram schematically illustrates an audio switching method according to an embodiment of the present disclosure.

[0016] Figure 3 A schematic diagram schematically illustrates the first type of path information of two channels in an embodiment of the present disclosure.

[0017] Figure 4 The first type of multi-channel path information diagram in the embodiment of the present disclosure is schematically shown.

[0018] Figure 5 A schematic diagram schematically illustrates the second type of path information of two channels in an embodiment of the present disclosure.

[0019] Figure 6 A schematic diagram schematically illustrates the second type of multi-channel path information according to an embodiment of the present disclosure.

[0020] Figure 7 A schematic diagram schematically illustrates the start position and end position of an audio application according to an embodiment of the present disclosure.

[0021] Figure 8 A schematic diagram schematically illustrates path information of an audio application according to an embodiment of the present disclosure.

[0022] Figure 9 The following schematically illustrates a flow chart of an audio switching method in an embodiment of the present disclosure.

[0023] Figure 10 The following schematically shows a block diagram of an audio switching device in an embodiment of the present disclosure.

[0024] Figure 11 A block diagram schematically illustrates an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0026] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0027] In related technologies, when the system switches audio applications (for example, opening an audiobook application while listening to music), the audio data of the previous audio application is often stopped directly or a simple fade-out effect is added, while the audio data of the newly opened application is played directly or a simple fade-in effect is added. The simple fade-in or fade-out effect mentioned here is to amplify or reduce the volume of the audio data, the purpose of which is to make the sound switching softer and more natural. Since the existing solution only changes the volume of the sound, the entire fade-in and fade-out process lacks a sense of space and cannot provide users with an immersive listening experience.

[0028] In order to solve the technical problems in the related art, an audio switching method is provided in an embodiment of the present disclosure, which can be applied to the application scenario of audio switching in any type of terminal. Figure 1 A schematic diagram shows a system architecture to which the audio switching method and apparatus according to the embodiments of the present disclosure can be applied.

[0029] like Figure 1 As shown, the system architecture 100 may include: a user 110 and a terminal 120. The terminal 120 may be any type of device capable of playing audio, such as a computer, a smart phone, a smart TV, a tablet computer, a smart wearable device (such as AR glasses), a smart speaker, and the like. The terminal may include multiple audio applications capable of playing audio. The user 110 may click on any audio application in the terminal 120 as the current audio application to play audio, and may click on another audio application as the target audio application while using the current audio application to play audio to perform an audio switching operation. Furthermore, the terminal may respond to the audio switching operation, switch the audio data of each channel of the target audio application from the starting position to the position of the virtual speaker; initialize the audio data of each channel of the current audio application to the position of the virtual speaker, and update the position of each channel so that it reaches the end position, so as to switch the current audio application to the target audio application, and realize the fade-out process of the current audio application and the fade-in process of the target audio application.

[0030] It should be noted that the audio switching method provided in the embodiment of the present disclosure can be executed by the terminal 120.

[0031] Figure 2 The audio switching method in the embodiment of the present disclosure is schematically shown in FIG, which specifically includes the following steps:

[0032] Step S210, when playing the audio data of the current audio application, in response to the audio switching operation, switching the audio data of each channel of the target audio application from the starting position to the position of the virtual speaker;

[0033] Step S220 : Initialize the audio data of each channel of the current audio application to the position of the virtual speaker, and update the position information of each channel until the end position is reached, so as to switch the current audio application to the target audio application.

[0034] In the embodiment of the present disclosure, the audio switching operation can be a user triggering operation on any audio application other than the current audio application on the terminal. The audio channel can include two channels or multiple channels, and each channel corresponds to a virtual speaker.

[0035] The starting position can be determined based on the positional information of the audio data for each channel. The position of the virtual speaker can be determined based on the set criteria. Based on this, the positional information of each channel of the target audio application can be switched from the starting position to the position of the virtual speaker according to the playback parameters to achieve the fade-in process.

[0036] Furthermore, the end position of the current audio application can be determined, and the audio data of each channel of the current audio application can be initialized to the position of the virtual speaker, so as to control the movement of the position information of the channel of the current audio application between the position of the virtual speaker and the end position according to the playback parameters, and switch the position information from the position of the virtual speaker to the end position to realize the fade-out process of the current audio application.

[0037] Next, according to Figure 2 Each step of the audio switching method in the embodiment of the present disclosure is described in detail.

[0038] In step S210 , when the audio data of the current audio application is played, in response to the audio switching operation, the audio data of each channel of the target audio application is switched from the starting position to the position of the virtual speaker.

[0039] In the embodiments of the present disclosure, the terminal may be a device capable of playing audio, such as a smartphone, a tablet computer, a smart speaker, a smart bracelet, a smart watch, etc. A smartphone is used as an example for illustration.

[0040] A terminal can include multiple audio applications, specifically native audio applications and installed third-party audio applications. Native audio applications include, but are not limited to, call and ringtone applications. Third-party audio applications can include gaming, video, music, and audiobook applications.

[0041] The current audio application can be any one of all the audio applications of the terminal, such as a video application. The target audio application can be any one of all the audio applications of the terminal except the current audio application, and can be specifically determined according to the audio application acted upon by the audio switching operation, that is, the target audio application refers to the audio application that the user needs to switch to, such as a game audio application. The audio switching operation can be a triggering operation on an audio application different from the audio application to which the played audio data belongs while playing audio data. The triggering operation can be a click operation acting on the terminal display interface, or a voice trigger, etc., which is not limited here. For example, if the current audio application is a video application, during the process of playing the audio data of the video application, if a click operation acting on the game application is detected, it can be considered that the audio switching operation has been received, and the game application is determined as the target audio application.

[0042] For the target audio application, its channels may include two channels or multiple channels. Two channels include a left channel and a right channel; multiple channels may include 2.1 channels, 5.1 channels, or 7.1 channels, etc. Here, 5.1 channels are used as an example for explanation. In the disclosed embodiment, 5.1 channels may include left, right, center, subwoofer, left surround, and right surround channels.

[0043] When rendering multi-channel audio data, spatial audio rendering algorithms assume that multiple virtual speakers are arranged in a virtual listening space. Data for each channel is sent to each virtual speaker, and the transmitted data signal is convolved with the response function between the virtual speaker and the human head position, making the audio sound as if it were emanating from the virtual speaker position. This allows the virtual speakers to simulate the function of real speakers in a terminal manner. Virtual speakers can be used to precisely position each sound anywhere in three-dimensional space or to move a sound source from one location to another according to a given motion trajectory.

[0044] The virtual speakers have corresponding configuration parameters, such as the number of virtual speakers, the position of virtual speakers, etc. In the embodiment of the present disclosure, the number of virtual speakers can be determined according to the number of channels, that is, each channel corresponds to a virtual speaker. The position of the virtual speakers can be set by the system according to the setting standard of the virtual speakers by default, and cannot be customized by the user. For example, when the channel type is two channels, the position of the virtual speakers can be set to a position 30 degrees to the left and right of the person, for example Figure 3 When the channel type is multi-channel, the position of the virtual speaker can be as follows: Figure 4 As shown in . It should be noted that Figure 3 and Figure 4 The left and right channels shown in the figure are the positions of the virtual speakers for those channels.

[0045] Based on this, since the audio data of the target audio application has not yet been played, the audio data of each channel of the target audio application can be gradually added. Specifically, the position information of the audio data of each channel of the target audio application can be switched from the starting position to the position of the virtual speaker corresponding to each channel. It should be noted that it can also be a portion of all channels, and the specific amount can be determined according to actual conditions.

[0046] When switching the position information of each channel of the target audio application, the following steps can be included: determining the position information of the audio data of each channel of the target audio application as the starting position; determining the first preset position as the position of the virtual speaker; during the audio playback process, automatically updating the position information of each channel to the position of the virtual speaker according to the playback parameters to fade in the target audio application.

[0047] Among them, the starting position of the sound object can be configured in advance. Sound object refers to the basic sound unit processed by the spatial audio rendering algorithm, which generally contains audio data and sound position information. The position information of the audio data of each channel of the target audio application can be determined as the starting position of the channel. The starting position needs to be configured in advance, and can be specified by the system by default, or it can be set by the user through an open settings interface. In addition, if there are multiple audio applications, a starting position can be set for each audio application, and the starting positions of different audio applications can be different. For example, the starting positions of game applications, call applications, audio-visual applications, and ringtone applications are all different, and the ending positions of game applications, call applications, audio-visual applications, and ringtone applications are all different. However, for game applications, their starting position and end position can be the same or different.

[0048] The first preset position can be further determined as the position of the virtual speaker. The first preset position can be determined according to a setting standard.

[0049] In some embodiments, during the process of playing the audio data of the current audio application, after obtaining the starting position and the position of the virtual speaker, the audio data of each channel of the target audio application can be switched from the starting position to the position of the virtual speaker. When the position information of each channel reaches the position of the virtual speaker, it can be considered that the fade-in process of the audio data of the target audio application is completed, and the audio data of the target audio application is played completely at this time.

[0050] Exemplarily, during audio playback, the position information of each channel of the target audio application can be automatically updated to the position of the virtual speaker according to the playback parameters to fade the target audio application in. The playback parameters can be path information and duration. The path information is used to describe the fade-in path between each channel of the target audio application from the starting position to the position of the virtual speaker. It should be noted that a plurality of candidate path information can be set in advance, and further in response to the user's selection operation, one candidate path information is selected from the plurality of candidate path information as the required path information.

[0051] Path information can be used to represent the shape of the path, such as a straight path or a curved path, etc. After the path information is determined, the path information can be adjusted. For example, when the path information is a curved path, the curvature of the curved path can be determined according to actual needs. Specifically, the curvature of the curved path can be determined in response to a user adjustment operation, or the curvature of the curved path can be set by default. When the curvature of the curved path is set by default, different curvatures can be determined according to the type of target audio application to determine the path information. The duration is used to indicate the time required for the fade-in process of each channel of the target audio application from the starting position to the position of the virtual speaker. The shorter the duration, the faster the fade-in process; the longer the duration, the slower the fade-in process.

[0052] After determining the duration and path information, the audio data of each channel of the target audio application may be automatically updated from the starting position to the position of the virtual speaker of the channel based on the duration and the path information.

[0053] In the disclosed embodiment, the position information of each channel of the target audio application can be directly updated or indirectly updated according to the path information. Direct update means that during the fade-in process, the position information of the audio data of each channel of the target audio application is directly switched from the starting position to the position of the virtual speaker without forwarding; that is, the position information of each channel is controlled to move directly to the position of the virtual speaker, and the path information is a straight path at this time. Indirect update means that the position information of the audio data of each channel of the target audio application is indirectly switched from the starting position to the position of the virtual speaker after forwarding. That is, the position information of each channel is controlled to move to the reference position, and the position information is controlled to move from the reference position to the position of the virtual speaker, and the path information is a curved path at this time. The reference position can be a position other than the starting position and the position of the virtual speaker, and can be adjusted according to actual needs. For example, the reference position can be the center of the head. The center of the head position refers to the origin of the coordinate system to which the entire sound and image movement is referenced, which can be the optimal point of the virtual speaker layout or the position of the user. For example, the center of the head position can be Figure 3 The user's location in C.

[0054] In the embodiment of the present disclosure, the sound object rendering capability of the spatial audio rendering algorithm can be used to process the fade-in process of the sound into a process of approaching the sound and image with a sense of space, which can bring an immersive listening experience to the user.

[0055] In step S220 , the audio data of each channel of the current audio application is initialized to the position of the virtual speaker, and the position information of each channel is updated until the end position is reached, so as to switch the current audio application to the target audio application.

[0056] In an embodiment of the present disclosure, while fading in the audio data of the target audio application, since the current audio application has been exited, the audio data of the current audio application can be faded out to switch the audio data of the current audio application to the audio data of the target audio application, and stop playing the audio data of the current audio application.

[0057] When fading out the audio data of the current audio application, the following steps may be specifically included: determining the second preset position as the end position; initializing the position information of the audio data of each channel of the current audio application to the position of the virtual speaker; during the audio playback process, automatically updating the position information of each channel to the end position according to the playback parameters to fade out the current audio application.

[0058] In the disclosed embodiment, a second preset position can be determined as the end position of the fade-out process, indicating that the fade-out process has stopped. The second preset position can be determined based on actual needs and can be the same as or different from the first preset position, depending on the specific needs. For example, the end position represented by the second preset position can be specified by the system by default or by the user through an open settings interface, which is not specifically limited here.

[0059] It should be noted that if there are multiple audio applications on the terminal, an end position can be set for each audio application, and the end positions of different audio applications can be different. It should be noted that for the same audio application, its corresponding start position and end position can be the same or different, and this is not specifically limited here. Figure 7 As shown in , for audio-visual, game, call, and ringtone applications, the starting and ending positions are different for different applications. However, for audio-visual applications, the starting position can be D and the ending position can also be D; for game applications, the starting position can be E and the ending position can also be E.

[0060] Furthermore, since the position information of each channel may be different, in order to achieve uniformity, the position information of the audio data of each channel in the current audio application can be initialized to the position of the virtual speaker, that is, the position of the virtual speaker is used as the starting point of the fade-out process of each channel of the current audio application. During the playback of the audio data of the current audio application, the position information of each channel is automatically updated according to the playback parameters of the audio data, and the position information of each channel is switched from the position of the virtual speaker to the end position. When the position information of each channel is at the end position, the audio data of the current audio application is faded out. Similar to the fade-in process described in step S210, the playback parameters can also include path information and duration, and the duration can be consistent with the duration of the fade-in process, and the shape of the path information can be consistent with the shape of the path information of the fade-in process. For example, if the path information of the fade-in process is a curved path, the path information of the fade-out process is also a curved path. If the path information of the fade-in process is a straight path, the path information of the fade-out process is also a straight path. Moreover, when the path information is a curved path, the curvature of the curve in the fade-in process can be the same as or different from the curvature of the curve in the fade-out process. There is no limitation here, and the curvature of the curve can be customized based on actual needs and user adjustment operations, as long as it moves from the position of the virtual speaker to the end position.

[0061] Similarly, when automatically updating the position information of each channel from the virtual speaker position to the end position based on playback parameters, the position information of each channel can be automatically updated from the virtual speaker position to the end position based on the duration and path information. Automatically updating the position information of each channel based on path information can still be done in two ways: Method 1: Based on the duration, the position information of each channel is controlled to move directly from the virtual speaker position to the end position; Method 2: Based on the duration, the position information of each channel is controlled to move from the virtual speaker position to the reference position, and then from the reference position to the end position. In other words, the position information of each channel is gradually switched from the virtual speaker position to the reference position, completing the fade-out process. The reference position can be any position different from the virtual speaker position and the end position, and can be determined and adjusted based on actual needs. Here, the reference position is used as the center of the head as an example. Furthermore, the reference position for both the fade-in and fade-out processes can be the same, for example, the center of the head.

[0062] Since the audio channel can include two or more channels, for any type of channel, the position information of the audio data of each channel of the target audio application can be directly switched from the starting position to the position of the virtual speaker; the audio data can also be forwarded to indirectly switch the position information of the audio data of each channel of the target audio application from the starting position to the position of the virtual speaker. Similarly, for any type of channel, the position information of the audio data of each channel of the current audio application can be directly switched from the position of the virtual speaker to the end position, or the position information of each channel of the current audio application can be indirectly switched from the position of the virtual speaker to the end position by forwarding.

[0063] Figure 3 The schematic diagram of the first path information of the two channels is shown schematically in FIG. Figure 3 As shown in , the left channel and the right channel are each configured with a virtual speaker, and the position of the virtual speaker of the left channel is as follows Figure 3 As shown in position A in the figure, the position of the virtual speaker for the right channel is as follows Figure 3As shown in position B in . During the fade-in process, the position information of the left and right channels of the target audio application can be directly switched from the starting position to the positions of their respective corresponding virtual speakers, that is, the position information of the left channel moves from the starting position to position A, and the position information of the right channel moves from the starting position to position B. It should be noted that the automatic update of the channel position information during the fade-in process can also be used to indicate that the sound image moves directly from the starting position to the position of the virtual speaker. During the fade-out process, the position information of the left and right channels of the current audio application can be switched from the positions of their respective corresponding virtual speakers to the end positions, that is, the sound images of the left and right channels can move from the position of the virtual speaker to the end position, thereby realizing the fade-out process. That is, the position information of the left channel moves from position A to the end position, and the position information of the right channel moves from position B to the end position.

[0064] Figure 4 A schematic diagram of the first type of multi-channel path information is shown schematically in FIG. Figure 4 As shown in , during the fade-in process, the position information of the left, right, center, subwoofer, left surround, and right surround channels of the target audio application can be directly switched from the starting position to the position of the virtual speakers corresponding to each channel. During the fade-out process, the position information of the left, right, center, subwoofer, left surround, and right surround channels of the current audio application can be switched from the position of the virtual speakers corresponding to each channel to the ending position.

[0065] For indirect fade-in and fade-out, forwarding can be performed through a reference position, which can be a position in the header. Figure 5 The second path information of two channels is schematically shown in FIG. Figure 5 As shown in , the left channel and the right channel are each configured with a virtual speaker, and the position of the virtual speaker of the left channel is as follows Figure 5 As shown in position A in the figure, the position of the virtual speaker for the right channel is as follows Figure 5As shown in position B in the figure. During the fade-in process, the position information of the left and right channels of the target audio application can be controlled to move from the starting position to the head center position C, and then from the head center position C to the position of the virtual speaker of each channel. That is, the path information is: the position information of the left channel moves from the starting position to the head center position C, and then from the head center position C to position A; the position information of the right channel moves from the starting position to the center position C, and then from the head center position C to position B. During the fade-out process, the position information of the left and right channels of the current audio application can be moved from the position of the virtual speaker of each channel to the head center position C, and then from the head center position C to the end position, that is, the sound image of the left and right channels can move from the position of the virtual speaker to the head center position, and then indirectly move from the head center position to the end position, thereby realizing the fade-out process of the current audio application of the two channels. That is, the path information is: the position information of the left channel moves from the position A of the virtual speaker to the center position C, and then moves from the center position C to the end position; the position information of the right channel moves from the position B of the virtual speaker to the center position C, and then moves from the center position C to the end position.

[0066] refer to Figure 6 As shown in , during the fade-in process, the position information of the left, right, center, subwoofer, left surround, and right surround channels of the target audio application can be switched from the starting position to the head center position C, and then moved from the head center position C to the position of the virtual speaker of each channel. During the fade-out process, the position information of the left, right, center, subwoofer, left surround, and right surround channels of the current audio application can be switched from the position of the virtual speaker of each channel to the head center position C, and then moved from the head center position C to the end position.

[0067] refer to Figure 7 As shown in , the position information of the left channel of an audiovisual application can be switched from the starting position D to the center position, and then from the center position to the position of the virtual speaker to achieve fade-in; and from the position of the virtual speaker to the center position, and then from the center position to the end position D to achieve fade-out. The position information of the right channel of a gaming application can be switched from the starting position E to the center position, and then from the center position to the position of the virtual speaker to achieve fade-in; and from the position of the virtual speaker to the center position, and then from the center position to the end position E to achieve fade-out.

[0068] In addition, if there are multiple audio applications on the terminal, and multiple audio applications can be arranged in a custom manner. When multiple audio applications are arranged horizontally, the fade-in and fade-out paths can be Figure 8 As shown in , for example, a fade-in process can be performed from the starting position of viewing and listening to the position of the virtual speaker of each channel, and a fade-out process can be performed from the position of the virtual speaker to the end position of the ringtone.

[0069] In an embodiment of the present disclosure, when a new audio playback sound is detected, the application to which the new audio belongs can be used as the target audio application. At this time, through the virtual speaker, the position information of each channel of the current audio application can be moved from the position of the virtual speaker to the end position, and the position information of each channel of the target audio application can be moved from the starting position to the position of the virtual speaker. The user feels that the sound of the current audio application gradually moves away from the user from the original sound and image position until the sound and image moves to the pre-set end position and stops playing. The sound of the target audio application gradually approaches the user from a pre-set starting position and stays at the virtual speaker position, thereby improving the immersiveness of the entire audio switching process.

[0070] Figure 9 The overall flow chart of audio switching is shown schematically in FIG. Figure 9 As shown in , it mainly includes the following steps:

[0071] In step S901, an audio switching operation is detected;

[0072] In step S902, the starting position of the sound object fade-in and the position of the virtual speaker of each channel are defined; wherein the position information of the audio data of each channel of the target audio application can be determined as the starting position;

[0073] In step S903, the duration and path information are determined;

[0074] In step S904, the position information of the target audio application is updated from the starting position to the position of the virtual speaker according to the path information within the duration;

[0075] In step S905, the position information of the audio data of each channel is initialized as the position of the virtual speaker;

[0076] In step S906, the end position of each channel is set;

[0077] In step S907 , the position information of the current audio application is updated from the position of the virtual speaker to the end position according to the path information within the duration.

[0078] Furthermore, if the audio switching operation is detected again, the target audio application can be used as the current audio application, and the switched audio application can be used as the target audio application again, and the steps from step S902 to step S907 can be executed in a loop to implement the audio fade-in and fade-out process.

[0079] In the embodiment of the present disclosure, during the process of playing the audio data of the current audio application, after obtaining the starting position and the position of the virtual speaker of each channel, the audio data of each channel of the target audio application can be switched from the starting position to the position of the virtual speaker, and the position information of the audio data of each channel of the current audio application can be switched from the position of the virtual speaker of each channel to the end position. With the help of the sound object rendering capability of the spatial audio rendering algorithm, the fading process of the sound when switching different audio applications is processed into a process of approaching and moving away of the sound image with a sense of space, which can bring an immersive listening experience to the user, improve the sense of space and reality, improve the user experience and diversity, and realize precise switching of audio.

[0080] The present disclosure provides an audio switching device, referring to Figure 10 As shown in , the audio switching device 1000 may include:

[0081] An audio fade-in module 1001 is configured to, when playing audio data of a current audio application, switch the audio data of each channel of a target audio application from a starting position to a position of a virtual speaker in response to an audio switching operation;

[0082] The audio fade-out module 1002 is configured to initialize the audio data of each channel of the current audio application to the position of the virtual speaker and update the position information of each channel until the end position is reached, so as to switch the current audio application to the target audio application.

[0083] In an exemplary embodiment of the present disclosure, the audio fade-in module includes: a starting position determination module, used to determine the position information of the audio data of each channel of the target audio application as the starting position; a virtual speaker position determination module, used to determine the first preset position as the position of the virtual speaker; and a fade-in module, used to automatically update the position information of each channel to the position of the virtual speaker according to the playback parameters to fade in the target audio application.

[0084] In an exemplary embodiment of the present disclosure, the fade-in module includes: a first position updating module, configured to automatically update the position information of each channel to the position of the virtual speaker based on the duration and path information.

[0085] In an exemplary embodiment of the present disclosure, the first position update module includes: a direct update module for controlling the position information of each channel to move directly to the position of the virtual speaker; or an indirect update module for controlling the position information of each channel to run to a reference position and move from the reference position to the position of the virtual speaker.

[0086] In an exemplary embodiment of the present disclosure, the audio fade-out module includes: an end position determination module for determining a second preset position as the end position; an initialization module for initializing the position information of the audio data of each channel of the current audio application to the position of the virtual speaker; and a fade-out module for automatically updating the position information of each channel from the position of the virtual speaker to the end position according to the playback parameters to fade out the current audio application.

[0087] In an exemplary embodiment of the present disclosure, the fade-out module includes: a second position update module is configured to: based on the duration, control the position information of each channel to move directly from the position of the virtual speaker to the end position; or based on the duration, control the position information of each channel to move from the position of the virtual speaker to a reference position, and then move from the reference position to the end position.

[0088] In an exemplary embodiment of the present disclosure, different audio applications have different starting positions and ending positions.

[0089] It should be noted that the specific details of each part of the above audio switching device have been described in detail in some implementation methods of the audio switching method, and thus will not be repeated here.

[0090] The exemplary embodiments of the present disclosure further provide an electronic device. The electronic device may be the aforementioned terminal 120. Generally, the electronic device may include a processor and a memory, wherein the memory is configured to store executable instructions of the processor, and the processor is configured to execute the aforementioned method by executing the executable instructions.

[0091] Below is Figure 11 The structure of the electronic device is exemplarily described by taking the mobile terminal 1100 in FIG. 1 as an example. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 11 The construction in can also be applied to fixed type equipment.

[0092] like Figure 11 As shown, the mobile terminal 1100 may specifically include: a processor 1101, a memory 1102, a bus 1103, a mobile communication module 1104, an antenna 1, a wireless communication module 1105, an antenna 2, a display screen 1106, a camera module 1107, an audio module 1108, a power module 1109 and a sensor module 1110.

[0093] The processor 1101 may include one or more processing units, for example, the processor 1101 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor, and / or an NPU (Neural-Network Processing Unit). The method in this exemplary embodiment may be executed by an AP, a GPU, or a DSP. When the method involves processing related to a neural network, it may be executed by an NPU. For example, the NPU may load neural network parameters and execute neural network-related algorithm instructions.

[0094] The encoder can encode (i.e., compress) an image or video to reduce the data size for easy storage or transmission. The decoder can decode (i.e., decompress) the encoded data of the image or video to restore the image or video data. The mobile terminal 1100 can support one or more encoders and decoders, such as: image formats such as JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap), and video formats such as MPEG (Moving Picture Experts Group) 1, MPEG10, H.1063, H.1064, and HEVC (High Efficiency Video Coding).

[0095] The processor 1101 may be connected to the memory 1102 or other components via a bus 1103 .

[0096] Memory 1102 can be used to store computer-executable program code, which includes instructions. Processor 1101 executes various functional applications and data processing of mobile terminal 1100 by running the instructions stored in memory 1102. Memory 1102 can also store application data, such as images, videos, and other files.

[0097] The communication functions of mobile terminal 1100 are implemented through mobile communication module 1104, antenna 1, wireless communication module 1105, antenna 2, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 1104 can provide 3G, 4G, and 5G mobile communication solutions for mobile terminal 1100. Wireless communication module 1105 can provide wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication for mobile terminal 1100.

[0098] The display screen 1106 is used to implement display functions, such as displaying user interfaces, images, videos, etc. The camera module 1107 is used to implement shooting functions, such as shooting images, videos, etc., and the camera module may include a color temperature sensor array. The audio module 1108 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 1109 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 1110 may include one or more sensors for implementing corresponding sensing detection functions. For example, the sensor module 1110 may include an inertial sensor, which is used to detect the motion posture of the mobile terminal 1100 and output inertial sensing data.

[0099] It should be noted that a computer-readable storage medium is also provided in an embodiment of the present disclosure. The computer-readable storage medium may be included in the electronic device described in the above embodiment; or it may exist independently without being assembled into the electronic device.

[0100] Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device.

[0101] Computer-readable storage media can transmit, propagate, or transfer programs for use by or in conjunction with an instruction execution system, apparatus, or device. Program code contained on a computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wireline, optical cable, RF, or any suitable combination thereof.

[0102] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments.

[0103] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0104] Furthermore, the figures above are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the figures above do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0105] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0106] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing what is disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims. It should be understood that the present disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An audio switching method, characterized in that: include: When playing audio data of the current audio application, in response to an audio switching operation, switching the audio data of each channel of the target audio application from a starting position to a position of the virtual speaker; Initialize the audio data of each channel of the current audio application to the position of the virtual speaker, and update the position information of each channel until the end position is reached, so as to switch the current audio application to the target audio application.

2. The audio switching method according to claim 1, wherein: Switching the audio data of each channel of the target audio application from the starting position to the position of the virtual speaker includes: Determining the position information of the audio data of each channel of the target audio application as the starting position; Determining a first preset position as the position of the virtual speaker; The position information of each channel is automatically updated to the position of the virtual speaker according to the playback parameters, so as to fade in the target audio application.

3. The audio switching method according to claim 2, wherein: The automatically updating the position information of each channel to the position of the virtual speaker according to the playback parameters includes: Based on the duration, the position information of each channel is automatically updated to the position of the virtual speaker according to the path information.

4. The audio switching method according to claim 3, wherein: Automatically updating the position information of each channel to the position of the virtual speaker according to the path information includes: Control the position information of each channel to move directly to the position of the virtual speaker; or The position information of each channel is controlled to move to a reference position, and then move from the reference position to the position of the virtual speaker.

5. The audio switching method according to claim 1, wherein: Initializing the audio data of each channel of the current audio application to the position of the virtual speaker and updating the position information of each channel until reaching the end position includes: determining the second preset position as the end position; Initialize the position information of the audio data of each channel of the current audio application to the position of the virtual speaker; The position information of each channel is automatically updated from the position of the virtual speaker to the end position according to the playback parameters, so as to fade out the current audio application.

6. The audio switching method according to claim 5, characterized in that: The automatically updating the position information of each channel from the position of the virtual speaker to the end position according to the playback parameters includes: Based on the duration, controlling the position information of each channel to move directly from the position of the virtual speaker to the end position; or Based on the duration, the position information of each channel is controlled to move from the position of the virtual speaker to a reference position, and then from the reference position to the end position.

7. The audio switching method according to claim 1, wherein: The starting and ending positions vary for different audio applications.

8. An audio switching device, characterized in that: include: An audio fade-in module, configured to, when playing audio data of a current audio application, switch the audio data of each channel of a target audio application from a starting position to a position of a virtual speaker in response to an audio switching operation; The audio fade-out module is used to initialize the audio data of each channel of the current audio application to the position of the virtual speaker and update the position information of each channel until it reaches the end position, so as to switch the current audio application to the target audio application.

9. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the audio switching method according to any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the audio switching method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Audio file playing method and mobile terminal

    CN107707742A

  • Efficient rendering of virtual soundfields

    US20190379992A1