Sound simulation method and device in game, electronic equipment and storage medium

CN117205563BActive Publication Date: 2026-09-29NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311248980.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2026-09-29
Estimated Expiration
2043-09-25

AI Technical Summary

Technical Problem

[0004]但是,上述方法对系统资源或者存储空间有着比较高的要求,导致在小品级游戏或者对性能要求较为苛刻的手机游戏中难以负担空间音频的高消耗,从而导致声音模拟效果较差

Benefits of technology

[0020]本申请提供一种游戏中的声音模拟方法、装置、电子设备及存储介质,通过预先采集制作好不同类型的待模拟声音对应的开阔环境混响声音样本以及封闭环境混响声音样本,从而根据发出待模拟声音的发声体所处空间的空间环境封闭度,可确定待模拟声音对应的混响声音模拟参数,从而采用混响声音模拟参数对待模拟声音对应的开阔环境混响声音样本以及封闭环境混响声音样本进行声音属性调整后,生成待模拟的声音对应的开阔环境混响声音和封闭环境混响声音,在对待模拟的声音对应的开阔环境混响声音和封闭环境混响声音进行混音播放后,对于聆听者而言,听到的声音播放效果则与待模拟的声音在空间中经过传播到达聆听者耳中的效果相同,从而实现了声音在空间中传播时混音音效的模拟。本方法只需要预先制作待模拟声音对应的开阔环境混响声音样本以及封闭环境混响声音样本即可,且相同类型的待模拟声音对应的开阔环境混响声音样本以及封闭环境混响声音样本可以相同,从而无需预先制作大批量的声音样本,可减少内存占用;另外,根据待模拟的声音对应的混响声音模拟参数对开阔环境混响声音样本以及封闭环境混响声音样本进行调整,可实现简单快速的声音混音效果模拟,通过两个样本声音完成各种复杂空间下的声音混音效果模拟,泛用性较强,开发成本低,系统消耗小,且方法执行效率较高,且由于混响声音模拟参数是根据待模拟的声音在所处空间环境封闭度下的实际混响音效确定的,提高了模拟生成的开阔环境混响声音和封闭环境混响声音的准确性,提升了声音混音音效的模拟效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117205563B_ABST
    Figure CN117205563B_ABST
Patent Text Reader

Abstract

The application provides a sound simulation method and device in a game, electronic equipment and a storage medium, and relates to the technical field of games. The method only needs to pre-produce open environment reverberation sound samples and closed environment reverberation sound samples corresponding to the sound to be simulated, and the open environment reverberation sound samples and the closed environment reverberation sound samples corresponding to the same type of sound to be simulated can be the same, so that a large number of sound samples do not need to be pre-produced, the memory occupation can be reduced, and the sound mixing effect simulation can be realized by adjusting the open environment reverberation sound samples and the closed environment reverberation sound samples according to the reverberation sound simulation parameters corresponding to the sound to be simulated. The sound mixing effect simulation in various complex spaces is completed through two sample sounds, the method has strong universality, low development cost, small system consumption, and high execution efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technology, and more specifically, to a method, apparatus, electronic device, and storage medium for simulating sound in games. Background Technology

[0002] Sound propagation simulation technology in games is a technique applied in game development to enhance the immersion and realism of games. It involves addressing multiple technical challenges, including sound source localization, environmental simulation, and multi-channel sound, making it technically demanding. Simulating the natural propagation of sound within games using digital methods has always been a cutting-edge research topic in game audio development.

[0003] Currently, commonly used sound propagation simulation technologies mainly include two stages: spatial environment acquisition and acoustic simulation. The spatial environment acquisition stage obtains the specific environment and terrain effects in the game through prefabricated spatial components or ray detection, so that the game engine can clearly understand which objects will affect the propagation of sound. The acoustic simulation stage simulates the propagation of sound by processing audio signals in real time or recording a large number of spatial reverberation samples in different spaces and switching between them.

[0004] However, the above methods have relatively high requirements for system resources or storage space, making it difficult for small-scale games or mobile games with demanding performance requirements to bear the high consumption of spatial audio, resulting in poor sound simulation effects. Summary of the Invention

[0005] The purpose of this application is to provide a method, device, electronic device, and storage medium for simulating sound in games, so as to achieve convenient and efficient sound mixing effect simulation.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0007] In a first aspect, embodiments of this application provide a sound simulation method for games, including:

[0008] Obtain reverberation sound samples from open and closed environments corresponding to the sound to be simulated;

[0009] Based on the spatial enclosure degree of the sound-emitting body corresponding to the sound to be simulated, and the mapping relationship between the spatial enclosure degree and the reverberation sound simulation parameters, the reverberation sound simulation parameters corresponding to the sound to be simulated are determined.

[0010] Based on the reverberation sound simulation parameters, the open environment reverberation sound sample, and the closed environment reverberation sound sample, generate the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated;

[0011] The reverberant sound from the open environment and the reverberant sound from the enclosed environment are mixed and then played back to present the playback sound effect of the sound to be simulated under the enclosedness of the spatial environment.

[0012] Secondly, embodiments of this application also provide a sound simulation device for games, including: an acquisition module, a determination module, a processing module, and a playback module;

[0013] The acquisition module is used to acquire open environment reverberation sound samples and closed environment reverberation sound samples corresponding to the sound to be simulated.

[0014] The determining module is used to determine the reverberation simulation parameters corresponding to the sound to be simulated based on the spatial environment enclosure degree of the sound-emitting body corresponding to the sound to be simulated, and the mapping relationship between the spatial environment enclosure degree and the reverberation sound simulation parameters.

[0015] The processing module is used to generate open environment reverberation sound and closed environment reverberation sound corresponding to the sound to be simulated based on the reverberation sound simulation parameters, the open environment reverberation sound sample, and the closed environment reverberation sound sample.

[0016] The playback module is used to mix the reverberation sound of the open environment and the reverberation sound of the enclosed environment and then play it to present the playback sound effect of the sound to be simulated under the enclosedness of the spatial environment.

[0017] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the sound simulation method in the game provided in the first aspect.

[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the sound simulation method in a game as provided in the first aspect.

[0019] The beneficial effects of this application are:

[0020] This application provides a sound simulation method, device, electronic device, and storage medium for games. By pre-collecting and preparing open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to different types of sounds to be simulated, the reverberation sound simulation parameters corresponding to the sound to be simulated can be determined based on the spatial environment enclosure of the space where the sound source is located. After adjusting the sound attributes of the open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated using the reverberation sound simulation parameters, open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated are generated. After mixing and playing the open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated, the sound playback effect heard by the listener is the same as the effect of the sound to be simulated propagating in space and reaching the listener's ear, thereby realizing the simulation of the mixed sound effect when sound propagates in space. This method only requires pre-creating open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated. Furthermore, the open-environment and closed-environment reverberation sound samples corresponding to the same type of sound to be simulated can be identical, thus eliminating the need to pre-create a large number of sound samples and reducing memory usage. In addition, by adjusting the open-environment and closed-environment reverberation sound samples according to the reverberation simulation parameters corresponding to the sound to be simulated, a simple and fast sound mixing effect simulation can be achieved. It can simulate sound mixing effects in various complex spaces using only two sample sounds, demonstrating strong versatility, low development cost, low system consumption, and high execution efficiency. Moreover, since the reverberation simulation parameters are determined based on the actual reverberation effect of the sound to be simulated in the closed environment, the accuracy of the generated open-environment and closed-environment reverberation sounds is improved, enhancing the simulation effect of the sound mixing.

[0021] In addition, by correcting the reverberation sound in open and closed environments based on the differences between the spatial environment of the sound source and the spatial environment of the listener, the simulation effect can be effectively improved. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart illustrating a sound simulation method in a game, provided as an embodiment of this application;

[0024] Figure 2A flowchart illustrating another sound simulation method in a game provided in this application embodiment;

[0025] Figure 3 A flowchart illustrating yet another sound simulation method in a game provided in this application embodiment;

[0026] Figure 4 A flowchart illustrating another sound simulation method in a game provided in this application embodiment;

[0027] Figure 5 A flowchart illustrating yet another sound simulation method in a game provided in this application embodiment;

[0028] Figure 6 A flowchart illustrating yet another sound simulation method in a game provided in this application embodiment;

[0029] Figure 7 A flowchart illustrating another sound simulation method in a game provided in this application embodiment;

[0030] Figure 8 A schematic diagram of a sound simulation device for a game provided in an embodiment of this application;

[0031] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0033] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0034] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0035] First, the relevant background technology of this solution will be explained:

[0036] Sound propagation simulation technology in games is a technique applied in the field of game development, aiming to enhance the immersion and realism of games. It involves addressing multiple technical challenges, including sound source localization, environmental simulation, and multi-channel sound, making it technically quite complex.

