Game audio playing control method and device and electronic equipment

By decoding and processing the audio data on the playback management module outside the game audio engine, the problem of inability to edit after packaging of the game audio engine is solved. It supports MP3 and other formats, improving the personalized experience of game audio and the ability to import audio data .

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

Patent Information

Application Number
CN202310712885.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The existing game audio engine cannot be edited after packaging, which limits players' personalized experience and UGC audio applications, especially the lack of support for MP3 audio decoding, resulting in users being unable to import UGC content in an ideal format.

Method used

By decoding the playback management module outside the game audio engine, it supports streaming playback and multiple encoding formats, such as MP3 and Vorbis, directly input the decoded data into the game audio engine, avoiding editing restrictions during packaging, and inputting through audio The instance is played in the game scene.

Benefits of technology

Support players to upload personalized game audio, which improves the personalized experience of game audio, and expands the scope of support for audio data formats, including MP3 format, and realizes the ideal format import and playback in game scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119139698A_ABST
    Figure CN119139698A_ABST
Patent Text Reader

Abstract

The invention provides a game audio playing control method and device and electronic equipment, and the method comprises the steps: obtaining an audio playing instruction generated in a game scene, and determining to-be-played audio data; wherein the audio data comprises a target audio and a playing attribute of the target audio; decoding the audio data through a preset playing management module to obtain decoded data of the audio data; wherein the playing management module is located outside the game audio engine; audio in the game scene is played based on a game audio engine; and inputting the decoded data into a game audio engine, creating an audio input instance in the game audio engine, and playing the decoded data of the target audio in the game scene through the audio input instance according to the playing mode. According to the mode, the player is supported to upload the game audio subjected to personalized editing, and the game audio is applied to the game scene, so that the personalized experience of the player on the game audio is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio processing, and in particular to a method, device and electronic equipment for controlling the playback of game audio. Background Art

[0002] There are usually various types of audio in game scenes, such as footsteps, gunshots, explosions, etc. The development of game audio is mainly implemented through audio engines, which are also called audio middleware. After the developer edits the game audio in the game audio engine, the game audio is packaged and published in the game audio engine. Game audio usually has some properties, such as volume, fade-in or fade-out properties, grouping information, etc. When the game audio is packaged and published by the game audio engine, these properties are fixed and can no longer be edited. This way of processing game audio makes it impossible for game players to upload personalized game audio and apply it in game scenes, affecting the players' personalized experience of game audio. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a method, device and electronic device for controlling the playback of game audio, so as to support players to upload personalized game audio and apply it in game scenes, so as to enhance the players' personalized experience of setting game audio attributes.

[0004] In a first aspect, an embodiment of the present invention provides a method for controlling the playback of game audio, the method comprising: obtaining an audio playback instruction generated in a game scene, and determining audio data to be played; wherein the audio data includes a target audio and playback attributes of the target audio; the playback attribute indicates: a playback method of the target audio in the game scene; decoding the audio data through a preset playback management module to obtain decoded data of the audio data; wherein the playback management module is located outside the game audio engine; the audio in the game scene is played based on the game audio engine; the decoded data is input into the game audio engine, an audio input instance is created in the game audio engine, and the decoded data of the target audio is played in the game scene through the audio input instance according to the playback method.

[0005] In a second aspect, an embodiment of the present invention provides a playback control device for game audio, the device comprising: a first determination module, used to obtain an audio playback instruction generated in a game scene, and determine audio data to be played; wherein the audio data includes a target audio and playback attributes of the target audio; the playback attribute indicates: a playback method of the target audio in the game scene; a first decoding module, used to decode the audio data through a preset playback management module to obtain decoded data of the audio data; wherein the playback management module is located outside the game audio engine; the audio in the game scene is played based on the game audio engine; a first playback module, used to input the decoded data into the game audio engine, create an audio input instance in the game audio engine, and play the decoded data of the target audio in the game scene according to the playback method through the audio input instance.

[0006] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned game audio playback control method.

[0007] In a fourth aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned game audio playback control method.

[0008] The embodiments of the present invention bring the following beneficial effects:

[0009] The embodiment of the present invention provides a method, device and electronic device for controlling the playback of game audio. The method includes: obtaining an audio playback instruction generated in a game scene, and determining the audio data to be played; wherein the audio data includes a target audio and the playback attributes of the target audio; the playback attribute indicates: the playback mode of the target audio in the game scene; the audio data is decoded and processed by a preset playback management module to obtain decoded data of the audio data; wherein the playback management module is located outside the game audio engine; the audio in the game scene is played based on the game audio engine; the decoded data is input into the game audio engine, an audio input instance is created in the game audio engine, and the decoded data of the target audio is played in the game scene according to the playback mode through the audio input instance. In this method, the audio data is decoded and processed by the playback management module, and the obtained decoded data is input into the game audio engine, and the decoded data of the audio is played in the game scene according to the corresponding playback mode in the audio data through the audio input instance in the game audio engine. This method does not require the game audio engine to package the game audio. The audio data is decoded through a preset playback management module, and then the decoded data is input into the game audio engine, and played in the game scene through the audio input instance in the game audio engine. Therefore, this method supports players to upload personalized edited game audio and apply it in the game scene, thereby enhancing the player's personalized experience of game audio.

[0010] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0011] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0013] Figure 1 A flowchart of a method for controlling the playback of game audio provided by an embodiment of the present invention;

[0014] Figure 2 A schematic diagram of a volume control curve provided by an embodiment of the present invention;

[0015] Figure 3 A schematic diagram of an audio data transmission method provided by an embodiment of the present invention;

[0016] Figure 4 A schematic diagram of the structure and function of a game engine provided by an embodiment of the present invention;

[0017] Figure 5 A schematic diagram of the structure of a game audio playback control device provided by an embodiment of the present invention;

[0018] Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0020] First, the nouns involved in the embodiments of the present application are introduced:

[0021] UGC (User Generated Content) refers to content generated by users and generally displayed or provided to other users through Internet platforms.

[0022] MOD (Modification): refers to the modification of the original electronic game by the game manufacturer or players to form a derivative version.

[0023] Messiah Engine: A video game engine.

[0024] Wwise: Software for interactive media and video games consisting of an audio authoring tool and a sound engine.

[0025] AudioInput plug-in: A plug-in within the Wwise engine that is used to receive audio streams from the outside.

