Sound effect adjustment method and device, storage medium, computing equipment and program product

By calculating the relative motion parameters of moving objects and target objects in the virtual environment in the game sound effect system, and dynamically adjusting the sound effect parameters to simulate the Doppler effect, the problem of insufficient sound effect response in the existing technology is solved, and the authenticity and immersion of the game sound effect are improved.

CN120114838APending Publication Date: 2025-06-10ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510264287.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The existing game sound system is insufficient in response to dynamic environments, especially near fast moving objects, and cannot effectively simulate the Doppler effect, resulting in a reduced authenticity and immersion of game sound effects.

Method used

By obtaining the background sound effects of the virtual environment and the initial sound effects of the moving object, the relative motion parameters of the moving object and the target object are calculated every preset period, the sound effect adjustment strategy is determined based on these parameters, and the sound effect parameters are dynamically adjusted to simulate the Doppler effect.

Benefits of technology

It enhances the authenticity and immersion of the game sound effects, making the player experience more vivid and realistic, thereby improving user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120114838A_ABST
    Figure CN120114838A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a sound effect adjustment method and apparatus, a storage medium, a computing device and a program product. The sound effect adjustment method comprises the steps of obtaining a background sound effect of a virtual environment and an initial sound effect of a moving object in the virtual environment; relative motion parameters of the moving object and the target object in the virtual environment are calculated every preset time period, and the relative motion parameters are used for indicating relative motion between the moving object and the target object; based on the relative motion parameters, determining a first sound effect adjustment strategy corresponding to the initial sound effect and a second sound effect adjustment strategy corresponding to the background sound effect; and adjusting the initial sound effect based on the first sound effect adjustment strategy, and adjusting the background sound effect based on the second sound effect adjustment strategy. Based on the relative motion parameters between the moving object and the target object, the sound effect parameters of the initial sound effect and the background sound effect in the virtual environment are dynamically determined and adjusted, the phenomenon that sound changes along with relative motion in reality is simulated, and the authenticity and immersion of the game sound effect are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a method and apparatus for sound effect adjustment, a storage medium, a computing device, and a program product. Background Art

[0002] In modern game development, sound effects are a key element in enhancing immersion and improving the player experience. Realistic environmental sounds, clear dialogue, and context-appropriate music can deepen the connection between players and the virtual world, making interactions more authentic and believable.

[0003] However, in related technologies, sound effect playback mostly relies on preset content. When faced with fast-moving objects (such as bullets, vehicles, or characters), there is a lack of response to the dynamic environment, reducing the authenticity and immersion of the game and limiting the developer's ability to create a more rich game world.

[0004] Therefore, a more realistic audio feedback is urgently needed, which is crucial for improving user satisfaction. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method for sound effect adjustment. One or more embodiments of the present invention also relate to a sound effect adjustment apparatus, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.

[0006] According to the first aspect of the embodiments of the present invention, a method for sound effect adjustment is provided, including: Obtaining background sound effects of a virtual environment and initial sound effects of moving objects in the virtual environment; Calculating, every preset time period, relative motion parameters of a moving object and a target object in the virtual environment, where the relative motion parameters are used to indicate the relative motion between the moving object and the target object; Determining a first sound effect adjustment strategy corresponding to the initial sound effects and a second sound effect adjustment strategy corresponding to the background sound effects based on the relative motion parameters; Adjusting the initial sound effects based on the first sound effect adjustment strategy and adjusting the background sound effects based on the second sound effect adjustment strategy.

[0007] According to the second aspect of the embodiments of the present invention, a sound effect apparatus is provided, including: An obtaining module configured to obtain background sound effects of a virtual environment and initial sound effects of moving objects in the virtual environment; A calculating module configured to calculate, every preset time period, relative motion parameters of a moving object and a target object in the virtual environment, where the relative motion parameters are used to indicate the relative motion between the moving object and the target object; A determination module, configured to determine a first sound effect adjustment strategy corresponding to an initial sound effect and a second sound effect adjustment strategy corresponding to a background sound effect based on relative motion parameters; An adjustment module, configured to adjust the initial sound effect based on the first sound effect adjustment strategy and adjust the background sound effect based on the second sound effect adjustment strategy.

[0008] According to a third aspect of an embodiment of the present invention, there is provided a computing device, including: A memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned sound effect adjustment method are implemented.

[0009] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium, which stores computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the above-mentioned sound effect adjustment method are implemented.

[0010] According to a fifth aspect of an embodiment of the present invention, there is provided a computer program product, including computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the above-mentioned sound effect adjustment method are implemented.

[0011] An embodiment of the present invention realizes obtaining the background sound effect of a virtual environment and the initial sound effect of a moving object in the virtual environment; at every preset time period, calculating the relative motion parameters of the moving object and the target object in the virtual environment, where the relative motion parameters are used to indicate the relative motion between the moving object and the target object; based on the relative motion parameters, determining a first sound effect adjustment strategy corresponding to the initial sound effect and a second sound effect adjustment strategy corresponding to the background sound effect; adjusting the initial sound effect based on the first sound effect adjustment strategy and adjusting the background sound effect based on the second sound effect adjustment strategy. Calculating the relative motion parameters between the moving object and the target object in the virtual environment at every preset time period includes a relative velocity vector. Based on these relative motion parameters, dynamically determining and adjusting the sound effect parameters of the initial sound effect and the background sound effect in the virtual environment. In this way, the system can simulate the phenomenon that sound changes with relative motion in reality, enhancing the authenticity and immersion of game sound effects, making the player experience more vivid and realistic, and thus improving user satisfaction. Description of the Drawings

[0012] Figure 1 is a schematic diagram of the Doppler effect; Figure 2 is a schematic structural interaction diagram of a sound effect adjustment system provided by an embodiment of the present invention; Figure 3 is a flowchart of a sound effect adjustment method provided by an embodiment of the present invention; Figure 4 It is the system architecture diagram of an audio adjustment system provided by an embodiment of the present invention; Figure 5 It is the processing procedure flowchart of an audio adjustment method provided by an embodiment of the present invention; Figure 6 It is the schematic diagram of a Doppler frequency offset calculation module provided by an embodiment of the present invention; Figure 7 It is the schematic diagram of an integrated interface provided by an embodiment of the present invention; Figure 8 It is the structural schematic diagram of a sound effect adjustment device provided by an embodiment of the present invention; Figure 9 It is the structural block diagram of a computing device provided by an embodiment of the present invention. Detailed implementation manners

[0013] Many specific details are set forth in the following description in order to provide a thorough understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific implementations disclosed below.

[0014] The terms used in one or more embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present invention. The singular forms "a", "the" and "said" used in one or more embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more of the associated listed items.

[0015] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of the present invention to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present invention, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0016] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present invention are all information and data that have been authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.

[0017] First, the noun terms involved in one or more embodiments of the present invention are explained.

[0018] Doppler effect: When there is relative motion between a wave source (such as the source of sound or light) and an observer, the phenomenon that the frequency of the wave received by the observer changes. Specifically, if the wave source approaches the observer, the received frequency will increase, resulting in a higher pitch; conversely, if the wave source moves away from the observer, the received frequency will decrease, and the pitch will become lower.

[0019] In modern game development, in order to enhance the player's immersion, the performance of game sound effects is particularly important. Realistic environmental sounds, clear character dialogues, and context-appropriate music can deepen the connection between players and the virtual world, making every interaction more realistic and credible. However, current game sound effect systems mostly rely on preset content and are insufficient in responding to dynamic environments. Especially in the presence of fast-moving objects (such as bullets, vehicles, or other player characters), the sound effects of these objects usually maintain a fixed frequency and fail to reflect the Doppler effect in reality - that is, the phenomenon that the pitch increases when the sound source approaches at high speed and decreases when it moves away at high speed.

