Audio control method, device, electronic device and storage medium

By determining the target part from the load-bearing part of the virtual vehicle in the virtual simulation racing game and performing synchronous mixed playback, the phase problem caused by the selection of audio materials in the virtual simulation racing game is solved, improving the sound quality effect and reducing memory overhead.

CN114225411BActive Publication Date: 2024-12-03NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111523263.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2024-12-03
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

In the virtual simulation racing game, when multiple tires select the same audio material, it may lead to a dressing filtering effect, affecting the sound quality effect, and in order to avoid this problem, it is necessary to increase the number of random material segments, resulting in excessive memory overhead.

Method used

By determining multiple target parts in the active state from the virtual vehicle load-bearing part in the game scene, multiple audio positions are determined on the target audio sample according to the number of these parts, synchronous mixing playback is performed to avoid phase problems caused by material segment selection. , and reduce the length of audio samples to reduce memory overhead.

Benefits of technology

It effectively avoids phase problems, improves sound quality and reduces memory overhead, supports multiple target parts to play audio simultaneously without adding a large number of material segments, and reduces memory requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114225411B_ABST
    Figure CN114225411B_ABST
Patent Text Reader

Abstract

The present application provides an audio control method, device, electronic device and storage medium, and relates to the technical field. The method comprises: determining multiple target parts in an activated state from the load-bearing parts of at least one virtual vehicle in the game scene; determining multiple audio positions corresponding to the multiple target parts from the target audio samples according to the number of the multiple target parts, the target audio samples being audio samples corresponding to the action surface of the load-bearing parts in the game scene; and synchronously mixing and playing the target audio samples based on the multiple audio positions corresponding to the multiple target parts. The present application can avoid the audio phase problem and can also avoid generating large memory overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game technology, and in particular to an audio control method, device, electronic equipment and storage medium. Background Art

[0002] In virtual simulation racing games, the virtual vehicles in the game need to reproduce the real sound effects of tires during movement to achieve an immersive effect for players.

[0003] During the game, all tires of the vehicle controlled by the player (usually 4) and some tires of the non-player vehicle closest to the virtual camera in the current frame need to trigger corresponding tire sound effects separately. In the prior art, an audio sample is usually divided into multiple material segments, and the length of each material segment is 1-2s. When playing, a segment of material is randomly selected to play. When the end of the material is played, another segment of material is randomly selected to play, so that the material is repeatedly selected and played continuously.

[0004] When multiple tires select the same segment from the material pool, and the playback time difference between them is only a few to tens of milliseconds, a serious combing filter effect may occur, affecting the sound quality. In order to avoid phase problems, the number of random material segments is often increased, and because the length of random material cannot be too short, a large amount of memory overhead is generated. Summary of the invention

[0005] The purpose of the present invention is to provide an audio control method, device, electronic device and storage medium to address the deficiencies in the above-mentioned prior art, so as to avoid phase problems in audio playback, improve sound quality, and avoid generating large memory overhead.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides an audio control method, the method comprising:

[0008] Determine a plurality of target parts in an activated state from load-bearing parts of at least one virtual vehicle in the game scene;

[0009] According to the number of the multiple target parts, multiple audio positions corresponding to the multiple target parts are determined from the target audio samples; the target audio samples are audio samples corresponding to the action surface of the load-bearing parts in the game scene;

[0010] The target audio samples are played synchronously and mixedly at multiple audio positions corresponding to the multiple target parts.

[0011] Optionally, the at least one virtual vehicle includes: a controlled virtual vehicle, and the determining of the multiple target parts in an activated state from the at least one virtual vehicle in the game scene includes:

[0012] It is determined that all load-bearing parts of the controlled virtual vehicle in the at least one virtual vehicle are in an activated state; the multiple target parts include: all load-bearing parts of the controlled virtual vehicle.

[0013] Optionally, the at least one virtual vehicle further includes: other virtual vehicles, and the determining of the multiple target parts in an activated state from the at least one virtual vehicle in the game scene includes:

[0014] According to the distance between the virtual lens in the game scene and the load-bearing parts of the other virtual vehicles, determining from the load-bearing parts of the other virtual vehicles that the distance meets the preset conditions is in an activated state;

[0015] The multiple target parts also include: load-bearing parts in the other virtual vehicles that are in an activated state.

[0016] Optionally, the step of determining, based on the distance between the virtual lens in the game scene and the load-bearing parts of the other virtual vehicles, that the load-bearing parts whose distances meet a preset condition are in an activated state from the load-bearing parts of the other virtual vehicles comprises:

[0017] Determining the remaining number of the target parts according to a preset upper limit of the number of the plurality of target parts and the number of all load-bearing parts of the controlled virtual vehicle;

[0018] According to the distance between the virtual lens in the game scene and the load-bearing parts of the other virtual vehicles, determining the load-bearing parts of the other virtual vehicles whose distances meet the preset conditions;

[0019] The remaining number of load-bearing parts with the closest distances are selected from the load-bearing parts whose distances meet the preset conditions and are in an activated state.

[0020] Optionally, determining, from the target audio sample, a plurality of audio positions corresponding to the plurality of target parts according to the number of the plurality of target parts includes:

[0021] According to the number of the multiple target parts, the target audio sample is divided by a preset distance value to obtain the multiple audio positions.

[0022] Optionally, the first audio position among the multiple audio positions is the starting position of the target audio sample.

[0023] Optionally, the synchronously mixing and playing the target audio samples at multiple audio positions corresponding to the multiple target parts includes:

[0024] Synchronously mixing and playing the target audio sample based on current audio particles at multiple audio positions corresponding to the multiple target parts, wherein an audio particle is a minimum unit of the target audio sample;

[0025] When the current audio particle corresponding to each audio position is played, the playing position of the next audio particle corresponding to each audio position is determined;

[0026] The target audio sample is played synchronously and mixedly based on the next audio particles corresponding to the multiple audio positions corresponding to the multiple target parts.

[0027] Optionally, determining the playback position of the next audio particle corresponding to each audio position includes:

[0028] Calculating the offset modulation amount of the next audio particle according to the playback duration of a single audio particle in the target audio sample;

[0029] The playback position of the next audio particle is determined according to the playback position of the first audio particle and the offset modulation amount.

[0030] Optionally, before determining the playback position of the next audio particle according to the playback position of the first audio particle and the offset modulation amount, the method further includes:

[0031] Calculating the random modulation amount of the next audio particle according to the playback duration of the single audio particle;

[0032] The step of determining the playback position of the next audio particle according to the playback position of the first audio particle and the offset modulation amount includes:

[0033] The playback position of the next audio particle is determined according to the playback position of the first audio particle, the offset modulation amount, and the random modulation amount.

[0034] Optionally, before calculating the offset modulation amount of the next audio particle according to the playback duration of a single audio particle in the target audio sample, the method further includes:

[0035] The playback duration of the single audio particle is determined according to the characteristics of the target audio sample.

[0036] Optionally, the method further includes:

[0037] After a preset time interval, updating a plurality of audio positions corresponding to the plurality of target parts;

[0038] The audios starting from the updated multiple audio positions corresponding to the multiple target parts are mixed and then played.

[0039] Optionally, the method further includes:

[0040] When the target part changes from an activated state to an inactivated state, the audio at the audio position corresponding to the target part is faded out.

[0041] Optionally, the method further includes:

[0042] When the distance between the target part of the other virtual vehicle and the virtual lens meets the preset condition again, and the time when the target part is in the inactive state meets the minimum flipping time interval, the target part is changed from the inactive state to the active state again.

[0043] In a second aspect, an embodiment of the present invention further provides an audio control device, the device comprising:

[0044] A target part determination module, used to determine a plurality of target parts in an activated state from the load-bearing parts of at least one virtual vehicle in the game scene;

[0045] An audio position determination module, used to determine, according to the number of the multiple target parts, multiple audio positions corresponding to the multiple target parts from target audio samples; the target audio samples are audio samples corresponding to the action surface of the load-bearing parts in the game scene;

[0046] The first audio playing module is used to synchronously mix and play the target audio samples based on multiple audio positions corresponding to the multiple target parts.

[0047] Optionally, the at least one virtual vehicle includes: a controlled virtual vehicle, and the target part determination module is specifically used to determine that all load-bearing parts of the controlled virtual vehicle in the at least one virtual vehicle are in an activated state; the multiple target parts include: all load-bearing parts of the controlled virtual vehicle.

[0048] Optionally, the at least one virtual vehicle also includes: other virtual vehicles, and the target part determination module is specifically used to determine, based on the distance between the virtual lens in the game scene and the load-bearing parts of the other virtual vehicles, that the load-bearing parts whose distance meets a preset condition are in an activated state from the load-bearing parts of the other virtual vehicles; the multiple target parts also include: the load-bearing parts in the other virtual vehicles that are in an activated state.

[0049] Optionally, the target site determination module includes:

[0050] a remaining number determining unit, configured to determine the remaining number of the target parts according to a preset upper limit of the number of the plurality of target parts and the number of all load-bearing parts of the controlled virtual vehicle;

[0051] A distance judgment unit, configured to determine, according to the distance between the virtual lens in the game scene and the load-bearing parts of the other virtual vehicles, a load-bearing part whose distance meets a preset condition from the load-bearing parts of the other virtual vehicles;

[0052] The target part selection unit is used to select the remaining number of the closest load-bearing parts from the load-bearing parts whose distances meet the preset conditions and put them in an activated state.

[0053] Optionally, the audio position determination module is specifically configured to divide the target audio sample into equal distances according to the number of the multiple target parts to obtain the multiple audio positions.

[0054] Optionally, the first audio position among the multiple audio positions is the starting position of the target audio sample.

[0055] Optionally, the first audio playback module includes:

[0056] A current audio particle playback unit, configured to synchronously mix and play the target audio sample based on current audio particles at multiple audio positions corresponding to the multiple target parts, wherein an audio particle is the smallest unit of the target audio sample;

[0057] A next audio particle position determination unit, used to determine the playback position of the next audio particle corresponding to each audio position when the current audio particle at each audio position is played;

[0058] The next audio particle playing unit is used to synchronously mix and play the target audio sample based on the next audio particles corresponding to the multiple audio positions corresponding to the multiple target parts.

[0059] Optionally, the next audio particle position determining unit includes:

[0060] An offset modulation amount calculation subunit, used to calculate the offset modulation amount of the next audio particle according to the playback duration of a single audio particle in the target audio sample;

[0061] The next audio particle position determination subunit is used to determine the playback position of the next audio particle according to the playback position of the first audio particle and the offset modulation amount.

[0062] Optionally, before the offset modulation amount calculation subunit, the device further includes:

[0063] The audio particle playback duration determination subunit is used to determine the playback duration of the single audio particle according to the characteristics of the target audio sample.

[0064] Optionally, the device further comprises:

[0065] An audio position updating module, used for updating a plurality of audio positions corresponding to the plurality of target parts after a preset time interval;

[0066] The second audio playing module is used to mix and play the audio starting from the updated multiple audio positions corresponding to the multiple target parts.

[0067] Optionally, the device further comprises:

[0068] The fade-out processing module is used to fade-out the audio at the audio position corresponding to the target part when the target part changes from an activated state to an inactivated state.

[0069] Optionally, the device further comprises:

[0070] The activation state re-changing module is used to change the target part from the inactive state to the active state again when the distance between the target part of the other virtual vehicle and the virtual lens meets the preset condition again and the time when the target part is in the inactive state meets the minimum flipping time interval.

[0071] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: 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 the steps of the audio control method as described in any of the above method embodiments.

[0072] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the audio control method as described in any of the above method embodiments are executed.

[0073] The beneficial effects of this application are:

[0074] The present invention provides an audio control method, device, electronic device and storage medium, the method comprising: determining multiple target parts in an activated state from the load-bearing parts of at least one virtual vehicle in a game scene; determining multiple audio positions corresponding to the multiple target parts from target audio samples according to the number of the multiple target parts, the target audio samples being audio samples corresponding to the action surface of the load-bearing parts in the game scene; and synchronously mixing and playing the target audio samples based on the multiple audio positions corresponding to the multiple target parts. The present invention determines the playback positions of the multiple target parts on the target audio samples according to the number of the target parts in an activated state, so that the multiple target parts synchronously mix and play the target audio samples from the corresponding playback positions on the target audio samples, thereby avoiding the phase problem caused by the use of material segments causing two target parts to select the same segment of material, and because the length of the target audio samples is short, it can avoid generating a large memory overhead. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0076] Figure 1 A schematic diagram of the existing tire sound effect playback process;

[0077] Figure 2 A method flow chart of an optional embodiment of the audio control method of the present invention;

[0078] Figure 3 A schematic diagram of an audio sample equidistant division provided by an embodiment of the present invention;

[0079] Figure 4 A method flow chart of another optional embodiment of the audio control method of the present invention;

[0080] Figure 5 A method flow chart of another optional embodiment of the audio control method of the present invention;

[0081] Figure 6 A schematic diagram of determining a target site provided by an embodiment of the present invention;

[0082] Figure 7 A method flow chart of another optional embodiment of the audio control method of the present invention;

[0083] Figure 8 A method flow chart of another optional embodiment of the audio control method of the present invention;

[0084] Fig. 9 A method flow chart of another optional embodiment of the audio control method of the present invention;

[0085] Fig.10 A method flow chart of another optional embodiment of the audio control method of the present invention;

[0086] Fig.11 A schematic diagram of a playback position of a next audio particle provided by an embodiment of the present invention;

[0087] Fig.12 is a structural schematic diagram of an audio control device according to an embodiment of the present invention;