[0026] MP3 (Moving Picture Experts Group Audio Layer III): An audio encoding technology that can significantly reduce the audio data capacity through a lossy compression algorithm.

[0027] Vorbis: An audio coding technology that can significantly reduce the audio data capacity through a lossy compression algorithm, often using Ogg as the container format.

[0028] Ogg (OGG Vorbis): A free and open standard multimedia file format.

[0029] MicroSE: In this case, it refers to a self-developed software module used for audio decoding and related file and thread management.

[0030] Streaming playback mode: During audio playback, a small section of the audio file is read into the memory for decoding one by one, which is different from the method of reading the entire file at one time.

[0031] The development of the video game industry has promoted various new demands. Support for UGC content has become one of the trends. Under the framework of some mature games, users are allowed to import their own art or audio resources to replace official resources. Sometimes, users are even allowed to edit or create game scenes or characters by themselves. For example, some time strategy games or multiplayer online competitive games will open map or character editors to users. However, in terms of game audio editing, these editors have limited support for the UGC audio file format uploaded by users and the personalized settings of audio attributes.

[0032] In the related technology, an audio engine is used to control the playback properties of game audio, such as: voice control, dynamic mixing, spatial orientation expression, etc. of game audio. However, the resources integrated into the game scene through the audio engine must be packaged before they can be released. However, the key attributes of the packaged audio resources are fixed, and it is difficult to edit them after release, which makes players lack the means to achieve specific auditory effects, affecting the players' personalized experience of game audio; secondly, the ideal user experience is that UGC resources are directly reflected in the game after import, but professional development processes such as compilation and packaging are inconsistent with this; in addition, the mainstream audio engine Wwise does not support MP3 audio decoding, which may cause users to be unable to import UGC content in an ideal format, or even unable to import UGC content.

[0033] Therefore, the above defects have greatly limited the realization of UGC functions. Although there are very few games that do not use commercial engines, but all functions are developed by developers themselves, the technical threshold and development costs are too high, which is not realistic for most manufacturers.

[0034] Based on this, the embodiments of the present invention provide a method, device, system and electronic device for controlling the playback of game audio, and the technology can be applied to game audio development.

[0035] To facilitate understanding of this embodiment, a method for controlling the playback of game audio disclosed in an embodiment of the present invention is first introduced in detail. The method can be applied to a local terminal device on which a game client is running; or, the method can also be applied to a cloud server running a game; Figure 1 As shown, the method comprises the following steps:

[0036] Step S102: obtaining an audio playback instruction generated in the game scene, and determining audio data to be played; wherein the audio data includes a target audio and a playback attribute of the target audio; the playback attribute indicates: a playback mode of the target audio in the game scene;

[0037] The above audio data includes the target audio and the playback attributes of the target audio. In this embodiment, the target audio may be an audio file stored locally, for example, the audio content edited by the game player, i.e., UGC audio; the audio playback attributes indicate how the target audio is played in the game scene, and the audio playback attributes may include: volume, grouping, fade-in and fade-out, 3D attenuation rules and other attribute parameters.

[0038] Game players can set audio playback attributes through the editing interface and record them in the audio data of the target audio. When the target audio is running, the playback attributes of the target audio are passed to the game audio engine and reflected in the listening experience in real time. The above audio playback instructions are used to issue audio playback commands. The audio playback instructions are associated with the corresponding audio data. After the game audio engine receives the audio playback command, it can determine the associated audio data as the audio data to be played and play it according to the playback method corresponding to the audio playback attributes.

[0039] Here, the audio playback command can be issued after a specified game event is triggered, or it can be issued after the scene object to which the audio is attached meets the specified conditions. After the audio playback command is obtained, the audio data associated with the audio playback instruction is determined as the audio data to be played, and then played. For example: the audio playback instruction is to play the applause audio edited by the player after the game is successfully completed. When the player successfully completes the game, the game audio engine determines the applause audio as the audio data to be played and plays the applause; or, the player pre-customizes and edits a virtual model of a bird and attaches it to the edited bird sound. When the bird model appears in the game scene, an audio playback instruction is generated, and then the bird sound is automatically played.

[0040] Step S104: Decoding the audio data through a preset playback management module to obtain decoded audio data; wherein the playback management module is located outside the game audio engine; and the audio in the game scene is played based on the game audio engine;

[0041] The playback management module is located outside the game audio engine and integrates functions such as audio decoding, streaming playback, synchronous and asynchronous playback, file and thread management. In order to enrich the diversity of audio resources, the playback management module also supports mainstream encoding formats such as MP3 and Vorbis. The above-mentioned decoded data is the audio sampling data obtained after the playback management module parses and processes the audio data according to the preset decoding method. The above-mentioned game audio engine is used to play the audio in the game scene and realize the interactive audio effect in the game scene. Common game audio engines include the Wwise engine.

[0042] That is to say, after determining the audio data to be played, the audio data is decoded and processed through the preset playback management module to obtain the decoded data of the audio data for the game audio engine to play in the game scene. Among them, the decoding processing method is related to the playback attributes in the audio data and the audio encoding format in the audio data. For example: if the playback attribute is the streaming playback mode, the audio data is read segment by segment and then decoded; if the audio encoding format is MP3 format, the MP3 format needs to be converted into a recognizable data format for the game audio engine.

[0043] In this step, the audio data can be decoded by a playback management module outside the game audio engine to obtain decoded data of the audio data.

[0044] Step S106: input the decoded data into the game audio engine, create an audio input instance in the game audio engine, and play the decoded data of the target audio in the game scene according to the playback mode through the audio input instance.

[0045] The above audio input instance is used to implement the playback of audio decoding data in the game audio engine, which is generally created through an audio input plug-in. Each audio decoding data can be played through an independent audio input instance.

[0046] In this step, the decoded data is input into the game audio engine. An independent audio input instance can be created for each decoded data. According to the playback mode corresponding to the playback attributes in the audio data, the playback interface is called in the game scene to play the decoded data of the target audio to realize the playback of audio resources.