[0020] See Figure 1 , Figure 1 is a schematic diagram of the Doppler effect, where a stationary observer receives sound waves from a moving object. When the moving object approaches the observer, the sound waves are compressed, resulting in an increase in frequency; while when the moving object moves away from the observer, the sound waves expand, resulting in a decrease in frequency. Specifically, when the moving object approaches the observer, the sound waves are compressed to form a compressed waveform, thereby increasing the frequency; while when it moves away from the observer, the sound waves expand to form an expanded waveform, thereby decreasing the frequency. Finally, the change in the frequency of the sound waves received by the observer reflects the relative motion between the moving object and the observer, simulating the Doppler effect in reality.

[0021] To address the above problems, in the present invention, a sound effect adjustment method is provided. The present invention also relates to a sound effect adjustment system, a sound effect device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail one by one in the following embodiments.

[0022] See Figure 2, Figure 2 FIG. Figure 2 is a schematic structural interaction diagram of a sound effect adjustment system provided by an embodiment of the present invention. The sound effect adjustment system includes a game engine, a server, and a sound output end. The server is configured to obtain the background sound effect of the virtual environment and the initial sound effect of the moving object in the virtual environment from the game engine. Every preset period, calculate the relative motion parameters of the moving object and the target object in the virtual environment, where the relative motion parameters are used to indicate the relative motion between the moving object and the target object. Based on the relative motion parameters, determine the first sound effect adjustment strategy corresponding to the initial sound effect and the second sound effect adjustment strategy corresponding to the background sound effect, adjust the initial sound effect based on the first sound effect adjustment strategy, and adjust the background sound effect based on the second sound effect adjustment strategy, and send the adjusted initial sound effect and background sound effect to the sound output end.

[0023] The sound effect adjustment system realizes the effect of dynamic sound effect adjustment through the close cooperation of the game engine, the server, and the sound output end. First, the game engine is responsible for providing the real-time state information of the virtual environment, including the background sound effect and the initial sound effect of the moving object, as well as their position and speed data. After the server obtains this information from the game engine, it calculates the relative motion parameters between the moving object and the target object, such as the relative velocity vector, every preset period to indicate the relative motion between the two. Based on these calculation results, the server dynamically determines and adjusts the sound effect parameters of the initial sound effect and the background sound effect to simulate the phenomenon that the sound changes with the relative motion in reality. The adjusted sound effect data is then sent to the sound output end, which is responsible for the final sound playback, ensuring that players can experience enhanced authenticity and immersion, making the game experience more vivid and realistic, thereby improving user satisfaction. Throughout the process, the game engine ensures the accuracy and real-time nature of the data, the server executes the core calculation and adjustment logic, and the sound output end ensures that the adjusted sound effect can be correctly conveyed to the players.

[0024] See Figure 3 , Figure 3 FIG. Figure 3 is a flowchart of a sound effect adjustment method provided by an embodiment of the present invention, which specifically includes the following steps.

[0025] Step 302: Obtain the background sound effect of the virtual environment and the initial sound effect of the moving object in the virtual environment.

[0026] Among them, the background sound effect refers to the sound elements that continuously exist or periodically appear in the virtual environment, such as the sound of wind, rain, and the hustle and bustle of the city; the initial sound effect refers to the original sound associated with a specific moving object in the virtual environment, such as the engine sound of a vehicle, etc.

[0027] In practical applications, the system first needs to extract background sound effects from the data sources of the virtual environment. This typically involves analyzing the game scene to identify which sound elements should be treated as background sound effects. For static background sound effects, the system can directly load preset audio files, which can be pre-recorded natural environment sounds or sounds generated by programs. For dynamically changing background sound effects, such as sounds that change over time or with weather conditions, the system will select appropriate audio resources based on the current game state. After obtaining the background sound effects, the system then focuses on the initial sound effects of moving objects. This part of the work includes determining the type of sound associated with each moving object and allocating corresponding audio resources to these objects. For example, in a racing game, different types of vehicles may have different engine sounds, and the system needs to ensure that each vehicle can play its unique initial sound effect. In addition, to ensure the authenticity and consistency of the sound effects, the system will also consider the attributes of the moving objects, such as size, speed, and material, etc., to fine-tune the parameters of the initial sound effects, such as volume and frequency response. In some cases, if the moving object has a complex action pattern, the system may combine multiple audio segments or use real-time synthesis technology to create more rich and variable initial sound effects.

[0028] In a specific embodiment of the present invention, in an open-world racing game, when the player drives a racing car into a busy city street, the system loads background sound effects suitable for the urban environment, such as the noise of distant vehicles and the hustle and bustle of the street crowd. As another fast-approaching racing car gets closer, the system detects that the distance between the two is less than a preset threshold and the relative velocity vector indicates that the two cars are approaching rapidly. At this time, the system adopts a highlighting strategy to enhance the sound effect of the approaching racing car, calculates and updates the audio frequency based on the Doppler effect, makes the engine sound of the other vehicle gradually higher and louder, and at the same time appropriately weakens the urban noise in the background sound effect to ensure that the player can clearly hear the sound of the approaching vehicle, providing a realistic and immersive auditory experience and enhancing the tension and interactivity of the race.

[0029] Step 304: Calculate the relative motion parameters of the moving object and the target object in the virtual environment at preset intervals, where the relative motion parameters are used to indicate the relative motion between the moving object and the target object.

[0030] Among them, the relative motion parameters are a set of data used to describe the relative position change between the moving object and the target object in the virtual environment. These parameters can include, but are not limited to, information such as distance, direction, and speed, etc.; the preset interval refers to the time interval preset by the system, and a calculation process will be triggered within this time interval to ensure that the update frequency of the relative motion parameters meets the real-time requirements.

[0031] In practical applications, the system regularly initiates the calculation process according to a preset time period. First, the system needs to determine the position coordinates of the moving object and the target object at the current moment. This is usually achieved through physical or spatial positioning services provided by the game engine, which can obtain the precise coordinates of each object in three-dimensional space. Once the position data of the two objects are obtained, the system then calculates the relative position change between them. For the step of calculating relative motion parameters, one implementation method is to directly use the difference in position coordinates to calculate the straight-line distance between the two, and estimate the relative speed by analyzing the trend of the distance change in several consecutive measurements. Another implementation method is to use vector operations, which not only calculates the distance between the two objects, but also obtains a direction vector pointing from the moving object to the target object, and the velocity component based on this direction vector, that is, the relative velocity vector. The relative velocity vector not only contains information about the magnitude of the velocity, but also includes direction information, which is crucial for simulating sound effects adjustments such as the Doppler effect. In addition, in order to improve the calculation efficiency and reduce unnecessary processing burdens, the system can introduce conditional judgments during the calculation process, for example, only perform detailed relative motion parameter calculations when the distance between the two objects is less than a certain threshold.

[0032] In a specific embodiment of the present invention, consider a racing game where the vehicle driven by the player is the moving object, and other racing cars or fixed road signs on the track are the target objects. Assume that the preset time period of the system is set to once per second. Whenever this time point is reached, the system will check the position information of all relevant objects. For each other racing car, the system will calculate the relative position between it and the player's vehicle, including the distance and direction between the two. If the two cars are approaching rapidly, the system will record a positive relative velocity vector; if one car is moving away from the other, a negative relative velocity vector will be recorded. For fixed road signs, although they do not move actively, as the player's vehicle moves forward, the system will also calculate the relative motion parameters relative to these fixed points. For example, when the player approaches a sign at a bend, the system will detect a gradually decreasing distance and the corresponding approaching speed. This continuous calculation of relative motion parameters enables the system to respond in real time to the dynamic changes in the game, providing precise sound effect adjustments, such as Doppler tone changes or changes in sound intensity, thereby enhancing the realism and immersive experience of the game.