[0088] Fig.13 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0089] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0090] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0091] In the description of the present application, it should be noted that if the terms "upper", "lower", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the application is usually placed when used. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application.

[0092] In addition, the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0093] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.

[0094] In virtual simulation racing games, the virtual vehicles in the game need to reproduce the real sound effects of tires during movement to achieve an immersive effect for players.

[0095] During the game, all tires of the vehicle controlled by the player (usually 4) and some tires of the non-player vehicle closest to the virtual camera in the current frame need to trigger corresponding tire sound effects separately. In the prior art, an audio sample is usually divided into multiple material segments, and the length of each material segment is 1-2s.

[0096] Please refer to Figure 1 , which is a schematic diagram of the existing tire sound effect playing process, such as Figure 1 As shown, when playing, a piece of material is randomly selected for playing, and when the material is played to the end, another piece of material is randomly selected for playing, and the material is repeatedly selected and played continuously. When two pieces of material are alternated, in order to improve the continuity of the player's hearing, cross-fading is often used, the volume of the previous piece of material is gradually faded out, and the volume of the next piece of material is gradually faded in, and the sum of the energy of the two is kept unchanged during the fade-in and fade-out process, and the amount of audio played in the cross-fade time interval will be temporarily doubled.

[0097] When multiple tires select the same piece of material from the material pool, and the playback time difference between them is only a few to tens of milliseconds, serious comb filter effects may occur. The comb filter response will cause serious phase problems and affect the sound quality.

[0098] In order to avoid phase problems, the number of random material segments is often increased and the random playback strategy is adjusted. Assume that during the game, the four tires of the player's controlled virtual vehicle all play audio, and other virtual vehicles other than the player consider playing audio on a maximum of four tires. Considering that the number of audios needs to be doubled when crossfading, at least 16 material segments are required, and the random selection of material segments needs to exclude the 8 most recently played material segments to ensure that no phase problems occur.

[0099] However, because too short materials may cause defects that players can feel during rapid and repeated cross-fade transitions, the length of random materials cannot be shorter than 1 to 1.5 seconds. Due to the minimum length and minimum number of material segments, the sample length in the entire material pool may take more than 20 seconds, resulting in a large amount of memory overhead. If the game scene involves a variety of surface material types and a complex tire noise hierarchy, the game's memory overhead will become even greater.

[0100] In response to the problems existing in the above-mentioned prior art, the present invention proposes the following technical concept: determine the number of target parts that need to play audio in the game scene, and determine the audio position corresponding to each target part on a whole target audio sample based on the number; start mixing the audio from multiple audio positions and then play it. On the one hand, since there is no need to screen the material segments, there is a certain time interval between the audio positions corresponding to each two target parts, and no phase problem will occur during the playback process. In addition, the duration of a whole target audio sample does not need to be too long, thereby avoiding a large memory overhead.

[0101] Before introducing the technical solution of the present invention, a brief introduction to the related terms designed in the present invention is given.

[0102] Audio sample: also known as sound effect sample or audio material, is a sound material file that can be played. Different types of road materials in the game scene correspond to different audio samples.

[0103] Road material: refers to the material type of the road in the game scene, such as asphalt road, grass road, gravel road, etc.

[0104] Phase problem: When a material segment is played multiple times at the same time with a very small time interval, the comb filtering effect generated between the two audio segments causes some frequency bands of the sound to be enhanced and others to be weakened, creating a hollow, weak, swirling, and wandering auditory effect.

[0105] Granular synthesis: The process of decomposing audio samples into tiny fragments in real time is called "granulation". Each tiny fragment is called a "particle". The method of splicing one or more particles together for continuous playback is called granular synthesis.

[0106] Granular playback position: refers to the sampling position of the next particle to be played in the entire audio sample in the granular synthesizer, usually expressed as a percentage.

[0107] Granular synthesizer: A plug-in used to play audio in the audio engine.

[0108] Low Frequency Oscillator (LFO): Low Frequency Oscillator (LFO), used in the present invention to modulate the particle playback position.

[0109] Sound voice: abbreviated as voice, represents an instance of a played audio sample.

[0110] Based on the above introduction, the audio control method, device, electronic device and storage medium provided by the present invention are introduced in detail below.

[0111] Firstly, the present invention provides an audio control method.

[0112] Please refer to Figure 2 , is a method flow chart of an optional embodiment of the audio control method of the present invention, such as Figure 2 As shown, in this embodiment, the audio control method includes:

[0113] S10: Determine a plurality of target parts in an activated state from load-bearing parts of at least one virtual vehicle in the game scene.

[0114] Generally, in virtual simulation racing games, the game scene includes: a track made of various road materials and a virtual vehicle moving on the track. The virtual vehicle can be a virtual motor vehicle, such as a virtual car, a virtual motorcycle, etc. The load-bearing parts of the virtual vehicle are the tires of the virtual vehicle. The present invention is described below using a virtual car as an example.

[0115] In an embodiment of the present invention, during a game, at least one virtual vehicle included in a current frame of a game scene is determined, and according to a preset activation rule, a load-bearing part of the at least one virtual vehicle that is in an activated state is determined as a target part, and the activation state is used to indicate that the load-bearing part is a load-bearing part that requires playing an audio sample.

[0116] S20: Determine multiple audio positions corresponding to the multiple target parts from the target audio samples according to the number of the multiple target parts; the target audio samples are audio samples corresponding to the action surfaces of the load-bearing parts in the game scene.

[0117] In an embodiment of the present invention, the target audio sample is a corresponding audio sample obtained by screening from multiple audio samples according to the type of road surface material corresponding to the working surface of the load-bearing part of the virtual vehicle in the current frame, wherein different audio samples correspond to different types of road surface materials.

[0118] The number of multiple target parts determines the number of audio segments that need to be mixed and played simultaneously. In order to avoid phase problems caused by dividing the target audio sample into different material segments for random selection, an embodiment of the present invention directly determines multiple audio positions on the target audio sample according to the number of multiple target parts, and each audio position corresponds to a target part.

[0119] Furthermore, for this step, the present invention provides another implementation method, which includes:

[0120] According to the number of the multiple target parts, the target audio sample is divided by a preset distance value to obtain multiple audio positions.

[0121] In the embodiment of the present invention, according to the number of the multiple target parts, the target audio sample is divided into multiple audio segments of preset distance values ​​starting from any position of the target audio sample, and the starting playback position of each audio segment is the audio position corresponding to each target part. Optionally, the target audio sample can be divided into equal distances so that the lengths of the obtained audio segments are equal, which can further avoid the phase problem that occurs during the playback of multiple audio segments.