[0047] The above-mentioned method for controlling the playback of game audio obtains the audio playback instruction generated in the game scene and determines the audio data to be played; wherein the audio data includes the target audio and the playback attributes of the target audio; the playback attributes indicate: the playback mode of the target audio in the game scene; the audio data is decoded and processed through a preset playback management module to obtain the decoded data of the audio data; wherein the playback management module is located outside the game audio engine; the audio in the game scene is played based on the game audio engine; the decoded data is input into the game audio engine, an audio input instance is created in the game audio engine, and the decoded data of the target audio is played in the game scene according to the playback mode through the audio input instance. In this method, the audio data is decoded and processed through the playback management module, and the obtained decoded data is input into the game audio engine, and the decoded data of the audio is played in the game scene according to the corresponding playback mode in the audio data through the audio input instance in the game audio engine. This method does not require the game audio engine to package the game audio. The audio data is decoded through a preset playback management module, and then the decoded data is input into the game audio engine, and played in the game scene through the audio input instance in the game audio engine. Therefore, this method supports players to upload personalized edited game audio and apply it in the game scene, thereby enhancing the player's personalized experience of game audio.

[0048] The following embodiments provide a specific implementation method for obtaining decoded data of audio data.

[0049] In one method, if the current playback mode is a streaming playback mode, a preset playback management module is used to read data segments from the audio data one by one, and the read data segments are decoded to obtain decoded segments corresponding to the data segments; wherein, the decoded segments corresponding to multiple data segments constitute the decoded data of the audio data.

[0050] The playback management module has the function of supporting streaming playback. When the current playback mode is the streaming playback mode, the playback management module reads a small segment of the audio data into the memory for decoding one by one, and further, the decoding segments corresponding to multiple data segments are sequentially composed of the decoded data of the audio data.

[0051] In one method, the audio encoding format of audio data is identified through a preset playback management module; a decoding method is determined based on the identified audio encoding format, and the audio data is decoded according to the decoding method to obtain decoded data of the audio data; wherein the data format of the decoded data matches the recognizable data format of the game audio engine.

[0052] The above audio encoding format may be MP3, Vorbis or other encoding formats.

[0053] The above-mentioned playback management module has the function of supporting mainstream encoding formats such as MP3 and Vorbis. Here, the playback management module can also identify the audio encoding format of the audio data. The decoding method is determined according to the content of the audio encoding format. After the audio data is decoded according to the decoding method, the data format of the final decoded data matches the recognizable data format of the game audio engine.

[0054] For example, the audio data encoding formats that the Wwise audio engine can recognize include PCM (Pulse-Code Modulation) uncompressed encoding. If the audio data file is in Ogg or MP3 format, the playback management module can decode the audio data file in Ogg or MP3 format, obtain audio data in PCM encoding format, and send it to the Wwise audio engine for playback. Of course, if the audio file is originally PCM encoded, there is no need to decode it, and the audio data can be directly read and sent to the Wwise audio engine.

[0055] In the related art, since the audio data encoding formats that the Wwise audio engine can recognize include the PCM non-compressed encoding format and the Vorbis (i.e., Ogg commonly used encoding) compressed encoding format, etc., and the MP3 encoding format is not supported, and the MP3 audio data cannot be decoded, this may result in the user being unable to import audio data in an ideal format, or even unable to upload the edited audio content to the game audio engine. In this embodiment, the audio decoding function of the playback management module makes up for the Wwise audio engine's restriction on MP3 format audio files and expands the range of supported audio data formats.

[0056] The decoding of the above-mentioned UGC audio is implemented through a playback management module outside the game audio engine. The game audio engine does not need to package the audio data, thus avoiding the editing restrictions on the game audio during the packaging process. At the same time, the playback management module decodes the audio data in different ways according to the audio data playback mode and the audio encoding format of the audio data, and can also support mainstream encoding formats such as MP3 and Vorbis, making it convenient for users to import UGC content in an ideal format.

[0057] After the playback management module decodes the audio data, the decoded data needs to be input into the game audio engine so that the game audio engine can play it in the game scene.

[0058] Specifically, a data transmission mode of the decoded data is determined; wherein the data transmission mode includes a synchronous transmission mode or an asynchronous transmission mode; and according to the data transmission mode, the decoded data is input into the game audio engine.

[0059] The playback management module can also determine the data transmission mode of the decoded data to control the playback of multiple audio data sources such as synchronous playback and asynchronous playback of the audio data. Here, the playback management module can determine the data transmission mode of the decoded data according to the audio playback attributes contained in the audio data. When there are multiple audio data to be played, different threads are started to transmit the decoded data respectively. For example, the playback management module can include multiple threads such as the main thread, asynchronous thread, streaming processing thread and I / O thread.

[0060] In one method, an audio input plug-in is installed in a game audio engine; decoded data is received through the audio input plug-in; an audio input instance of the audio input plug-in is created in the game audio engine; wherein the audio input instance corresponds to the decoded data; in an initial state, the audio input instance is an empty instance, and the audio input instance is used to play the decoded data received by the audio input plug-in.

[0061] The above-mentioned audio input plug-in can specifically be an Audioinput plug-in. The application of the AuioInput plug-in is mostly to meet the needs of voice communication. Here, the Audioinput plug-in can be used as a channel for audio decoding data to enter the game audio engine, and each decoded data can be played through an independent Audioinput instance.

[0062] In this method, after receiving the decoded data through the audio input plug-in, an audio input instance of the audio input plug-in is created in the game audio engine. Initially, the audio input instance is a special resource whose actual content is "empty", so that the player can use the empty instance to input UGC audio data into the game audio engine.

[0063] In an example, taking the Wwise audio engine as an example, Audioinput is an audio input plug-in in the Wwise engine. An Audioinput instance based on the AudioIInput plug-in is created in the Wwise project, and each UGC resource is played through an independent Audioinput instance. If the Wwise resource, called Event, is regarded as the encapsulation and reference of audio content, then for the AudioInput instance, it can be understood as an "empty" Event, which makes it convenient for subsequent players to use the empty instance to input UGC audio data into the game audio engine for playing UGC audio resources.

[0064] The following embodiments provide specific implementations of decoding data for playing target audio.

[0065] In one method, the playback attributes include sound effect space attributes; the sound effect space attributes include three-dimensional playback attributes or two-dimensional playback attributes; through the audio input instance, the specified playback interface in the game audio engine is called; wherein the specified playback interface is used to: play the target audio according to the sound effect playback attributes; play the target audio according to the sound effect space attributes through the specified playback interface.

[0066] The above three-dimensional playback attribute corresponds to the three-dimensional playback mode of audio data, which dynamically controls the volume according to the three-dimensional space distance. The sound perception will be different if the position of the sound source is different relative to the listening position. The above two-dimensional playback attribute is a playback mode in which audio data is played at a constant volume. The audio playback effect is the same regardless of the listening position in the game scene.