[0033] Furthermore, calculating the relative motion parameters of a moving object and a target object in a virtual environment includes: obtaining the velocity vector information of the moving object and the target object in the virtual environment; and calculating the relative velocity vector between the moving object and the target object based on the velocity vector information.

[0034] Among them, the velocity vector information refers to the data that describes the magnitude and direction of the movement of an object in a virtual environment; the relative velocity vector is the velocity component of the relative movement between two objects, which not only includes the magnitude of the velocity but also includes the direction information and is used to represent the movement state of one object relative to another object.

[0035] In practical applications, the system first needs to obtain the velocity vector information of the moving object and the target object from the data source of the virtual environment. This step usually relies on the physical simulation function or spatial positioning service provided by the game engine, which can provide accurate velocity data of each object in three-dimensional space. For the step of obtaining the velocity vector information, one implementation method is to directly read the internal state variables of the game engine, and these variables store the current velocity and direction information of the object. Another implementation method is to estimate the velocity through the rate of change of position, that is, to measure the position coordinates of the object at consecutive time points and calculate the change in distance between two measurements divided by the time interval to obtain the average velocity vector. No matter which method is adopted, the system needs to ensure that the obtained velocity vector information has high precision and real-time performance so that the subsequent calculations can accurately reflect the relative movement between objects.

[0036] Once the velocity vector information of the moving object and the target object is obtained, the system then calculates the relative velocity vector between the two based on this data. Specifically, the system will perform a vector subtraction operation, that is, subtract the velocity vector of the target object from the velocity vector of the moving object. If both objects are in a stationary state, then their relative velocity vector is zero, meaning that no relative movement occurs. If the moving object is moving towards the target object, then the calculated relative velocity vector will point towards the target object, and its magnitude represents the approaching speed. On the contrary, if the moving object is moving away from the target object, the relative velocity vector will point in the away direction. In addition, when the two objects are moving in different directions, the system also needs to consider the angle factor and calculate a more complex relative velocity vector. To improve the calculation efficiency and reduce the unnecessary processing burden, the system can introduce conditional judgments during the calculation process, for example, only perform detailed relative velocity vector calculations when the distance between the two objects is less than a certain threshold.

[0037] In a specific embodiment of the present invention, assume that in a racing game, the vehicle driven by the player is the moving object, while other racing cars or fixed road signs on the track are the target objects. Whenever the system reaches a preset time interval (such as once per second), the calculation process is triggered. The system first queries the game engine to obtain the speed vector information of the player's vehicle and other relevant objects. Then, the system performs a vector subtraction operation to determine the relative speed vector. For example, if the player's vehicle is traveling east at a speed of 60 kilometers per hour and an opponent's vehicle in front is traveling east at a speed of 50 kilometers per hour, then the relative speed vector between the two will be 10 kilometers per hour, pointing east. If the player's vehicle then turns north while the opponent's vehicle continues east, the system will recalculate the relative speed vector based on the new speed vectors, taking into account the angular difference between the two directions, and the result will be an oblique vector representing the more complex spatial relationship between the two. This continuous calculation of the relative speed vector enables the system to respond in real time to the dynamic changes in the game, providing precise adjustments to sound effects, such as Doppler pitch changes or changes in sound intensity, thereby enhancing the realism and immersive experience of the game.

[0038] Based on this, by calculating the relative motion parameters of the moving object and the target object in the virtual environment, including obtaining the speed vector information and calculating the relative speed vector, the system can capture the subtle relative position changes between the two.

[0039] Step 306: Based on the relative motion parameters, determine the first sound effect adjustment strategy corresponding to the initial sound effect and the second sound effect adjustment strategy corresponding to the background sound effect.

[0040] Among them, the relative motion parameters refer to the data set describing the relative position and speed changes between the moving object and the target object in the virtual environment, including but not limited to information such as distance, direction, and speed vector; the first sound effect adjustment strategy refers to the adjustment rules for the initial sound effect (i.e., the sound effect generated by the moving object), aiming to optimize the performance of these sound effects according to the changes in the relative motion parameters; the second sound effect adjustment strategy refers to the method specifically used to adjust the background sound effect to ensure that the background sound effect can accurately reflect the dynamic characteristics of the environment.

[0041] In practical applications, based on the calculated relative motion parameters, the system begins to determine how to adjust the background sound effects and the initial sound effects of the moving object. For the first sound effect adjustment strategy corresponding to the initial sound effects, the system pays more attention to the speed and direction changes of the moving object. When the moving object accelerates or decelerates, the frequency of the sound it produces will change, which can be simulated through the Doppler effect. For example, in a racing game, when the vehicle accelerates towards the player's position, the engine sound will become higher and sharper; while when the vehicle moves away from the player, the sound will become lower. In addition, the change in the direction of the moving object will also affect the stereo localization of the sound effect, making the sound seem to come from different directions. To achieve this, the system can adjust the balance between the left and right channels according to the relative velocity vector to provide a more realistic 3D audio experience.

[0042] For the second sound effect adjustment strategy corresponding to the background sound effects of the moving object, the system will consider the impact of relative motion on the ambient sound. For example, when the player approaches a noise source (such as traffic in the city), the background sound effects should gradually become stronger and may add more high-frequency components to simulate the feeling of getting closer. On the contrary, when the player moves away from the noise source, the background sound effects should weaken and the frequency may also become lower. In addition, if the moving object is quickly passing through different types of areas (such as from a forest into an open area), the background sound effects need to be quickly switched to reflect the significant changes in the environment. To achieve a smooth transition, the system can adopt fade-in / fade-out effects or progressive sound effect mixing.

[0043] In a specific embodiment of the present invention, in an open-world racing game, the player drives a racing car on the track, and there are the cheering sounds of NPC (non-player character) spectators on both sides of the track as background sound effects. As a fast-approaching opponent's racing car gradually gets closer, the relative motion parameters of the system show that the distance between the two cars is rapidly shortening. At this time, the system activates the first sound effect adjustment strategy, gradually increasing the intensity and frequency of the engine sound of the player's vehicle, and at the same time adjusting its sound effect according to the position of the opponent's racing car to simulate a realistic Doppler effect. At the same time, the system uses the second sound effect adjustment strategy to appropriately weaken the NPC sound in the background sound effects according to the speed of the player's racing car and the changes in the surrounding environment, creating a tense and exciting race atmosphere. This meticulous sound effect adjustment not only enhances the realism of the game but also helps the player better perceive the dynamic changes around, enhancing the immersion and interactivity of the race.

[0044] Further, based on the relative motion parameters, determine the first sound effect adjustment strategy corresponding to the initial sound effect and the second sound effect adjustment strategy corresponding to the background sound effect, including: when the relative motion parameters indicate that the moving object is approaching the target object, determine the first sound effect adjustment strategy as the highlighting strategy and the second sound effect adjustment strategy as the shielding strategy; when the relative motion parameters indicate that the moving object is moving away from the target object, determine the first sound effect adjustment strategy as the shielding strategy and the second sound effect adjustment strategy as the highlighting strategy.

[0045] Among them, the relative motion parameters refer to the data set describing the relative position and speed changes between the moving object and the target object in the virtual environment, including but not limited to information such as distance, direction, and velocity vector. The highlighting strategy aims to enhance the salience of specific sound effects to make them more prominent; while the shielding strategy aims to reduce or suppress the influence of certain sound effects to make other sound elements more obvious.