[0037] In the real world, sound waves undergo very complex physical changes during propagation. In addition to natural energy attenuation, they are accompanied by a series of objective physical phenomena such as reflection, diffraction, and transmission. Simulating the natural propagation effects of sound in games using digital means has always been a cutting-edge topic in game audio development.

[0038] Currently, sound propagation simulation technology in games for complex environments basically includes two modules: spatial environment acquisition and acoustic simulation. The spatial environment acquisition part is to capture the specific environment and terrain effects within the game, allowing the game engine to determine which objects will affect sound propagation. This step currently uses two main methods: prefabricated spatial components and raycasting. Different solutions may selectively choose one, or combine both.

[0039] The acoustic simulation aspect now has two main directions: real-time audio signal processing or recording a large number of spatial reverberation samples in different spaces and switching between them. There are many methods for real-time audio signal processing, such as digital effects processors, physically modeled effects processors, and parametric preset baking, and there are generally mature technical solutions in these areas. Some projects also choose to record a large number of real spatial reverberation samples for certain special sounds to obtain a more realistic auditory experience.

[0040] As described above, with the improvement of acoustic simulation accuracy, the accuracy of spatial components, the number of rays, and the refresh accuracy of rays will all continuously increase in the spatial environment acquisition stage. This will significantly increase system consumption and development costs. In the acoustic simulation stage, if real-time rendering is used, system resource consumption will increase significantly as accuracy and effect requirements rise. While pre-recording sound spatial effect materials can greatly save system resources, the number of samples of different spatial reverberation effects that can be pre-recorded is limited. Higher accuracy requirements demand a larger number of recorded samples, which will place demands on game storage space.

[0041] In short, current simulations of sound propagation effects in different spaces place high demands on system resources and storage space. This means that good spatial audio effects are generally only found in high-end, high-budget, large-scale games. Smaller games or performance-intensive mobile games struggle to handle the high demands of spatial audio, forcing them to resort to simpler simulation methods. This results in sound that can only support a few basic preset environments and struggles to achieve natural transitions between different environments. Some games even completely abandon spatial audio systems altogether.

[0042] Currently, there is a lack of a low-cost, low-power audio propagation simulation solution that can also deliver good performance for spaces of different sizes.

[0043] Based on this, this solution proposes a sound simulation method for games. By pre-collecting and creating open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to different types of sounds to be simulated, the reverberation sound simulation parameters corresponding to the sound to be simulated can be determined according to the spatial environment enclosure of the space where the sound source is located. Then, by adjusting the sound attributes of the open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated using the reverberation sound simulation parameters, the open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated are obtained. After mixing the open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated, the sound playback effect heard by the listener is the same as the effect of the sound to be simulated propagating in a space with the above-mentioned enclosed spatial environment to reach the listener's ears, thus realizing the simulation of the mixed sound effect when sound propagates in space.

[0044] This method only requires pre-creating open and closed environment reverberation sound samples corresponding to the sound to be simulated. Furthermore, the open and closed environment reverberation sound samples corresponding to the same type of sound to be simulated can be the same, thus eliminating the need to pre-create a large number of sound samples and reducing memory usage. Compared to the existing method of adding open and closed environment reverberation sounds using effects, this solution is more convenient, and the pre-recorded samples can be used multiple times, resulting in lower development costs.

[0045] In addition, by adjusting the reverberation sound samples of open and closed environments according to the reverberation sound simulation parameters corresponding to the sound to be simulated, a simple and fast simulation of sound mixing effects can be achieved. The simulation of sound mixing effects in various complex spaces can be completed using two sample sounds. It has strong versatility, low development cost, low system consumption, and high method execution efficiency.

[0046] Figure 1 This is a flowchart illustrating a sound simulation method in a game, provided as an embodiment of this application. The execution subject of this method can be an electronic device such as a computer or server, or a terminal device with a display screen. Figure 1 As shown, the method may include:

[0047] S101. Obtain the open environment reverberation sound sample and the closed environment reverberation sound sample corresponding to the sound to be simulated.

[0048] The sound to be simulated can be of any type. The sound to be simulated is emitted by a specific sound-emitting body, and the spatial environment in which the sound-emitting body is located can be different. For the listener, due to the different spatial environments in which the sound-emitting body is located and the propagation and attenuation of the emitted sound in space, the sounds to be simulated emitted by sound-emitting bodies in different spaces that the listener hears in the same location will be different after propagating through space to the listener's ears.

[0049] For example, the sounds to be simulated can be gunshots, footsteps, horns, etc. The sound source corresponding to gunshots can be a pistol, the sound source corresponding to footsteps can be a game character, and the sound source corresponding to horns can be a car, etc.

[0050] The reverberation sound samples in open and enclosed environments corresponding to the sound to be simulated can be sample materials recorded in typical open spaces and enclosed spaces, respectively. An open environment refers to an open space, and an enclosed environment refers to a sealed environment.

[0051] S102. Determine the reverberation simulation parameters of the sound to be simulated based on the spatial enclosure degree of the sound source corresponding to the sound to be simulated and the mapping relationship between the spatial enclosure degree and the reverberation simulation parameters.

[0052] Optionally, the reverberation simulation parameters corresponding to the sound to be simulated can be determined based on the spatial enclosure degree of the sound source corresponding to the sound to be simulated, and the pre-created mapping relationship between the spatial enclosure degree and the reverberation sound simulation parameters.

[0053] The sound exhibits different effects depending on the degree of enclosure in a spatial environment. For example, sound sounds muffled in a closed environment, while it lasts longer in an open environment. Therefore, there is a certain mapping relationship between the degree of enclosure of the spatial environment and the reverberation simulation parameters. Based on this mapping relationship and the degree of enclosure of the sound source corresponding to the sound to be simulated, the reverberation simulation parameters for that sound can be determined. In other words, it determines the sound parameters that the reverberation sound corresponding to the sound to be simulated should possess under the degree of enclosure of the spatial environment in which the sound is located.

[0054] The reverberation simulation parameters obtained by mapping different reverberation sound will vary depending on the degree of enclosure of the spatial environment in which the sound to be simulated is located.

[0055] S103. Based on the reverberation sound simulation parameters, open environment reverberation sound samples, and closed environment reverberation sound samples, generate the open environment reverberation sound and closed environment reverberation sound corresponding to the sound to be simulated.

[0056] The reverberation simulation parameters of the sound to be simulated refer to the sound parameters that the reverberant sound in the sound to be simulated should have when the sound is in a closed environment. The reverberant sound can include open environment reverberation sound and closed environment reverberation sound. Therefore, based on the reverberation simulation parameters, the sound parameters of the open environment reverberation sound samples and closed environment reverberation sound samples corresponding to the sound to be simulated can be adjusted to generate the open environment reverberation sound and closed environment reverberation sound corresponding to the sound to be simulated.

[0057] In other words, the reverberation simulation parameters in this embodiment simulate the reverberation in the sound to be simulated, without altering the sound itself. These reverberation simulation parameters are determined based on the actual reverberation the sound should possess in a closed environment, and can be accurately used to simulate both open and closed environment reverberation for the sound to be simulated.

[0058] For example, the sound to be simulated is an explosion. In the game, this sound is broken down into multiple components. The pure explosion sound might be very short, lasting less than a second; this part is called the dry sound. In the real environment, after the dry sound is emitted, it propagates and reflects in the spatial environment, forming a tail. This tail includes various sounds such as pre-delay and reverberation. These sounds can be collectively referred to as wet sounds.

[0059] Because dry sound is constant and does not change with different environments, the impact of environmental changes on the perceived sound is mainly achieved by adjusting wet sound. That is, in this embodiment, the open environment reverberation sound sample and the closed environment reverberation sound sample corresponding to the sound to be simulated are adjusted to generate the open environment reverberation sound and the closed environment reverberation sound of the sound to be simulated under the closedness of the spatial environment.

[0060] S104. Mix the reverberation sound of the open environment and the reverberation sound of the closed environment and play it back to present the playback sound effect of the sound to be simulated under the closed environment of the space.

[0061] Open-environment reverberation represents the sound effect of the simulated sound after it has attenuated through space. Closed-environment reverberation represents the sound effect of the simulated sound after it has attenuated through space. By mixing and playing the open-environment and closed-environment reverberation, the mixed sound effect of the simulated sound propagating in a closed environment can be reproduced. For the listener, the sound effect presented by the mixed open-environment and closed-environment reverberation is the same as the sound of the simulated sound emitted by the sound source in its closed environment reaching the listener's ear. This achieves the simulation of the sound mixing effect of the simulated sound propagating through space.