[0067] Here, the game audio engine allows the user to set the sound effect space attributes of the audio data. The sound effect space attributes include three-dimensional playback attributes or two-dimensional playback attributes. According to the user's settings, the game audio engine can control the audio input instance to call the specified playback interface through the internal API (Application Programming Interface) to make the UGC audio achieve the expected playback mode.

[0068] For example, the player sets the audio playback properties of UGC audio A through the game interface and saves the audio properties. When the game audio engine receives the audio data of audio A through the audio input instance, it controls the audio input instance to call the specified playback interface and play it according to the playback method corresponding to the audio playback properties.

[0069] In one method, if the sound effect space attribute is a three-dimensional playback attribute, the audio playback position and listening position of the target audio are obtained from the game scene through a specified playback interface; based on the audio playback position and the listening position, the azimuthal performance parameters of the target audio are determined; wherein the azimuthal performance parameters include: playback control parameters of the target audio in a plurality of preset channels; and according to the azimuthal performance parameters, the target audio is controlled to be played in a plurality of channels.

[0070] The above-mentioned listening position is the position for listening to audio data. In some embodiments, the listening position can be the position of the controlled virtual object controlled by the player in the game scene; it can also be a position preset by the player himself. The above-mentioned audio playback position refers to the position where the audio data is played, and can also be understood as the position of the sound-emitting body. The above-mentioned azimuth performance parameters include: the playback control parameters of the target audio in the preset multiple channels. The azimuth performance parameters can be calculated based on the relative position of the audio playback position relative to the listening position. The relative position includes: the distance of the audio playback position relative to the listening position in the game scene, and the direction of the audio playback position relative to the listening position. For example, the relative position can be described as: the audio playback position in the game scene is located 10 meters north of the listening position.

[0071] If the sound effect space attribute is a three-dimensional playback attribute, it is necessary to use the game audio engine to determine the audio playback position and the listening position in the game scene, and calculate in real time the distance of the audio playback position relative to the listening position and the direction of the audio playback position relative to the listening position. Based on the distance and direction, calculate the playback control parameters of the audio in the preset multiple channels, adjust the difference in performance of each channel, control the audio data to be played in multiple channels, and thus build a realistic 3D environment and create an immersive audio-visual experience.

[0072] In order to create a more realistic audio-visual experience, before playing audio data, it is also necessary to consider the distance attenuation characteristics of sound propagation. In one method, the playback attributes include: distance attenuation parameters, obtaining the audio playback position and listening position of the target audio from the game scene through the playback management module; determining the current volume control parameters of the target audio based on the audio playback position and listening position; sending the current volume control parameters to the game audio engine; wherein the current volume control parameters are used to: control the playback volume of the target audio according to the current volume control parameters through the game audio engine.

[0073] The above distance attenuation refers to the fact that the sound volume will gradually attenuate due to the influence of distance during the propagation process, and the parameter that affects the sound volume attenuation is called the distance attenuation parameter; the distance attenuation parameter is related to the relative position of the audio playback position and the listening position. The above current volume control parameter can be understood as Real-time Parameter Controls (RTPC, real-time parameter control), which is the result obtained by accumulating multiple volume control parameters. After sending the current volume control parameter to the game audio engine, the game audio engine can control the playback volume of the UGC audio data at the current moment to obtain the final listening experience of the audio data at the current moment.

[0074] It is understandable that the distance attenuation parameter can affect the assignment of the current volume control parameter. Here, the audio playback position and the listening position are obtained from the game scene through the playback management module, and the current volume control parameter of the target audio can be determined according to the relative distance from the audio playback position to the listening position in the game, and the current volume control parameter is sent to the game audio engine, thereby controlling the volume of the audio data in real time.

[0075] In one approach, the current volume control parameter may be obtained through a volume control curve.

[0076] Specifically, the distance attenuation parameters include: a minimum distance, a first volume control parameter corresponding to the minimum distance, a maximum distance, and a second volume control parameter corresponding to the maximum distance. Based on the audio playback position and the listening position, the current distance is determined; based on the distance attenuation parameters and the preset curve type parameters, a volume control curve is generated; and the current volume control parameter corresponding to the current distance is found from the volume control curve.

[0077] The above minimum distance and maximum distance are the starting distance and maximum audible range of volume attenuation in 3D playback mode, respectively. Players can set them on the audio properties page of the game audio engine. The above current distance is the distance from the audio playback position to the listening position.

[0078] Here, the distance from the audio playback position to the listening position is determined according to the audio playback position and the listening position, a volume control curve is generated according to the distance attenuation parameter and the curve type parameter of the preset volume control curve, and the current volume control parameter corresponding to the current distance is found from the volume control curve.

[0079] For example, a volume control curve such as Figure 2 As shown, the volume control curve has a linear single slope. The horizontal axis of the curve indicates the distance from the audio playback position to the listening position, and the vertical axis indicates the current volume control parameters corresponding to different distances. In this example, the minimum distance in the distance attenuation parameter is Min distance, and the first volume control parameter corresponding to the minimum distance is RTPC=100; the maximum distance is Max distance, and the second volume control parameter corresponding to the maximum distance is RTPC=0. The current distance can be adjusted in real time, that is, Figure 2 The real-time distance in the video is obtained, and the current volume control parameter corresponding to the current distance is obtained from the volume control curve. The current volume control parameter is sent to the game audio engine in real time to control the current playback volume of the UGC audio data.

[0080] In actual implementation, the UGC audio data can also be mixed with the official game audio resources produced by the audio engine and applied to the game scene.

[0081] Specifically, a first audio to be played is obtained from an audio resource package corresponding to the game scene; wherein the first audio is generated by an audio creation tool corresponding to the game audio engine, and is packaged and published to an audio resource package corresponding to the game scene; the target audio is processed according to the playback mode through an audio input instance; the processed target audio and the first audio are mixed through the game audio engine, and the mixed audio is played in the game scene.

[0082] The first audio mentioned above is generated by the audio creation tool corresponding to the game audio engine, that is, the official audio resource that comes with the game. The audio needs to be packaged and published to the audio resource package corresponding to the game scene.

[0083] That is to say, the official audio resource to be played is found from the audio resource package corresponding to the game scene. After the audio data is processed according to the playback mode through the audio input instance, it is mixed with the processed audio data through the game audio engine, and the mixed audio can be played in the game scene.

[0084] In this way, UGC audio resources can be used to generate game audio resources, and then dynamically mixed with official audio for application in game scenes.