[0046] In practical applications, the system determines how to adjust the initial sound effect and background sound effect of the moving object based on the calculated relative motion parameters. When the relative motion parameters indicate that the moving object is approaching the target object, the system will adopt the highlighting strategy as the first sound effect adjustment strategy, increasing the intensity of the sound effect emitted by the moving object itself or introducing new sound effect elements to enhance the auditory experience. For example, in a racing game, when a racing car approaches the player's position, the engine sound of the player's vehicle will become higher and sharper, simulating the real Doppler effect. At the same time, for the background sound effect, the system will apply the shielding strategy as the second sound effect adjustment strategy, appropriately weakening the intensity of the background sound effect or reducing its complexity, such as reducing the volume of cheers and applause, to avoid masking the sound of the moving object.

[0047] On the contrary, when the relative motion parameters show that the moving object is moving away from the target object, the system will switch to a different adjustment strategy. At this time, the first sound effect adjustment strategy becomes the shielding strategy, meaning that the system will weaken the sound effect generated by the moving object itself, so that these sounds will not be too obtrusive. For example, as the player's vehicle drives away from the bustling market, the engine sound and other driving noises of the vehicle will gradually become lower, reflecting the fact that the moving object is moving away. At the same time, for the background sound effect, the system will adopt the highlighting strategy as the second sound effect adjustment strategy, restoring and enhancing the intensity or richness of the background sound effect. For example, the cheering sounds of NPCs will gradually resume, helping the player to better perceive the surrounding environment.

[0048] In a specific embodiment of the present invention, in an open-world racing game, the player drives a racing car on a track, and there are cheering sounds from NPC spectators on both sides of the track as background sound effects. When an opponent's racing car starts to approach rapidly, the relative motion parameters of the system show that the distance between the two cars is rapidly shortening. At this time, the system activates a highlighting strategy as the first sound effect adjustment strategy, gradually increasing the intensity and frequency of the engine sound of the player's vehicle to simulate a realistic Doppler effect. At the same time, according to the speed of the player's racing car and the changes in the surrounding environment, the system uses a shielding strategy as the second sound effect adjustment strategy to appropriately weaken the NPC voices in the background sound, creating a tense and exciting race atmosphere. On the contrary, when the opponent's racing car gradually moves away, the system reverses the adjustment strategy: the background sound gradually resumes, while the sound of the opponent's vehicle gradually weakens, reflecting the fact that the opponent's vehicle is moving away. Such dynamic adjustment not only enhances the realism of the game but also helps the player better perceive the dynamic changes around, enhancing the immersion and interactivity of the race.

[0049] Based on this, by determining the first sound effect adjustment strategy corresponding to the initial sound effect and the second sound effect adjustment strategy corresponding to the background sound effect based on the relative motion parameters, the system can provide a highly immersive audio experience.

[0050] Furthermore, determining the first sound effect adjustment strategy as the highlighting strategy includes: obtaining the initial audio frequency and the medium propagation rate parameter of the initial sound effect; calculating the updated audio frequency based on the initial audio frequency, the medium propagation rate parameter, and the relative motion parameter, where the updated audio frequency is greater than the initial audio frequency; determining the highlighting strategy based on the initial audio frequency and the updated audio frequency; determining the second sound effect adjustment strategy as the shielding strategy includes: obtaining the initial volume parameter and the shielding volume parameter of the background sound effect; based on the initial volume parameter and the shielding volume parameter.

[0051] Among them, the initial audio frequency refers to the original frequency of the sound emitted by the moving object in a stationary or uniform linear motion state; the medium propagation rate parameter refers to the speed at which sound propagates in a specific environment, such as the speed of sound in air is about 343 meters per second; the updated audio frequency is the new frequency calculated based on the Doppler effect. Usually, when the moving object approaches the target object, this frequency will be higher than the initial audio frequency; the highlighting strategy aims to enhance the salience of a specific sound effect, making it more prominent; the shielding strategy is to reduce the influence of certain sound effects without completely eliminating them, making other sound elements more obvious.

[0052] In practical applications, when the system determines that the relative motion parameters indicate that the moving object is approaching the target object, it will activate the highlighting strategy as the first audio adjustment strategy. First, the system obtains the initial audio of the moving object, its initial audio frequency, and the medium propagation rate parameter. For example, in a racing game, the initial audio frequency of the player's vehicle engine sound may be 500 Hz, and the medium propagation rate (i.e., the speed of sound in air) is approximately 343 m / s. Next, based on these parameters and the previously calculated relative velocity vector information, the system uses the Doppler effect formula to calculate the updated audio frequency. For the step of calculating the updated audio frequency, one implementation is to directly apply the Doppler frequency shift formula to calculate. If the calculation result shows that the updated audio frequency is greater than the initial audio frequency, this indicates that the moving object is approaching the target object rapidly, so the highlighting strategy needs to be adopted to enhance the expressiveness of the audio. Finally, the system determines the specific details of the highlighting strategy according to the difference between the initial audio frequency and the updated audio frequency, such as adjusting the pitch, increasing the volume, or adding high-frequency components, etc., to ensure that the sound of the moving object is clearer and more attention-grabbing.

[0053] When the system detects that the relative motion parameters indicate that the moving object is moving away from the target object, it will activate the shielding strategy as the second audio adjustment strategy. This process starts with obtaining the initial volume parameter of the background audio and the shielding volume parameter. For example, in a racing game, the background audio can include the cheers of the audience, and its initial volume parameter may be 80 dB. The shielding volume parameter refers to the volume value that needs to be reduced to achieve the shielding effect, which can be set according to the intention of the game designer and the requirements of the current scene. For the step based on the initial volume parameter and the shielding volume parameter, the system will decide how to adjust the volume of the background audio according to these two parameters. One implementation is to simply reduce the volume of the background audio to the preset shielding volume level, and another more complex way is to gradually weaken the background audio through a fade-in and fade-out effect, or use dynamic range compression technology to maintain the presence of the background audio but reduce its influence. This adjustment can help the player better focus on the audio generated by the moving object itself, improving the immersion and interactive experience of the game.

[0054] In a specific embodiment of the present invention, in an open-world racing game, when an opponent's racing car approaches the player rapidly, the system first obtains the initial audio frequency of the opponent's vehicle engine sound (e.g., 500 Hz) and the medium propagation rate of sound in the air (about 343 m / s). Based on these parameters and the calculated relative motion parameters, which indicate that the opponent's car is approaching the player at a high speed, the system uses the Doppler effect formula to calculate and update the audio frequency. Since the relative velocity vector between the two cars indicates a rapid approach, the updated audio frequency is higher than the initial audio frequency, for example, increasing from 500 Hz to 600 Hz. Based on the difference between the initial audio frequency and the updated audio frequency, the system determines a highlighting strategy to gradually enhance the pitch and volume of the opponent's vehicle engine sound, making the sound appear more urgent and louder, simulating a realistic approaching effect.

[0055] Meanwhile, to ensure that the player can hear the approaching opponent's vehicle sound more clearly, the system activates a second sound effect adjustment strategy - the shielding strategy. The system obtains the initial volume parameter of the current background sound effect (such as 80 dB) and the preset shielding volume parameter (e.g., reduced to 60 dB). Based on these two, the system gradually weakens the environmental noises in the background sound effect, such as wind sounds and distant traffic sounds, thereby making the sound of the opponent's vehicle more prominent. This meticulous sound effect adjustment not only enhances the realism of the game but also helps the player better perceive the dynamic changes around, increasing the tension and immersive experience of the race. In this way, the system can provide highly realistic and coherent audio feedback in the virtual environment, enabling the player to be more deeply immersed in the game world.

[0056] Based on this, by determining the first sound effect adjustment strategy as the highlighting strategy and the second sound effect adjustment strategy as the shielding strategy, the system can provide a highly immersive audio experience. This method allows the system to flexibly adjust the sound effects according to the dynamic situations within the virtual world, ensuring the authenticity and coherence of the audio both in static and dynamic scenarios.