[0062] In summary, the sound simulation method in the game provided in this embodiment pre-collects and prepares open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to different types of sounds to be simulated. Based on the spatial enclosure of the space where the sound source of the sound to be simulated is located, the reverberation sound simulation parameters corresponding to the sound to be simulated can be determined. After adjusting the sound attributes of the open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated using the reverberation sound simulation parameters, open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated are generated. After mixing and playing the open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated, the sound playback effect heard by the listener is the same as the effect of the sound to be simulated propagating in space and reaching the listener's ear, thus realizing the simulation of the mixed sound effect when the sound propagates in space. This method only requires pre-creating open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated. Furthermore, the open-environment and closed-environment reverberation sound samples corresponding to the same type of sound to be simulated can be identical, thus eliminating the need to pre-create a large number of sound samples and reducing memory usage. In addition, by adjusting the open-environment and closed-environment reverberation sound samples according to the reverberation simulation parameters corresponding to the sound to be simulated, a simple and fast sound mixing effect simulation can be achieved. It can simulate sound mixing effects in various complex spaces using only two sample sounds, demonstrating strong versatility, low development cost, low system consumption, and high execution efficiency. Moreover, since the reverberation simulation parameters are determined based on the actual reverberation effect of the sound to be simulated in the closed environment, the accuracy of the generated open-environment and closed-environment reverberation sounds is improved, enhancing the simulation effect of the sound mixing.

[0063] Figure 2 A flowchart illustrating another sound simulation method in a game provided by an embodiment of this application; optionally, the method of this application further includes:

[0064] S201. Determine the location of the sound source in the game scene based on its geographical coordinates; the sound source is the object that emits the sound to be simulated.

[0065] The sound-emitting entity is a concrete physical object whose geographical coordinates within the game scene can be collected in real time, thus determining its location within the game scene. As explained earlier, the sound-emitting entity is the object that emits the sound to be simulated.

[0066] S202. Determine the bounding box of the space to which the sound source belongs based on its position in the game scene.

[0067] In this embodiment, the enclosure degree of the spatial environment can be determined by placing trigger boxes. Trigger boxes can be placed in different spaces, and different enclosure parameters can be assigned to boxes of different sizes. The environmental parameter for the most enclosed and smallest space is 1, and the environmental parameter for the most open space is 0. 0-0.1 is a completely open space, 0.2 is an open space with relatively complex low obstructions, 0.3 is a semi-enclosed space, 0.4-0.6 is a large enclosed space, 0.7-0.8 is a medium-sized enclosed space, 0.8-0.9 is a small enclosed space, and 1 is an extremely enclosed space.

[0068] This can be understood as follows: different enclosing boxes can be pre-set for different spaces, and each enclosing box has a different degree of enclosure. Then, based on the location of the sound source, the space where the sound source is located can be determined, and the enclosure degree of the space environment of the sound source can be determined based on the enclosure degree of the space.

[0069] S203. Determine the spatial environment enclosure degree of the sound-emitting body based on the spatial enclosure box corresponding to the spatial environment enclosure degree.

[0070] Therefore, the enclosure degree of the space where the sound-emitting body is located can be determined as the enclosure degree of the sound-emitting body's space environment. For example, if the enclosure degree of the space where the sound-emitting body is located is 0.4, then the enclosure degree of the space where the sound-emitting body is located can be determined as 0.4, and the space where the sound-emitting body is located can be considered as a large enclosed space.

[0071] Of course, the above-mentioned methods and granularities for classifying spatial environment enclosure are only examples. In practice, there may be more detailed classifications, not limited to the examples above.

[0072] Optionally, the method of this application may further include: constructing a correspondence between the spatial environment enclosure degree and the reverberation simulation parameters of the open environment reverberation sound samples based on the magnitude of the reverberation simulation parameters of the open environment reverberation sound samples under each spatial environment enclosure degree.

[0073] Based on the magnitude of the reverberation simulation parameters of the reverberation sound samples in the enclosed environment under various spatial enclosure conditions, a correspondence between the spatial enclosure condition and the reverberation simulation parameters of the reverberation sound samples in the enclosed environment is constructed.

[0074] The reverberation sound effects of the open environment and the closed environment that the sound to be simulated should actually have under different spatial enclosure conditions can be pre-collected and determined. The sound to be simulated can be emitted by a sound source in different spatial environments, and the real open environment reverberation sound and real closed environment reverberation sound included in the sound to be simulated by the listener can be collected. Based on the real open environment reverberation sound and real closed environment reverberation sound, the reverberation sound simulation parameters of the open environment reverberation sound sample and the reverberation sound simulation parameters of the closed environment reverberation sound sample under each spatial enclosure condition can be determined.

[0075] Through the above steps, multiple sets of three-dimensional data can be obtained. Each set of three-dimensional data may include: {the degree of spatial environment enclosure, the magnitude of the reverberation simulation parameters of the open environment reverberation sound sample, and the magnitude of the reverberation simulation parameters of the closed environment reverberation sound sample}. Then, the data can be converted into a mapping relationship to construct the correspondence between the degree of spatial environment enclosure and the reverberation simulation parameters of the open environment reverberation sound sample, as well as the correspondence between the degree of spatial environment enclosure and the reverberation simulation parameters of the closed environment reverberation sound sample.

[0076] In some embodiments, reverberation sound simulation parameters may include at least one of the following: sound volume, sound fade-out parameters, and sound filtering parameters.

[0077] Optionally, the reverberation sound simulation parameters corresponding to the sound to be simulated include a first sound simulation parameter corresponding to an open environment and a second sound simulation parameter corresponding to a closed environment; wherein, the first sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the open environment, and the second sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the closed environment.

[0078] Based on this, the first sound simulation parameters corresponding to an open environment may include at least one of the following: first target sound volume, first target sound fade-out parameters, and first target sound filtering parameters.

[0079] The second sound simulation parameters corresponding to the closed environment may include at least one of the following: second target sound volume, second target sound fade-out parameters, and second target sound filtering parameters.

[0080] The terms "first" and "second" here have no actual physical meaning; they are merely used to distinguish the sound simulation parameters for open and enclosed environments.

[0081] Since the reverberation sound simulation parameters for open and enclosed environments can include multiple parameters, and the correspondence between each parameter and the degree of enclosure of the space environment is different, this embodiment will explain the several correspondences involved in this solution.

[0082] First: When the reverberation sound simulation parameter is the sound volume, the correspondence between the spatial environment enclosure degree and the first sound volume corresponding to the reverberation sound sample of the open environment, and the correspondence between the spatial environment enclosure degree and the second sound volume corresponding to the reverberation sound sample of the closed environment can be constructed respectively.

[0083] Second: When the reverberation sound simulation parameters are sound fade-out parameters, the correspondence between the spatial environment enclosure degree and the first sound fade-out parameter corresponding to the open environment reverberation sound sample, and the correspondence between the spatial environment enclosure degree and the second sound fade-out parameter corresponding to the closed environment reverberation sound sample can be constructed respectively.

[0084] Third: When the reverberation sound simulation parameters are the sound fade-out parameters, the correspondence between the spatial environment enclosure degree and the first sound filtering parameters corresponding to the open environment reverberation sound sample, and the correspondence between the spatial environment enclosure degree and the second sound filtering parameters corresponding to the closed environment reverberation sound sample can be constructed respectively.

[0085] Figure 3 This is a flowchart illustrating another sound simulation method in a game provided by an embodiment of this application; optionally, in step S103, generating the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated based on the reverberation sound simulation parameters, the open environment reverberation sound sample, and the closed environment reverberation sound sample may include:

[0086] S301. Based on the first sound simulation parameters, adjust the sound of the open environment reverberation sound sample to generate the open environment reverberation sound corresponding to the sound to be simulated.

[0087] Optionally, based on the aforementioned correspondence between the spatial environment enclosure degree and the first sound volume corresponding to the open environment reverberation sound sample, the spatial environment enclosure degree and the first sound fade-out parameter corresponding to the open environment reverberation sound sample, and the spatial environment enclosure degree and the first sound filtering parameter corresponding to the open environment reverberation sound sample, the first sound simulation parameters corresponding to the open environment reverberation sound sample in the spatial environment where the sound to be simulated is located can be determined respectively, including: the first target sound volume, the first target sound fade-out parameter, and the first target sound filtering parameter.

[0088] Therefore, based on the volume of the first target sound, the fade-out parameters of the first target sound, and the filtering parameters of the first target sound, the sound of the open environment reverberation can be adjusted to generate the open environment reverberation sound corresponding to the sound to be simulated.

[0089] S302. Based on the second sound simulation parameters, adjust the sound of the closed environment reverberation sound sample to generate the closed environment reverberation sound corresponding to the sound to be simulated.

[0090] Similarly, based on the aforementioned correspondence between the spatial environment enclosure degree and the second sound volume corresponding to the reverberation sound sample in the enclosed environment, the spatial environment enclosure degree and the second sound fade-out parameter corresponding to the reverberation sound sample in the enclosed environment, and the spatial environment enclosure degree and the second sound filtering parameter corresponding to the reverberation sound sample in the enclosed environment, the second sound simulation parameters corresponding to the reverberation sound sample in the enclosed environment in which the sound to be simulated is located can be determined respectively, including: the second target sound volume, the second target sound fade-out parameter, and the second target sound filtering parameter.