[0122] For examples, please refer to Figure 3 , is a schematic diagram of an audio sample equidistant division provided by an embodiment of the present invention, such as Figure 3 As shown, the audio sample is logically divided into multiple "slots", each slot can support the playback of a sound voice, and the position of each slot on the audio sample is represented by the cursor position slot. The length of the audio segment between any two adjacent cursor positions is equal. Figure 3 It is shown in the figure that when the number of target parts is 3, the audio positions corresponding to the three target parts are slot1, slot2, and slot3 respectively.

[0123] Furthermore, the first audio position among the multiple audio positions is the starting position of the target audio sample.

[0124] Specifically, to ensure that the distance between any two adjacent audio positions, that is, the length of the audio segment, is long enough when dividing the target audio sample, the starting position of the target audio sample can be used as the first audio position, and the other audio positions are set at equal distances after the starting position of the target audio sample.

[0125] For example, the initial position of the main cursor slot 1 is the starting position of the target audio sample, and the positions of other cursor slots n can be calculated based on the position of the main cursor and the number s of multiple target parts, that is:

[0126] S n =S1+n*100% / s

[0127] S30: Synchronously mixing and playing target audio samples at multiple audio positions corresponding to multiple target parts.

[0128] In an embodiment of the present invention, after determining multiple audio positions corresponding to multiple target positions on the target audio sample, the particle synthesizer synchronously mixes and plays the target audio samples at the multiple audio positions, thereby achieving synchronously mixing and playing the target audio samples at multiple target positions.

[0129] Furthermore, in order to improve the audio playback effect after mixing, the audio starting from the corresponding audio position can be adjusted according to the physical parameters of the virtual vehicle corresponding to the different target parts during the mixing process. For example, the physical parameters of the virtual vehicle include: the type of virtual vehicle, the speed of the virtual vehicle, the volume of the audio generated by the load-bearing parts of different types of virtual vehicles on the action surface is different, and the audio playback speed generated by virtual vehicles of different speeds is also different. According to the type of virtual vehicle and the speed of the virtual vehicle, the audio starting from the audio position corresponding to the corresponding target part is adjusted to make the audio playback effect more realistic.

[0130] The audio control method provided by the above embodiment determines multiple target parts in an activated state from the load-bearing parts of at least one virtual vehicle in the game scene; determines multiple audio positions corresponding to the multiple target parts from the target audio samples according to the number of the multiple target parts, and the target audio samples are audio samples corresponding to the action surface of the load-bearing parts in the game scene; and synchronously mixes and plays the target audio samples based on the multiple audio positions corresponding to the multiple target parts. The above embodiment determines the playback positions of the multiple target parts on the target audio sample according to the number of the target parts in the activated state, so that the multiple target parts synchronously mix and play the target audio samples from the corresponding playback positions on the target audio sample, thereby avoiding the phase problem caused by the use of material segments causing two target parts to select the same segment of material, and because the length of the target audio sample is short, it can avoid generating a large memory overhead.

[0131] Based on the above-mentioned embodiment of the present invention, another optional embodiment of the audio control method of the present invention is further proposed.

[0132] Please refer to Figure 4 , is a method flow chart of another optional embodiment of the audio control method of the present invention, such as Figure 4As shown, in this embodiment, the audio control method includes: S11, S12, S20 and S30, wherein S20 and S30 are the same as those in the above embodiment and will not be described in detail herein.

[0133] Specifically, the audio control method includes:

[0134] S11: Determine that all load-bearing parts of a controlled virtual vehicle in at least one virtual vehicle are in an activated state; the multiple target parts include: all load-bearing parts of the controlled virtual vehicle.

[0135] Generally, at least one virtual vehicle has a controlled virtual vehicle controlled by a player. During the game, the controlled virtual vehicle will appear in every frame. Therefore, the target part must include the load-bearing part of the controlled virtual vehicle.

[0136] In an embodiment of the present invention, in order to ensure the audio effect played, all load-bearing parts of the controlled virtual vehicle must play audio. Therefore, it is determined that all load-bearing parts of the controlled virtual vehicle are in an activated state, and the multiple target parts include: all load-bearing parts of the controlled virtual vehicle.

[0137] S12: According to the distance between the virtual lens and the load-bearing parts of other virtual vehicles in the game scene, determine from the load-bearing parts of other virtual vehicles that the distance meets the preset conditions and is in an activated state; the multiple target parts also include: the load-bearing parts in other virtual vehicles that are in an activated state.

[0138] Generally, in virtual simulation racing games, virtual vehicles controlled by different players chase each other in the game scene. Therefore, during the game, other virtual vehicles controlled by other players may drive into the current frame screen where the controlled virtual vehicle is located, or may drive out of the current frame screen where the controlled virtual vehicle is located.

[0139] In an embodiment of the present invention, when other virtual vehicles and the controlled virtual vehicle are in the current frame at the same time, the distance between the load-bearing parts of the other virtual vehicles and the virtual lens in the game scene is calculated, and the state of the load-bearing parts whose distance meets the preset conditions is updated to an activated state. The multiple target parts also include: the load-bearing parts of other virtual vehicles that are in an activated state.

[0140] S20: Determine multiple audio positions corresponding to the multiple target parts from the target audio samples according to the number of the multiple target parts; the target audio samples are audio samples corresponding to the action surfaces of the load-bearing parts in the game scene.

[0141] S30: Mix and play the audios starting from multiple audio positions corresponding to the multiple target parts.

[0142] The audio control method provided in the above embodiment determines that all load-bearing parts of the controlled virtual vehicle in at least one virtual vehicle are in an activated state, determines the distance between the virtual lens and the load-bearing parts of other virtual vehicles in the game scene, and determines that the load-bearing parts of other virtual vehicles whose distances meet preset conditions are in an activated state, and the multiple target parts include: all load-bearing parts of the controlled virtual vehicle and the load-bearing parts in other virtual vehicles that are in an activated state. The above embodiment can accurately determine the load-bearing parts that need to play audio, which is convenient for the subsequent particle synthesizer to determine the corresponding audio position for each load-bearing part that needs to play audio, and ensure that the particle synthesizer accurately mixes the audio and plays it.

[0143] Based on the above-mentioned embodiment of the present invention, another optional embodiment of the audio control method of the present invention is further proposed.

[0144] Please refer to Figure 5 , is a method flow chart of another optional embodiment of the audio control method of the present invention, such as Figure 5 As shown, in this embodiment, S12 in the audio control method of the above embodiment includes:

[0145] S121: Determine the remaining number of target parts according to the preset upper limit of the number of multiple target parts and the number of all load-bearing parts of the controlled virtual vehicle.

[0146] In an embodiment of the present invention, since there may be multiple virtual vehicles in the current frame of the game scene, the number of all load-bearing parts of the multiple virtual vehicles is relatively large. In order to avoid increasing the amount of calculation due to all load-bearing parts being in an activated state, a preset upper limit on the number of target parts in an activated state is set to save computing resources.