[0057] Step 308: Adjust the initial sound effect based on the first sound effect adjustment strategy and adjust the background sound effect based on the second sound effect adjustment strategy.

[0058] Among them, the first sound effect adjustment strategy refers to a series of rules and methods for adjusting the initial sound effect of a moving object according to relative motion parameters; the second sound effect adjustment strategy refers to the principle for adjusting the background sound effect, aiming to ensure that the background sound effect can reflect the influence of relative motion in the virtual environment. These two strategies work together to achieve a more realistic and immersive audio experience.

[0059] In actual applications, the system first applies the first sound effect adjustment strategy to adjust the initial sound effect of the moving object. That is, according to the relative motion parameters calculated previously, such as the relative velocity vector, the system will change the sound effect characteristics related to the moving object. For example, if the moving object is accelerating towards the target object, the frequency of the sound it emits will become higher due to the Doppler effect, and the volume will gradually increase. The system can simulate this effect by adjusting the parameters of the audio player in real time, such as pitch, volume, etc. For the step adjustment of the initial sound effect, one implementation method is to directly modify the attribute value of the audio file, and another implementation method is to use dynamic audio processing technology, such as using audio filters or synthesizers, to generate sounds that match the current situation at runtime. In addition, in order to ensure the smoothness of sound changes, the system can adopt a progressive adjustment method to avoid sudden sound effect jumps, thereby providing a more natural auditory experience.

[0060] Next, the system applies the second sound effect adjustment strategy to adjust the background sound effects. Background sound effects typically include persistent sound elements in the environment, such as wind, rain, and the hustle and bustle of the city. Depending on the relative motion parameters, these sounds may need to be enhanced, weakened, or completely replaced to better reflect the change in the player's location. For example, when the player enters a busy market from a quiet forest, the background sound effects should gradually change from birdsong and rustling leaves to the noise of the crowd and the hawking of vendors. To achieve this, the system may mix multiple pre-recorded audio clips or create new background sound effects through procedural generation technology. Similarly, the system can also use fade-in and fade-out effects to make the transition between background sound effects smoother. For step adjustment of background sound effects, the system can intelligently select the background sound effects that best suit the current scene based on the relative distance and direction between the moving object and different environmental elements, and make appropriate adjustments to them, such as volume control, equalizer settings, etc.

[0061] In a specific embodiment of the present invention, consider a racing game in which a player drives a vehicle as a moving object, and the surrounding spectators and other vehicles are target objects. When the opponent's vehicle accelerates to overtake the player, the system gradually increases the pitch and volume of the engine sound based on the first sound effect adjustment strategy to simulate the effect of the vehicle approaching quickly. At the same time, the background sound effect also changes, and the system weakens the noisy sound of the audience according to the second sound effect adjustment strategy. As the opponent's vehicle overtakes the player and moves away, the engine sound changes again, becoming low and rapidly weakened, reflecting the fact that the vehicle is moving away. The background sound effect is correspondingly restored to the general noise level of the competition venue. Such dynamic adjustment not only allows players to feel a more realistic game atmosphere, but also improves the immersion and interactivity of the game.

[0062] Further, after calculating the relative motion parameters of the moving object and the target object in the virtual environment, it further includes: when the relative motion parameters are greater than the parameter threshold, determining the first sound effect adjustment strategy corresponding to the initial sound effect as the default strategy, and determining the second sound effect adjustment strategy corresponding to the background sound effect as the default strategy.

[0063] Among them, the parameter threshold is a critical value preset by the system, used to determine whether to apply the default strategy to prevent frequent calculations and not perform sound effect processing at relatively long distances; the default strategy is a set of simplified and stable sound effect adjustment rules, ensuring the consistency and coherence of the sound effects even in extreme cases.

[0064] In practical applications, after the system completes the calculation of the relative motion parameters between the moving object and the target object in the virtual environment, it will further check whether these parameters exceed the preset parameter threshold. When it is detected that the relative motion parameters exceed the threshold, in order to prevent frequent calculations and not perform complex sound effect processing at relatively long distances, the system determines the first sound effect adjustment strategy corresponding to the initial sound effect as the default strategy, and also determines the second sound effect adjustment strategy corresponding to the background sound effect as the default strategy. That is, when the distance between the moving object and the target object is too large or their relative speed is too high, the system will not perform complex Doppler effects or other dynamic sound effect adjustments, but adopt a set of basic and static sound effect settings. For the step of determining the default strategy, one implementation method is to directly restore the background sound effect and the initial sound effect to the preset basic state, that is, without any special dynamic adjustments, but maintaining a fixed volume, frequency, and other attributes. Another implementation method is that in the case of exceeding the threshold, the system can gradually reduce the dynamic adjustment of the sound effect until it stops completely, rather than immediately switching to the default strategy, so as to avoid the discomfort brought to the player by sudden changes. In addition, the system can also flexibly set the parameter threshold according to actual needs to adapt to different types of game scenarios and performance requirements.

[0065] In a specific embodiment of the present invention, in an open-world racing game, a player drives a racing car on a track. When an opponent car approaches gradually, the relative motion parameters of the system show that the distance between the two cars is rapidly shortened, but it does not exceed the parameter threshold. Therefore, the system adjusts the sound effects according to the normal highlighting and shielding strategies, so that the engine sound of the opponent vehicle gradually becomes more obvious, and the natural sound in the background sound effect is appropriately weakened, creating a tense and exciting transition effect. However, if the opponent car suddenly accelerates to an extremely high speed, causing the relative motion parameter to exceed the preset threshold, the system will immediately switch to the default strategy. In this case, the background sound effects (NPC cheering sounds) and the initial sound effects (such as the engine sound of the opponent vehicle) will be adjusted to the preset basic state, and no complex dynamic adjustments will be made. This can prevent sound distortion caused by extreme speed changes, while reducing unnecessary computing burdens and ensuring the effective use of system resources. On the contrary, if the distance between the two cars becomes very far, the system will also trigger the default strategy to maintain the basic state of the background sound effects and the initial sound effects without additional sound effect processing, thereby optimizing the performance in remote situations. In this way, the system can intelligently manage sound processing frequencies in different situations to provide a smoother and more efficient audio experience.

[0066] Based on this, the application of the default strategy can also help the system optimize performance, reduce unnecessary computing burdens, and ensure efficient use of resources. In this way, the system can effectively manage the frequency and range of sound processing, avoid unnecessary complex calculations at large distances or extreme speeds, thereby improving overall efficiency and the quality of user experience.

[0067] Furthermore, at every preset time period, the relative motion parameters of the mobile object and the target object in the virtual environment are calculated, wherein the relative motion parameters are used to indicate the relative motion between the mobile object and the target object, and also include: obtaining the distance parameters of the mobile object and the target object in the virtual environment; when the distance parameter is greater than a preset distance threshold, adjusting the length of the preset time period.

[0068] The distance threshold is a critical distance value preset by the system. When the actual distance exceeds this value, the system will adjust the calculation frequency to optimize performance; the preset period refers to the time interval preset by the system, during which a calculation process will be triggered.

[0069] In practical applications, in order to prevent excessive calculations from reducing the refresh rate, the system first needs to obtain the distance parameters of the moving object and the target object in the virtual environment. This step usually relies on the physical simulation function or spatial positioning service provided by the game engine, which can provide accurate position data of each object in three-dimensional space. For the step of obtaining the distance parameters, one implementation method is to directly read the state variables inside the game engine, which store the current position information of the object. Another implementation method is to determine the distance parameters by measuring the position coordinates of the object at two consecutive time points and calculating the straight-line distance between the two. Regardless of which method is used, the system needs to ensure that the distance parameters obtained are highly accurate and real-time, so as to subsequently determine whether the length of the preset time period needs to be adjusted.