[0091] Therefore, based on the volume of the second target sound, the fade-out parameters of the second target sound, and the filtering parameters of the second target sound, the sound of the closed environment reverberation can be adjusted to generate the closed environment reverberation sound corresponding to the sound to be simulated.

[0092] In some embodiments, the sound fade-out parameters may further include: sound fade-out effective time, sound fade-out duration, and sound fade-out flow rate multiplier; the sound filtering parameters may further include: sound filtering effective time, sound filtering intensity, and sound filtering flow rate multiplier.

[0093] Therefore, the first target sound fade-out parameters may include: the first target sound fade-out effective time, the first target sound fade-out duration, and the first target sound fade-out flow rate multiplier. The first target sound filtering parameters may include: the first target sound filtering effective time, the first target sound filtering intensity, and the first target sound filtering flow rate multiplier.

[0094] Similarly, the second target sound fade-out parameters may include: the second target sound fade-out effective time, the second target sound fade-out duration, and the second target sound fade-out flow rate. The second target sound filtering parameters may include: the second target sound filtering effective time, the second target sound filtering intensity, and the second target sound filtering flow rate.

[0095] Based on this, the correspondence between the spatial environment enclosure degree and the first sound fade-out parameter corresponding to the open environment reverberation sound sample can include three independent correspondences: the correspondence between the spatial environment enclosure degree and the first target sound fade-out effective time corresponding to the open environment reverberation sound sample, the correspondence between the spatial environment enclosure degree and the first target sound fade-out duration corresponding to the open environment reverberation sound sample, and the correspondence between the spatial environment enclosure degree and the first target sound fade-out flow rate ratio corresponding to the open environment reverberation sound sample.

[0096] The established correspondence between the spatial environment enclosure degree and the first sound filtering parameters corresponding to the open environment reverberation sound samples can include three independent correspondences: the correspondence between the spatial environment enclosure degree and the effective time of the first target sound filter corresponding to the open environment reverberation sound samples, the correspondence between the spatial environment enclosure degree and the first target sound filter intensity corresponding to the open environment reverberation sound samples, and the correspondence between the spatial environment enclosure degree and the first target sound filter flow rate ratio corresponding to the open environment reverberation sound samples.

[0097] Similarly, the constructed correspondence between the spatial environment enclosure degree and the second sound fade-out parameter corresponding to the reverberation sound sample of the enclosed environment can include three independent correspondences: the correspondence between the spatial environment enclosure degree and the second target sound fade-out effective time corresponding to the reverberation sound sample of the enclosed environment, the correspondence between the spatial environment enclosure degree and the second target sound fade-out duration corresponding to the reverberation sound sample of the enclosed environment, and the correspondence between the spatial environment enclosure degree and the second target sound fade-out flow rate ratio corresponding to the reverberation sound sample of the enclosed environment.

[0098] The constructed correspondence between the spatial environment enclosure degree and the second sound filtering parameters corresponding to the reverberation sound samples of the enclosed environment can include three independent correspondences: the correspondence between the spatial environment enclosure degree and the effective time of the second target sound filter corresponding to the reverberation sound samples of the enclosed environment, the correspondence between the spatial environment enclosure degree and the intensity of the second target sound filter corresponding to the reverberation sound samples of the enclosed environment, and the correspondence between the spatial environment enclosure degree and the flow rate ratio of the second target sound filter corresponding to the reverberation sound samples of the enclosed environment.

[0099] Therefore, based on the corresponding relationships, the fade-out effective time, fade-out duration, and fade-out flow rate of the first target sound can be determined for the open environment reverberation sound sample in the spatial environment where the sound to be simulated is located. Furthermore, the fade-out effective time, fade-out duration, and fade-out flow rate of the second target sound can be determined for the closed environment reverberation sound sample in the spatial environment where the sound to be simulated is located.

[0100] Simultaneously, the activation time, intensity, and flow rate of the first target sound filter can be determined for the open-environment reverberant sound sample in the spatial environment where the sound to be simulated is located. Furthermore, the activation time, intensity, and flow rate of the second target sound filter can be determined for the enclosed-environment reverberant sound sample in the spatial environment where the sound to be simulated is located.

[0101] Generally, the higher the enclosure of a space, the lower the volume of reverberation in an open environment, and the higher the volume of reverberation in a closed environment. The volume of reverberation in an open environment gradually decreases as the enclosure of the space increases, while the volume of reverberation in a closed environment gradually increases as the enclosure of the space increases.

[0102] The higher the spatial enclosure, the shorter the duration of reverberation in an open environment. The sound playback timeline decreases in volume according to a fixed curve. Then, the fade-out activation time and fade-out flow rate are determined based on the current spatial enclosure level.

[0103] The fade-out time refers to the time after which the sound begins to fade out after the sound has been played for 3 seconds. For example, if the fade-out time is 3 seconds, then the sound will begin to fade out after 3 seconds of playback.

[0104] The fade-out flow rate ratio is used to calculate the actual flow rate of the sound fade-out, allowing the sound to fade out according to the actual flow rate. The higher the spatial enclosure, the faster the flow rate, and the faster the sound will fade out.

[0105] Sound filtering refers to filtering out the high-frequency components of a sound, making the sound relatively muffled.

[0106] Generally, the greater the spatial enclosure, the shorter the sound filtering time and the stronger the filtering intensity. Adjustment can be achieved by using a time axis to control the sound filtering intensity. The time axis increases the sound filtering intensity at a fixed curve to simulate the attenuation process of sound being consumed after multiple reflections. Then, the time flow rate of the time axis is adjusted according to the current spatial enclosure. The smaller the space (the greater the spatial enclosure), the faster the time axis event flow rate, and the faster the sound will be filtered out.

[0107] It is worth noting that the above correspondences are all based on actual case analyses of sound propagation in different spaces. Each of the above correspondences can be represented by a function curve, with the horizontal axis representing the spatial enclosure and the vertical axis representing the corresponding reverberation simulation parameters. Of course, the correspondences are not limited to function curves; they can also exist in the form of key-value pairs, as long as the correspondences are clearly represented.

[0108] Figure 4 A flowchart illustrating another sound simulation method in a game provided in this application embodiment; optionally, in step S301, adjusting the sound of the open environment reverberation sound sample according to the first sound simulation parameters may include:

[0109] S401. Adjust the current volume of the open environment reverberation sound sample to the volume of the first target sound.

[0110] This embodiment uses the adjustment of reverberant sound samples in an open environment as an example for illustration. The adjustment method for reverberant sound samples in a closed environment is similar, except that the specific values ​​of the second sound simulation parameters used are different, which will not be described in detail here.

[0111] Optionally, the volume of the open environment reverberation sound sample can be adjusted to the determined first target sound volume.

[0112] S402. Based on the first target sound fade-out parameters, control the open environment reverberation sound sample to perform a sound fade-out operation during the first target sound fade-out effective time, and perform sound fade-out according to the first target sound fade-out duration and the first target sound fade-out flow rate multiple.

[0113] For sound fade-out control, the sound fade-out operation can be started when the target sound fade-out effective time is reached. During the sound fade-out process, the sound can gradually fade out according to the target sound fade-out duration. In addition, the sound fade-out can be performed according to the target sound fade-out flow rate. Sound fade-out means gradually suppressing the sound and making the sound slowly disappear.

[0114] Assuming the first target sound fade-out activation time is 3 seconds and the first target sound fade-out duration is 4 seconds, then the sound fade-out can begin after the playback duration of the reverberant sound sample in an open environment reaches 3 seconds, and the sound will gradually fade out over 4 seconds. The first target sound fade-out duration here is only the base fade-out duration. The base fade-out duration can be adjusted using the first target sound fade-out flow rate multiplier. The higher the first target sound fade-out flow rate multiplier, the shorter the base fade-out duration, and the faster the sound fades out.

[0115] S403. Based on the first target sound filtering parameters, control the open environment reverberation sound sample to perform sound filtering operation during the first target sound filtering effective time, and perform sound filtering according to the first target sound filtering intensity and the first target sound filtering flow rate multiple.

[0116] The sound filtering operation is similar to the sound fade-out operation, except that one fades out the sound and the other filters the sound. You can refer to the implementation of step S402 for understanding.

[0117] Figure 5 This is a flowchart illustrating another sound simulation method in a game provided by an embodiment of this application; optionally, step S402, fading out the sound according to the first target sound fade-out duration and the first target sound fade-out flow rate multiple, may include:

[0118] S501. Determine the target flow rate based on the fade-out flow rate ratio of the first target sound and the base flow rate.