[0147] Based on the foregoing, all load-bearing parts of the controlled virtual vehicle are target parts. Therefore, the number of remaining target parts for competition by the load-bearing parts of other virtual vehicles is determined according to the preset upper limit and the number of all load-bearing parts of the controlled virtual vehicle.

[0148] S122: According to the distance between the virtual lens and the load-bearing parts of other virtual vehicles in the game scene, determine the load-bearing parts of other virtual vehicles whose distances meet preset conditions.

[0149] In the embodiment of the present invention, the process of calculating the distance between the load-bearing parts of other virtual vehicles and the virtual lens is as described in S12 above, and will not be described in detail here.

[0150] S123: Selecting the remaining number of load-bearing parts that are closest to the load-bearing parts that meet the preset conditions and putting them in an activated state.

[0151] In the embodiment of the present invention, among all the load-bearing parts that meet the preset conditions, the remaining number of load-bearing parts that are closest to the virtual lens are determined to be in an activated state according to the remaining number.

[0152] For example, the preset maximum number of multiple target parts is 6, please refer to Figure 6 , is a schematic diagram of determining a target part provided by an embodiment of the present invention, such as Figure 6 As shown, in the picture at time t1, including the controlled virtual vehicle "player car" and other virtual vehicles "car A", the four load-bearing parts of the player car are all in an activated state, and the remaining number of target parts that can be competed for is 2. The distance between the four load-bearing parts of car A and the virtual lens is calculated, and it is determined that the distance between the two load-bearing parts on the right side of car A and the virtual lens meets the preset conditions and is closest to the virtual lens, and it is determined that the two load-bearing parts on the right side of car A are in an activated state.

[0153] In the picture at time t2, including the controlled virtual vehicle "player car", other virtual vehicles "car A" and "car B", the four load-bearing parts of the player car are all in an activated state, and the distances between the four load-bearing parts of car A and the four load-bearing parts of car B and the virtual lens are calculated, and it is determined that the distances between the right rear load-bearing parts of car A and the left front load-bearing parts of car B and the virtual lens meet the preset conditions and are closest to the virtual lens, and it is determined that the right rear load-bearing parts of car A and the left front load-bearing parts of car B are in an activated state.

[0154] It should be noted that the four target parts of the player's car are numbered from left to right and from front to back. The number of the target part of car A remains unchanged according to the number of the previous frame, and the number of the target part of car B is the number of the load-bearing part that was eliminated in the previous frame and the current frame, such as Figure 6 As shown, from time t1 to time t2, the right front load-bearing part of vehicle A is eliminated, and the number 5 of the right front load-bearing part of vehicle A is updated to the left front load-bearing part of vehicle B. Figure 3 The numbers of the multiple cursor positions on the target audio samples shown correspond one to one.

[0155] The audio control method provided in the above embodiment determines the remaining number of target parts according to the preset upper limit of the number of multiple target parts and the number of all load-bearing parts of the controlled virtual vehicle, determines the load-bearing parts whose distances meet the preset conditions from the load-bearing parts of other virtual vehicles according to the distances between the virtual lens and the load-bearing parts of other virtual vehicles in the game scene, and selects the remaining number of load-bearing parts whose distances meet the preset conditions to be activated. The above embodiment reduces the number of target parts that need to determine the audio position by setting the upper limit of the number of target parts to select the load-bearing parts of some other virtual vehicles for activation, thereby saving computing resources.

[0156] Based on the above-mentioned embodiment of the present invention, another optional embodiment of the audio control method of the present invention is further proposed.

[0157] Please refer to Figure 7 , is a method flow chart of another optional embodiment of the audio control method of the present invention, such as Figure 7 As shown, in this embodiment, the audio control method includes: S10, S20, S31-S33, wherein S10 and S20 are the same as those in the above embodiment and will not be described in detail here.

[0158] Specifically, the audio control method includes:

[0159] S10: Determine a plurality of target parts in an activated state from load-bearing parts of at least one virtual vehicle in the game scene.

[0160] S20: Determine multiple audio positions corresponding to the multiple target parts from the target audio samples according to the number of the multiple target parts; the target audio samples are audio samples corresponding to the action surfaces of the load-bearing parts in the game scene.

[0161] S31: synchronously mixing and playing target audio samples based on current audio particles at multiple audio positions corresponding to multiple target parts, wherein an audio particle is the smallest unit of the target audio sample.

[0162] In an embodiment of the present invention, a particle synthesizer divides a target audio sample into multiple tiny segments, each tiny segment being the smallest unit of the target audio sample and being called an audio particle. The particle synthesizer performs particle synthesis on current audio particles at multiple audio positions corresponding to multiple target parts on the target audio sample, and synchronously mixes and plays the target audio sample based on multiple current audio particles.

[0163] S32: When the current audio particle corresponding to each audio position is played, the playing position of the next audio particle corresponding to each audio position is determined.

[0164] Generally, after a particle synthesizer finishes playing an audio particle, it will continue to play the audio particle repeatedly. In the embodiment of the present invention, in order to reflect the sense of change of the sound effect during the movement of the virtual vehicle and make the audio playback effect better, it is necessary to let the particle synthesizer play the next audio particle after playing an audio particle, so it is necessary to determine the position of the next audio particle on the target audio sample.

[0165] S33: Synchronously mix and play the target audio sample based on the next audio particles corresponding to the multiple audio positions corresponding to the multiple target parts.

[0166] In an embodiment of the present invention, after determining the playback position of the next audio particle, the particle synthesizer synthesizes the next audio particles corresponding to multiple target parts according to the physical parameters of the virtual vehicle corresponding to each target part, and synchronously mixes and plays the target audio samples based on the multiple next audio particles.

[0167] The audio control method provided by the above embodiment is based on the current audio particles at multiple audio positions corresponding to multiple target parts to synchronously mix and play the target audio sample, wherein the audio particle is the smallest unit of the target audio sample, and when the current audio particle at each audio position is played, the play position of the next audio particle corresponding to each audio position is determined, and the target audio sample is synchronously mixed and played based on the next audio particles corresponding to multiple audio positions corresponding to the multiple target parts. The above embodiment ensures that after the particle synthesizer synchronously mixes and plays the target audio sample based on multiple current audio particles, it can continue to synchronously mix and play the target audio sample based on multiple next audio particles without repeatedly playing the current audio particle, so that the played audio has a continuous sense of change and a more realistic effect.

[0168] Based on the above-mentioned embodiment of the present invention, another optional embodiment of the audio control method of the present invention is further proposed.

[0169] Please refer to Figure 8 , is a method flow chart of another optional embodiment of the audio control method of the present invention, such as Figure 8 As shown, S32 in the audio control method of the above embodiment includes:

[0170] S321: Calculate the offset modulation amount of the next audio particle according to the playback duration of a single audio particle in the target audio sample.