[0070] Once the distance parameter is obtained, the system next checks whether the distance is greater than a preset distance threshold. If the distance does exceed the threshold, it indicates that the distance between the moving object and the target object is far enough that frequent relative motion parameter calculations become unnecessary. At this point, the system will adjust the length of the preset time period to extend the calculation cycle, thereby reducing the calculation frequency. Specifically, for the step of adjusting the length of the preset time period, one implementation method is to simply increase the time interval, for example, from once per second to once every two seconds. Another more flexible way is to dynamically adjust the time interval according to the degree to which the actual distance exceeds the threshold, that is, the farther the distance, the lower the calculation frequency. This method not only reduces unnecessary calculation burden, but also ensures that a higher calculation frequency can be maintained at a closer distance, ensuring the accuracy and timeliness of sound effect adjustment.

[0071] In a specific embodiment of the present invention, in an open-world racing game, a player drives a car on a winding track. Whenever the system reaches a preset time interval (such as once per second), the calculation process will be triggered. The system first queries the game engine to obtain the position information of the player's vehicle and other related objects, and then calculates the distance parameters between them. If the system finds that the distance between the player's vehicle and another fast-approaching opponent car exceeds a preset distance threshold, such as 500 meters, the system will automatically adjust the length of the preset period to reduce the calculation frequency from once per second to once every five seconds. This can significantly reduce the amount of calculation, especially when the player is far away from other vehicles, avoiding the waste of system resources. On the contrary, when the distance between the two cars gradually shortens and the system detects that the relative motion parameters indicate that the opponent car is approaching quickly, the calculation frequency will be restored to the original once per second, ensuring that the changes in relative motion can be captured in time, providing accurate sound effect adjustments, such as Doppler pitch changes or changes in sound intensity, thereby enhancing the realism and immersive experience of the game. In this way, the system can intelligently manage the sound effect processing frequency in different situations and provide a smoother and more efficient audio experience.

[0072] Based on this, by obtaining the distance parameter before calculating the relative motion parameters between the moving object and the target object in the virtual environment at every preset time period and adjusting the length of the preset time period when the distance parameter is greater than the preset distance threshold, the system can intelligently manage computing resources in different situations. This method not only effectively prevents over-computation, reduces the refresh rate of the system, and improves efficiency, but also ensures that a reasonable sound processing frequency can be maintained even at a large distance.

[0073] One embodiment of the present invention realizes obtaining the background sound effects of a virtual environment and the initial sound effects of a moving object in the virtual environment; calculating the relative motion parameters of the moving object and the target object in the virtual environment at every preset time period, wherein the relative motion parameters are used to indicate the relative motion between the moving object and the target object; determining the first sound effect adjustment strategy corresponding to the initial sound effect and the second sound effect adjustment strategy corresponding to the background sound effect based on the relative motion parameters; adjusting the initial sound effect based on the first sound effect adjustment strategy, and adjusting the background sound effect based on the second sound effect adjustment strategy. Calculating the relative motion parameters between the moving object and the target object in the virtual environment at every preset time period, including the relative velocity vector. Based on these relative motion parameters, dynamically determining and adjusting the sound effect parameters of the initial sound effect and the background sound effect in the virtual environment. In this way, the system can simulate the phenomenon that the sound changes with the relative motion in reality, enhance the authenticity and immersion of the game sound effects, make the player experience more vivid and realistic, and thus improve user satisfaction.

[0074] See also Figure 4 , Figure 4 This is a system architecture diagram of an audio adjustment system provided by an embodiment of the present invention, and the architecture includes a game engine, a server and a sound effect output terminal. The game engine is responsible for providing real-time status information of the virtual environment, including background sound effects and initial sound effects of moving objects, as well as the position and speed data of these objects. After the server obtains this information from the game engine, it calculates the relative motion parameters between the moving object and the target object at preset time intervals, including the relative velocity vector, and dynamically determines and adjusts the sound effect parameters of the initial sound effect and the background sound effect based on these parameters. The adjusted sound effect data is sent to the sound effect output terminal, which is responsible for the final sound playback. In this way, the system can simulate the phenomenon that sound changes with relative motion in reality, enhance the authenticity and immersion of the game sound effects, make the player experience more vivid and realistic, and thus improve user satisfaction.

[0075] The following combination Figure 5 Taking the application of the sound effect adjustment method provided by the present invention in a game where vehicles, bullets, etc. approach the player as an example, the sound effect adjustment method is further described. Figure 5 It is a processing flow chart of an audio adjustment method provided by an embodiment of the present invention, which specifically includes the following steps.

[0076] Step 502: Obtain position and velocity information.

[0077] Specifically, obtain the player's position and the current position and velocity vector information of fast-moving objects (such as bullets, vehicles, other players, etc.). The position and velocity data are usually calculated in real time by the game physics module.

[0078] Step 504: Calculate the relative velocity.

[0079] Specifically, by calculating the velocity vectors of the player and the object, the relative velocity between the two is obtained. The relative velocity calculation formula is: V relative =V object −V player where Vobject is the velocity vector of the fast-moving object, and Vplayer is the velocity vector of the player.

[0080] Determine whether the object is approaching or moving away from the player according to the direction of the relative velocity. If the relative velocity direction points to the player, it means the object is approaching; if the direction is away, it means the object is moving away from the player.

[0081] Step 506: Doppler frequency shift calculation.

[0082] Specifically, according to the Doppler effect, when the sound source approaches the observer, the audio frequency will increase; when the sound source moves away from the observer, the audio frequency will decrease.

[0083] The calculation formula for the Doppler frequency shift is as follows:

[0084] where f' is the adjusted frequency; f is the original audio frequency; c is the speed of sound (usually 343 m / s); vlistener is the speed of the receiver (player); vsource is the speed of the sound source (such as the speed of a bullet, vehicle, or other player character). The system calculates the frequency shift according to the relative velocity and the direction of motion. This shift is used to dynamically adjust the audio frequency, making the sound effect present pitch changes when approaching or moving away, enhancing the realism.

[0085] Step 508: Dynamic frequency adjustment.

[0086] Specifically, adjust the audio playback frequency in real time according to the frequency shift value. If the relative velocity direction points to the player (i.e., approaching), then increase the audio playback frequency to make the sound pitch higher; if the relative velocity direction points away from the player (i.e., moving away), then decrease the audio playback frequency to make the sound pitch lower. To avoid the abruptness caused by frequency changes, the system uses a smooth transition algorithm to gradually change the frequency adjustment, ensuring the coherence and naturalness of the sound effect.

[0087] Step 510: Condition detection.

[0088] Specifically, set a speed threshold. Only when the relative speed exceeds this threshold will the Doppler effect calculation and audio frequency adjustment operations be triggered. When the relative speed is low, no frequency adjustment is performed to reduce the computational load and resource consumption. For example, in a shooting game, only when the relative speed of the bullet or the enemy reaches a certain threshold will the Doppler effect be processed to ensure the effective utilization of the computing resources of the sound effect system.

[0089] Step 512: If the condition is met, optimize the sound effects and resources.

[0090] Specifically, use an audio analysis tool (such as FFT - Fast Fourier Transform) to perform spectral analysis on all audio signals in the game scene to identify the frequency range and intensity of background noise. The noise may come from wind sounds, engine sounds, ambient dialogues, etc. Obtain the ambient audio input of the current scene (usually provided by the game engine audio module); perform real - time spectral decomposition on the audio signal to extract the main frequency components of the noise; record the intensity and covered frequency band of the noise and store it in the noise analysis module.