[0119] Taking the fade-out duration of sound as a function curve as an example, the horizontal axis of the curve represents the fade-out duration, and the vertical axis represents the enclosure degree of the spatial environment. The slope of the curve indicates the fade-out velocity; the higher the velocity, the more turbulent the curve, and the shorter the fade-out time. The base velocity refers to the velocity corresponding to the determined first target fade-out duration. The base velocity can be adjusted according to the first target fade-out velocity multiplier to obtain the target velocity. Alternatively, the target velocity can be obtained by directly multiplying the first target fade-out velocity multiplier by the base velocity. When the velocity multiplier is positive, the target velocity increases relative to the base velocity, the fade-out duration will be shortened, and the sound will fade out at a faster speed.

[0120] S502. Fade out the sound according to the fade-out duration of the first target sound and the target flow rate.

[0121] Therefore, based on the determined target sound flow rate, the reverberation sound samples in the open environment can be controlled to fade out according to the first target sound fade-out duration and the target flow rate.

[0122] Figure 6 This is a flowchart illustrating another sound simulation method in a game provided by an embodiment of this application; optionally, after generating the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated in step S103, it may further include:

[0123] S601. Determine the difference in spatial enclosure based on the enclosure degree of the sound-emitting body and the enclosure degree of the listener's spatial environment. The difference in spatial enclosure is the listener's spatial enclosure degree minus the enclosure degree of the sound-emitting body.

[0124] In some embodiments, the open-environment reverberation sound and the enclosed-environment reverberation sound obtained from the above adjustments can be further processed, i.e., corrected, based on the difference between the spatial enclosure of the sound-emitting body's environment and the listener's environment, in order to improve the realism of the simulated sound.

[0125] Alternatively, one can first determine the enclosure degree of the listener's space based on the surrounding box of the space in which the listener is located, and then subtract the enclosure degree of the sound source from the enclosure degree of the listener's space to obtain the difference in enclosure degree.

[0126] S602. Based on the difference in spatial enclosure, correct the reverberation sound in open environments and / or enclosed environments.

[0127] Based on different values ​​of the spatial environment enclosure difference, different methods can be used to correct the reverberation sound in open and closed environments, or only the reverberation sound in open environments can be corrected.

[0128] Optionally, in step S602, correcting the reverberation sound in the open environment and / or the reverberation sound in the closed environment based on the difference in spatial enclosure can include:

[0129] If the difference in spatial enclosure is positive, then the reverberation sound in the open environment and the reverberation sound in the enclosed environment are filtered and the sound volume is increased respectively.

[0130] In one scenario, when the difference in spatial enclosure is positive, it indicates that the sound source is in a relatively open environment, while the listener is in a relatively enclosed environment. In this case, further filtering of both the open and enclosed reverberation sounds is necessary, but without shortening the sound duration. Furthermore, the greater the difference in spatial enclosure, the greater the degree of filtering required.

[0131] Since filtering removes some volume, the volume can be slightly increased to compensate for this loss. This simulates the effect of hearing sound from an open environment in a closed setting.

[0132] If the difference in spatial enclosure is negative, the volume and fade-out duration of the reverberant sound in the open environment are increased, and the reverberant sound in the open environment is filtered.

[0133] In another scenario, when the difference in spatial enclosure is negative, it indicates that the sound source is in a relatively enclosed environment while the listener is in a relatively open environment. In this case, it is necessary to increase the volume of the reverberation sound in the open environment and increase the playback time (i.e., increase the fade-out time) to allow the open and enclosed sounds to coexist. Furthermore, the reverberation sound in the open environment can be further filtered to simulate the effect of hearing a sound from an enclosed environment in an open environment.

[0134] When the difference in spatial enclosure is 0, it proves that the sound source and the listener are in the same space or the same type of space, and the sound does not need to be further processed.

[0135] Figure 7 A flowchart illustrating another sound simulation method in a game provided in this application embodiment; optionally, in step S101, before obtaining the open environment reverberation sound sample and the closed environment reverberation sound sample corresponding to the sound to be simulated, the following may be included:

[0136] S701. Determine the target sound source based on the sound type to be simulated.

[0137] There are many types of sounds, such as gunshots, footsteps, and laughter. Based on the type of sound to be simulated, the target sound source can be determined first.

[0138] S702. In a preset open environment, the audio information of the target sound source emitted by the sound-emitting body is collected by the recording device to generate an open environment reverberation sound sample corresponding to the sound to be simulated.

[0139] Therefore, in a pre-defined open environment, a target sound source can be emitted through a sound-emitting body, and the sound can be recorded using a recording device to generate an open environment reverberation sound sample corresponding to the sound to be simulated. The pre-defined open environment can be a typical and representative open environment.

[0140] For example, if the sound to be simulated is a gunshot, the sound of a gunshot can be captured by a recording device in a preset open environment to generate an open environment reverberation sound sample corresponding to the sound to be simulated.

[0141] S703. In a preset closed environment, the audio information of the target sound source emitted by the sound-emitting body is collected by the recording device to generate a closed environment reverberation sound sample corresponding to the sound to be simulated; the positional relationship and angle relationship between the recording device and the sound-emitting body meet the preset requirements.

[0142] Similar to the recording method of open environment reverberation sound samples, closed environment reverberation sound samples corresponding to the sound to be simulated can be collected in a preset closed environment.

[0143] When collecting sound samples, the positional and angular relationships between the recording device and the sound source usually need to meet preset requirements. For example, the recording device and the sound source cannot be too close to each other. They need to match the effect of sound propagation, reflection, and collision in space. If they are too close, the collected sound will lack reflection and collision attenuation, and the representativeness of the sample will be poor.

[0144] In summary, the sound simulation method in the game provided in this embodiment pre-collects and prepares open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to different types of sounds to be simulated. Based on the spatial enclosure of the space where the sound source of the sound to be simulated is located, the reverberation sound simulation parameters corresponding to the sound to be simulated can be determined. After adjusting the sound attributes of the open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated using the reverberation sound simulation parameters, open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated are generated. After mixing and playing the open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated, the sound playback effect heard by the listener is the same as the effect of the sound to be simulated propagating in space and reaching the listener's ear, thus realizing the simulation of the mixed sound effect when the sound propagates in space. This method only requires pre-creating open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated. Furthermore, the open-environment and closed-environment reverberation sound samples corresponding to the same type of sound to be simulated can be identical, thus eliminating the need to pre-create a large number of sound samples and reducing memory usage. In addition, by adjusting the open-environment and closed-environment reverberation sound samples according to the reverberation simulation parameters corresponding to the sound to be simulated, a simple and fast sound mixing effect simulation can be achieved. It can simulate sound mixing effects in various complex spaces using only two sample sounds, demonstrating strong versatility, low development cost, low system consumption, and high execution efficiency. Moreover, since the reverberation simulation parameters are determined based on the actual reverberation effect of the sound to be simulated in the closed environment, the accuracy of the generated open-environment and closed-environment reverberation sounds is improved, enhancing the simulation effect of the sound mixing.

[0145] In addition, by correcting the reverberation sound in open and closed environments based on the differences between the spatial environment of the sound source and the spatial environment of the listener, the simulation effect can be effectively improved.

[0146] The following describes the apparatus, device, and storage medium used to execute the sound simulation method in the game provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.

[0147] Figure 8 This is a schematic diagram of a sound simulation device for a game provided in an embodiment of this application. The function implemented by this device corresponds to the steps performed by the method described above. This device can be understood as the aforementioned server, or the server's processor, or as a component that implements the functions of this application under the control of the server, independent of the aforementioned server or processor. Figure 8As shown, the device may include: an acquisition module 710, a determination module 720, a processing module 730, and a playback module 740;

[0148] The acquisition module 710 is used to acquire open environment reverberation sound samples and closed environment reverberation sound samples corresponding to the sound to be simulated.

[0149] The determination module 720 is used to determine the reverberation simulation parameters of the sound to be simulated based on the spatial environment enclosure degree of the sound-emitting body corresponding to the sound to be simulated, and the mapping relationship between the spatial environment enclosure degree and the reverberation sound simulation parameters.

[0150] The processing module 730 is used to generate the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated based on the reverberation sound simulation parameters, the open environment reverberation sound sample and the closed environment reverberation sound sample.

[0151] The playback module 740 is used to mix and play reverberant sounds from open and enclosed environments to present the playback sound effect of the sound to be simulated under the enclosedness of the spatial environment.

[0152] Optionally, the determining module 720 is further configured to determine the position of the sound emitter in the game scene based on the geographical coordinate information of the sound emitter; the sound emitter is the object that emits the sound to be simulated;

[0153] Determine the bounding box of the space to which the sound source belongs based on its position in the game scene;

[0154] The spatial enclosure degree of the sound-emitting body is determined based on the spatial enclosure degree corresponding to the spatial enclosure box.

[0155] Optionally, it also includes: building modules;

[0156] The module is used to construct the correspondence between the spatial environment enclosure degree and the reverberation simulation parameters of the open environment reverberation sound samples based on the magnitude of the reverberation simulation parameters of the open environment reverberation sound samples under various spatial environment enclosure degrees.