[0171] In the embodiment of the present invention, in order to make the audio particles continue to play backward along the target audio sample, it is necessary to calculate the playback position of the next audio particle to be played. The embodiment of the present invention adopts the offset modulation method for calculation, and uses a low-frequency oscillator to set the waveform to saw up + (ramp). The saw up + (ramp) waveform is essentially a straight line with a certain slope, whose horizontal coordinate is time and the vertical coordinate is the offset modulation amount. According to the number of audio particles that have been played and the playback time of a single audio particle, the current audio playback time is determined, and the offset modulation amount corresponding to the audio playback time is determined on the saw up + (ramp) waveform. The offset modulation amount is expressed as a percentage.

[0172] Furthermore, an embodiment of the present invention provides a method for determining the playback duration of a single audio particle, the method comprising:

[0173] Determine the playback duration of a single audio particle based on the characteristics of the target audio sample.

[0174] Specifically, the playback duration of a single audio particle is the particle length of the audio particle. The particle length is the smallest unit of audio playback and can be selected based on the characteristics of the audio sample. For example, for audio samples with small and stable audio changes, that is, the audio features in the audio sample are relatively few, because even if a long length is set, the changes in the audio particles played within the length are also very small, so the particle length can be set to a shorter length. For audio samples with drastic audio changes, that is, audio samples with obvious features in the audio, because a certain length of playback is required to hear the features in the audio more completely, the particle length can be set to a longer length.

[0175] S323: Determine the playback position of the next audio particle according to the playback position and the offset modulation amount of the first audio particle.

[0176] In the embodiment of the present invention, the playback position of the first audio particle is the audio position of each target part in the target audio sample, and the audio position is based on Figure 3 The corresponding cursor position slot, the position of the cursor position slot on the target audio sample is also expressed in the form of a percentage. Based on the playback position and offset modulation amount of the first audio particle, the playback position of the next audio particle on the target audio sample can be determined.

[0177] It should be noted that this embodiment is only described by determining the playback position of audio particles in a target part, but the above steps are used to determine the playback position of audio particles in each target part, which will not be repeated here.

[0178] The audio control method provided in the above embodiment calculates the offset modulation amount of the next audio particle according to the playback duration of a single audio particle in the target audio sample, and determines the playback position of the next audio particle according to the playback position and the offset modulation amount of the first audio particle. The above embodiment determines the playback position of the next audio particle on the target audio sample by the offset modulation amount, so that during the continuous playback process, the same audio particle is not played repeatedly, but the target audio sample can be played continuously backward according to the playback position of the next audio particle, so that the played audio has a continuous sense of change and a more realistic effect.

[0179] Based on the above-mentioned embodiment of the present invention, another optional embodiment of the audio control method of the present invention is further proposed.

[0180] Please refer to Fig. 9 , is a method flow chart of another optional embodiment of the audio control method of the present invention, such as Fig. 9As shown, S32 in the audio control method of the above embodiment includes S321, S322 and S324, wherein S321 is the same as the above embodiment and will not be described in detail here.

[0181] Specifically, the audio control method includes:

[0182] S321: Calculate the offset modulation amount of the next audio particle according to the playback duration of a single audio particle in the target audio sample.

[0183] S322: Calculate the random modulation amount of the next audio particle according to the playback duration of a single audio particle.

[0184] In the embodiment of the present invention, in order to make the playback position of the audio particle more random, after determining the offset modulation amount, a random modulation amount is added. The embodiment of the present invention adopts a random modulation method for calculation, and uses a low-frequency oscillator to set the waveform to random. The random waveform is essentially a completely random waveform without any change rules. Its horizontal axis is time, and its vertical axis is the random modulation amount. According to the number of audio particles that have been played and the playback time of a single audio particle, the current audio playback time is determined, and the random modulation amount corresponding to the audio playback time is determined on the random waveform. The random modulation amount is expressed in the form of a percentage.

[0185] S324: Determine the playback position of the next audio particle according to the playback position, offset modulation amount, and random modulation amount of the first audio particle.

[0186] In the embodiment of the present invention, based on the above S323, the random modulation amount is added to determine the playback position of the next audio particle on the target audio sample, which is not elaborated in this application.

[0187] The audio control method provided in the above embodiment calculates the random modulation amount of the next audio particle according to the playback duration of a single audio particle, and determines the playback position of the next audio particle according to the playback position, offset modulation amount and random modulation amount of the first audio particle. The above embodiment calculates the random modulation amount so that the playback position of each audio particle will produce a subtle random offset, so that the played audio will constantly change, avoiding repetitiveness in the listening experience.

[0188] Based on the above embodiment, another optional embodiment of the audio control method of the present invention is further proposed.

[0189] Please refer to Fig.10 , is a method flow chart of another optional embodiment of the audio control method of the present invention, such as Fig.10 As shown, in this embodiment, the audio control method further includes:

[0190] S40: after a preset time interval, updating a plurality of audio positions corresponding to a plurality of target parts.

[0191] Based on the above, we can know that the audio sample is logically divided into multiple "slots", each slot can support the playback of a sound voice. If the multiple audio positions corresponding to the multiple target parts remain unchanged, each target part can only repeatedly play the audio particles in the slot. In order to allow each target part to traverse and play the audio particles on the entire target audio sample, the multiple audio positions corresponding to the multiple target parts need to be updated, that is, Figure 3 The cursor position shown is updated.

[0192] In order to ensure that the audio particles in each target part will not be replayed from the beginning when the audio particles in the slot are played to the end of the slot, it is necessary to ensure that the multiple audio positions corresponding to the multiple target parts are updated before the audio particles in each target part are played to the end of the slot. Specifically, according to the playback speed of the target audio sample, the playback time required to play from the start to the end of each slot is determined, so that the update time of the audio position is less than the playback time, and the preset time interval is determined according to the playback time.

[0193] For example, the preset time interval t0, the audio position update increment percentage δ, the target audio sample duration t sample If the following formula is satisfied, it can be ensured that particles will not be played repeatedly in the slot within the update interval.

[0194] t0<t sample *δ

[0195] For example, assuming the shortest target audio sample length t sample =6s,δ=13% then t sample *δ=0.78. We can take t0=0.6. That is, every 0.6s, the game engine updates the audio engine with the change information of the audio position. If δ is selected as a prime number, it can be ensured that the particle playback position of the target audio sample will change after each loop.

[0196] It should be noted that when the cursor position S n >100%, wrap the audio position back to the beginning of the target audio sample: S n =S n -100%.

[0197] For examples, please refer to Fig.11 , is a schematic diagram of a playback position of a next audio particle provided by an embodiment of the present invention, such as Fig.11As shown, according to the characteristics of the target audio sample, the playback duration of a single audio particle is set to 0.2 seconds. Within the preset time interval of an audio position update, three audio particles can be played at each target position. Therefore, the aforementioned offset modulation and random modulation are required to calculate the playback position of the next audio particle twice. In this embodiment, the period of the saw up + (ramp) waveform is the same as the update time interval of the audio position, which is 0.6 seconds, so that after each audio position is updated, the saw up + (ramp) waveform also restarts the offset modulation, and the maximum modulation amount is also set to 13%. The period of the random waveform can be randomly set, and its maximum modulation amount can be set to a smaller value, such as 1.5%, to avoid affecting the positioning distribution of the playback position of the overall audio particles.

