Game sound effect processing method and device, electronic equipment and storage medium
By dynamically adjusting battlefield audio signals based on the distribution data of virtual object teams in strategy games, the problem of the inability of the sound field to change dynamically in existing technologies is solved, thereby improving the game's immersion and sound field matching.
Patent Information
- Application Number
- CN202510929781.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-09-16
AI Technical Summary
In strategy games, especially large-scale battle scenes, existing technologies are unable to dynamically adjust the sound field according to changes in the game screen, resulting in a decrease in player immersion.
By determining the distribution data of the virtual object team, decomposing and adjusting the audio components of the battlefield audio signal, the sound effects of the game screen are dynamically adjusted to reflect the position and distribution of the virtual objects.
It realizes dynamic adjustment of game sound effects, enhances players' immersion and battlefield perception, and improves the gaming experience.
Smart Images

Figure CN120643906A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of games, and in particular to a method, device, electronic device, and storage medium for processing game sound effects. Background Art
[0002] In strategy games (SLGs), especially when large-scale battles are involved, for example, when multiple virtual game objects (e.g., thousands of soldiers) appear simultaneously on the game screen, related solutions typically use a static approach to generate game screen sound effects, which cannot accurately reflect actual game screen changes, resulting in a poor user experience. Summary of the Invention
[0003] The embodiments of the present application provide a method, device, electronic device, and storage medium for processing game sound effects to enhance the player's gaming experience.
[0004] In a first aspect, an embodiment of the present application provides a method for processing game sound effects, the method comprising:
[0005] Determining at least one virtual object team participating in the game battle corresponding to the target game screen;
[0006] Determining distribution data corresponding to the virtual object team;
[0007] When the distribution data corresponding to the virtual object team meets a preset distribution condition, decomposing a preset first battlefield audio signal to obtain a first audio component and a second audio component, wherein the first audio component is used to indicate a difference between at least two channel signals of the first battlefield audio signal;
[0008] adjusting a target audio parameter of the first audio component based on the distribution data corresponding to the virtual object team to obtain an adjusted first audio component;
[0009] Based on the adjusted first audio component and the second audio component, a second battlefield audio signal to be played on the target game screen is obtained.
[0010] In a second aspect, an embodiment of the present application provides a game sound effect processing device, the device comprising:
[0011] A first determining module is used to determine at least one virtual object team participating in the game battle corresponding to the target game screen;
[0012] A second determining module is used to determine the distribution data corresponding to the virtual object team;
[0013] a decomposition module, configured to decompose a preset first battlefield audio signal to obtain a first audio component and a second audio component when the distribution data corresponding to the virtual object team satisfies a preset distribution condition, wherein the first audio component is used to indicate a difference between at least two channel signals of the first battlefield audio signal;
[0014] an adjustment module, configured to adjust a target audio parameter of the first audio component based on the distribution data corresponding to the virtual object team to obtain an adjusted first audio component;
[0015] The third determining module is configured to obtain a second battlefield audio signal to be played on the target game screen based on the adjusted first audio component and the second audio component.
[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; a processor loading instructions from the memory to execute the steps of any one of the game sound effect processing methods provided in the embodiment of the present application.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps of any one of the game sound processing methods provided in the embodiment of the present application.
[0018] In a fifth aspect, an embodiment of the present application further provides a computer program product, comprising a computer program or instructions, which, when executed by a processor, implements the steps of any one of the game sound processing methods provided in the embodiments of the present application.
[0019] By adopting the solution of the embodiment of the present application, the first audio component in the first battlefield audio signal is processed through the distribution data corresponding to the virtual object team. The first battlefield audio signal can be dynamically adjusted according to the changes in the real-time game screen to obtain the second battlefield audio signal, thereby adaptively generating sound effects suitable for the current game screen, allowing players to feel a more realistic and changeable battlefield atmosphere, solving the problem of blurred battlefield perception, and enriching the auditory experience of the game. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 This is a schematic diagram of an embodiment of a game sound effect processing system provided in an embodiment of the present application;
[0022] Figure 2 This is a flowchart of an embodiment of a method for processing game sound effects provided in an embodiment of the present application;
[0023] Figure 3 This is a schematic diagram of an embodiment flow chart of determining the adjusted first audio component provided in an embodiment of the present application;
[0024] Figure 4 This is a schematic diagram of an embodiment of the present application for decomposing the audio signal of the first battlefield;
[0025] Figure 5 Schematic diagram of the structure of the game sound effect processing device provided in an embodiment of the present application;
[0026] Figure 6 It is a structural diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0028] In strategy games (SLGs), the battlefields depicted in the game are massive, accommodating thousands of virtual game objects (e.g., soldiers) onscreen simultaneously. To provide players with an immersive gaming experience, game sound effects play a crucial role. However, related technologies typically employ fixed stereo reverberation or preset sound field positioning to construct the game sound field. Fixed stereo reverberation schemes fix the sound effects across the entire game screen to a pre-set stereo pattern, ensuring the reverberation effect remains constant regardless of the game screen's changes. Preset sound field positioning, on the other hand, fixes different sound signals to specific locations based on pre-set rules, such as fixing the sound of soldiers on the left to the left channel and the sound of soldiers on the right to the right channel. This static approach to constructing the sound field cannot dynamically adjust the width of the sound field based on changes in the game screen. In top-down strategy games, the scale and layout of the battlefield in the game screen constantly change with player actions and game progress. For example, when soldiers shift from a dense formation to dispersed movements, this approach cannot dynamically adjust the sound field, resulting in a mismatch between the sound field and the game screen, reducing the player's immersion.
[0029] In view of this, the present application proposes a game sound effect processing method, which determines at least one virtual object team and its corresponding distribution data participating in the game battle corresponding to the target game screen, and processes the first battlefield audio signal in the screen. It can dynamically adjust the first audio component of the first battlefield audio signal according to the distribution data corresponding to the virtual object team, thereby achieving the effect of dynamically adjusting the sound width corresponding to the target game screen, so that the sound in the game can more realistically reflect the position and distribution of the virtual objects in the space, making the player feel as if they are in the game screen, greatly enhancing the immersiveness of the game screen.
[0030] The embodiments of the present application provide a method, apparatus, electronic device, and computer-readable storage medium for processing game sound effects. Specifically, the method for processing game sound effects in the embodiments of the present application can be executed by an electronic device, such as a terminal or a server.
[0031] The terminal can be a terminal device such as a smart phone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), etc. The terminal can also include a client, which can be a game client, a browser client with a game program, or an instant messaging client, etc.
[0032] The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0033] For example, Figure 1 As shown, the electronic device is explained using a terminal 10 and a server 20 as an example. The server 20 can determine at least one virtual object team participating in the game battle corresponding to the target game screen through the terminal 10; determine the distribution data corresponding to the virtual object team; when the distribution data corresponding to the virtual object team meets the preset distribution conditions, decompose the preset first battlefield audio signal to obtain a first audio component and a second audio component, and the first audio component is used to indicate the difference between at least two channel signals of the first battlefield audio signal; based on the distribution data corresponding to the virtual object team, adjust the target audio parameter of the first audio component to obtain the adjusted first audio component; based on the adjusted first audio component and the second audio component, obtain the second battlefield audio signal to be played of the target game screen, and send the second battlefield audio signal to the terminal 10 for playback.
[0034] The following is a detailed description of each embodiment in conjunction with the accompanying drawings. It should be noted that the order in which the following embodiments are described does not limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in an order different from that shown in the drawings.
[0035] The game sound effect processing method of this embodiment obtains and processes the first battlefield audio signal in the game screen, and can dynamically adjust the left and right channel difference information of the first battlefield audio signal according to the distribution data corresponding to the virtual object team. It can adjust the spatial positioning and sound field characteristics of the sound in real time according to the distribution data corresponding to the virtual object team in the game screen, enhance the immersiveness of the game screen and the player's battlefield perception ability, and improve the spatial positioning accuracy of the sound to adapt to the needs of different game screens.
[0036] In this embodiment, a server is used as an example to illustrate that this embodiment provides a method for processing game sound effects. Figure 2 As shown, the specific process of the game sound effect processing method can be as follows.
[0037] Please refer to Figure 2 The specific process of the game sound effect processing method can be as follows: Step 210 to Step 250, wherein:
[0038] Step 210 : Determine at least one virtual object team participating in the game battle corresponding to the target game screen.
[0039] In some embodiments, a target game screen including at least one virtual object team is displayed by a player device, and a virtual object team includes multiple virtual objects.
[0040] The game screen refers to the portion of the virtual environment or game world that the player inhabits during a game. For example, the game screen may include a collection of in-game elements such as terrain, buildings, characters, and objects, as well as the relationships and layout between these elements. For example, in a top-down strategy game, the game screen may include mountains, rivers, cities, castles, and a battlefield with thousands of soldiers.
[0041] The target game screen refers to the game screen for which the game sound effects need to be adjusted. The target game screen can be a screen corresponding to any game scene among multiple game screens of the game or a screen corresponding to a specific game scene, and this manual does not limit this.
[0042] Game battles refer to combat or confrontational activities within a game. Game battles can involve interactions between multiple teams of virtual objects (such as soldiers, vehicles, and characters). For example, in a strategy game, two factions of warbands engage in battle on the battlefield. Each faction comprises multiple warbands, each of which is a team of virtual objects.
[0043] It should be noted that at least one virtual object team participating in the game battle corresponding to the target game screen can be multiple virtual object teams within the target game screen, or can be all virtual object teams participating in the game battle. Some of all virtual object teams can be located within the target game screen, and other virtual object teams can be located outside the target game screen.
[0044] A virtual object team refers to a group of virtual objects with similar attributes or functions within a game. For example, virtual objects can be characters, props, environmental elements, etc., and they exhibit certain behavioral and audio characteristics within the game. For example, a virtual object team can be a group of soldiers. For example, in a SLG game, a group of soldiers can be considered a virtual object team. A group of soldiers can be controlled by the player and have the same movements (e.g., marching, attacking) and sounds (e.g., shouting).
[0045] In some embodiments, multiple virtual objects may be classified according to their attributes (such as camp, type, etc.) to form different virtual object teams.
[0046] In some embodiments, virtual object teams can be user-defined. The user can group objects with similar attributes based on the game's storyline, gameplay, and visual design, and configure corresponding original audio signals for one or more virtual object teams.
[0047] Step 220: Determine the distribution data corresponding to the virtual object team.
[0048] Distribution data is data related to the position and distribution of virtual object teams within the target game screen. For example, the distribution data may include information such as the position, number, and arrangement of the virtual object teams. For example, the distribution data may include the coordinates of each virtual object within the target game screen, the number of virtual objects within the virtual object team (e.g., a group of soldiers has 100 soldiers), and the arrangement of the virtual object team (e.g., linear arrangement, circular arrangement, etc.).
[0049] In some embodiments, a preset interface can be used to obtain distribution data corresponding to a virtual object team in the game. For example, information such as the position, number, and arrangement of the virtual object team can be obtained by calling game data.
[0050] Step 230: When the distribution data corresponding to the virtual object team meets the preset distribution conditions, the preset first battlefield audio signal is decomposed to obtain a first audio component and a second audio component, where the first audio component is used to indicate the difference between at least two channel signals of the first battlefield audio signal.
[0051] The preset distribution condition is a condition for determining whether the first audio component needs to be processed. For example, the preset distribution condition may include the distribution density of the virtual object team and / or the distribution range of the virtual object team being greater than a corresponding threshold value, and the corresponding threshold value may be a system preset value or a system default value.
[0052] The first battlefield audio signal refers to an original audio signal used to simulate the sound of at least one virtual object team in the game. For example, the first battlefield audio signal may include the basic sound characteristics of multiple virtual object teams. For example, in an SLG game, the first battlefield audio signal may include the shouts of soldiers, the sounds of weapons firing, the neighing of horses, etc., or a combination thereof.
[0053] In some embodiments, the first battlefield audio signal can be pre-recorded or generated to represent the sounds of multiple virtual object teams in the target game screen. For example, a user (e.g., a game developer) can record real sounds in a professional recording studio, such as soldiers' shouts and gunshots. For another example, a user (e.g., a game developer) can also use an audio synthesizer to generate specific sounds, such as the neighing of a warhorse. For another example, a user (e.g., a game developer) can also use sound materials from a preset sound effect library. For another example, the first battlefield audio signal can be a pre-recorded or synthesized audio file and stored in the game's resource files.
[0054] In some embodiments, the first battlefield audio signal can be a mixed audio signal, including audio signals of multiple virtual object teams. For example, in a dynamically changing game screen, the first battlefield audio signal can include the shouts of a soldier group, the engine sounds of a vehicle group, etc. The user can pre-record or synthesize the audio signals of multiple virtual object teams, and mix the audio signals of multiple virtual object teams into an audio file as the first battlefield audio signal and load it into the game. For another example, when the game is running, the terminal device can retrieve the corresponding audio signals of the multiple virtual object teams in real time according to the virtual object teams in the game screen to generate the first battlefield audio signal. The first battlefield audio signal can be adjusted according to the dynamic changes of the game screen.
[0055] The first audio component refers to the portion of the first battlefield audio signal that needs to be adjusted. For example, the first audio component may include but is not limited to a difference signal between a left channel signal and a right channel signal, and a difference signal between other channel signals.
[0056] The second audio component refers to an audio signal other than the first audio component obtained by decomposing the first battlefield audio signal.
[0057] In some embodiments, the first audio component can be determined in a variety of ways. For example, the first battlefield audio signal can be decomposed into the first audio component and the second audio component according to the number and type of channels. Figure 4As shown, the first battlefield audio signal is a stereo signal. The first battlefield audio signal can be decomposed into a center signal (Mid signal, represented by M) and a side signal (Side signal, represented by S), and the side signal (Side signal) is used as the first audio component, where M = (L + R) / 2; S = (LR) / 2. L represents the left channel signal corresponding to the first battlefield audio signal, and R represents the right channel signal corresponding to the first battlefield audio signal. Exemplarily, based on the left channel signal corresponding to the first battlefield audio signal and the right channel signal corresponding to the first battlefield audio signal, the left channel signal and the right channel signal can be converted from the time domain to the frequency domain through frequency domain analysis to determine the respective frequency components of the left channel signal and the right channel signal in the frequency domain. By comparing the spectrum of the left channel signal and the spectrum of the right channel signal, the first audio component is determined, for example, the frequency component with a larger difference in spectral amplitude is selected as the first audio component, or the frequency component with a larger difference in phase is selected as the first audio component. Spectral analysis includes but is not limited to short-time Fourier transform, wavelet transform, etc.
[0058] For example, for 5.1 surround sound or 7.1 surround sound, the 5.1 surround sound or 7.1 surround sound can be downmixed to obtain corresponding left channel signals and right channel signals to obtain the first audio component and the second audio component. Alternatively, for a specific channel combination (such as front left channel / front right channel), the audio can be decomposed into a center signal and a side signal using the above method to obtain multiple first audio components, and multiple second audio components can be obtained based on the signals of the remaining channels.
[0059] Step 240 : Adjust the target audio parameter of the first audio component based on the distribution data corresponding to the virtual object team to obtain an adjusted first audio component.
[0060] Target audio parameters refer to audio parameters that need to be adjusted. Audio parameters are used to characterize various characteristics of audio signals. For example, audio parameters may include frequency-related parameters (such as center frequency, frequency range, bandwidth, etc.), amplitude-related parameters (such as amplitude, gain, etc.), and phase-related parameters (such as phase offset). The target audio parameter can be any one or a combination of these audio parameters.
[0061] In some embodiments, the target audio parameters of the first audio component can be adjusted based on the distribution data corresponding to the virtual object team in a variety of ways to obtain an adjustment result. For example, the gain, reverberation, delay, volume, etc. of the first audio component can be adjusted according to the distribution data. Exemplarily, the volume of the first audio component (such as the lateral signal) can be increased or decreased according to the distribution data to widen or narrow the width of the sound image in the game screen. For example, when multiple virtual object teams are detected to be distributed in different areas such as the left side, right side, front, and back of the screen, the volume of the lateral signal is increased to increase the width of the sound image.
[0062] In some embodiments, the processor may perform preprocessing based on the first battlefield audio signal to obtain a preprocessed first battlefield audio signal; and perform adjustments based on the first audio component of the preprocessed first battlefield audio signal. Preprocessing includes, but is not limited to, framing, windowing, and discretization. Exemplarily, the original first battlefield audio signal is segmented into multiple time periods of audio signals, and the audio parameters of the first audio component of the audio signal in each time period are adjusted to obtain an adjustment result for that time period.
[0063] For example, the original first battlefield audio signal can be framed by time period to obtain audio signals for each frame. Furthermore, a certain overlap rate can be set, for example, 50%, to ensure the continuity of each frame of audio signals. Furthermore, to ensure that each audio signal frame has the same frame length, zero padding can be performed on the end of the audio signal where the frame length is insufficient, so that each audio signal frame has the same frame length.
[0064] Step 250 : obtaining a second battlefield audio signal to be played on the target game screen based on the adjusted first audio component and the second audio component.
[0065] In some embodiments, the first audio component is a side signal, and the target audio parameter of the first audio component is gain. The adjusted first audio component is a gain-adjusted side signal. For example, if the gain of the side signal before adjustment is 0 dB, and the adjustment parameter is a gain increase of +3 dB, the adjusted side signal gain is +3 dB.
[0066] The second battlefield audio signal refers to an adjusted audio signal to be played that is obtained based on the adjusted first audio component and the second audio component.
[0067] In some embodiments, the first audio component is a side signal, and the second audio component is a center signal. Based on the adjusted first audio component and the second audio component, an adjusted left channel signal and an adjusted right channel signal can be converted. Based on the adjusted left channel signal and the adjusted right channel signal, a second battlefield audio signal is determined and played to obtain a sound effect corresponding to the game screen, such as the group noise sound effect finally played in the game.
[0068] For example, the adjusted side signal is S' and the center signal is M, then the adjusted left channel signal and the adjusted right channel signal can be calculated by the following formula: L'=M+S', R'=M - S', where L' is the adjusted left channel signal and R' is the adjusted right channel signal.
[0069] By using the distribution data corresponding to multiple virtual object teams, the target audio parameters of the first audio component are adjusted in real time. The sound effects corresponding to the game screen can change according to the distribution and dynamics of the soldier group, allowing players to perceive the sounds in the game screen more accurately and enhance the player's immersion and spatial perception ability.
[0070] In some embodiments, the processed second battlefield audio signal can be converted into actual sound through the audio playback system and played to the player through the speaker or other audio device corresponding to each channel.
[0071] In some embodiments, the method further comprises:
[0072] The second battlefield audio signal is mixed and played based on the environmental response signal corresponding to the game screen.
[0073] An environmental response signal refers to an audio signal generated based on the environmental characteristics of the game scene, and is used to simulate the effects of the environment on sound, such as reverberation, reflection, absorption, etc. The environmental response signal can enhance the realism and immersion of the game scene. For example, in a forest scene, the environmental response signal may include the rustling of leaves, the chirping of birds in the distance, the echo of trees, etc. In some embodiments, the environmental response signal can be obtained by recording or synthesizing a sound signal that matches the target game screen, or the environmental response signal can be dynamically generated based on the characteristics of the game scene (such as lighting, weather, terrain, etc.).
[0074] Mixing refers to the process of combining the second battlefield audio signal with the environmental response signal to generate the final audio signal to be played. In some embodiments, the environmental response signal and the second battlefield audio signal can be convolved to obtain the final audio signal to be played.
[0075] In some embodiments, the distribution data includes location information of at least one virtual object team,
[0076] When the distribution data corresponding to the virtual object team meets a preset distribution condition, before decomposing the preset first battlefield audio signal to obtain the first audio component and the second audio component, the method further includes:
[0077] determining a center position of all virtual object teams based on position information of at least one virtual object team;
[0078] When the center position is within the field of view corresponding to the target game screen, determining that the distribution data corresponding to the virtual object team meets the preset distribution condition;
[0079] When the center position is not within the field of view corresponding to the target game screen, it is determined that the distribution data corresponding to the virtual object team meets the preset distribution condition.
[0080] In some embodiments, the position information of the virtual object team may be the coordinates, direction, relative distance from other virtual objects in the virtual object team, etc. of each virtual object in the virtual object team. For example, the position information of the virtual object team may be expressed as a vector, such as [(A1, A2, A3), (B1, B2, B3), ...], where A1, A2, and A3 respectively represent the coordinates, direction, and distance between the virtual object A and a specific virtual object. The specific virtual object may be a system-preset or manually-preset virtual object, or the specific virtual object may be a specific virtual game character. For example, if the virtual object team includes multiple soldiers and generals, the specific virtual object may be a general.
[0081] In some embodiments, the position information of the virtual object team may further include the center coordinates of the virtual object team (e.g., the geometric center or the center of mass, etc.). The center coordinates of the virtual object team may be calculated by averaging the positions of all virtual objects in the virtual object team. For example, the position of each virtual object in the virtual object team is (xi, yi). The center coordinates of the virtual object team are obtained by adding the corresponding coordinates of each virtual object and dividing the sum by the number of virtual objects in the virtual object team.
[0082] In some embodiments, the center coordinates of each virtual object team may be averaged, for example, by adding the center coordinates of each virtual object team and dividing the sum by the number of virtual object teams to obtain the center positions of all virtual object teams.
[0083] The field of view of the target game screen refers to the area that can be seen in the target game screen. For example, the field of view of the game screen can include the screen area, that is, the boundary of the target game screen actually seen by the player.
[0084] In some embodiments, the field of view may be the range of the game screen frame captured by the observation space of a preset virtual camera in the initial default state after entering the game.
[0085] In some embodiments, the game screen is a game screen taken from a bird's-eye view, and the field of view may be the range of each frame of the target game screen.
[0086] In some embodiments, the target game screen is a three-dimensional game screen. The target game screen can be photographed by a preset virtual camera based on the position of the virtual object team in the game screen. The pixel positions of multiple virtual object teams in the game screen frame are determined based on the shooting results, and the range of the game screen frame is used as the field of view corresponding to the target game screen.
[0087] For example, a preset virtual camera can be set in the game screen, and the pixel position of the virtual object team in each game screen frame of the game screen, that is, the coordinate information of the image pixels, can be determined through the preset virtual camera, thereby converting the position information of the virtual object team in the game screen into the coordinate information of the image pixels.
[0088] In some embodiments, for each virtual object team in the game screen frame, the center coordinates of the virtual object team can be determined based on the pixel position of each virtual object in the virtual object team, and the center positions of all virtual object teams can be determined based on the center coordinates of each virtual object team.
[0089] In some embodiments, a preset virtual camera can be set to collect the real-time three-dimensional position of the virtual object team in the three-dimensional scene from the top of the game screen with a global perspective, and mapped to the real-time pixel position of the game screen frame. That is, the game screen is photographed by the preset virtual camera to obtain a two-dimensional image screen, and then the virtual object team is found in the two-dimensional graphic screen according to the positioning of the virtual object team to obtain the pixel position of the virtual object team in the game screen frame, without the need to use other complex conversion processes to obtain the real-time position of the virtual object team in the game screen mapped to the pixel position in the game screen frame, thereby improving the efficiency of determining the position of the virtual game object group, and then helping to improve the efficiency of audio processing.
[0090] In some embodiments, as Figure 3 As shown, based on the distribution data corresponding to the virtual object team, the target audio parameter of the first audio component is adjusted to obtain the adjusted first audio component. The specific process may be as follows.
[0091] Please refer to Figure 3 The specific process of determining the adjusted first audio component may include steps 310 to 320, wherein:
[0092] Step 310: determining adjustment parameters of target audio parameters based on the distribution data;
[0093] Step 320: Adjust the target audio parameter of the first audio component based on the adjustment parameter to obtain an adjusted first audio component.
[0094] The adjustment parameter is data for adjusting the target audio parameter of the first audio component. The adjustment parameter may include data for adjusting the volume of the first audio component, the gain or attenuation of each frequency component in the first audio component, the filter type and bandwidth, etc. In some embodiments, the adjustment parameter may include an adjustment direction and an adjustment amplitude. The adjustment direction may include increasing or decreasing the adjustment, and the adjustment amplitude may include the change before and after the adjustment.
[0095] In some embodiments, the adjustment parameter can be determined in various ways based on the spectral characteristics and distribution data of the first audio component. For example, the processor can generate a corresponding search vector based on the spectral characteristics and distribution data of the first audio component, search the vector in a preset database, and determine the adjustment parameter.
[0096] The preset database is used to store, index, and query information related to adjustment data. The preset database can store multiple reference vectors and the historical adjustment parameters corresponding to each reference vector. The reference vectors can include historical spectrum characteristics, historical distribution data, etc.
[0097] In some embodiments, the preset database can be constructed based on historical data. For example, each time a user actively adjusts the audio parameters of a first audio component, the historical spectral characteristics of the corresponding first audio component, the historical distribution data of historical game images, and the historical adjustment parameters are combined into historical adjustment data. The historical spectral characteristics and historical distribution data in the historical adjustment data are used as reference vectors, and the reference vectors are associated with the corresponding historical adjustment parameters and stored.
[0098] It should be noted that, when determining the adjustment parameter, the distribution data corresponds to the first audio component one-to-one. For example, the distribution data is data of the first audio component at the same time point or the same time period.
[0099] In some embodiments, it may be determined whether the second battlefield audio signal satisfies user preference data; and in response to a negative result, an adjustment parameter is determined based on the distribution data, the spectral characteristics of the first audio component, and the user preference data.
[0100] User preference data refers to the player's specific needs and preferences for the playback effect of the Second Battlefield audio signal. For example, user preference data may include the player's preferred volume, timbre, noise threshold, sound image width, etc. The preferred timbre is used to express the sound that the player hopes to gain in the Second Battlefield audio signal (such as human voice, music, treble, mid-range, bass, etc.), and the sound that is attenuated (such as background music). The noise threshold refers to the maximum noise decibel that the player can accept. The sound image width refers to the range of sound distribution that the player expects to feel.
[0101] In some embodiments, user preference data can be determined in a variety of ways. For example, the processor can directly ask users about their preferences for playback effects through a settings interface or a questionnaire.
[0102] In some embodiments, adjustment parameters preset by the user may be obtained, and user preference data may be determined based on the preset adjustment parameters.
[0103] Pre-set adjustment parameters directly reflect user preferences for audio playback, but they have some limitations. Pre-set adjustment parameters don't account for the impact of dynamic changes in the game screen on playback quality, so the actual playback effect may not match the ideal playback effect of the adjustment parameters. Statistical analysis based on historical adjustment data can be used to determine user preferences.
[0104] Whether the second battlefield audio signal satisfies the user preference data refers to the degree of match between the second battlefield audio signal and the user preference data. For example, whether the sound data satisfies the user preference data may include: whether the frequency distribution of the second battlefield audio signal matches the user's preferred timbre; whether the second battlefield audio signal exceeds the user's acceptable noise threshold; and whether the second battlefield audio signal matches the preferred audio signal in the user preference data. The preferred audio signal refers to an audio signal whose sound image width meets the user's requirements.
[0105] In some embodiments, determining whether the second battlefield audio signal satisfies the user preference data can be performed in a variety of ways. For example, an actual sound waveform can be generated based on the second battlefield audio signal collected by the microphone array; an ideal sound waveform can be generated based on the user preference data; and whether the second battlefield audio signal satisfies the user preference data can be determined based on the similarity between the ideal sound waveform and the actual sound waveform. If the similarity is greater than a similarity threshold, the second battlefield audio signal is determined to satisfy the user preference data.
[0106] Among them, the similarity threshold can be a system preset value or a system default value. The similarity threshold can also be determined based on historical adjustment records. For example, each time the player completes an adjustment, the similarity between the actual sound waveform after adjustment and the preset sound waveform is calculated; the average of the similarities corresponding to each adjustment is completed is used as the similarity threshold.
[0107] In some embodiments, the target audio parameter includes a volume parameter, the adjustment parameter includes a volume adjustment parameter,
[0108] Determining adjustment parameters of target audio parameters based on the distribution data includes:
[0109] Determining a volume adjustment parameter corresponding to the distribution data based on a correspondence between the preset distribution data and the preset volume adjustment parameter;
[0110] Adjusting the target audio parameter of the first audio component based on the adjustment parameter to obtain the adjusted first audio component includes:
[0111] The volume of the first audio component is adjusted based on the volume adjustment parameter to obtain an adjusted first audio component.
[0112] Preset distribution data refers to pre-defined distribution data corresponding to multiple virtual object teams in various game scenes. Preset distribution data can be pre-defined by users (such as audio designers or developers) based on game design requirements and stored in configuration files.
[0113] The preset volume adjustment parameters refer to volume adjustment parameters corresponding to the preset distribution data. The preset volume adjustment parameters are usually pre-defined by a user (eg, an audio designer or developer) according to game design requirements and stored in a configuration file.
[0114] The correspondence relationship refers to the mapping between preset distribution data and preset volume adjustment parameters. This mapping relationship allows the corresponding volume adjustment parameters to be determined based on the actual distribution data of multiple virtual object teams in the target game screen. This correspondence relationship can be stored in a configuration file as a table or function, allowing the volume adjustment parameters corresponding to the current distribution data of all virtual objects to be determined through a lookup table or calculation function.
[0115] The volume adjustment parameter may include a desired volume value of the first audio component after adjustment, or a change in the volume of the first audio component before and after adjustment.
[0116] The volume of the first audio component may be an initial volume value of the first audio component or a volume value at a current time. The current time generally refers to a time point at which the processor collects, processes, and makes decisions. For example, the current time may be a time point at which the processor last collected data, updated a control instruction, or made a decision.
[0117] It's understandable that the distribution data of all virtual objects within a game screen varies depending on the game screen. Based on this virtual object distribution data, targeted sound effects can be generated that better match the game screen, enhancing the player's sense of immersion and spatial perception. For example, a game screen may include multiple armies, each consisting of multiple soldiers and a general. Each soldier or general may emit audio signals such as footsteps and shouts. By adjusting the volume of the first audio component in the first battlefield audio signal, a group noise effect more appropriate to the current game screen can be achieved.
[0118] In some embodiments, based on a mapping relationship between a preset total number of virtual objects and a preset volume parameter, and based on a volume adjustment parameter corresponding to the total number of all virtual objects in the target game screen, the volume of the first audio component can be adjusted to obtain an adjusted first audio component, so as to adjust the sound width of the target game screen.
[0119] In some embodiments, the total number of all virtual objects can be determined based on the number of virtual objects in each virtual object team. When the total number of virtual objects is greater than a preset threshold, the volume of the lateral signal is increased based on the increase corresponding to the total number to widen the sound image; when the total number is less than the preset threshold, the volume of the lateral signal is reduced based on the decrease corresponding to the total number to make the sound image more focused.
[0120] In some embodiments, the distribution data includes at least one of a virtual object distribution density, a virtual object distribution range, and a number of virtual objects in each virtual object team.
[0121] Virtual object distribution density refers to the number of virtual objects within a preset area. Virtual object distribution density reflects the density of virtual objects in the game screen.
[0122] The preset area refers to the spatial range within the target game screen. In some embodiments, the target game screen can be divided based on a grid, preset rules, or virtual object teams to obtain at least one preset area. The division can be based on one or more parameters, such as the size of the screen, the density of the virtual objects, a specific area, or any combination thereof. In some embodiments, the target game screen can also be divided by other methods.
[0123] The virtual object distribution range refers to the range of virtual objects in the game screen. In some embodiments, the virtual object distribution range can be obtained by calculating the maximum distance between virtual objects or the standard deviation of the positions.
[0124] In some embodiments, an adjustment parameter can be determined based on the virtual object distribution density and virtual object distribution range using a preset rule to obtain the adjusted first audio component. For example, the preset rule is: the lower the virtual object distribution density, the louder the lateral signal volume and the wider the sound image; the larger the soldier distribution range, the louder the lateral signal volume and the wider the sound image.
[0125] In some embodiments, an adjustment ratio can be determined based on the virtual object distribution density and the virtual object distribution range, where the adjustment ratio is a value between 0 and 1, and the volume of the adjusted first audio component is determined based on the adjustment ratio. For example, the adjustment ratio k = (1-virtual object distribution density) × (virtual object distribution range / maximum distribution range), and the following formula is used to calculate the volume of the adjusted first audio component: G = -M + (M + N) × k.
[0126] Wherein, G is the volume of the adjusted first audio component, k is the adjustment ratio, and the adjustment ratio from 0 to 1 is mapped to a volume value in the volume range of -MdB to +NdB through this formula.
[0127] In some embodiments, the method further comprises:
[0128] determining an initial audio signal of each virtual object team when the distribution data corresponding to the virtual object team meets a preset distribution condition;
[0129] Based on the position information of each virtual object team, the initial audio signal corresponding to the virtual object team is adjusted to obtain the audio signal to be played of each virtual object team.
[0130] In some embodiments, the initial audio signal of each virtual object team may be different from the first battlefield audio signal, and different virtual object teams each correspond to an initial audio signal; the audio signal to be played of each virtual object team may be different from the second battlefield audio signal, and the audio signal to be played of each virtual object team is obtained by adjusting the initial audio signal based on the position information of the virtual object team.
[0131] In some embodiments, for each virtual object team, the output ratio of the left channel signal and the right channel signal in the initial audio signal corresponding to the virtual object team may be adjusted based on the relative position information between the virtual object team and a preset virtual camera.
[0132] The output ratio refers to the relative intensity or volume ratio of the audio signal in different channels (such as the left and right channels). For example, the output ratio is L:R, where L is the output ratio of the left channel and R is the output ratio of the right channel. L and R are values between 0 and 1, indicating the relative volume of the channel signals. 0 means the volume of the channel signal is zero, meaning the channel signal is not output at all. 1 means the volume of the channel signal is maximum, meaning the channel signal is output at full volume.
[0133] The relative position information may include relative distance, relative orientation, etc.
[0134] In some embodiments, the output ratio of the left channel signal and the right channel signal can be determined based on the horizontal position of the virtual object team (e.g., the x coordinate) and the horizontal width of the field of view, for example, the output ratio of the left channel L = (x-L1) / L; the output ratio of the left channel R = (L2-x) / L, where L1 is the coordinate of the left boundary of the field of view, and L2 is the coordinate of the right boundary of the field of view.
[0135] In some embodiments, the method further comprises:
[0136] When the total number of virtual objects in at least one virtual object team is greater than a preset number threshold, performing phase modulation processing on the second battlefield audio signal to obtain a phase-modulated second battlefield audio signal;
[0137] Playback is based on the second battlefield audio signal after phase modulation.
[0138] The preset quantity threshold is a threshold condition for determining the total quantity of virtual objects.
[0139] The preset quantity threshold may be a system default value, an experience value, a manually preset value, or any combination thereof, and may be set according to actual needs, and this specification does not impose any restrictions on this.
[0140] In some embodiments, the second battlefield audio signal may be divided into sub-audio signals of multiple time periods, and phase modulation may be performed on the sub-audio signal of each time period to obtain a phase-modulated second battlefield audio signal.
[0141] In some embodiments, the time domain signal of the second battlefield audio signal can be converted into a frequency domain signal through Fourier transform, the phase of each frequency component can be randomly adjusted in the frequency domain, and the adjusted frequency domain signal can be converted back into a time domain signal to obtain a phase-modulated second battlefield audio signal.
[0142] In some embodiments, when the total number of virtual objects in at least one virtual object team is greater than a preset number threshold, performing phase modulation processing on the second battlefield audio signal to obtain the phase-modulated second battlefield audio signal includes:
[0143] Converting the second battlefield audio signal into a corresponding frequency domain signal;
[0144] Performing phase delay processing on at least one frequency component of the frequency domain signal within the target frequency band to obtain a phase-modulated frequency domain signal;
[0145] The phase-modulated frequency domain signal is inversely transformed to obtain a phase-modulated second battlefield audio signal.
[0146] The target frequency band is the frequency range that has a greater impact on the width of the sound. For example, the target frequency band may be 2kHz-8kHz.
[0147] In some embodiments, the time domain signal of the second battlefield audio signal can be converted into a corresponding frequency domain signal. For multiple frequency components of the frequency domain signal within the range of 2kHz-8kHz, multiple time delays within a preset time range are randomly generated, and at least one of the multiple frequency components is adjusted based on the multiple time delays. For example, a random time delay within the range of ±5ms is applied to each of the different frequency components, with different random time delays corresponding to different phase offsets. For example, the phase of the 2kHz frequency component is delayed by 2ms, the phase of the 3kHz frequency component is delayed by 3ms, and the phase of the 4kHz frequency component is advanced by 1ms.
[0148] In some embodiments, a convolution operation may be performed on the phase-modulated second battlefield audio signal and the environment response signal to obtain the final audio signal to be played.
[0149] It can be understood that by randomly adjusting the phase of each frequency component, the randomness or complexity of the sound can be increased, thereby enhancing the naturalness or spatial sense of the sound.
[0150] This embodiment also provides a game sound effect processing device, which can be integrated into a terminal device. Figure 5 As shown, the game sound effect processing device may include:
[0151] A first determining module 501 is configured to determine at least one virtual object team participating in the game battle corresponding to the target game screen;
[0152] The second determining module 502 is used to determine the distribution data corresponding to the virtual object team;
[0153] a decomposition module 503 configured to decompose a preset first battlefield audio signal to obtain a first audio component and a second audio component when the distribution data corresponding to the virtual object team satisfies a preset distribution condition, wherein the first audio component is used to indicate a difference between at least two channel signals of the first battlefield audio signal;
[0154] An adjustment module 504 is configured to adjust a target audio parameter of the first audio component based on the distribution data corresponding to the virtual object team to obtain an adjusted first audio component;
[0155] The third determining module 505 is configured to obtain a second battlefield audio signal to be played on the target game screen based on the adjusted first audio component and the second audio component.
[0156] By adopting the solution of the embodiment of the present application, by determining at least one virtual object team and its corresponding distribution data participating in the game battle corresponding to the target game screen, the first battlefield audio signal in the screen is processed, and the first audio component of the first battlefield audio signal can be dynamically adjusted according to the distribution data corresponding to the virtual object team, thereby achieving the effect of dynamically adjusting the sound width corresponding to the target game screen, so that the sound in the game can more realistically reflect the position and distribution of the virtual objects in the space, making the player feel as if they are in the game screen, greatly enhancing the immersiveness of the game screen.
[0157] In some embodiments, the decomposition module 503 is further configured to:
[0158] determining a center position of all virtual object teams based on position information of at least one virtual object team;
[0159] When the center position is within the field of view corresponding to the target game screen, determining that the distribution data corresponding to the virtual object team meets the preset distribution condition;
[0160] When the center position is not within the field of view corresponding to the target game screen, it is determined that the distribution data corresponding to the virtual object team meets the preset distribution condition.
[0161] In some embodiments, the adjustment module 504 is further configured to:
[0162] determining an adjustment parameter of a target audio parameter based on the distribution data;
[0163] The target audio parameter of the first audio component is adjusted based on the adjustment parameter to obtain an adjusted first audio component.
[0164] In some embodiments, the target audio parameter includes a volume parameter, the adjustment parameter includes a volume adjustment parameter,
[0165] The adjustment module 504 is further configured to:
[0166] Determining a volume adjustment parameter corresponding to the distribution data based on a correspondence between the preset distribution data and the preset volume adjustment parameter;
[0167] The volume of the first audio component is adjusted based on the volume adjustment parameter to obtain an adjusted first audio component.
[0168] In some embodiments, the adjustment module 504 is further configured to:
[0169] determining an initial audio signal of each virtual object team when the distribution data corresponding to the virtual object team meets a preset distribution condition;
[0170] Based on the position information of each virtual object team, the initial audio signal corresponding to the virtual object team is adjusted to obtain the audio signal to be played of each virtual object team.
[0171] In some embodiments, the adjustment module 504 is further configured to:
[0172] When the total number of virtual objects in at least one virtual object team is greater than a preset number threshold, performing phase modulation processing on the second battlefield audio signal to obtain a phase-modulated second battlefield audio signal;
[0173] Playback is based on the second battlefield audio signal after phase modulation.
[0174] In some embodiments, the adjustment module 504 is further configured to:
[0175] Converting the second battlefield audio signal into a frequency domain signal;
[0176] Performing phase delay processing on at least one frequency component of the frequency domain signal within the target frequency band to obtain a phase-modulated frequency domain signal;
[0177] The phase-modulated frequency domain signal is inversely transformed to obtain a phase-modulated second battlefield audio signal.
[0178] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, such as a smartphone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), or the like. Alternatively, the electronic device may be a server.
[0179] like Figure 6 As shown, Figure 6Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 600 includes a processor 601 having one or more processing cores, a memory 602 having one or more computer-readable storage media, and a computer program stored in the memory 602 and executable on the processor. The processor 601 is electrically connected to the memory 602. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0180] The processor 601 is the control center of the electronic device 600. It connects the various parts of the entire electronic device 600 using various interfaces and lines. By running or loading software programs and / or units stored in the memory 602 and calling data stored in the memory 602, it executes various functions of the electronic device 600 and processes data, thereby monitoring the entire electronic device 600. The processor 601 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the various methods, steps, and logic blocks disclosed in the embodiments of this application.
[0181] In the embodiment of the present application, the processor 601 in the electronic device 600 loads instructions corresponding to one or more application processes into the memory 602 according to the following steps, and the processor 601 runs the application stored in the memory 602 to implement various functions, such as:
[0182] Determining at least one virtual object team participating in the game battle corresponding to the target game screen;
[0183] Determine the distribution data corresponding to the virtual object team;
[0184] When the distribution data corresponding to the virtual object team meets a preset distribution condition, decomposing the preset first battlefield audio signal to obtain a first audio component and a second audio component, where the first audio component is used to indicate a difference between at least two channel signals of the first battlefield audio signal;
[0185] adjusting a target audio parameter of the first audio component based on the distribution data corresponding to the virtual object team to obtain an adjusted first audio component;
[0186] Based on the adjusted first audio component and second audio component, a second battlefield audio signal to be played on the target game screen is obtained.
[0187] By adopting the solution of the embodiment of the present application, by determining at least one virtual object team and its corresponding distribution data participating in the game battle corresponding to the target game screen, the first battlefield audio signal in the screen is processed, and the first audio component of the first battlefield audio signal can be dynamically adjusted according to the distribution data corresponding to the virtual object team, thereby achieving the effect of dynamically adjusting the sound width corresponding to the target game screen, so that the sound in the game can more realistically reflect the position and distribution of the virtual objects in the space, making the player feel as if they are in the game screen, greatly enhancing the immersiveness of the game screen.
[0188] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0189] Optional, such as Figure 6 As shown, the electronic device 600 further includes: a touch screen 603, a radio frequency circuit 604, an audio circuit 605, an input unit 606, and a power supply 607. Among them, the processor 601 is electrically connected to the touch screen 603, the radio frequency circuit 604, the audio circuit 605, the input unit 606, and the power supply 607 respectively. Those skilled in the art will understand that Figure 6 The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0190] The touch display screen 603 can be used for displaying a graphical user interface and receiving an operation instruction generated by the user acting on the graphical user interface. The touch display screen 603 can include a display panel and a touch panel. Among them, the display panel can be used for displaying information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any groups thereof. Optionally, a liquid crystal display (LCD), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like can be used to configure the display panel. The touch panel can be used for collecting the user's touch operation on or near it (such as the user uses any suitable object or accessory such as a finger, a stylus on the touch panel or near the touch panel) and generates corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 601, and can receive the command sent by the processor 601 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 601 to determine the type of touch event, and then the processor 601 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 603 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize input and output functions. That is, the touch display screen 603 can also be used as part of the input unit 606 to realize the input function.
[0191] The radio frequency circuit 604 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals with the network device or other electronic devices.
[0192] The audio circuit 605 can be used to provide an audio interface between the user and the electronic device through a speaker and microphone. The audio circuit 605 can convert the received audio data into an electrical signal and transmit it to the speaker, which then converts it into a sound signal for output. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 605 and converted into audio data. The audio data is then output to the processor 601 for processing, and then sent to another electronic device through the radio frequency circuit 604, or the audio data is output to the memory 602 for further processing. The audio circuit 605 may also include an earphone jack to provide communication between external headphones and the electronic device.
[0193] The input unit 606 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0194] Power supply 607 is used to supply power to various components of electronic device 600. Optionally, power supply 607 can be logically connected to processor 601 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 607 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0195] although Figure 6 Not shown in the figure, the electronic device 600 may further include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0196] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0197] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0198] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute any of the game sound effect processing methods provided in the embodiments of the present application. The computer program can execute the following steps of the game sound effect processing method:
[0199] Determining at least one virtual object team participating in the game battle corresponding to the target game screen;
[0200] Determine the distribution data corresponding to the virtual object team;
[0201] When the distribution data corresponding to the virtual object team meets a preset distribution condition, decomposing the preset first battlefield audio signal to obtain a first audio component and a second audio component, where the first audio component is used to indicate a difference between at least two channel signals of the first battlefield audio signal;
[0202] adjusting a target audio parameter of the first audio component based on the distribution data corresponding to the virtual object team to obtain an adjusted first audio component;
[0203] Based on the adjusted first audio component and second audio component, a second battlefield audio signal to be played on the target game screen is obtained.
[0204] By adopting the solution of the embodiment of the present application, by determining at least one virtual object team and its corresponding distribution data participating in the game battle corresponding to the target game screen, the first battlefield audio signal in the screen is processed, and the first audio component of the first battlefield audio signal can be dynamically adjusted according to the distribution data corresponding to the virtual object team, thereby achieving the effect of dynamically adjusting the sound width corresponding to the target game screen, so that the sound in the game can more realistically reflect the position and distribution of the virtual objects in the space, making the player feel as if they are in the game screen, greatly enhancing the immersiveness of the game screen.
[0205] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0206] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0207] Since the computer program stored in the computer-readable storage medium can execute any one of the game sound effect processing methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the game sound effect processing methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0208] According to one aspect of the present application, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in various optional implementations of the above embodiments.
[0209] In the above-described embodiments of the game sound effect processing device, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different focuses. For portions not described in detail in a particular embodiment, reference can be made to the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the above-described game sound effect processing device, computer-readable storage medium, computer program product, electronic device, and their corresponding units can be referred to in the description of the game sound effect processing method in the above embodiments, and the details will not be repeated here.
[0210] The above is a detailed introduction to a game sound effect processing method, device, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, based on the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for processing game sound effects, characterized in that: The method comprises: Determining at least one virtual object team participating in the game battle corresponding to the target game screen; Determining distribution data corresponding to the virtual object team; When the distribution data corresponding to the virtual object team meets a preset distribution condition, decomposing a preset first battlefield audio signal to obtain a first audio component and a second audio component, wherein the first audio component is used to indicate a difference between at least two channel signals of the first battlefield audio signal; adjusting a target audio parameter of the first audio component based on the distribution data corresponding to the virtual object team to obtain an adjusted first audio component; Based on the adjusted first audio component and the second audio component, a second battlefield audio signal to be played on the target game screen is obtained.
2. The method according to claim 1, characterized in that The distribution data includes location information of the at least one virtual object team, When the distribution data corresponding to the virtual object team meets a preset distribution condition, before decomposing the preset first battlefield audio signal to obtain the first audio component and the second audio component, the method further includes: determining a center position of all virtual object teams based on the position information of the at least one virtual object team; When the center position is within the field of view corresponding to the target game screen, determining that the distribution data corresponding to the virtual object team meets a preset distribution condition; When the center position is not within the field of view corresponding to the target game screen, it is determined that the distribution data corresponding to the virtual object team meets a preset distribution condition.
3. The method according to claim 1, characterized in that The adjusting the target audio parameter of the first audio component based on the distribution data corresponding to the virtual object team to obtain the adjusted first audio component includes: determining an adjustment parameter of the target audio parameter based on the distribution data; The target audio parameter of the first audio component is adjusted based on the adjustment parameter to obtain the adjusted first audio component.
4. The method according to claim 3, characterized in that The target audio parameter includes a volume parameter, and the adjustment parameter includes a volume adjustment parameter. The determining the adjustment parameter of the target audio parameter based on the distribution data includes: Determining the volume adjustment parameter corresponding to the distribution data based on a correspondence between the preset distribution data and the preset volume adjustment parameter; The adjusting the target audio parameter of the first audio component based on the adjustment parameter to obtain the adjusted first audio component includes: The volume of the first audio component is adjusted based on the volume adjustment parameter to obtain the adjusted first audio component.
5. The method according to claim 3, characterized in that The distribution data includes at least one of a virtual object distribution density, a virtual object distribution range, and the number of virtual objects in each virtual object team.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: determining an initial audio signal of each virtual object team when the distribution data corresponding to the virtual object team meets a preset distribution condition; Based on the position information of each virtual object team, the initial audio signal corresponding to the virtual object team is adjusted to obtain the audio signal to be played of each virtual object team.
7. The method according to claim 1, characterized in that The method further comprises: When the total number of virtual objects in the at least one virtual object team is greater than a preset number threshold, performing phase modulation processing on the second battlefield audio signal to obtain a phase-modulated second battlefield audio signal; Playing is performed based on the phase-modulated second battlefield audio signal.
8. The method according to claim 7, characterized in that When the total number of virtual objects in the at least one virtual object team is greater than a preset number threshold, performing phase modulation processing on the second battlefield audio signal to obtain the phase-modulated second battlefield audio signal includes: Converting the second battlefield audio signal into a corresponding frequency domain signal; Performing phase delay processing on at least one frequency component of the frequency domain signal within the target frequency band to obtain a phase-modulated frequency domain signal; The phase-modulated frequency domain signal is inversely transformed to obtain the phase-modulated second battlefield audio signal.
9. A game sound effect processing device, characterized in that: The device comprises: A first determining module is used to determine at least one virtual object team participating in the game battle corresponding to the target game screen; A second determining module is used to determine the distribution data corresponding to the virtual object team; a decomposition module, configured to decompose a preset first battlefield audio signal to obtain a first audio component and a second audio component when the distribution data corresponding to the virtual object team satisfies a preset distribution condition, wherein the first audio component is used to indicate a difference between at least two channel signals of the first battlefield audio signal; an adjustment module, configured to adjust a target audio parameter of the first audio component based on the distribution data corresponding to the virtual object team to obtain an adjusted first audio component; The third determining module is configured to obtain a second battlefield audio signal to be played on the target game screen based on the adjusted first audio component and the second audio component.
10. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the game sound effect processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the game sound effect processing method according to any one of claims 1 to 8.