[0085] In addition, the audio data and audio playback instructions need to be associated and saved in the local audio resource package in advance.

[0086] Specifically, the pre-recorded target audio and the pre-set target audio playback attributes are obtained to obtain audio data; the audio playback instructions corresponding to the audio data are determined; wherein the audio playback instructions include: a specified game event is triggered, or a scene object to which the audio data is attached in the game scene satisfies a specified condition; the audio data and the audio playback instructions are associated and saved in a local audio resource package. The above audio playback instructions are instructions for playing audio data.

[0087] Here, game players can integrate the edited audio content and designed audio playback properties into UGC audio data, set the audio playback instructions corresponding to the audio data, and associate the audio data and audio playback instructions and save them to the local audio resource package, so that the game engine can quickly determine the audio data to be played according to the audio playback instructions, and trigger the playback of UGC audio. Among them, the audio playback instructions include the triggering of a specified game event, or the scene object to which the audio data is attached in the game scene meets the specified conditions. After the audio playback instructions meet the conditions, the playback of UGC audio is triggered. For example, the audio playback instructions are to play the applause audio that the player has personalized edited after the game is successfully completed. When the player successfully completes the game, the applause is triggered; or, when lightning appears in the game scene, the thunder audio attached to the lightning by the player is played.

[0088] In a specific embodiment, the playback management module is a MicroSE module, the game audio engine is a Wwise engine, and the audio input instance is an AudioInput instance. In this embodiment, the MicroSE module integrates functions such as audio decoding, streaming playback, synchronous and asynchronous playback, file and thread management, and the transmission method of audio data in the game software is as follows: Figure 3 shown.

[0089] Here, Audioinput is a plug-in in the Wwise engine. In the initial state, the Wwise audio package contains official audio resources packaged in traditional form, as well as "empty" resources dedicated to AudioInput. When the player's UGC audio data replaces the "empty" resources dedicated to AudioInput and is transferred into the Wwise audio package, different UGC contents can be flexibly played under the management of MicroSE.

[0090] The audio playback properties set by the player can be recorded in the audio data, accepted by the user during game operation, and passed to the Wwise engine through the API. In other words, property editing does not have to be implemented through packaging before the game is released. However, when the audio playback properties are three-dimensional playback properties, the minimum distance and maximum distance in the distance attenuation parameters need to be fixed when packaging in Wwise.

[0091] Specifically, the Audioinput instance is controlled by the API to play in 3D or 2D mode. When the playback mode is 3D, the orientation performance parameters are calculated by the Wwise engine. The audio playback position and listening position of the audio are obtained from the game scene in real time through the MicroSE module; according to the audio playback position and listening position, the current volume control parameters of the audio are determined in real time in the volume control curve, and sent to the game audio engine to control the current playback volume of the audio data. The sending frequency of the current volume control parameters is optimized as appropriate, such as: refreshing after a few frames or detecting a distance change.

[0092] Finally, the MicroSE module is integrated into the game engine (such as Messiah) together with the Wwise engine including the Auidoinput plug-in. Figure 4 shown.

[0093] In this embodiment, local audio resources are creatively separated from the Wwise audio package, and are input into the Wwise engine through AudioInput after external decoding. A general audio resource based on AudioIInput is created in the Wwise project, and each UGC resource is played through an independent Audioinput instance, avoiding the process of the Wwise engine packaging and processing UGC audio resources, while its playback can be managed by Wwise, improving the personalized editing of game audio and enhancing the personalized experience of players for game audio.

[0094] For an embodiment corresponding to the above method, see Figure 5 A schematic diagram of a game audio playback control device is shown, the device comprising:

[0095] The first determination module 502 is used to obtain the audio playback instruction generated in the game scene and determine the audio data to be played; wherein the audio data includes the target audio and the playback attribute of the target audio; the playback attribute indicates: the playback mode of the target audio in the game scene;

[0096] The first decoding module 504 is used to decode the audio data through a preset playback management module to obtain decoded data of the audio data; wherein the playback management module is located outside the game audio engine; the audio in the game scene is played based on the game audio engine;

[0097] The first playing module 506 is used to input the decoded data into the game audio engine, create an audio input instance in the game audio engine, and play the decoded data of the target audio in the game scene according to the playing mode through the audio input instance.

[0098] In this method, the audio data is decoded and processed by the playback management module, and the obtained decoded data is input into the game audio engine. The decoded data of the audio is played in the game scene through the audio input instance in the game audio engine and in accordance with the corresponding playback method in the audio data. This method does not require the game audio engine to package the game audio. The audio data is decoded and processed by the preset playback management module, and then the decoded data is input into the game audio engine, and the audio input instance in the game audio engine is played in the game scene. Therefore, this method supports players to upload personalized game audio and apply it in the game scene, which enhances the personalized experience of players for game audio.

[0099] The above-mentioned first decoding module is used to read data segments from the audio data one by one through a preset playback management module if the current playback mode is a streaming playback mode, and decode the read data segments to obtain decoding segments corresponding to the data segments; wherein, the decoding segments corresponding to multiple data segments constitute the decoding data of the audio data.

[0100] The above-mentioned first decoding module is used to identify the audio encoding format of the audio data through a preset playback management module; determine the decoding method based on the identified audio encoding format, decode the audio data according to the decoding method, and obtain decoded data of the audio data; wherein the data format of the decoded data matches the recognizable data format of the game audio engine.

[0101] The above-mentioned first playback module is also used to determine a data transmission mode of the decoded data; wherein the data transmission mode includes a synchronous transmission mode or an asynchronous transmission mode; according to the data transmission mode, the decoded data is input into the game audio engine.

[0102] An audio input plug-in is installed in the above-mentioned game audio engine, and the above-mentioned first playback module is also used to receive decoded data through the audio input plug-in; an audio input instance of the audio input plug-in is created in the game audio engine; wherein the audio input instance corresponds to the decoded data; in the initial state, the audio input instance is an empty instance, and the audio input instance is used to play the decoded data received by the audio input plug-in.

[0103] The above-mentioned playback attributes include sound effect space attributes; the sound effect space attributes include three-dimensional playback attributes or two-dimensional playback attributes. The above-mentioned first playback module is also used to call the specified playback interface in the game audio engine through an audio input instance; wherein the specified playback interface is used to: play the target audio according to the sound effect playback attributes; play the target audio according to the sound effect space attributes through the specified playback interface.