[0091] Dynamically adjust the sound effect parameters related to the Doppler effect to enhance the important sound effects that players can perceive (such as the sound of a bullet approaching quickly). Based on the intensity and spectral data of the background noise, identify the sound effects most relevant to player interaction (such as the flying sound of a bullet or the sound of a vehicle passing by); assign higher priorities to important sound effects, increase the volume or adjust the frequency offset value; dynamically adjust the sound effect parameters masked by the background noise, such as increasing the high - frequency components (to penetrate the low - frequency noise); weaken the background noise that has no direct effect on the player and highlight the key sound effects.

[0092] Use a sound effect priority algorithm to dynamically sort the sound effects. Determine the priorities of all sound effects in the scene (through a weight formula, considering distance, relative speed, importance of the sound source, etc.); according to the coverage range of the current background noise, adjust the volume of the sound effects with low priorities (such as distant background sounds) so that the sound effects with high priorities (such as the sound of an approaching bullet) are clearer; feed the noise data back to the Doppler effect calculation module in real - time to optimize the frequency adjustment results and keep the key sound effects coherent and realistic in a complex environment.

[0093] Use a timer or trigger to control the refresh frequency of the Doppler effect calculation. When the hardware performance is poor (such as on low - end devices) or the game load is high (such as in a complex scene during a multiplayer battle), reduce the refresh frequency of the Doppler effect calculation; dynamically adjust the calculation refresh period according to the distance between the player and the sound source. For example, when the sound source is far from the player, reduce the number of frequency adjustments; when the sound source approaches the player, increase the calculation frequency to ensure the real - time performance of the key sound effects.

[0094] Adjust the calculation accuracy of the Doppler effect according to the scenario requirements. In scenarios with high-performance requirements (such as when a bullet is flying rapidly towards the player), improve the calculation accuracy: consider the precise speed and direction values after the decimal point; improve the accuracy of audio frequency shift; in scenarios with low-performance requirements (such as when the sound source is far from the player and the change is not significant), reduce the calculation accuracy: only process integer speeds or large changes; ignore insignificant sound effect changes to save calculation resources.

[0095] Reduce unnecessary Doppler effect calculations through relative speed threshold detection. Set a relative speed threshold (e.g., 5 m / s). When the relative speed between the sound source and the player is lower than this threshold, no Doppler effect calculation is performed. For example: activate the frequency adjustment module only when the speed of fast-moving objects such as bullets and vehicles exceeds the threshold; disable Doppler calculation in a stationary or low-speed state (such as when the player stands still) to reduce the calculation overhead.

[0096] Use a timer or trigger to control the refresh frequency of the Doppler effect calculation. When the hardware performance is poor (such as on low-end devices) or the game load is high (such as in a complex multiplayer battle scenario), reduce the refresh frequency of the Doppler effect calculation. Dynamically adjust the calculation refresh period according to the distance between the player and the sound source. When the sound source is far from the player, reduce the number of frequency adjustments; when the sound source approaches the player, increase the calculation frequency to ensure the real-time nature of key sound effects.

[0097] Adjust the calculation accuracy of the Doppler effect according to the scenario requirements. Improve the calculation accuracy in scenarios with high-performance requirements (such as when a bullet is flying rapidly towards the player); reduce the calculation accuracy in scenarios with low-performance requirements (such as when the sound source is far from the player and the change is not significant). Reduce unnecessary Doppler effect calculations through relative speed threshold detection. Set a relative speed threshold (e.g., 5 m / s). When the relative speed between the sound source and the player is lower than this threshold, no Doppler effect calculation is performed.

[0098] Step 514: The condition is not met, so do not optimize the sound effects and resources.

[0099] Specifically, when the condition is not met, the system will not execute the above optimization measures and will maintain the default sound effects and resource usage status.

[0100] Step 516: Output the sound effects.

[0101] Specifically, use the calculated frequency shift to dynamically adjust the playback frequency of the sound effects, thereby implementing the Doppler effect. Ensure that the sound effect processing of the Doppler effect is smoothly integrated into the game sound system to achieve the invocation and control of the module. Provide a standardized interface to make it flexibly applicable to various game scenarios that need to simulate the Doppler effect.

[0102] Through the combination of the above steps and technical content, the system can effectively simulate the phenomenon that sound changes with relative motion in reality, enhancing the authenticity and immersion of game sound effects, making the player experience more vivid and realistic, thereby improving user satisfaction.

[0103] See Figure 6 , Figure 6 which is a schematic diagram of a Doppler frequency shift calculation module provided by an embodiment of the present invention. The module includes the following key parts: a position and velocity information acquisition unit for real-time acquisition of the position and velocity vector information of the player and the fast-moving object; a relative velocity calculation unit for determining the relative velocity by calculating the velocity vector difference between the player and the object and judging whether the object is approaching or moving away from the player; a Doppler effect calculation unit for calculating the offset of the audio frequency according to the Doppler effect formula to ensure the correct pitch change when approaching or moving away; a frequency dynamic adjustment unit responsible for real-time adjustment of the audio playback frequency according to the calculated frequency offset value, adopting a smooth transition algorithm to ensure the coherence and naturalness of the sound effect; a condition detection unit for setting a relative velocity threshold and triggering the Doppler effect calculation only when the relative velocity exceeds the threshold, reducing unnecessary consumption of computing resources.

[0104] See Figure 7 , Figure 7 which is a schematic diagram of an integrated interface provided by an embodiment of the present invention, aiming to seamlessly integrate the Doppler frequency shift calculation module into the game sound effect system. The interface includes multiple input and output ports: an audio signal input port for receiving the original audio signal from the game scene; a background noise analysis port connected to the environmental noise detection module for identifying the frequency range and intensity of the background noise; a sound effect priority management port for docking with the complex environment adaptation module to dynamically adjust the priority and parameters of the sound effect; a Doppler effect control port for receiving and processing the Doppler effect calculation result to optimize the sound effect performance; a performance optimization control port for dynamically adjusting the calculation frequency and accuracy according to the hardware performance and game load; an audio signal output port for outputting the audio signal adjusted by the Doppler effect to ensure the authenticity and immersion of the sound effect. Through the coordinated work of these ports, the integrated interface realizes the efficient management and optimization of the sound effect system, improving the overall game experience.

[0105] Corresponding to the above method embodiment, the present invention also provides an embodiment of a sound effect adjustment device. Figure 8 which is a structural schematic diagram of a sound effect adjustment device provided by an embodiment of the present invention. As Figure 8 shown, the device includes: An acquisition module 802 configured to acquire the background sound effect of the virtual environment and the initial sound effect of the moving object in the virtual environment; A calculation module 804, configured to calculate relative motion parameters of a moving object and a target object in a virtual environment at preset intervals, where the relative motion parameters are used to indicate the relative motion between the moving object and the target object; A determination module 806, configured to determine a first sound effect adjustment strategy corresponding to an initial sound effect and a second sound effect adjustment strategy corresponding to a background sound effect based on the relative motion parameters; An adjustment module 808, configured to adjust the initial sound effect based on the first sound effect adjustment strategy and adjust the background sound effect based on the second sound effect adjustment strategy.

[0106] Optionally, the calculation module 804 is further configured to obtain velocity vector information of the moving object and the target object in the virtual environment; and calculate a relative velocity vector between the moving object and the target object based on the velocity vector information.

[0107] Optionally, the determination module 806 is further configured to, when the relative motion parameters indicate that the moving object is approaching the target object, determine the first sound effect adjustment strategy as a highlighting strategy and the second sound effect adjustment strategy as a shielding strategy; and when the relative motion parameters indicate that the moving object is moving away from the target object, determine the first sound effect adjustment strategy as a shielding strategy and the second sound effect adjustment strategy as a highlighting strategy.