[0157] Based on the magnitude of the reverberation simulation parameters of the reverberation sound samples in the enclosed environment under various spatial enclosure conditions, a correspondence between the spatial enclosure condition and the reverberation simulation parameters of the reverberation sound samples in the enclosed environment is constructed.

[0158] Optionally, the reverberation sound simulation parameters include at least one of the following: sound volume, sound fade-out parameters, and sound filtering parameters.

[0159] Optionally, the reverberation sound simulation parameters corresponding to the sound to be simulated include a first sound simulation parameter corresponding to an open environment and a second sound simulation parameter corresponding to a closed environment; wherein, the first sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the open environment, and the second sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the closed environment.

[0160] Optionally, the first sound simulation parameters include at least one of the following: first target sound volume, first target sound fade-out parameters, and first target sound filtering parameters;

[0161] The second sound simulation parameters include at least one of the following: second target sound volume, second target sound fade-out parameters, and second target sound filtering parameters.

[0162] Optionally, the processing module 730 is specifically used to adjust the sound of the open environment reverberation sound sample according to the first sound simulation parameters to generate the open environment reverberation sound corresponding to the sound to be simulated.

[0163] Based on the second sound simulation parameters, the sound of the reverberant sound sample in the closed environment is adjusted to generate the reverberant sound in the closed environment corresponding to the sound to be simulated.

[0164] Optionally, the processing module 730 is specifically used to adjust the current volume of the open environment reverberation sound sample to the volume of the first target sound.

[0165] Based on the first target sound fade-out parameters, the reverberant sound samples in the open environment are controlled to perform a sound fade-out operation during the first target sound fade-out effective time, and the sound fades out according to the first target sound fade-out duration and the first target sound fade-out flow rate multiplier; the first target sound fade-out parameters include: the first target sound fade-out effective time, the first target sound fade-out duration, and the first target sound fade-out flow rate multiplier.

[0166] Based on the first target sound filtering parameters, the reverberation sound samples in the open environment are controlled to perform sound filtering operations during the first target sound filtering effective time, and sound filtering is performed according to the first target sound filtering intensity and the first target sound filtering flow rate ratio; the first target sound filtering parameters include: the first target sound filtering effective time, the first target sound filtering intensity, and the first target sound filtering flow rate ratio.

[0167] Optionally, the processing module 730 is specifically used to determine the target flow rate based on the first target sound fade-out flow rate multiplier and the base flow rate;

[0168] The sound fades out based on the fade-out duration of the first target sound and the target flow rate.

[0169] Optionally, it also includes: an adjustment module;

[0170] The adjustment module is used to determine the difference in spatial enclosure based on the enclosure of the sound source and the enclosure of the listener's spatial environment. The difference in spatial enclosure is the listener's spatial enclosure minus the enclosure of the sound source's spatial environment.

[0171] Based on the difference in spatial enclosure, the reverberation sound in open environments and / or enclosed environments is corrected.

[0172] Optionally, the adjustment module is specifically used to filter the reverberation sound in the open environment and the reverberation sound in the closed environment respectively, and increase the sound volume if the difference in the spatial environment enclosure is positive.

[0173] If the difference in spatial enclosure is negative, the volume and fade-out duration of the reverberant sound in the open environment are increased, and the reverberant sound in the open environment is filtered.

[0174] Optionally, the determining module 720 is also used to determine the target sound source based on the sound type of the sound to be simulated;

[0175] The processing module 730 is also used to collect audio information of the target sound source emitted by the sound-emitting body through a recording device in a preset open environment, and generate an open environment reverberation sound sample corresponding to the sound to be simulated.

[0176] In a pre-defined enclosed environment, audio information of the target sound source emitted by the sound-emitting body is collected by a recording device to generate a reverberant sound sample of the enclosed environment corresponding to the sound to be simulated; the positional and angular relationship between the recording device and the sound-emitting body meets the pre-defined requirements.

[0177] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0178] The modules described above can be connected or communicate with each other via wired or wireless connections. Wired connections can include metal cables, optical fibers, hybrid cables, or any combination thereof. Wireless connections can include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any module can be divided into two or more units. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here.

[0179] Figure 9 A schematic diagram of an electronic device provided in this application embodiment includes: a processor 801, a storage medium 802, and a bus 803. The storage medium 802 stores machine-readable instructions executable by the processor 801. When the electronic device runs a sound simulation method in a game as described in the embodiment, the processor 801 communicates with the storage medium 802 via the bus 803. The processor 801 executes the machine-readable instructions to perform the following steps:

[0180] Obtain reverberation sound samples from open and closed environments corresponding to the sound to be simulated;

[0181] Based on the spatial enclosure degree of the sound source corresponding to the sound to be simulated, and the mapping relationship between the spatial enclosure degree and the reverberation sound simulation parameters, the reverberation sound simulation parameters corresponding to the sound to be simulated are determined.

[0182] Based on the reverberation sound simulation parameters, open environment reverberation sound samples, and closed environment reverberation sound samples, generate the open environment reverberation sound and closed environment reverberation sound corresponding to the sound to be simulated.

[0183] The reverberant sound from both open and enclosed environments is mixed and then played back to reproduce the sound effect of the simulated sound in a closed spatial environment.

[0184] In one feasible implementation, the processor 801 is further configured to: determine the location of the sound emitter in the game scene based on the geographic coordinate information of the sound emitter; the sound emitter is an object that emits the sound to be simulated;

[0185] Determine the bounding box of the space to which the sound source belongs based on its position in the game scene;

[0186] The spatial enclosure degree of the sound-emitting body is determined based on the spatial enclosure degree corresponding to the spatial enclosure box.

[0187] In one feasible implementation, the processor 801 is further configured to: construct a correspondence between the spatial environment enclosure degree and the reverberation simulation parameters of the open environment reverberation sound samples based on the magnitude of the reverberation simulation parameters of the open environment reverberation sound samples under each spatial environment enclosure degree.

[0188] Based on the magnitude of the reverberation simulation parameters of the reverberation sound samples in the enclosed environment under various spatial enclosure conditions, a correspondence between the spatial enclosure condition and the reverberation simulation parameters of the reverberation sound samples in the enclosed environment is constructed.

[0189] In a feasible implementation, the reverberation sound simulation parameters include at least one of the following: sound volume, sound fade-out parameters, and sound filtering parameters.

[0190] In one feasible implementation, the reverberation sound simulation parameters corresponding to the sound to be simulated include a first sound simulation parameter corresponding to an open environment and a second sound simulation parameter corresponding to a closed environment; wherein, the first sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the open environment, and the second sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the closed environment.

[0191] In one feasible implementation, the first sound simulation parameter includes at least one of the following: first target sound volume, first target sound fade-out parameter, and first target sound filtering parameter;

[0192] The second sound simulation parameters include at least one of the following: second target sound volume, second target sound fade-out parameters, and second target sound filtering parameters.

[0193] In one feasible implementation, when the processor 801 generates the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated based on the reverberation sound simulation parameters, the open environment reverberation sound sample, and the closed environment reverberation sound sample, it is specifically used to: adjust the sound of the open environment reverberation sound sample according to the first sound simulation parameters to generate the open environment reverberation sound corresponding to the sound to be simulated.

[0194] Based on the second sound simulation parameters, the sound of the reverberant sound sample in the closed environment is adjusted to generate the reverberant sound in the closed environment corresponding to the sound to be simulated.

[0195] In one feasible implementation, when processor 801 performs sound adjustment on open environment reverberation sound sample according to first sound simulation parameters, it is specifically used to: adjust the current volume of open environment reverberation sound sample to the first target sound volume.

[0196] Based on the first target sound fade-out parameters, the reverberant sound samples in the open environment are controlled to perform a sound fade-out operation during the first target sound fade-out effective time, and the sound fades out according to the first target sound fade-out duration and the first target sound fade-out flow rate multiplier; the first target sound fade-out parameters include: the first target sound fade-out effective time, the first target sound fade-out duration, and the first target sound fade-out flow rate multiplier.

[0197] Based on the first target sound filtering parameters, the reverberation sound samples in the open environment are controlled to perform sound filtering operations during the first target sound filtering effective time, and sound filtering is performed according to the first target sound filtering intensity and the first target sound filtering flow rate ratio; the first target sound filtering parameters include: the first target sound filtering effective time, the first target sound filtering intensity, and the first target sound filtering flow rate ratio.

[0198] In one feasible implementation, when the processor 801 performs sound fade-out according to the first target sound fade-out duration and the first target sound fade-out flow rate multiplier, it is specifically used to determine the target flow rate according to the first target sound fade-out flow rate multiplier and the base flow rate; and to perform sound fade-out according to the first target sound fade-out duration and the target flow rate.

[0199] In one feasible implementation, after the processor 801 generates the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated, it is further configured to: determine the spatial environment closure difference based on the spatial environment closure of the sound source and the spatial environment closure of the listener, wherein the spatial environment closure difference is the listener's spatial environment closure minus the spatial environment closure of the sound source.