[0104] The above-mentioned device also includes a first control module, which is used to obtain the audio playback position and listening position of the target audio from the game scene through a specified playback interface if the sound effect space attribute is a three-dimensional playback attribute; based on the audio playback position and listening position, determine the azimuth performance parameters of the target audio; wherein the azimuth performance parameters include: playback control parameters of the target audio in multiple preset channels; according to the azimuth performance parameters, control the target audio to be played in multiple channels.

[0105] The above-mentioned playback attributes include: distance attenuation parameters; the above-mentioned device also includes a first acquisition module, which is used to obtain the audio playback position and listening position of the target audio from the game scene through the playback management module; based on the audio playback position and listening position, determine the current volume control parameter of the target audio; send the current volume control parameter to the game audio engine; wherein the current volume control parameter is used to: control the playback volume of the target audio according to the current volume control parameter through the game audio engine.

[0106] The above-mentioned distance attenuation parameters include: a minimum distance, a first volume control parameter corresponding to the minimum distance, a maximum distance, and a second volume control parameter corresponding to the maximum distance; the above-mentioned device also includes a second determination module, which is used to determine the current distance based on the audio playback position and the listening position; generate a volume control curve based on the distance attenuation parameter and a preset curve type parameter; and search for the current volume control parameter corresponding to the current distance from the volume control curve.

[0107] The above-mentioned first playback module is also used to obtain the first audio to be played from the audio resource package corresponding to the game scene; wherein the first audio is generated by the audio creation tool corresponding to the game audio engine, and is packaged and published to the audio resource package corresponding to the game scene; the target audio is processed according to the playback mode through the audio input instance; the processed target audio and the first audio are mixed by the game audio engine, and the mixed audio is played in the game scene.

[0108] The above-mentioned device also includes a first association module, which is used to obtain pre-recorded target audio and pre-set target audio playback properties to obtain audio data; determine the audio playback instructions corresponding to the audio data; wherein the audio playback instructions include: a specified game event is triggered, or a scene object in the game scene to which the audio data is attached meets specified conditions; and the audio data and the audio playback instructions are associated and saved in a local audio resource package.

[0109] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned game audio playback control method. The electronic device can be a server or a terminal device.

[0110] See also Figure 6 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine executable instructions that can be executed by the processor 100. The processor 100 executes the machine executable instructions to implement the above-mentioned game audio playback control method.

[0111] Further, Figure 6The electronic device shown also includes a bus 102 and a communication interface 103, and the processor 100, the communication interface 103 and the memory 101 are connected through the bus 102. Among them, the memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 102 can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but it does not mean that there is only one bus or one type of bus. The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.

[0112] The processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: obtaining the audio playback instruction generated in the game scene and determining the audio data to be played; wherein the audio data includes the target audio and the playback attributes of the target audio; the playback attribute indicates: the playback method of the target audio in the game scene; through a preset playback management module, the audio data is decoded and processed to obtain decoded data of the audio data; wherein the playback management module is located outside the game audio engine; the audio in the game scene is played based on the game audio engine; the decoded data is input into the game audio engine, an audio input instance is created in the game audio engine, and the decoded data of the target audio is played in the game scene according to the playback method through the audio input instance.

[0113] In this method, the audio data is decoded and processed by the playback management module, and the obtained decoded data is input into the game audio engine. The decoded data of the audio is played in the game scene through the audio input instance in the game audio engine and in accordance with the corresponding playback method in the audio data. This method does not require the game audio engine to package the game audio. The audio data is decoded and processed by the preset playback management module, and then the decoded data is input into the game audio engine, and the audio input instance in the game audio engine is played in the game scene. Therefore, this method supports players to upload personalized game audio and apply it in the game scene, which enhances the personalized experience of players for game audio.

[0114] The processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: if the current playback mode is a streaming playback mode, through a preset playback management module, data segments are read from the audio data one by one, and the read data segments are decoded to obtain decoded segments corresponding to the data segments; wherein, the decoded segments corresponding to multiple data segments constitute the decoded data of the audio data.

[0115] The processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: identifying the audio encoding format of the audio data through a preset playback management module; determining a decoding method based on the identified audio encoding format, decoding the audio data according to the decoding method, and obtaining decoded data of the audio data; wherein the data format of the decoded data matches the recognizable data format of the game audio engine.

[0116] The processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: determining the data transmission mode of the decoded data; wherein the data transmission mode includes a synchronous transmission mode or an asynchronous transmission mode; according to the data transmission mode, inputting the decoded data into the game audio engine.

[0117] An audio input plug-in is installed in the above-mentioned game audio engine. The processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: receiving decoded data through the audio input plug-in; creating an audio input instance of the audio input plug-in in the game audio engine; wherein the audio input instance corresponds to the decoded data; in the initial state, the audio input instance is an empty instance, and the audio input instance is used to play the decoded data received by the audio input plug-in.

[0118] The above-mentioned playback attributes include sound effect space attributes; the sound effect space attributes include three-dimensional playback attributes or two-dimensional playback attributes. The processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: calling the designated playback interface in the game audio engine through an audio input instance; wherein the designated playback interface is used to: play the target audio according to the sound effect playback attributes; play the target audio according to the sound effect space attributes through the designated playback interface.

[0119] The processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: if the sound effect space attribute is a three-dimensional playback attribute, obtain the audio playback position and listening position of the target audio from the game scene through the specified playback interface; based on the audio playback position and listening position, determine the azimuth performance parameters of the target audio; wherein the azimuth performance parameters include: playback control parameters of the target audio in preset multiple channels; according to the azimuth performance parameters, control the target audio to be played in multiple channels.

[0120] The above-mentioned playback attributes include: distance attenuation parameters; the processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: through the playback management module, the audio playback position and listening position of the target audio are obtained from the game scene; based on the audio playback position and listening position, the current volume control parameters of the target audio are determined; the current volume control parameters are sent to the game audio engine; wherein the current volume control parameters are used to: through the game audio engine, control the playback volume of the target audio according to the current volume control parameters.

[0121] The above-mentioned distance attenuation parameters include: a minimum distance, a first volume control parameter corresponding to the minimum distance, a maximum distance, and a second volume control parameter corresponding to the maximum distance; the processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: determining the current distance based on the audio playback position and the listening position; generating a volume control curve based on the distance attenuation parameter and a preset curve type parameter; and searching for the current volume control parameter corresponding to the current distance from the volume control curve.