[0198] S50: Mix and play the audio starting from the updated multiple audio positions corresponding to the multiple target parts.

[0199] In an embodiment of the present invention, after a preset time interval, when multiple audio positions corresponding to multiple target parts are updated, the particle synthesizer will directly jump to the updated multiple audio positions after playing the current audio particles, and start audio synthesis and playing the multiple audio particles from the multiple audio positions.

[0200] Based on the above embodiment, another optional embodiment of the audio control method of the present invention is further proposed.

[0201] Specifically, the audio control method further includes:

[0202] When the target part changes from an activated state to an inactivated state, the audio at the audio position corresponding to the target part is faded out.

[0203] In the embodiment of the present invention, Figure 6 As shown, from time t1 to time t2, the load-bearing part in the right front of car A changes from an activated state to an inactivated state. The load-bearing part in the inactivated state does not need to play audio. In order to avoid causing the player to feel discontinuous in hearing, when the target part is deactivated, a fade-out time is set so that the audio of the deactivated target part will not be terminated immediately, but converted to a virtual voice part, and during the fade-out time, the audio of the audio is gradually reduced until it disappears completely. At the same time, a fade-in time is set for the newly activated target part, so that the audio of the newly activated target part is gradually increased to ensure that the audio of each target part in the played synthetic audio achieves a smooth transition.

[0204] The audio control method provided in the above embodiment fades out the audio at the audio position corresponding to the target part when the target part changes from an activated state to an inactivated state. The above embodiment can ensure that the audio achieves a smooth transition when the target part is switched, and the player will not experience obvious auditory defects.

[0205] Based on the above embodiment, another optional embodiment of the audio control method of the present invention is further proposed.

[0206] Specifically, the audio control method further includes:

[0207] When the distance between the target part of other virtual vehicles and the virtual lens meets the preset conditions again, and the time when the target part is in the inactive state meets the minimum flipping time interval, the target part is changed from the inactive state to the active state again.

[0208] The target part involved in the embodiment of the present invention is the target part that is converted from an activated state to a non-activated state in the above-mentioned embodiment. When multiple other virtual vehicles gather near the virtual lens, affected by the displacement changes of other virtual vehicles, the distance between the load-bearing parts of other virtual vehicles and the virtual lens may frequently switch between satisfying the preset conditions and not satisfying the preset conditions. In order to avoid jittering of the played audio, a minimum flipping time interval is set. When the target part is deactivated, even if the distance between the target part and the virtual lens satisfies the preset conditions again, it must wait until the deactivation time satisfies the minimum flipping time interval before it can be changed from the non-activated state to the activated state again.

[0209] After the target part is deactivated, the audio of the target part is converted from the real sound part to the virtual sound part. After the target part is reactivated, the audio of the target part is converted from the virtual sound part to the real sound part. According to the playback duration of the virtual sound part, the offset modulation amount and the random modulation amount are recalculated to determine the playback position of the new audio particles, and fade-in processing is performed within the fade-in time to achieve a smooth transition of the audio.

[0210] The audio control method provided in the above embodiment changes the target part from the inactive state to the active state again when the distance between the target part of the other virtual vehicle and the virtual lens meets the preset condition again, and the time the target part is in the inactive state meets the minimum flipping time interval. The above embodiment avoids audio jitter caused by frequent state switching of the target part and improves the audio playback effect by setting the minimum flipping time interval.

[0211] After testing, the audio control method provided by the present invention can support simultaneous audio playback of up to 10 target parts for audio samples of 6-10s without causing phase problems, with good playback effect, reducing the number and total length of audio samples and saving memory overhead.

[0212] Secondly, the present invention also provides an audio control device.

[0213] Please refer to Fig.12 , is a schematic diagram of the structure of an audio control device according to an embodiment of the present invention, such as Fig.12 As shown, the audio control device comprises:

[0214] A target part determination module 10, for determining a plurality of target parts in an activated state from the load-bearing parts of at least one virtual vehicle in the game scene;

[0215] The audio position determination module 20 is used to determine multiple audio positions corresponding to the multiple target parts from the target audio samples according to the number of the multiple target parts; the target audio samples are audio samples corresponding to the action surface of the load-bearing parts in the game scene;

[0216] The first audio playing module 30 is used to synchronously mix and play target audio samples at multiple audio positions corresponding to multiple target parts.

[0217] Optionally, at least one virtual vehicle includes: a controlled virtual vehicle, and the target part determination module 10 is specifically used to determine that all load-bearing parts of the controlled virtual vehicle in the at least one virtual vehicle are in an activated state; the multiple target parts include: all load-bearing parts of the controlled virtual vehicle.

[0218] Optionally, at least one virtual vehicle also includes: other virtual vehicles, and the target part determination module 10 is specifically used to determine, based on the distance between the virtual lens and the load-bearing parts of other virtual vehicles in the game scene, that the load-bearing parts of other virtual vehicles whose distances meet preset conditions are in an activated state; the multiple target parts also include: load-bearing parts in other virtual vehicles that are in an activated state.

[0219] Optionally, the target site determination module 10 includes:

[0220] A remaining number determining unit, used to determine the remaining number of target parts according to a preset upper limit of the number of multiple target parts and the number of all load-bearing parts of the controlled virtual vehicle;

[0221] A distance determination unit, for determining, based on the distance between the virtual lens and the load-bearing parts of other virtual vehicles in the game scene, a load-bearing part whose distance meets a preset condition from the load-bearing parts of other virtual vehicles;

[0222] The target part selection unit is used to select the remaining number of load-bearing parts that are closest to the load-bearing parts that meet the preset conditions and put them in an activated state.

[0223] Optionally, the audio position determination module 20 is specifically configured to divide the target audio sample into equal distances according to the number of the multiple target parts to obtain multiple audio positions.

[0224] Optionally, the first audio position among the multiple audio positions is the starting position of the target audio sample.

[0225] Optionally, the first audio playing module 30 includes:

[0226] A current audio particle playback unit, used to synchronously mix and play target audio samples based on current audio particles at multiple audio positions corresponding to multiple target parts, wherein an audio particle is the smallest unit of a target audio sample;

[0227] A next audio particle position determination unit is used to determine the playback position of the next audio particle corresponding to each audio position when the current audio particle at each audio position is played;

[0228] The next audio particle playing unit is used to synchronously mix and play the target audio sample based on the next audio particles corresponding to the multiple audio positions corresponding to the multiple target parts.

[0229] Optionally, the next audio particle position determining unit includes:

[0230] An offset modulation amount calculation subunit, used to calculate the offset modulation amount of the next audio particle according to the playback duration of a single audio particle in the target audio sample;

[0231] The next audio particle position determination subunit is used to determine the playback position of the next audio particle according to the playback position and offset modulation amount of the first audio particle.

[0232] Optionally, before the offset modulation amount calculation subunit, the device further includes:

[0233] The audio particle playback duration determination subunit is used to determine the playback duration of a single audio particle according to the characteristics of the target audio sample.

[0234] Optionally, the device further comprises:

[0235] An audio position updating module, used for updating a plurality of audio positions corresponding to a plurality of target parts after a preset time interval;

[0236] The second audio playing module is used to mix and play the audio starting from the updated multiple audio positions corresponding to the multiple target parts.

[0237] Optionally, the device further comprises:

[0238] The fade-out processing module is used to fade out the audio at the audio position corresponding to the target part when the target part changes from an activated state to an inactivated state.

[0239] Optionally, the device further comprises:

[0240] The activation state re-changing module is used to change the target part from the inactive state to the active state when the distance between the target part of other virtual vehicles and the virtual lens meets the preset conditions again and the time when the target part is in the inactive state meets the minimum flipping time interval.

[0241] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0242] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0243] Then, the present invention also provides an electronic device.

[0244] Please refer to Fig.13 , is a schematic diagram of an electronic device provided by an embodiment of the present invention, such as Fig.13 As shown, the electronic device 100 includes: a processor 101, a storage medium 102 and a bus. The storage medium 102 stores program instructions executable by the processor 101. When the electronic device 100 is running, the processor 101 and the storage medium 102 communicate through the bus. The processor 101 executes the program instructions to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0245] Finally, optionally, the present invention also provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed by a processor when it is run as in the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0246] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0248] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0249] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0250] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An audio control method, characterized in that: The method comprises: Determining a plurality of target parts in an activated state from load-bearing parts of at least one virtual vehicle in a game scene; the activated state is used to indicate that the target part is a load-bearing part for which an audio sample needs to be played, the at least one virtual vehicle comprising a controlled virtual vehicle, and the plurality of target parts in the activated state at least comprising all load-bearing parts of the controlled virtual vehicle; Dividing the target audio samples by a preset distance value according to the number of the multiple target parts to determine multiple audio positions corresponding to the multiple target parts; the target audio samples are audio samples corresponding to the action surface of the weight-bearing parts in the game scene; The target audio samples are played synchronously and mixedly at multiple audio positions corresponding to the multiple target parts.

2. The method according to claim 1, wherein The at least one virtual vehicle further includes: other virtual vehicles, and the determining of multiple target parts in an activated state from the at least one virtual vehicle in the game scene includes: According to the distance between the virtual lens in the game scene and the load-bearing parts of the other virtual vehicles, determining from the load-bearing parts of the other virtual vehicles that the load-bearing parts whose distances meet a preset condition are in an activated state; The multiple target parts also include: load-bearing parts in the other virtual vehicles that are in an activated state.

3. The method according to claim 2, wherein The step of determining, based on the distance between the virtual lens in the game scene and the load-bearing parts of the other virtual vehicles, that the load-bearing parts whose distances meet a preset condition are in an activated state from the load-bearing parts of the other virtual vehicles comprises: Determining the remaining number of the target parts according to a preset upper limit of the number of the plurality of target parts and the number of all load-bearing parts of the controlled virtual vehicle; Determining, from the load-bearing parts of the other virtual vehicles, a load-bearing part whose distance satisfies a preset condition, according to the distance between the virtual lens in the game scene and the load-bearing part of the other virtual vehicles; The remaining number of load-bearing parts with the closest distances are selected from the load-bearing parts whose distances meet the preset conditions and are in an activated state.

4. The method according to claim 1, wherein The first audio position among the multiple audio positions is the starting position of the target audio sample.

5. The method according to claim 1, wherein The synchronously mixing and playing the target audio samples at the multiple audio positions corresponding to the multiple target parts includes: Synchronously mixing and playing the target audio sample based on current audio particles at multiple audio positions corresponding to the multiple target parts, wherein an audio particle is the smallest unit of the target audio sample; When the current audio particle at each audio position is played, the playback position of the next audio particle corresponding to each audio position is determined; The target audio sample is played synchronously based on next audio particles corresponding to multiple audio positions corresponding to the multiple target parts.

6. The method according to claim 5, wherein The determining the playback position of the next audio particle corresponding to each audio position includes: Calculating the offset modulation amount of the next audio particle according to the playback duration of a single audio particle in the target audio sample; The playback position of the next audio particle is determined according to the playback position of the first audio particle and the offset modulation amount.

7. The method according to claim 6, wherein Before determining the playback position of the next audio particle according to the playback position of the first audio particle and the offset modulation amount, the method further includes: Calculating a random modulation amount of the next audio particle according to the playback duration of the single audio particle; The determining the playback position of the next audio particle according to the playback position of the first audio particle and the offset modulation amount includes: The playback position of the next audio particle is determined according to the playback position of the first audio particle, the offset modulation amount, and the random modulation amount.

8. The method according to claim 6, wherein Before calculating the offset modulation amount of the next audio particle according to the playback duration of a single audio particle in the target audio sample, the method further includes: The playback duration of the single audio particle is determined according to the characteristics of the target audio sample.

9. The method according to any one of claims 1 to 8, wherein: The method further comprises: After a preset time interval, updating a plurality of audio positions corresponding to the plurality of target parts; The audios starting from the updated multiple audio positions corresponding to the multiple target parts are mixed and then played.

10. The method according to claim 1, wherein The method further comprises: When the target portion changes from an activated state to an inactivated state, the audio at the audio position corresponding to the target portion is faded out.

11. The method according to claim 2, wherein The method further comprises: When the distance between the target part of the other virtual vehicle and the virtual lens meets the preset condition again, and the time when the target part is in the inactive state meets the minimum flipping time interval, the target part is changed from the inactive state to the active state again.

12. An audio control device, characterized in that: The device comprises: a target part determination module, configured to determine a plurality of target parts in an activated state from among the load-bearing parts of at least one virtual vehicle in a game scene; the activated state being used to indicate that the target part is a load-bearing part for which an audio sample needs to be played, the at least one virtual vehicle comprising a controlled virtual vehicle, the plurality of target parts in the activated state comprising at least all the load-bearing parts of the controlled virtual vehicle; an audio position determination module, configured to divide the target audio samples into preset distance values ​​according to the number of the multiple target parts, and determine multiple audio positions corresponding to the multiple target parts; the target audio samples are audio samples corresponding to the action surface of the load-bearing parts in the game scene; The first audio playing module is configured to synchronously mix and play the target audio samples based on the multiple audio positions corresponding to the multiple target parts.

13. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the program instructions to perform the steps of the audio control method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the audio control method according to any one of claims 1 to 11 are executed.