[0200] Based on the difference in spatial enclosure, the reverberation sound in open environments and / or enclosed environments is corrected.

[0201] In one feasible implementation, when the processor 801 performs the correction of open environment reverberation sound and / or closed environment reverberation sound based on the difference in spatial environment enclosure, it specifically performs the following: if the difference in spatial environment enclosure is positive, it performs filtering processing on the open environment reverberation sound and the closed environment reverberation sound respectively and increases the sound volume.

[0202] If the difference in spatial enclosure is negative, the volume and fade-out duration of the reverberant sound in the open environment are increased, and the reverberant sound in the open environment is filtered.

[0203] In one feasible implementation, before acquiring open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated, the processor 801 is further configured to: determine the target sound source based on the sound type of the sound to be simulated;

[0204] In a pre-set open environment, the audio information of the target sound source emitted by the sound-emitting body is collected by the recording device to generate an open environment reverberation sound sample corresponding to the sound to be simulated.

[0205] In a pre-defined enclosed environment, audio information of the target sound source emitted by the sound-emitting body is collected by a recording device to generate a reverberant sound sample of the enclosed environment corresponding to the sound to be simulated; the positional and angular relationship between the recording device and the sound-emitting body meets the pre-defined requirements.

[0206] In this way, the electronic device can pre-collect and prepare open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to different types of sounds to be simulated. Based on the degree of enclosure of the space where the sound source is located, the reverberation sound simulation parameters corresponding to the sound to be simulated can be determined. After adjusting the sound attributes of the open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated using the reverberation sound simulation parameters, the open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated are generated. After mixing and playing the open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated, the sound playback effect heard by the listener is the same as the effect of the sound to be simulated traveling through space to reach the listener's ears, thus realizing the simulation of the mixing effect when sound travels through space. This method only requires pre-creating open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated. Furthermore, the open-environment and closed-environment reverberation sound samples corresponding to the same type of sound to be simulated can be identical, thus eliminating the need to pre-create a large number of sound samples and reducing memory usage. In addition, by adjusting the open-environment and closed-environment reverberation sound samples according to the reverberation simulation parameters corresponding to the sound to be simulated, a simple and fast sound mixing effect simulation can be achieved. It can simulate sound mixing effects in various complex spaces using only two sample sounds, demonstrating strong versatility, low development cost, low system consumption, and high execution efficiency. Moreover, since the reverberation simulation parameters are determined based on the actual reverberation effect of the sound to be simulated in the closed environment, the accuracy of the generated open-environment and closed-environment reverberation sounds is improved, enhancing the simulation effect of the sound mixing.

[0207] The storage medium 802 stores program code, which, when executed by the processor 801, causes the processor 801 to perform various steps in the sound simulation method in the game according to various exemplary embodiments of this application as described in the "Exemplary Methods" section above.

[0208] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0209] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory is any other medium capable of carrying or storing desired program code having an instruction or data structure form and accessible by a computer, but is not limited thereto. Storage medium 802 in this embodiment can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0210] Optionally, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is executed by a processor, and the processor performs the following steps:

[0211] Obtain reverberation sound samples from open and closed environments corresponding to the sound to be simulated;

[0212] Based on the spatial enclosure degree of the sound source corresponding to the sound to be simulated, and the mapping relationship between the spatial enclosure degree and the reverberation sound simulation parameters, the reverberation sound simulation parameters corresponding to the sound to be simulated are determined.

[0213] Based on the reverberation sound simulation parameters, open environment reverberation sound samples, and closed environment reverberation sound samples, generate the open environment reverberation sound and closed environment reverberation sound corresponding to the sound to be simulated.

[0214] The reverberant sound from both open and enclosed environments is mixed and then played back to reproduce the sound effect of the simulated sound in a closed spatial environment.

[0215] In one feasible implementation, the processor 801 is further configured to: determine the location of the sound emitter in the game scene based on the geographic coordinate information of the sound emitter; the sound emitter is an object that emits the sound to be simulated;

[0216] Determine the bounding box of the space to which the sound source belongs based on its position in the game scene;

[0217] The spatial enclosure degree of the sound-emitting body is determined based on the spatial enclosure degree corresponding to the spatial enclosure box.

[0218] In one feasible implementation, the processor 801 is further configured to: construct a correspondence between the spatial environment enclosure degree and the reverberation simulation parameters of the open environment reverberation sound samples based on the magnitude of the reverberation simulation parameters of the open environment reverberation sound samples under each spatial environment enclosure degree.

[0219] Based on the magnitude of the reverberation simulation parameters of the reverberation sound samples in the enclosed environment under various spatial enclosure conditions, a correspondence between the spatial enclosure condition and the reverberation simulation parameters of the reverberation sound samples in the enclosed environment is constructed.

[0220] In a feasible implementation, the reverberation sound simulation parameters include at least one of the following: sound volume, sound fade-out parameters, and sound filtering parameters.

[0221] In one feasible implementation, the reverberation sound simulation parameters corresponding to the sound to be simulated include a first sound simulation parameter corresponding to an open environment and a second sound simulation parameter corresponding to a closed environment; wherein, the first sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the open environment, and the second sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the closed environment.

[0222] In one feasible implementation, the first sound simulation parameter includes at least one of the following: first target sound volume, first target sound fade-out parameter, and first target sound filtering parameter;

[0223] The second sound simulation parameters include at least one of the following: second target sound volume, second target sound fade-out parameters, and second target sound filtering parameters.

[0224] In one feasible implementation, when the processor 801 generates the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated based on the reverberation sound simulation parameters, the open environment reverberation sound sample, and the closed environment reverberation sound sample, it is specifically used to: adjust the sound of the open environment reverberation sound sample according to the first sound simulation parameters to generate the open environment reverberation sound corresponding to the sound to be simulated.

[0225] Based on the second sound simulation parameters, the sound of the reverberant sound sample in the closed environment is adjusted to generate the reverberant sound in the closed environment corresponding to the sound to be simulated.

[0226] In one feasible implementation, when processor 801 performs sound adjustment on open environment reverberation sound sample according to first sound simulation parameters, it is specifically used to: adjust the current volume of open environment reverberation sound sample to the first target sound volume.

[0227] Based on the first target sound fade-out parameters, the reverberant sound samples in the open environment are controlled to perform a sound fade-out operation during the first target sound fade-out effective time, and the sound fades out according to the first target sound fade-out duration and the first target sound fade-out flow rate multiplier; the first target sound fade-out parameters include: the first target sound fade-out effective time, the first target sound fade-out duration, and the first target sound fade-out flow rate multiplier.

[0228] Based on the first target sound filtering parameters, the reverberation sound samples in the open environment are controlled to perform sound filtering operations during the first target sound filtering effective time, and sound filtering is performed according to the first target sound filtering intensity and the first target sound filtering flow rate ratio; the first target sound filtering parameters include: the first target sound filtering effective time, the first target sound filtering intensity, and the first target sound filtering flow rate ratio.

[0229] In one feasible implementation, when the processor 801 performs sound fade-out according to the first target sound fade-out duration and the first target sound fade-out flow rate multiplier, it is specifically used to determine the target flow rate according to the first target sound fade-out flow rate multiplier and the base flow rate; and to perform sound fade-out according to the first target sound fade-out duration and the target flow rate.

[0230] In one feasible implementation, after the processor 801 generates the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated, it is further configured to: determine the spatial environment closure difference based on the spatial environment closure of the sound source and the spatial environment closure of the listener, wherein the spatial environment closure difference is the listener's spatial environment closure minus the spatial environment closure of the sound source.

[0231] Based on the difference in spatial enclosure, the reverberation sound in open environments and / or enclosed environments is corrected.

[0232] In one feasible implementation, when the processor 801 performs the correction of open environment reverberation sound and / or closed environment reverberation sound based on the difference in spatial environment enclosure, it specifically performs the following: if the difference in spatial environment enclosure is positive, it performs filtering processing on the open environment reverberation sound and the closed environment reverberation sound respectively and increases the sound volume.

[0233] If the difference in spatial enclosure is negative, the volume and fade-out duration of the reverberant sound in the open environment are increased, and the reverberant sound in the open environment is filtered.

[0234] In one feasible implementation, before acquiring open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated, the processor 801 is further configured to: determine the target sound source based on the sound type of the sound to be simulated;

[0235] In a pre-set open environment, the audio information of the target sound source emitted by the sound-emitting body is collected by the recording device to generate an open environment reverberation sound sample corresponding to the sound to be simulated.

[0236] In a pre-defined enclosed environment, audio information of the target sound source emitted by the sound-emitting body is collected by a recording device to generate a reverberant sound sample of the enclosed environment corresponding to the sound to be simulated; the positional and angular relationship between the recording device and the sound-emitting body meets the pre-defined requirements.