[0122] The processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: obtaining the first audio to be played from the audio resource package corresponding to the game scene; wherein the first audio is generated by an audio creation tool corresponding to the game audio engine, and packaged and published to the audio resource package corresponding to the game scene; processing the target audio according to the playback mode through the audio input instance; mixing the processed target audio and the first audio through the game audio engine, and playing the mixed audio in the game scene.

[0123] The processor in the above-mentioned electronic device can implement the following operations of the above-mentioned game audio playback control method by executing machine executable instructions: obtaining pre-recorded target audio and pre-set target audio playback properties to obtain audio data; determining the audio playback instructions corresponding to the audio data; wherein the audio playback instructions include: a specified game event is triggered, or a scene object to which the audio data in the game scene is attached meets specified conditions; and the audio data and the audio playback instructions are associated and saved in a local audio resource package.

[0124] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned game audio playback control method.

[0125] The machine executable instructions stored in the above-mentioned machine-readable storage medium can implement the following operations in the above-mentioned game audio playback control method by executing the machine executable instructions: obtaining the audio playback instructions generated in the game scene and determining the audio data to be played; wherein the audio data includes the target audio and the playback attributes of the target audio; the playback attribute indicates: the playback method of the target audio in the game scene; through a preset playback management module, the audio data is decoded and processed to obtain decoded data of the audio data; wherein the playback management module is located outside the game audio engine; the audio in the game scene is played based on the game audio engine; the decoded data is input into the game audio engine, an audio input instance is created in the game audio engine, and the decoded data of the target audio is played in the game scene according to the playback method through the audio input instance.

[0126] In this method, the personalized edited audio data is decoded and processed through the playback management module, and the obtained decoded data is input into the game audio engine. Through the audio input instance in the game audio engine, the decoded data of the audio is played in the game scene according to the corresponding playback method in the audio data. This method does not require the game audio engine to package the game audio. The audio data is decoded and processed through the preset playback management module, and then the decoded data is input into the game audio engine. It is played in the game scene through the audio input instance in the game audio engine. Therefore, this method supports players to upload personalized edited game audio and apply it in the game scene, which enhances the personalized experience of players for game audio.

[0127] The machine executable instructions stored in the above-mentioned machine-readable storage medium can implement the following operations in the above-mentioned game audio playback control method by executing the machine executable instructions: if the current playback mode is the streaming playback mode, through the preset playback management module, data segments are read from the audio data one by one, and the read data segments are decoded to obtain decoded segments corresponding to the data segments; wherein, the decoded segments corresponding to multiple data segments constitute the decoded data of the audio data.

[0128] The machine executable instructions stored in the above-mentioned machine-readable storage medium can implement the following operations in the above-mentioned game audio playback control method by executing the machine executable instructions: identifying the audio encoding format of the audio data through a preset playback management module; determining a decoding method based on the identified audio encoding format, decoding the audio data according to the decoding method, and obtaining decoded data of the audio data; wherein the data format of the decoded data matches the recognizable data format of the game audio engine.

[0129] The machine executable instructions stored in the above-mentioned machine-readable storage medium can implement the following operations in the above-mentioned game audio playback control method by executing the machine executable instructions: determining a data transmission mode of decoded data; wherein the data transmission mode includes a synchronous transmission mode or an asynchronous transmission mode; according to the data transmission mode, inputting the decoded data into the game audio engine.

[0130] The machine executable instructions stored in the above-mentioned machine-readable storage medium can be executed to implement the following operations in the above-mentioned game audio playback control method: receiving decoded data through an audio input plug-in; creating an audio input instance of the audio input plug-in in the game audio engine; wherein the audio input instance corresponds to the decoded data; in an initial state, the audio input instance is an empty instance, and the audio input instance is used to play the decoded data received by the audio input plug-in.

[0131] The above-mentioned playback attributes include sound effect space attributes; the sound effect space attributes include three-dimensional playback attributes or two-dimensional playback attributes. The machine executable instructions stored in the above-mentioned machine-readable storage medium can implement the following operations in the above-mentioned game audio playback control method by executing the machine executable instructions: through an audio input instance, calling a designated playback interface in the game audio engine; wherein the designated playback interface is used to: play the target audio according to the sound effect playback attributes; through the designated playback interface, play the target audio according to the sound effect space attributes.

[0132] The machine executable instructions stored in the above-mentioned machine-readable storage medium can implement the following operations in the above-mentioned game audio playback control method by executing the machine executable instructions: if the sound effect space attribute is a three-dimensional playback attribute, obtain the audio playback position and listening position of the target audio from the game scene through the specified playback interface; based on the audio playback position and listening position, determine the azimuthal performance parameters of the target audio; wherein the azimuthal performance parameters include: playback control parameters of the target audio in a preset plurality of channels; according to the azimuthal performance parameters, control the target audio to be played in a plurality of channels.

[0133] The above-mentioned playback attributes include: distance attenuation parameters; machine executable instructions stored in the above-mentioned machine-readable storage medium, and by executing the machine executable instructions, the following operations in the above-mentioned game audio playback control method can be implemented: through the playback management module, the audio playback position and listening position of the target audio are obtained from the game scene; based on the audio playback position and listening position, the current volume control parameters of the target audio are determined; the current volume control parameters are sent to the game audio engine; wherein the current volume control parameters are used to: through the game audio engine, control the playback volume of the target audio according to the current volume control parameters.

[0134] The above-mentioned distance attenuation parameters include: a minimum distance, a first volume control parameter corresponding to the minimum distance, a maximum distance, and a second volume control parameter corresponding to the maximum distance; the machine executable instructions stored in the above-mentioned machine-readable storage medium, by executing the machine executable instructions, can implement the following operations in the above-mentioned game audio playback control method: determine the current distance based on the audio playback position and the listening position; generate a volume control curve based on the distance attenuation parameter and a preset curve type parameter; search for the current volume control parameter corresponding to the current distance from the volume control curve.

[0135] The machine executable instructions stored in the above-mentioned machine-readable storage medium can implement the following operations in the above-mentioned game audio playback control method by executing the machine executable instructions: obtaining the first audio to be played from the audio resource package corresponding to the game scene; wherein the first audio is generated by an audio creation tool corresponding to the game audio engine, and packaged and published to the audio resource package corresponding to the game scene; processing the target audio according to the playback mode through the audio input instance; mixing the processed target audio and the first audio through the game audio engine, and playing the mixed audio in the game scene.