[0108] Optionally, the determination module 806 is further configured to obtain an initial audio frequency of the initial sound effect and a medium propagation rate parameter; calculate an updated audio frequency based on the initial audio frequency, the medium propagation rate parameter, and the relative motion parameters, where the updated audio frequency is greater than the initial audio frequency; determine a highlighting strategy based on the initial audio frequency and the updated audio frequency; obtain an initial volume parameter and a shielding volume parameter of the background sound effect; and based on the initial volume parameter and the shielding volume parameter.

[0109] Optionally, the sound effect adjustment device further includes a default module, configured to, when the relative motion parameters are greater than a parameter threshold, determine the first sound effect adjustment strategy corresponding to the initial sound effect as a default strategy and the second sound effect adjustment strategy corresponding to the background sound effect as a default strategy.

[0110] Optionally, the sound effect adjustment device further includes a preset interval adjustment module, configured to obtain a distance parameter between the moving object and the target object in the virtual environment; and adjust the length of the preset interval when the distance parameter is greater than a preset distance threshold.

[0111] Applied to the sound effect adjustment device, the sound effect adjustment device realizes the periodic calculation and dynamic sound effect adjustment of the relative motion parameters between the mobile object and the target object in the virtual environment through the coordinated work of its various modules. Specifically, the acquisition module 802 is responsible for acquiring the background sound effects of the virtual environment and the initial sound effects of the mobile object in the virtual environment, ensuring that the system has the latest audio data. Subsequently, the calculation module 804 calculates the relative motion parameters between the mobile object and the target object at every preset time period, including the relative velocity vector, to indicate the relative motion state between the two. Based on these relative motion parameters, the determination module 806 dynamically determines the first sound effect adjustment strategy corresponding to the initial sound effect and the second sound effect adjustment strategy corresponding to the background sound effect, ensuring that the adjustment strategy can reflect the real-time relative motion situation. Finally, the adjustment module 808 adjusts the initial sound effect according to the first sound effect adjustment strategy, and adjusts the background sound effect based on the second sound effect adjustment strategy, thereby realizing the dynamic adjustment of the sound effect parameters of the initial sound effect and the background sound effect in the virtual environment. In this way, the system can simulate the phenomenon that the sound changes with the relative motion in reality, enhance the authenticity and immersion of the game sound effect, make the player experience more vivid and realistic, and thus improve user satisfaction. Each module works together in sequence according to the serial number, ensuring the efficiency and accuracy of the entire process.

[0112] The above is a schematic scheme of a sound effect adjustment device of this embodiment. It should be noted that the technical scheme of the sound effect adjustment device and the technical scheme of the above-mentioned sound effect adjustment method belong to the same concept, and the details not described in detail in the technical scheme of the sound effect adjustment device can be referred to the description of the technical scheme of the above-mentioned sound effect adjustment method.

[0113] Figure 9 The block diagram of a computing device 900 provided according to an embodiment of the present invention is shown. The components of the computing device 900 include but are not limited to a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.

[0114] The computing device 900 also includes an access device 940 that enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0115] In one embodiment of the present invention, the above components of the computing device 900 and Figure 9 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 9 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present invention. Those skilled in the art may add or replace other components as needed.

[0116] The computing device 900 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 900 may also be a mobile or stationary server.

[0117] The processor 920 is used to execute the following computer program / instructions, which implement the steps of the above-mentioned sound effect adjustment method when executed by the processor.

[0118] Each embodiment of the present invention is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the sound effect adjustment method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the sound effect adjustment method embodiment.

[0119] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned sound effect adjustment method when executed by a processor.

[0120] Each embodiment of the present invention is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the sound effect adjustment method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the sound effect adjustment method embodiment.

[0121] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned sound effect adjustment method when executed by a processor.

[0122] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above-mentioned sound effect adjustment method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above-mentioned sound effect adjustment method.

[0123] The above describes specific embodiments of the present invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0124] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0125] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present invention.

[0126] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0127] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of the present invention. The present invention selects and specifically describes these embodiments in order to better explain the distance and practical application of the embodiments of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A sound effect adjustment method, characterized in that: include: Acquire background sound effects of a virtual environment and initial sound effects of moving objects in the virtual environment; At every preset time period, calculating a relative motion parameter between the moving object and the target object in the virtual environment, wherein the relative motion parameter is used to indicate the relative motion between the moving object and the target object; Determining, based on the relative motion parameter, a first sound effect adjustment strategy corresponding to the initial sound effect and a second sound effect adjustment strategy corresponding to the background sound effect; The initial sound effect is adjusted based on the first sound effect adjustment strategy, and the background sound effect is adjusted based on the second sound effect adjustment strategy.

2. The method according to claim 1, characterized in that The calculating the relative motion parameters between the moving object and the target object in the virtual environment includes: Acquiring velocity vector information of a moving object and a target object in the virtual environment; Based on the velocity vector information, a relative velocity vector between the moving object and the target object is calculated.

3. The method according to claim 1, characterized in that Determining a first sound effect adjustment strategy corresponding to the initial sound effect and a second sound effect adjustment strategy corresponding to the background sound effect based on the relative motion parameter includes: In a case where the relative motion parameter indicates that the moving object is close to the target object, determining the first sound effect adjustment strategy to be a highlighting strategy, and determining the second sound effect adjustment strategy to be a shielding strategy; When the relative motion parameter indicates that the moving object is moving away from the target object, the first sound effect adjustment strategy is determined to be a shielding strategy, and the second sound effect adjustment strategy is determined to be a highlighting strategy.

4. The method according to claim 3, characterized in that The determining that the first sound effect adjustment strategy is a highlighting strategy includes: Obtaining initial audio frequency and medium propagation velocity parameters of the initial sound effect; Calculating an updated audio frequency based on the initial audio frequency, the medium propagation velocity parameter and the relative motion parameter, wherein the updated audio frequency is greater than the initial audio frequency; Determining a highlighting strategy based on the initial audio frequency and the updated audio frequency; The determining that the second sound effect adjustment strategy is a shielding strategy includes: Obtaining an initial volume parameter and a shielding volume parameter of the background sound effect; Based on the initial volume parameter and the masking volume parameter.

5. The method according to claim 1, characterized in that After calculating the relative motion parameters between the mobile object and the target object in the virtual environment, the method further includes: When the relative motion parameter is greater than the parameter threshold, the first sound effect adjustment strategy corresponding to the initial sound effect is determined as the default strategy, and the second sound effect adjustment strategy corresponding to the background sound effect is determined as the default strategy.

6. The method according to claim 1, characterized in that Before calculating the relative motion parameters between the moving object and the target object in the virtual environment at every preset time period, wherein the relative motion parameters are used to indicate the relative motion between the moving object and the target object, the method further includes: Acquire the distance parameter between the moving object and the target object in the virtual environment; When the distance parameter is greater than a preset distance threshold, the length of the preset time period is adjusted.

7. A sound effect adjustment device, characterized in that: include: An acquisition module is configured to acquire background sound effects of a virtual environment and initial sound effects of moving objects in the virtual environment; A calculation module, configured to calculate a relative motion parameter between the moving object and the target object in the virtual environment at every preset time period, wherein the relative motion parameter is used to indicate the relative motion between the moving object and the target object; a determination module configured to determine, based on the relative motion parameter, a first sound effect adjustment strategy corresponding to the initial sound effect and a second sound effect adjustment strategy corresponding to the background sound effect; The adjustment module is configured to adjust the initial sound effect based on the first sound effect adjustment strategy, and adjust the background sound effect based on the second sound effect adjustment strategy.

8. A computing device, characterized in that include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the sound effect adjustment method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: It stores a computer program / instruction, which, when executed by a processor, implements the steps of the sound effect adjustment method described in any one of claims 1-6.

10. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the steps of the sound effect adjustment method described in any one of claims 1-6.