[0237] In this way, the electronic device can pre-collect and prepare open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to different types of sounds to be simulated. Based on the degree of enclosure of the space where the sound source is located, the reverberation sound simulation parameters corresponding to the sound to be simulated can be determined. After adjusting the sound attributes of the open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated using the reverberation sound simulation parameters, the open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated are generated. After mixing and playing the open-environment reverberation sound and closed-environment reverberation sound corresponding to the sound to be simulated, the sound playback effect heard by the listener is the same as the effect of the sound to be simulated traveling through space to reach the listener's ears, thus realizing the simulation of the mixing effect when sound travels through space. This method only requires pre-creating open-environment reverberation sound samples and closed-environment reverberation sound samples corresponding to the sound to be simulated. Furthermore, the open-environment and closed-environment reverberation sound samples corresponding to the same type of sound to be simulated can be identical, thus eliminating the need to pre-create a large number of sound samples and reducing memory usage. In addition, by adjusting the open-environment and closed-environment reverberation sound samples according to the reverberation simulation parameters corresponding to the sound to be simulated, a simple and fast sound mixing effect simulation can be achieved. It can simulate sound mixing effects in various complex spaces using only two sample sounds, demonstrating strong versatility, low development cost, low system consumption, and high execution efficiency. Moreover, since the reverberation simulation parameters are determined based on the actual reverberation effect of the sound to be simulated in the closed environment, the accuracy of the generated open-environment and closed-environment reverberation sounds is improved, enhancing the simulation effect of the sound mixing.

[0238] In this embodiment, the computer program, when run by the processor, can also execute other machine-readable instructions to perform other methods as described in the embodiments. For details on the specific execution steps and principles, please refer to the description of the embodiments, which will not be repeated here.

[0239] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0240] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0241] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0242] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A sound simulation method for games, characterized in that, include: Obtain reverberation sound samples from open and closed environments corresponding to the sound to be simulated; Based on the spatial enclosure degree of the sound-emitting body corresponding to the sound to be simulated, and the mapping relationship between the spatial enclosure degree and the reverberation sound simulation parameters, the reverberation sound simulation parameters corresponding to the sound to be simulated are determined. Based on the reverberation sound simulation parameters, the open environment reverberation sound sample, and the closed environment reverberation sound sample, generate the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated; The reverberant sound from the open environment and the reverberant sound from the enclosed environment are mixed and then played back to present the playback sound effect of the sound to be simulated under the enclosedness of the spatial environment.

2. The method according to claim 1, characterized in that... The method further includes: The location of the sound-emitting object in the game scene is determined based on its geographical coordinates; the sound-emitting object is the object that emits the sound to be simulated. Based on the position of the sound-emitting object in the game scene, determine the bounding box to which the position belongs; The spatial environment enclosure degree of the sound-emitting body is determined based on the spatial enclosure degree corresponding to the spatial enclosure box.

3. The method according to claim 1, characterized in that, The method further includes: Based on the magnitude of the reverberation simulation parameters of open environment reverberation sound samples under various spatial enclosure conditions, a correspondence between the spatial enclosure conditions and the reverberation simulation parameters of open environment reverberation sound samples is constructed. Based on the magnitude of the reverberation simulation parameters of the reverberation sound samples in the enclosed environment under various spatial enclosure conditions, a correspondence between the spatial enclosure condition and the reverberation simulation parameters of the reverberation sound samples in the enclosed environment is constructed.

4. The method according to claim 3, characterized in that, The reverberation sound simulation parameters include at least one of the following: sound volume, sound fade-out parameters, and sound filtering parameters.

5. The method according to claim 4, characterized in that, The reverberation simulation parameters corresponding to the sound to be simulated include a first sound simulation parameter corresponding to an open environment and a second sound simulation parameter corresponding to a closed environment; wherein, the first sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the open environment, and the second sound simulation parameter is used to adjust the parameters of the reverberation sound sample in the closed environment.

6. The method according to claim 5, characterized in that, The first sound simulation parameters include at least one of the following: first target sound volume, first target sound fade-out parameters, and first target sound filtering parameters; The second sound simulation parameters include at least one of the following: second target sound volume, second target sound fade-out parameters, and second target sound filtering parameters.

7. The method according to claim 6, characterized in that, Based on the reverberation sound simulation parameters, the open environment reverberation sound sample, and the closed environment reverberation sound sample, the open environment reverberation sound and the closed environment reverberation sound corresponding to the sound to be simulated are generated, including: Based on the first sound simulation parameters, the open environment reverberation sound sample is sound adjusted to generate the open environment reverberation sound corresponding to the sound to be simulated; Based on the second sound simulation parameters, the sound of the enclosed environment reverberation sound sample is adjusted to generate the enclosed environment reverberation sound corresponding to the sound to be simulated.

8. The method according to claim 7, characterized in that, The step of adjusting the sound of the open environment reverberation sound sample according to the first sound simulation parameters includes: Adjust the current volume of the open environment reverberation sound sample to the volume of the first target sound; Based on the first target sound fade-out parameters, the open environment reverberation sound sample is controlled to perform a sound fade-out operation during the first target sound fade-out effective time, and the sound fades out according to the first target sound fade-out duration and the first target sound fade-out flow rate multiplier; the first target sound fade-out parameters include: the first target sound fade-out effective time, the first target sound fade-out duration, and the first target sound fade-out flow rate multiplier. Based on the first target sound filtering parameters, the open environment reverberation sound sample is controlled to perform sound filtering operation at the first target sound filtering effective time, and sound filtering is performed according to the first target sound filtering intensity and the first target sound filtering flow rate multiple; the first target sound filtering parameters include: the first target sound filtering effective time, the first target sound filtering intensity, and the first target sound filtering flow rate multiple.

9. The method according to claim 8, characterized in that, The sound fade-out process, based on the fade-out duration and fade-out flow rate of the first target sound, includes: The target flow rate is determined based on the fade-out flow rate ratio of the first target sound and the base flow rate. The sound fades out based on the first target sound fade-out duration and the target flow rate.

10. The method according to any one of claims 1-9, characterized in that, After generating the open-environment reverberation sound and the enclosed-environment reverberation sound corresponding to the sound to be simulated, the method further includes: Based on the spatial enclosure degree of the sound-emitting body and the spatial enclosure degree of the listener, a spatial enclosure degree difference is determined, wherein the spatial enclosure degree difference is the spatial enclosure degree of the listener minus the spatial enclosure degree of the sound-emitting body. Based on the difference in the enclosure of the spatial environment, the reverberation sound in the open environment and / or the reverberation sound in the enclosed environment are corrected.

11. The method according to claim 10, characterized in that, The step of correcting the reverberation sound in the open environment and / or the reverberation sound in the enclosed environment based on the difference in the spatial environment enclosure includes: If the difference in the spatial environment enclosure is positive, then the reverberation sound in the open environment and the reverberation sound in the enclosed environment are filtered and the sound volume is increased respectively. If the difference in the spatial environment enclosure is negative, the volume of the reverberant sound in the open environment and the fade-out duration are increased, and the reverberant sound in the open environment is filtered.

12. The method according to any one of claims 1-9, characterized in that, Before acquiring the open environment reverberation sound samples and the closed environment reverberation sound samples corresponding to the sound to be simulated, the following steps are included: Determine the target sound source based on the type of sound to be simulated; In a pre-set open environment, audio information of the target sound source emitted by the sound-emitting body is collected by a recording device to generate an open environment reverberation sound sample corresponding to the sound to be simulated. In a pre-defined enclosed environment, audio information of the target sound source emitted by a sound-emitting body is collected by a recording device to generate a reverberant sound sample of the enclosed environment corresponding to the sound to be simulated; the positional and angular relationship between the recording device and the sound-emitting body meets the pre-defined requirements.

13. A sound simulation device for games, characterized in that, include: Acquisition module, determination module, processing module, playback module; The acquisition module is used to acquire open environment reverberation sound samples and closed environment reverberation sound samples corresponding to the sound to be simulated. The determining module is used to determine the reverberation simulation parameters corresponding to the sound to be simulated based on the spatial environment enclosure degree of the sound-emitting body corresponding to the sound to be simulated, and the mapping relationship between the spatial environment enclosure degree and the reverberation sound simulation parameters. The processing module is used to generate open environment reverberation sound and closed environment reverberation sound corresponding to the sound to be simulated based on the reverberation sound simulation parameters, the open environment reverberation sound sample, and the closed environment reverberation sound sample. The playback module is used to mix the reverberation sound of the open environment and the reverberation sound of the enclosed environment and then play it to present the playback sound effect of the sound to be simulated under the enclosedness of the spatial environment.

14. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform a sound simulation method in a game as described in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the sound simulation method in the game as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Audio playing control method and device, electronic equipment and readable storage medium

    CN112188363A

  • Method for suppressing sound reverberation in audio signal

    CN114745634A