[0136] The machine executable instructions stored in the above-mentioned machine-readable storage medium can implement the following operations in the above-mentioned game audio playback control method by executing the machine executable instructions: obtaining the pre-recorded target audio and the pre-set playback properties of the target audio to obtain audio data; determining the audio playback instructions corresponding to the audio data; wherein the audio playback instructions include: a specified game event is triggered, or a scene object to which the audio data is attached in the game scene meets a specified condition; and the audio data and the audio playback instructions are associated and saved in a local audio resource package.

[0137] The game audio playback control method, device and computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0139] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0140] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0141] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying 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 limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0142] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for controlling the playback of game audio, characterized in that: The method comprises: Obtaining an audio playback instruction generated in a game scene and determining audio data to be played; wherein the audio data includes target audio and playback attributes of the target audio; the playback attributes indicate: how the target audio is played in the game scene; The audio data is decoded and processed by a preset playback management module to obtain decoded data of the audio data; wherein the playback management module is located outside the game audio engine; and the audio in the game scene is played based on the game audio engine; The decoded data is input into the game audio engine, an audio input instance is created in the game audio engine, and the decoded data of the target audio is played in the game scene through the audio input instance according to the playing mode.

2. The method according to claim 1, characterized in that The step of decoding the audio data by a preset playback management module to obtain decoded data of the audio data includes: If the current playback mode is a streaming playback mode, data segments are read from the audio data one by one through a preset playback management module, and the read data segments are decoded to obtain decoding segments corresponding to the data segments; wherein, the decoding segments corresponding to multiple data segments constitute the decoding data of the audio data.

3. The method according to claim 1, characterized in that The step of decoding the audio data by a preset playback management module to obtain decoded data of the audio data includes: Identifying the audio encoding format of the audio data through a preset playback management module; A decoding method is determined based on the identified audio encoding format, and the audio data is decoded according to the decoding method to obtain decoded data of the audio data; wherein the data format of the decoded data matches the recognizable data format of the game audio engine.

4. The method according to claim 1, wherein The step of inputting the decoded data into the game audio engine comprises: Determining a data transmission mode of the decoded data; wherein the data transmission mode includes a synchronous transmission mode or an asynchronous transmission mode; According to the data transmission mode, the decoded data is input into the game audio engine.

5. The method according to claim 1, wherein An audio input plug-in is installed in the game audio engine; and the step of creating an audio input instance in the game audio engine includes: Receiving the decoded data via the audio input plug-in; An audio input instance of the audio input plug-in is created in the game audio engine; wherein the audio input instance corresponds to the decoded data; in an initial state, the audio input instance is an empty instance, and the audio input instance is used to play the decoded data received by the audio input plug-in.

6. The method according to claim 1, wherein The playback attribute includes a sound effect space attribute; the sound effect space attribute includes a three-dimensional playback attribute or a two-dimensional playback attribute; The step of playing the decoded data of the target audio in the game scene according to the playing mode through the audio input instance includes: Calling a designated playback interface in the game audio engine through the audio input instance; wherein the designated playback interface is used to: play the target audio according to the sound effect playback attribute; The target audio is played through the designated playback interface according to the sound effect space attributes.

7. The method according to claim 6, characterized in that The step of playing the target audio according to the sound effect space attribute through the designated playback interface includes: If the sound effect space attribute is a three-dimensional playback attribute, obtaining the audio playback position and listening position of the target audio from the game scene through the designated playback interface; Determining the azimuth performance parameters of the target audio based on the audio playback position and the listening position; wherein the azimuth performance parameters include: playback control parameters of the target audio in a plurality of preset channels; According to the orientation performance parameter, the target audio is controlled to be played in the multiple channels.

8. The method according to claim 1, characterized in that The playback attributes include: distance attenuation parameters; Before the step of playing the target audio in the game scene according to the playing mode using the audio input instance, the method further includes: Obtaining, through the playback management module, an audio playback position and a listening position of the target audio from the game scene; Determining a current volume control parameter of the target audio based on the audio playback position and the listening position; The current volume control parameter is sent to the game audio engine; wherein the current volume control parameter is used to: control the playback volume of the target audio according to the current volume control parameter through the game audio engine.

9. The method according to claim 8, characterized in that The distance attenuation parameters include: a minimum distance, a first volume control parameter corresponding to the minimum distance, a maximum distance, and a second volume control parameter corresponding to the maximum distance; The step of determining the current volume control parameter of the target audio based on the audio playback position and the listening position includes: determining a current distance based on the audio playback position and the listening position; generating a volume control curve based on the distance attenuation parameter and a preset curve type parameter; A current volume control parameter corresponding to the current distance is searched from the volume control curve.

10. The method according to claim 1, characterized in that The step of playing the decoded data of the target audio in the game scene according to the playing mode through the audio input instance includes: Obtaining a first audio to be played from the audio resource package corresponding to the game scene; wherein the first audio is generated by an audio creation tool corresponding to the game audio engine and packaged and published to the audio resource package corresponding to the game scene; Processing the target audio according to the playback mode through the audio input instance; The processed target audio and the first audio are mixed by the game audio engine, and the mixed audio is played in the game scene.

11. The method according to claim 1, wherein Before the steps of obtaining the audio playback instruction generated in the game scene and determining the audio data to be played, the method further includes: Acquire the pre-recorded target audio and the preset playback attributes of the target audio to obtain the audio data; Determining an audio playback instruction corresponding to the audio data; wherein the audio playback instruction includes: a specified game event being triggered, or a scene object in the game scene to which the audio data is attached meeting a specified condition; The audio data and the audio playback instruction are associated and saved in a local audio resource package.

12. A device for controlling the playback of game audio, characterized in that: The device includes: A first determination module is configured to obtain an audio playback instruction generated in a game scene and determine audio data to be played; wherein the audio data includes target audio and playback attributes of the target audio; the playback attributes indicate how the target audio is played in the game scene; a first decoding module, configured to decode the audio data through a preset playback management module to obtain decoded data of the audio data; wherein the playback management module is located outside the game audio engine; and the audio in the game scene is played based on the game audio engine; The first playback module is configured to input the decoded data into the game audio engine, create an audio input instance in the game audio engine, and play the decoded data of the target audio in the game scene through the audio input instance according to the playback mode.

13. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the game audio playback control method according to any one of claims 1 to 11.

14. A machine-readable storage medium, characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the game audio playback control method according to any one of claims 1 to 11.