CN108744517B - Audio processing method, device, terminal and storage medium - Google Patents
Audio processing method, device, terminal and storage medium Download PDFInfo
- Publication number
- CN108744517B CN108744517B CN201810395831.1A CN201810395831A CN108744517B CN 108744517 B CN108744517 B CN 108744517B CN 201810395831 A CN201810395831 A CN 201810395831A CN 108744517 B CN108744517 B CN 108744517B
- Authority
- CN
- China
- Prior art keywords
- geometric
- determining
- sound
- geometry
- detection direction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/54—Controlling the output signals based on the game progress involving acoustic signals, e.g. for simulating revolutions per minute [RPM] dependent engine sounds in a driving game or reverberation against a virtual wall
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/60—Methods for processing data by generating or executing the game program
- A63F2300/6063—Methods for processing data by generating or executing the game program for sound processing
- A63F2300/6081—Methods for processing data by generating or executing the game program for sound processing generating an output signal, e.g. under timing constraints, for spatialization
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Stereophonic System (AREA)
- Processing Or Creating Images (AREA)
Abstract
An embodiment of the present application provides an audio processing method, configured to process sound in a game scene, where a space of the game scene is divided into a plurality of geometric objects that are spliced with each other, and a virtual resource in the game scene is set on a surface of the geometric objects or on an inner cross section of the geometric objects, the method including: determining a path geometry according to the positions of a sound source and a sound receiving object in a game scene, wherein the path geometry is a geometry through which sound is transmitted from the sound source to the sound receiving object; judging whether virtual resources meeting preset conditions exist in the path geometry; and setting audio processing parameters according to the judgment result. By the method, the problem that a large amount of data calculation is needed when the collision detection system is used for collision detection, so that memory resources of the terminal are occupied, and the calculation efficiency is reduced can be avoided.
Description
Technical Field
The present application relates to the field of game technologies, and in particular, to an audio processing method, an audio processing apparatus, a terminal, and a storage medium.
Background
Under the wave of the internet, the continuous development and evolution of hardware and software technologies have promoted the emergence of intelligent devices and software. Meanwhile, a large number of games with different themes emerge to meet the requirements of users.
In a game application run by a terminal, there are many different subject matters and play types, but each type of game application needs to process game sound effects in a game to produce an audio effect according with a current game scene, and a common game scene is when a game character receives external game sound effects, such as: NPC sound effect and environmental sound effect etc. the game program needs to handle external game sound effect to reflect different virtual resources in the game scene, for example, building thing etc. to the debilitation influence that the sound that propagates in the game scene causes, borrow this, improve the reality degree of game sound effect. In the existing scheme for realizing the effect, all models passing through the sound transmission process need to be calculated one by one through a collision detection system, and then shielding coefficients represented by different models and the like are obtained so as to process the sound. At present, a large amount of data calculation is needed in the calculation process, a large amount of terminal calculation resources are occupied, and pressure is caused to the terminal.
Disclosure of Invention
An object of the present disclosure is to provide an audio processing method, apparatus, terminal, and storage medium, thereby overcoming, at least to some extent, one or more of the problems due to the limitations and disadvantages of the related art.
In order to solve the above problem, an embodiment of the present application provides an audio processing method for processing sound in a game scene, a space of the game scene is divided into a plurality of geometric objects spliced with each other, and virtual resources in the game scene are arranged on a surface of the geometric objects or on an inner cross section of the geometric objects, the method including: determining a path geometry according to the positions of a sound source and a sound receiving object in a game scene, wherein the path geometry is a geometry through which sound is transmitted from the sound source to the sound receiving object; judging whether virtual resources meeting preset conditions exist in the path geometry; and setting audio processing parameters according to the judgment result.
Optionally, the step of determining the path geometry based on the positions of the sound source and the sound receiving object in the game scene comprises: a detection step, namely determining a second geometric body adjacent to the first geometric body according to the positions of the sound source and the sound receiving object in the game scene, wherein the first geometric body is the geometric body where the sound source is located; and a circulation step, namely determining the second geometric body as the first geometric body of the next detection step so as to determine the path geometric body.
Optionally, the positions of the sound source and the sound receiving object are coordinate values of the sound source and coordinate values of the sound receiving object, and before the detecting step, the method further includes: and determining a primary detection direction and a secondary detection direction according to the coordinate values of the sound source and the coordinate values of the sound receiver, and distributing a corresponding secondary detection direction counter for the secondary detection direction.
Alternatively, the step of determining a second geometry adjacent to the first geometry based on the positions of the sound source and the sound receiving object in the game scene comprises: updating the value of the secondary detection direction counter along with the process of determining the second geometric body, and judging whether the value of the secondary detection direction counter meets a preset value or not; and determining the second geometric body according to the judgment result.
Alternatively, the step of determining the primary detection direction and the secondary detection direction according to the coordinate values of the sound source and the coordinate values of the sound receiver includes: making difference values between the axial coordinate values of the sound receiving party and the axial coordinate values of the sound source to obtain corresponding difference values of the axial directions; and determining that the axial direction corresponding to the maximum difference value is the main detection direction, and the other axial directions are the secondary detection directions.
Optionally, the step of updating the value of the secondary detection direction counter with the process of determining the second geometry, and determining whether the value of the secondary detection direction counter satisfies a preset value includes: the method comprises the following steps that along with the process of detecting a geometric body adjacent to a first geometric body in a main detection direction and/or a secondary detection direction, a difference value corresponding to a secondary detection direction counter is increased or the current value of the secondary detection direction counter is initialized at the current value of the secondary detection direction counter, and an updated current value is obtained; and judging whether the updated current value is greater than or equal to the maximum difference value.
Optionally, determining the second geometry according to the determination result includes at least one of the following steps: when the value of the secondary detection direction counter meets a preset value, determining a geometric body adjacent to the first geometric body as a second geometric body according to the secondary detection direction and the main detection direction; and when the value of the secondary detection direction counter does not meet the preset value, determining the geometric body adjacent to the first geometric body as a second geometric body along the primary detection direction.
Optionally, the step of determining whether a virtual resource meeting a preset condition exists in the path geometry includes: acquiring the type of the virtual resource; judging whether the type of the virtual resource meets a preset condition or not; the step of setting audio processing parameters according to the judgment result comprises the following steps: and when the type of the virtual resource meets the preset condition, setting audio processing parameters.
Optionally, the step of determining whether a virtual resource meeting a preset condition exists in the path geometry includes: determining at least one geometric surface in the path geometric body according to the coordinate values of the path geometric body; and judging whether virtual resources meeting preset conditions exist in at least one geometric surface.
Optionally, the step of determining the path geometry based on the positions of the sound source and the sound receiving object in the game scene comprises: determining a type of a sound source; and determining path geometric bodies meeting a preset number according to the positions of the sound source and the sound receiving object in the game scene, wherein the preset number corresponds to the type of the sound source.
An embodiment of the present application further provides an audio processing apparatus, including: the position module is used for determining a path geometric body according to the positions of a sound source and a sound receiving object in a game scene, wherein the path geometric body is a geometric body through which sound is transmitted from the sound source to the sound receiving object; the detection module is used for judging whether virtual resources meeting preset conditions exist in the path geometry body or not; and the setting module is used for setting audio processing parameters according to the judgment result.
An embodiment of the present application further provides a mobile terminal, including: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to perform the audio processing method described above via execution of the executable instructions.
An embodiment of the present application further provides a computer storage medium, and the computer program is executed by a processor to implement the audio processing method.
Through the audio processing method, the device, the mobile terminal and the computer storage medium provided by the application, the game scene space is divided into the geometric bodies which are spliced with each other, the virtual resources in the game scene are arranged on the surface of the geometric bodies, for example, a building, the geometric bodies needing the sound to pass through in the sound propagation process are determined through the positions of the sound source and the sound receiving object, the virtual resources arranged on the geometric bodies are further obtained, whether the preset conditions are met or not is judged, the audio processing parameters are set according to the judgment result, and through the mode, the situation that when collision detection is carried out through a collision detection system, a large amount of data calculation needs to be carried out, the memory resources of the terminal are occupied, and the calculation efficiency is reduced.
Drawings
The above and other features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
fig. 1 is a flowchart of an audio processing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of the geometry of the space that constitutes the game scene provided by one embodiment of the present application;
FIG. 3 is a schematic diagram of a path geometry provided by one embodiment of the present application;
FIG. 4 is a schematic view of a first geometry and a second geometry as provided by one embodiment of the present application;
FIG. 5 is a schematic diagram of an embodiment provided by an embodiment of the present application;
FIG. 6 is a schematic view of the geometric surfaces of adjacent geometric objects provided by an embodiment of the present application;
fig. 7 is a block diagram of an audio processing apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of a mobile terminal according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of one of the storage media according to the embodiment of the disclosure.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be further noted that various trigger events disclosed in this specification may be preset, or may be set in real time according to an operation instruction of a user during a program running process, and different trigger events may trigger execution of different functions.
Fig. 1 illustrates a method of audio processing according to one embodiment. In the present embodiment, an audio processing method 100 is described by way of different examples. The audio processing method provided in this embodiment is executed on a mobile terminal, and the mobile terminal may be any terminal device such as a computer, a tablet computer, and an electronic device. The method comprises the steps of executing a software application on a processor of the mobile terminal and rendering the software application on a touch display of the mobile terminal to obtain a graphical user interface, wherein content displayed by the graphical user interface at least partially comprises a part or all of a game scene, and the game scene comprises a game picture and at least one virtual object.
The game screen includes virtual resources such as ground, mountain, stone, flower, grass, tree, building, and vehicle. The virtual object may be a virtual object for enemy camping or a virtual object for own camping, and the virtual object may implement corresponding behaviors in the game scene in response to the operation of the user, for example, the user may control the virtual object to perform actions such as walking, running, squatting, lying prone, attacking, shooting, and the like in the game scene, which is not limited herein. When other virtual objects in the game perform corresponding actions in the game scene, different sounds are triggered and generated, and the sounds are received by the current virtual object.
As shown in fig. 2, in the present embodiment, the space of the game scene is divided into a plurality of geometric bodies that are connected to each other. The geometric bodies can be cuboids, cubes, parallelepipeds, honeycomb bodies and the like, and can be understood to be spliced with each other, so that the space of the whole game scene is formed. Optionally, the geometric body is a rectangular parallelepiped with the same length and width. And establishing a coordinate system XYZ in the space of the game scene, wherein the coordinate system XYZ is respectively a horizontal direction XZ coordinate and a vertical direction coordinate Y. The space is divided into infinite cuboids with a horizontal X of 5 meters, a Z of 5 meters, and a vertical upward Y of 3.5 meters, and the length, width, and height division values of the cuboids can be arbitrarily set by developers according to actual conditions. The virtual resources in the game scene are established on the outer surface or the inner cross section of the geometric body, for example, when the virtual scene is a building, the walls of the building are respectively arranged on the surface of the geometric body to form a closed building space. The virtual resources arranged on the geometric body can be generated by loading during game running or can be corresponding building instructions, and the corresponding virtual resources are arranged on the geometric body according to the building instructions, wherein the step of responding to the building instructions is as follows: responding to a touch operation of the user on the preset building instruction control on the graphical user interface, where the touch operation may be a click touch operation or a slide touch operation for the preset building instruction control, and the like, and is not specifically limited herein.
In an alternative embodiment, a storage device is provided, in which geometric marking information of geometric objects in a game scene is stored, and a game program can determine specific geometric objects in the game scene through the geometric marking information. In the present embodiment, when a build instruction is responded, the virtual resource type for which the build instruction is directed and the geometry-related information for carrying the virtual resource are stored. The association information is used to determine whether a virtual resource exists on a particular geometry and the type of virtual resource. In other embodiments, the information stored on the storage device may also be other information related to the geometry and the virtual resource, by which to determine the virtual resource situation carried on a particular geometry, for example, by which to determine whether a virtual resource exists on the current geometry, and whether the type of virtual resource is a house, a tree, a lighthouse, or the like. It should be noted that the information may also be stored in other manners, and is not limited herein.
Through the embodiment, on one hand, the virtual resources built by the virtual object can be aligned and spliced with the original virtual resources in the game scene; on the other hand, physical collision detection between the buildings is avoided when the buildings are built in a game scene, so that the system overhead can be effectively reduced, and the smoothness of game operation is improved; finally, the incidence relation between different virtual resources in the game scene can be conveniently inquired, and whether the collision relation exists between the different virtual resources is determined without judging whether the collision relation exists between the different virtual resources.
The audio processing method provided by the embodiment comprises the following steps:
step S310, determining a path geometry according to the positions of a sound source and a sound receiving object in a game scene, wherein the path geometry is a geometry through which sound is required to be transmitted from the sound source to the sound receiving object;
step S320, judging whether virtual resources meeting preset conditions exist in the path geometry;
and step S330, setting audio processing parameters according to the judgment result.
Through the embodiment, the game space is divided into the geometric bodies which are spliced with each other, the virtual resources are established on the outer surfaces or the inner sections of the geometric bodies, so that the relevant conditions of the virtual resources on the geometric bodies can be determined by inquiring the information of the geometric bodies, after the geometric bodies which need to pass through in the process of transmitting the sound emitted by the sound source to the sound receiving object are determined according to the positions of the sound source and the sound receiving object, the virtual resources on the geometric bodies are determined to meet the preset conditions by inquiring the relevant information, and then the audio processing parameters are set according to the virtual resources.
Hereinafter, each step of the audio processing method in the present exemplary embodiment will be further described.
As shown in fig. 3, in step S310, a path geometry is determined according to the positions of the sound source and the sound receiving object in the game scene, and the path geometry is the geometry through which the sound needs to travel from the sound source to the sound receiving object.
Specifically, sound refers to sound associated with a game scene. For example, the sound related to the game scene may be a sound associated with a virtual object in the game scene, such as an engine sound of an automobile, a footstep sound of the virtual object, or a sound associated with a virtual resource in the game scene, such as a sound in a natural environment constituted by the virtual resource, such as wind sound, water sound, and the like. In this embodiment, the sound source refers to a virtual resource or a virtual object configured according to a preset rule to trigger a sound effect, where the preset rule may trigger the sound effect according to a preset action of the virtual object, for example, the preset action may be walking, running, attacking, or skill special effect of the virtual object; the preset condition may also be that the sound effect is triggered according to the preset environment of the virtual resource, for example, the preset environment may be water flow. In this embodiment, the sound receiving object is a virtual object that satisfies a preset condition with the sound source in the game scene, where the preset condition may be a preset sound propagation distance, that is, when the sound receiving object and the sound source satisfy the preset sound propagation distance, the sound receiving object is controlled to receive the sound emitted by the sound source; the preset condition may also be other parameters set by a game developer, and is not specifically limited herein.
In this embodiment, the geometric body through which the sound propagates from the sound source to the sound receiving object is a geometric body through which a connection line defined by the position information of the sound source and the position information of the sound receiving object passes, where the position information may be a specific coordinate value or a coordinate value range. Specifically, step S310 specifically includes the following steps:
step S3101, a detection step of determining a second geometric body adjacent to a first geometric body according to positions of a sound source and a sound receiving object in a game scene, wherein the first geometric body is a geometric body where the sound source is located;
step S3102, a loop is made to determine the second geometry as the first geometry for the next detection step to determine the path geometry.
Through the embodiment, the geometric bodies through which the sound passes in the propagation process can be determined according to the positions of the sound source and the sound receiving object, and then the audio processing parameters can be determined by determining the virtual resources on the geometric bodies which can pass without determining the situation of irrelevant geometric bodies, so that the calculation pressure of data can be effectively reduced.
Hereinafter, each step of the audio processing method in the present exemplary embodiment will be further described.
With respect to step S3101, the detecting step determines a second geometric volume adjacent to a first geometric volume, which is the geometric volume in which the sound source is located, according to the positions of the sound source and the sound receiving object in the game scene. As shown in fig. 4, the adjacent second geometry refers to a geometry having the same face, point or edge as the first geometry. Specifically, a coordinate system is established in the game, and the positions of the virtual resources and the virtual objects in the game scene are defined through the coordinate system, for example, the coordinate value of the center point of the virtual resource or the virtual object is determined as the position of the virtual resource or the virtual object. Similarly, the position of the geometric object constituting the space of the game scene is defined by a coordinate system, for example, the geometric object is determined by three vertexes on the geometric object, and the specific geometric object can also be defined by the coordinates of the center point of the geometric object and the preset relationship between the center point and the vertex of the geometric object. And acquiring the position of a virtual object or a virtual resource as a sound source, and comparing the position of the sound source with the position of a geometric body in the game scene to determine the geometric body where the sound source is located.
It should be noted that, in the present embodiment, since the space of the game scene is formed by splicing adjacent geometric bodies, the adjacent second geometric body here is a geometric body directly adjacent to the first geometric body. In other embodiments, the adjacent second geometry may also be determined according to the division manner of the game space, and determined as a geometry that is spaced and adjacent to the first geometry, where spaced and adjacent may mean that there is another geometry between the second geometry and the first geometry, or that there is no other geometry between the second geometry and the first geometry.
Specifically, in the present embodiment, step S3101 may be implemented by:
step S31011: and updating the value of the secondary detection direction counter along with the process of determining the second geometric body, and judging whether the value of the secondary detection direction counter meets a preset value or not. The number of the second geometric bodies that the sound propagates through may be 0, that is, the same geometric body is used for the sound source and the sound receiving object, and the number of the second geometric bodies may also be multiple. When determining the second geometric body through which the sound propagates from the geometric bodies constituting the space of the game scene according to the search direction, the second geometric body is determined at a frequency of one geometric body at a time, and the value of the secondary detection direction counter is updated once every time one second geometric body is determined. In the present embodiment, the value to be updated at each time is determined by the positions of the sound source and the sound receiving object. It should be noted that the number of the secondary detection direction counters corresponds to the number of the secondary detection directions, for example, if there are two secondary detection directions, then there are two secondary detection directions.
Specifically, in the present embodiment, step S31011 may include the steps of:
step S310111: and increasing the difference corresponding to the secondary detection direction counter or initializing the current value of the secondary detection direction counter at the current value of the secondary detection direction counter along with the process of detecting the geometric body adjacent to the first geometric body in the primary detection direction and/or the secondary detection direction to obtain the updated current value. The main detection direction refers to a detection direction which is included each time when the second geometry is confirmed, and the sub detection direction refers to a detection direction which is included only when the preset condition is met when the second geometry is confirmed. The secondary detection direction counter is used to trigger the determination of the second geometry in the search direction including the secondary detection direction, and the difference value corresponding to the secondary detection direction counter is determined by the positions of the sound source and the sound receiving object. The different secondary detection direction counters have corresponding differences, and the specific determination of the differences is detailed below in step 3103. When determining the second geometry along the main detection direction or along the main detection direction and the sub-detection direction, the value of the sub-detection direction counter is updated every time the second geometry is determined, wherein the value updating method includes two types: the first is to add the current value of the secondary detection direction counter and the corresponding difference value of the secondary detection direction counter; the second clock restores the current value of the sub-detection direction counter to the initial value, for example, the initial value is "0". In this embodiment, the value updating method of the secondary detection direction counter is determined according to whether the secondary detection direction is included in the current search direction when determining the second geometric solid, specifically, when detecting the geometric solid adjacent to the first geometric solid along the main detection direction, the current value of the secondary detection direction counter is increased by the difference corresponding to the secondary detection direction counter; when detecting a geometry adjacent to the first geometry along the primary detection direction and the secondary detection direction, a current value of the secondary detection direction counter is initialized.
Step S310112: and judging whether the updated current value is greater than or equal to the maximum difference value. In this embodiment, the finding direction for determining the second geometry has at least two detection directions, including: a primary detection direction and a secondary detection direction, each of which is determined according to the positions of the sound source and the sound receiving object and has a corresponding difference value, will be described in detail in step 3103 below with respect to the relevant contents of the detection direction and the difference value, and the maximum difference value is determined as a preset value in step 31011.
Step S31012: and determining the second geometric body according to the judgment result. Specifically, the method comprises the following steps:
in step S310121, when the value of the secondary detection direction counter satisfies a preset value, a geometric body adjacent to the first geometric body is determined as a second geometric body according to the secondary detection direction and the primary detection direction. When the current value of the secondary detection direction counter is determined to be greater than or equal to the maximum difference value according to the updated current value of the secondary detection direction counter obtained in step S31011, a geometric object adjacent to the current first geometric object is determined as the second geometric object along a direction determined by both the secondary detection direction and the primary detection direction. In the present embodiment, the direction determined in common by the sub detection direction and the main detection direction means a direction corresponding to a vector determined by vector synthesis from a unit vector corresponding to the sub detection direction and a unit vector corresponding to the main detection direction, and a second geometry adjacent to the current first geometry is searched for based on the direction. In other embodiments, determining the geometry adjacent to the first geometry as the second geometry according to the secondary detection direction and the primary detection direction may be sequentially searching for the second geometry adjacent to the current first geometry according to a unit frequency along the secondary detection direction and the primary detection direction, respectively, for example, determining a transition geometry adjacent to the first geometry along the secondary detection direction, and then determining the geometry adjacent to the transition geometry as the second geometry along the primary detection direction.
Step S310122: and when the value of the secondary detection direction counter does not meet the preset value, determining the geometric body adjacent to the first geometric body as a second geometric body along the primary detection direction.
By the above embodiment, it is possible to effectively determine the second geometry adjacent to the first geometry according to the positions of the sound source and the sound receiving object without performing complicated collision detection to determine the geometry through which the sound needs to pass during propagation.
With respect to step S3102, the step is looped to determine the second geometry as the first geometry for the next detection step to determine the path geometry. In determining a geometry traversed by the sound during the propagation from the sound source to the sound receiving object, a second geometry adjacent to the first geometry is detected by loop iteration to determine the geometry traversed by the sound during the propagation, wherein the geometry is determined as the path geometry. After determining a second geometry adjacent to the current first geometry according to step S3101, the first geometry in step S3101 is executed next time with the second geometry as the first geometry. In this embodiment, before step S3102 is executed, it is determined whether or not there is a virtual resource satisfying a preset condition in the path geometry by step S320, and if there is no virtual resource satisfying the preset condition, then according to step S3102, the current second geometry is determined as the first geometry, and step S3101 is executed in a loop until it is detected that there is a virtual resource satisfying the preset condition in the path geometry, so as to stop the loop. In other embodiments, after performing the ending step S3101, execution of step S3102 is triggered until it is determined that the current first geometry coincides with the geometry in which the sound receiving object is located. In this embodiment, determining the propagation number may be implemented as follows:
step 1, determining the type of a sound source; specifically, in the present embodiment, any virtual resource or virtual object that can trigger an audio effect can be used as a sound source, where the type of the virtual resource includes, but is not limited to, a pipeline, a carrier, a gun, and the like, and the preset number of transmissions corresponding to different types of the virtual resource is preset.
Step 2, determining path geometric bodies meeting a preset number according to the positions of sound sources and sound receiving objects in a game scene, wherein the preset number corresponds to the types of the sound sources; specifically, the type of the virtual resource or the virtual object is determined by acquiring the virtual resource or the virtual object which triggers the sound effect, and the preset number of path geometries which can be propagated by the sound effect triggered by the corresponding sound source is acquired according to the type.
Further, before step S3101, step S310 further includes step S3103: and determining a primary detection direction and a secondary detection direction according to the coordinate values of the sound source and the coordinate values of the sound receiver, and distributing a corresponding secondary detection direction counter for the secondary detection direction. In the present embodiment, the number of primary detection directions is "1", the number of secondary detection directions is "2", and a coordinate system including an X axis, a Y axis, and a Z axis is established in the space of the game scene, the primary detection direction corresponding to one of the coordinate axes, and the secondary detection directions corresponding to the other two coordinate axes. In other embodiments, the primary detection direction and the secondary detection direction may correspond to different coordinate axes, and the detection direction may be defined according to actual needs.
Specifically, step S3103 includes the steps of:
step S31031: and making difference values between the axial coordinate values of the sound receiving party and the axial coordinate values of the sound source to obtain the corresponding difference values of the axial directions. In the present embodiment, coordinate values (Xs, Ys, Zs) of a sound source and coordinate values (Xr, Yr, Zr) of a sound receiving object are acquired; the coordinate values of the sound receiving objects and the coordinate values of the sound source are differentiated to obtain corresponding differences on different coordinate axes, namely diffX is Xr-Xs, diffY is Yr-Ys, and diffZ is Zr-Zs.
Step S31032: and determining that the axial direction corresponding to the maximum difference value is the main detection direction, and the other axial directions are the secondary detection directions. In this embodiment, the differences diffX, diffY, and diffZ corresponding to the coordinate axes are determined in step S31031, the coordinate axis corresponding to the largest difference is determined as the primary detection direction by the comparison, and the other coordinate values are determined as the secondary detection directions.
The above steps are illustrated below by specific illustrative examples:
as shown in fig. 5, in this example, the sound source coordinates are (0,5,5), the sound receiving object coordinates are (20,10,10), the difference value corresponding to each coordinate axis is obtained by subtracting the sound receiving object coordinates from the sound receiving object coordinates, diffX is 20, diffY is 5, and diffZ is 5, so that the maximum difference value is 20, the X axis is determined as the primary detection direction, the Y axis and the Z axis are the secondary detection directions, and corresponding counters, i.e., a Y-axis secondary detection direction counter StepY and a Z-axis secondary detection direction counter StepZ, are assigned to the secondary detection directions, and the initial values of StepY and StepZ are 0; the difference corresponding to StepY is diffY, i.e., 5, and the difference corresponding to StepZ is diffZ, i.e., 5. Determining the sound source (0,5,5) as a first geometric body, determining that the current values of StepY and StepZ are 0 and less than the maximum difference value of 20, determining the geometric body adjacent to the first geometric body as a second geometric body [ 1 ] in the main detection direction, and updating StepY and StepZ, namely, StepY +5 is 5, and StepZ +5 is 5; by judging that the current values of StepY and StepZ are both 5, the current second geometric body is taken as the first geometric body, the geometric body adjacent to the first geometric body is continuously determined as a second geometric body [ 2 ] along the main detection direction, and meanwhile, StepY and StepZ are updated, namely StepY +5 is 10, and StepZ +5 is 10; and continuing to circulate until the current values of StepY and StepZ are both determined to be 20, determining a second geometric body [ 3 ] adjacent to the first geometric body along the primary detection direction and the secondary detection direction because the current values of StepY and StepZ are 20 and equal to the maximum difference value, namely determining the second geometric body adjacent to the first geometric body along the X axis, the Y axis and the Z axis, and simultaneously updating the values of StepY and StepZ to be 0 as the initial value.
Through the embodiment, the detection direction during the process of determining the path geometry can be determined according to the sound source and the sound receiving object, the counter is distributed to each detection direction, so that the corresponding detection direction can be determined according to the numerical value of the counter, the method can determine that the sound can pass through the geometry in the sound transmission process through a small amount of calculation, and determines the virtual resource which can generate the shielding effect in the sound transmission process through detecting the virtual resource information on the geometry, and the virtual resource which needs to pass through in the sound transmission process does not need to be determined through collision detection.
With respect to step S320, it is determined whether a virtual resource satisfying a preset condition exists in the path geometry. In this embodiment, the path geometry is composed of a preset number of geometric surfaces, and determining whether a virtual resource meeting a preset condition exists in the path geometry is determining whether a virtual resource meeting a preset condition exists in at least one geometric surface in the path geometry.
In an alternative embodiment, the space of the game scene is divided into a plurality of geometric objects spliced with each other, during the initialization process of the game, the terminal loads the mark information of each geometric object and the information of the virtual resource on the geometric object, or during the detection of the running process of the game, the terminal builds the virtual resource on the outer surface or the inner cross section of the geometric object by responding to the building instruction, at this time, the terminal creates the corresponding geometric object and the associated information of the virtual resource, and the specific content is described in detail above.
In the present embodiment, when determining the virtual resource on the path geometry, the following steps may be performed:
step S3203: at least one geometric surface in the path geometry is determined from the coordinate values of the path geometry. The path geometry is composed of a plurality of geometric faces. In the present embodiment, when the path geometry is a rectangular parallelepiped, the path geometry is composed of 6 geometric surfaces. In other embodiments, since the space constituting the game scene is formed by splicing geometric objects, adjacent geometric objects share a geometric surface, and thus each path geometric object is actually composed of 3 geometric surfaces. It should be noted that the number of the geometric surfaces included in the path geometry may be set according to practical situations, and is not particularly limited herein. Since sound travels from one path geometry to another during propagation, it is only possible to traverse the geometric surface of the path geometry depending on the direction of propagation.
In this embodiment, the at least one geometric surface may be determined by:
step S32031, acquiring a first coordinate value and a second coordinate value of two adjacent geometric bodies;
step S32032 of determining a coordinate axis direction in which the corresponding axial coordinate values of the first coordinate value and the second coordinate value are different; in the present embodiment, the first coordinate value and the second coordinate value are worst, and the coordinate axis direction corresponding to the difference value whose result is not 0 is determined;
step S32033, determining geometric surfaces adjacent to each other in the coordinate axis direction in the two geometric bodies; specifically, the geometric surfaces adjacent to each other in the coordinate axis direction refer to two geometric surfaces of two geometric bodies corresponding to each coordinate axis, and planes in which the two geometric surfaces are located are adjacent to each other, where the geometric surface may be a geometric surface included in the geometric body, or may be a geometric surface shared by the geometric body and another geometric body. As shown in fig. 6, for example, assuming that the coordinate values of the adjacent a geometry and B geometry are (1,1,2) and (2,2,2), respectively, and by making a difference between the two coordinate values, it is determined that the difference value corresponding to the X axis and the Y axis is not 0, the right side geometry surface of the a geometry and the left side geometry surface of the B geometry are determined as geometry surfaces adjacent to each other on the X axis, and the upper side geometry surface of the a geometry and the lower side geometry surface of the B geometry are determined as geometry surfaces adjacent to each other on the Y coordinate axis.
Step S3204: and judging whether virtual resources meeting preset conditions exist in at least one geometric surface. In this embodiment, virtual resource information of a corresponding geometric surface on a geometric object is obtained to determine whether the virtual resource satisfies a preset condition.
Through the implementation mode, the information of the geometric surface needing to be judged can be effectively reduced, and only the virtual resource condition on the specific geometric surface needs to be acquired, so that the running speed of the game can be increased, and the game experience of a user is improved.
In the present embodiment, when determining whether there is a virtual resource satisfying a preset condition, the following steps may be performed:
s3201: acquiring the type of the virtual resource;
s3202: judging whether the type of the virtual resource meets a preset condition or not; in this embodiment, the preset condition means that the type of the virtual resource is a wall. In other embodiments, the preset condition may also refer to other types of virtual resources.
Regarding step S330, audio processing parameters are set according to the determination result.
Specifically, when the type of the virtual resource satisfies a preset condition, the audio processing parameter is set. In the present embodiment, the audio processing parameter refers to loudness of an audio effect or the like. In other embodiments, the audio processing parameter may be other audio-related parameters, and the specific parameter content for adjustment is not limited herein.
It should be noted that, the above steps may be executed simultaneously or sequentially.
Through the implementation mode, when the sound is transmitted from the sound source to the sound receiving object and the influence of the virtual resources in the game scene on the sound is determined, only the path geometric body which is possibly passed through in the sound transmission process is determined according to the preset query rule, then the virtual resource type on the path geometric body is queried in the data query mode, when the virtual resource type is the preset type, the influence of the virtual resources on the sound is determined, and then the parameters of the sound effect are set.
As shown in fig. 7, an exemplary embodiment further discloses an audio processing apparatus, which includes:
the position module is used for determining a path geometric body according to the positions of a sound source and a sound receiving object in a game scene, wherein the path geometric body is a geometric body through which sound is transmitted from the sound source to the sound receiving object;
the detection module is used for judging whether virtual resources meeting preset conditions exist in the path geometry body or not;
and the setting module is used for setting audio processing parameters according to the judgment result.
The specific details of each module unit in the foregoing embodiments have been described in detail in the corresponding audio processing method, and it can be understood that other unit modules included in the audio processing apparatus correspond to the audio processing method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Fig. 8 is a schematic structural diagram of one of the mobile terminals according to the embodiments of the present disclosure. As shown in fig. 8, the mobile terminal of the present embodiment includes: a memory 803, and a processor 802. The memory 803 and the processor 802 may be connected by a bus. The graphical user interface is obtained by executing a software application on a processor of the terminal and rendering on a display device of the terminal.
Wherein the processor is configured to implement the following steps via execution of the executable instructions: determining a path geometry according to the positions of a sound source and a sound receiving object in a game scene, wherein the path geometry is a geometry through which sound is transmitted from the sound source to the sound receiving object;
judging whether virtual resources meeting preset conditions exist in the path geometry;
and setting audio processing parameters according to the judgment result.
Optionally, the step of determining the path geometry based on the positions of the sound source and the sound receiving object in the game scene comprises: a detection step, namely determining a second geometric body adjacent to the first geometric body according to the positions of the sound source and the sound receiving object in the game scene, wherein the first geometric body is the geometric body where the sound source is located; and a circulation step, namely determining the second geometric body as the first geometric body of the next detection step so as to determine the path geometric body.
Optionally, the positions of the sound source and the sound receiving object are coordinate values of the sound source and coordinate values of the sound receiving object, and before the detecting step, the method further includes: and determining a primary detection direction and a secondary detection direction according to the coordinate values of the sound source and the coordinate values of the sound receiver, and distributing a corresponding secondary detection direction counter for the secondary detection direction.
Alternatively, the step of determining a second geometry adjacent to the first geometry based on the positions of the sound source and the sound receiving object in the game scene comprises: updating the value of the secondary detection direction counter along with the process of determining the second geometric body, and judging whether the value of the secondary detection direction counter meets a preset value or not; and determining the second geometric body according to the judgment result.
Alternatively, the step of determining the primary detection direction and the secondary detection direction according to the coordinate values of the sound source and the coordinate values of the sound receiver includes: making difference values between the axial coordinate values of the sound receiving party and the axial coordinate values of the sound source to obtain corresponding difference values of the axial directions; and determining that the axial direction corresponding to the maximum difference value is the main detection direction, and the other axial directions are the secondary detection directions.
Optionally, the step of updating the value of the secondary detection direction counter with the process of determining the second geometry, and determining whether the value of the secondary detection direction counter satisfies a preset value includes: the method comprises the following steps that along with the process of detecting a geometric body adjacent to a first geometric body in a main detection direction and/or a secondary detection direction, a difference value corresponding to a secondary detection direction counter is increased or the current value of the secondary detection direction counter is initialized at the current value of the secondary detection direction counter, and an updated current value is obtained; and judging whether the updated current value is greater than or equal to the maximum difference value.
Optionally, determining the second geometry according to the determination result includes at least one of the following steps: when the value of the secondary detection direction counter meets a preset value, determining a geometric body adjacent to the first geometric body as a second geometric body according to the secondary detection direction and the main detection direction; and when the value of the secondary detection direction counter does not meet the preset value, determining the geometric body adjacent to the first geometric body as a second geometric body along the primary detection direction.
Optionally, the step of determining whether a virtual resource meeting a preset condition exists in the path geometry includes: acquiring the type of the virtual resource; judging whether the type of the virtual resource meets a preset condition or not; the step of setting audio processing parameters according to the judgment result comprises the following steps: and when the type of the virtual resource meets the preset condition, setting audio processing parameters.
Optionally, the step of determining whether a virtual resource meeting a preset condition exists in the path geometry includes: determining at least one geometric surface in the path geometric body according to the coordinate values of the path geometric body; and judging whether virtual resources meeting preset conditions exist in at least one geometric surface.
Optionally, the step of determining the path geometry based on the positions of the sound source and the sound receiving object in the game scene comprises: determining a type of a sound source; and determining path geometric bodies meeting a preset number according to the positions of the sound source and the sound receiving object in the game scene, wherein the preset number corresponds to the type of the sound source.
Through the mobile terminal that this application provided, divide the recreation scene space into the geometry of mutual concatenation, set up the virtual resource in the recreation scene on the surface of geometry, for example, the building, the geometry that needs the sound to pass through in the sound propagation process is confirmed through the position of sound source and sound receiving object, and then acquire the virtual resource that sets up on the geometry, in order to judge whether for satisfying the preset condition, set up the processing parameter of audio frequency according to the judged result, through this kind of mode, can avoid looking into the time through collision detection system to carrying out the collision, need carry out a large amount of data calculations, lead to occuping the memory resource at terminal, reduce computational efficiency.
In alternative embodiments, the mobile terminal may further include one or more processors and memory resources, represented by memory, for storing instructions, such as application programs, that are executable by the processing components. The application program stored in the memory may include one or more modules that each correspond to a set of instructions. Furthermore, the processing component is configured to execute the instructions to perform the audio processing method described above.
The mobile terminal may further include: a power component configured to power manage the executive mobile terminal; a wired or wireless network interface configured to connect the mobile terminal to a network; and an input-output (I/O) interface. The mobile terminal may operate based on an operating system stored in memory, such as Android, iOS, Windows, Mac OS X, Unix, Linux, FreeBSD, or the like.
FIG. 9 is a schematic structural diagram of one of the computer storage media according to the embodiments of the present disclosure. As shown in fig. 9, a program product 1100 according to an embodiment of the application is depicted, on which a computer program is stored which, when being executed by a processor, carries out the steps of: determining a path geometry according to the positions of a sound source and a sound receiving object in a game scene, wherein the path geometry is a geometry through which sound is transmitted from the sound source to the sound receiving object;
judging whether virtual resources meeting preset conditions exist in the path geometry;
and setting audio processing parameters according to the judgment result.
Optionally, the step of determining the path geometry based on the positions of the sound source and the sound receiving object in the game scene comprises: a detection step, namely determining a second geometric body adjacent to the first geometric body according to the positions of the sound source and the sound receiving object in the game scene, wherein the first geometric body is the geometric body where the sound source is located; and a circulation step, namely determining the second geometric body as the first geometric body of the next detection step so as to determine the path geometric body.
Optionally, the positions of the sound source and the sound receiving object are coordinate values of the sound source and coordinate values of the sound receiving object, and before the detecting step, the method further includes: and determining a primary detection direction and a secondary detection direction according to the coordinate values of the sound source and the coordinate values of the sound receiver, and distributing a corresponding secondary detection direction counter for the secondary detection direction.
Alternatively, the step of determining a second geometry adjacent to the first geometry based on the positions of the sound source and the sound receiving object in the game scene comprises: updating the value of the secondary detection direction counter along with the process of determining the second geometric body, and judging whether the value of the secondary detection direction counter meets a preset value or not; and determining the second geometric body according to the judgment result.
Alternatively, the step of determining the primary detection direction and the secondary detection direction according to the coordinate values of the sound source and the coordinate values of the sound receiver includes: making difference values between the axial coordinate values of the sound receiving party and the axial coordinate values of the sound source to obtain corresponding difference values of the axial directions; and determining that the axial direction corresponding to the maximum difference value is the main detection direction, and the other axial directions are the secondary detection directions.
Optionally, the step of updating the value of the secondary detection direction counter with the process of determining the second geometry, and determining whether the value of the secondary detection direction counter satisfies a preset value includes: the method comprises the following steps that along with the process of detecting a geometric body adjacent to a first geometric body in a main detection direction and/or a secondary detection direction, a difference value corresponding to a secondary detection direction counter is increased or the current value of the secondary detection direction counter is initialized at the current value of the secondary detection direction counter, and an updated current value is obtained; and judging whether the updated current value is greater than or equal to the maximum difference value.
Optionally, determining the second geometry according to the determination result includes at least one of the following steps: when the value of the secondary detection direction counter meets a preset value, determining a geometric body adjacent to the first geometric body as a second geometric body according to the secondary detection direction and the main detection direction; and when the value of the secondary detection direction counter does not meet the preset value, determining the geometric body adjacent to the first geometric body as a second geometric body along the primary detection direction.
Optionally, the step of determining whether a virtual resource meeting a preset condition exists in the path geometry includes: acquiring the type of the virtual resource; judging whether the type of the virtual resource meets a preset condition or not; the step of setting audio processing parameters according to the judgment result comprises the following steps: and when the type of the virtual resource meets the preset condition, setting audio processing parameters.
Optionally, the step of determining whether a virtual resource meeting a preset condition exists in the path geometry includes: determining at least one geometric surface in the path geometric body according to the coordinate values of the path geometric body; and judging whether virtual resources meeting preset conditions exist in at least one geometric surface.
Optionally, the step of determining the path geometry based on the positions of the sound source and the sound receiving object in the game scene comprises: determining a type of a sound source; and determining path geometric bodies meeting a preset number according to the positions of the sound source and the sound receiving object in the game scene, wherein the preset number corresponds to the type of the sound source.
Through the computer storage medium that this application provided, divide the game scene space into the geometry of mutual concatenation, set up the virtual resource in the game scene on the surface of geometry, for example, the building, the geometry that needs the sound to pass through in the sound propagation process is confirmed through the position of sound source and sound receiving object, and then acquire the virtual resource that sets up on the geometry, in order to judge whether for satisfying the preset condition, set up the processing parameter of audio frequency according to the judged result, through this kind of mode, can avoid looking into the time through collision detection system to carrying out the collision, need carry out a large amount of data calculations, lead to occupying the memory resource at terminal, reduce computational efficiency.
Program code embodied in a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, an electronic device, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (11)
1. An audio processing method for processing sound in a game scene, wherein a space of the game scene is divided into a plurality of geometric bodies spliced with each other, virtual resources in the game scene are arranged on the surface of the geometric bodies or the inner sections of the geometric bodies, and the method comprises the following steps:
determining a path geometry according to the positions of a sound source and a sound receiving object in the game scene, wherein the path geometry is a geometry through which sound needs to pass when being transmitted from the sound source to the sound receiving object;
judging whether the path geometric solid has a virtual resource meeting a preset condition, wherein the virtual resource type on the geometric solid and the associated information of the geometric solid bearing the virtual resource are stored in advance, and the step of judging whether the path geometric solid has the virtual resource meeting the preset condition comprises the following steps: determining the type of the virtual resource on the geometry forming the path geometry according to the association information; judging whether the type of the virtual resource meets the preset condition or not;
setting audio processing parameters according to the judgment result, wherein the step of setting audio processing parameters according to the judgment result comprises the following steps: and when the type of the virtual resource meets the preset condition, setting audio processing parameters.
2. The audio processing method of claim 1, wherein the step of determining a path geometry based on the locations of sound sources and sound receiving objects in the game scene comprises:
a detection step, namely determining a second geometric body adjacent to a first geometric body according to the positions of a sound source and a sound receiving object in the game scene, wherein the first geometric body is the geometric body where the sound source is located;
and a circulation step, namely determining the second geometric body as the first geometric body of the next detection step so as to determine the path geometric body.
3. The audio processing method according to claim 2, wherein the positions of the sound source and the sound receiving object are coordinate values of the sound source and coordinate values of the sound receiving object, and the detecting step is preceded by:
determining a primary detection direction and a secondary detection direction according to the coordinate values of the sound source and the coordinate values of the sound receiver, and distributing a corresponding secondary detection direction counter for the secondary detection direction, wherein the secondary detection direction counter is used for triggering the determination of a second geometric body towards a searching direction containing the secondary detection direction; the step of determining the primary detection direction and the secondary detection direction according to the coordinate values of the sound source and the coordinate values of the sound receiver includes:
making difference values between the axial coordinate values of the sound receiving party and the axial coordinate values of the sound source to obtain corresponding difference values of the axial directions;
and determining that the axial direction corresponding to the maximum difference value is the main detection direction, and the other axial directions are the secondary detection directions.
4. The audio processing method of claim 3, wherein the step of determining a second geometry adjacent to the first geometry based on the positions of the sound source and the sound receiving object in the game scene comprises:
updating the value of the secondary detection direction counter along with the process of determining the second geometric body, and judging whether the value of the secondary detection direction counter meets a preset value or not;
and determining a second geometric body according to the judgment result.
5. The audio processing method according to claim 4, wherein the step of updating the value of the secondary detection direction counter accompanying the process of determining the second geometry, and determining whether the value of the secondary detection direction counter satisfies a preset value, comprises:
the process of detecting the geometric body adjacent to the first geometric body along with the main detection direction and/or the secondary detection direction increases the difference value corresponding to the secondary detection direction counter on the current numerical value of the secondary detection direction counter or initializes the current numerical value of the secondary detection direction counter to obtain an updated current numerical value;
and judging whether the updated current value is greater than or equal to the maximum difference value.
6. The audio processing method of claim 4, wherein said determining the second geometry based on the determination comprises at least one of:
when the value of the secondary detection direction counter meets a preset value, determining a geometric body adjacent to the first geometric body as a second geometric body according to the secondary detection direction and the main detection direction;
and when the value of the secondary detection direction counter does not meet a preset value, determining the geometric body adjacent to the first geometric body as a second geometric body along the primary detection direction.
7. The audio processing method according to claim 1, wherein the step of determining whether a virtual resource satisfying a preset condition exists in the path geometry comprises:
determining at least one geometric surface in the path geometric body according to the coordinate values of the path geometric body;
and judging whether the virtual resources meeting preset conditions exist in the at least one geometric surface.
8. The audio processing method of claim 1, wherein the step of determining a path geometry based on the locations of sound sources and sound receiving objects in the game scene comprises:
determining a type of the sound source;
and determining path geometric bodies meeting a preset number according to the positions of the sound source and the sound receiving object in the game scene, wherein the preset number corresponds to the type of the sound source.
9. An audio processing apparatus, characterized in that the audio processing apparatus comprises:
the position module is used for determining a path geometric body according to the positions of a sound source and a sound receiving object in a game scene, wherein the path geometric body is a geometric body which sound needs to pass through from the sound source to the sound receiving object, the space of the game scene is divided into a plurality of geometric bodies which are spliced with each other, and virtual resources in the game scene are arranged on the surface of the geometric bodies or the inner section of the geometric bodies;
a detection module, configured to determine whether a virtual resource meeting a preset condition exists in the path geometry, where a virtual resource type on the geometry and associated information of the geometry that carries the virtual resource are pre-stored, and the step of determining whether a virtual resource meeting the preset condition exists in the path geometry includes: determining the type of the virtual resource on the geometry forming the path geometry according to the association information; judging whether the type of the virtual resource meets the preset condition or not;
the setting module is used for setting audio processing parameters according to the judgment result, and the step of setting the audio processing parameters according to the judgment result comprises the following steps: and when the type of the virtual resource meets the preset condition, setting audio processing parameters.
10. A mobile terminal, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the audio processing method of any of claims 1-8 via execution of the executable instructions.
11. A computer storage medium, characterized in that a computer program stored in the computer storage medium, when executed by a processor, implements the audio processing method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810395831.1A CN108744517B (en) | 2018-04-27 | 2018-04-27 | Audio processing method, device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810395831.1A CN108744517B (en) | 2018-04-27 | 2018-04-27 | Audio processing method, device, terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108744517A CN108744517A (en) | 2018-11-06 |
CN108744517B true CN108744517B (en) | 2022-02-22 |
Family
ID=64012481
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810395831.1A Active CN108744517B (en) | 2018-04-27 | 2018-04-27 | Audio processing method, device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108744517B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111147747B (en) * | 2019-12-30 | 2021-07-27 | 深圳市优必选科技股份有限公司 | Method for identifying complementary component and image processing equipment |
CN111744192B (en) * | 2020-06-28 | 2024-02-02 | 网易(杭州)网络有限公司 | Sound propagation method, sound propagation device, electronic equipment and computer readable medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000267675A (en) * | 1999-03-16 | 2000-09-29 | Sega Enterp Ltd | Acoustical signal processor |
CN103186710A (en) * | 2011-12-31 | 2013-07-03 | 北京金山软件有限公司 | Optimal route searching method and system |
JP2016007399A (en) * | 2014-06-25 | 2016-01-18 | 株式会社カプコン | Sound effect processing program and game device |
CN107050860A (en) * | 2017-04-24 | 2017-08-18 | 网易(杭州)网络有限公司 | Method, device, storage medium and the processor of map generation |
CN107952243A (en) * | 2017-11-29 | 2018-04-24 | 杭州电魂网络科技股份有限公司 | Determining method of path and device |
-
2018
- 2018-04-27 CN CN201810395831.1A patent/CN108744517B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000267675A (en) * | 1999-03-16 | 2000-09-29 | Sega Enterp Ltd | Acoustical signal processor |
CN103186710A (en) * | 2011-12-31 | 2013-07-03 | 北京金山软件有限公司 | Optimal route searching method and system |
JP2016007399A (en) * | 2014-06-25 | 2016-01-18 | 株式会社カプコン | Sound effect processing program and game device |
CN107050860A (en) * | 2017-04-24 | 2017-08-18 | 网易(杭州)网络有限公司 | Method, device, storage medium and the processor of map generation |
CN107952243A (en) * | 2017-11-29 | 2018-04-24 | 杭州电魂网络科技股份有限公司 | Determining method of path and device |
Also Published As
Publication number | Publication date |
---|---|
CN108744517A (en) | 2018-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11270497B2 (en) | Object loading method and apparatus, storage medium, and electronic device | |
US20200353357A1 (en) | Virtual Resource Processing Method in Game Scene and Apparatus, Terminal, and Storage-Medium | |
US20200316466A1 (en) | Information Processing Method and Apparatus, Mobile Terminal, and Storage Medium | |
JP2021517002A (en) | Virtual resource processing methods and devices in the game scene | |
US20220318945A1 (en) | Optimizing compilation of shaders | |
CN108465241B (en) | Game sound reverberation processing method and device, storage medium and electronic equipment | |
CN112090078B (en) | Game character movement control method, device, equipment and medium | |
CN112717404B (en) | Virtual object movement processing method and device, electronic equipment and storage medium | |
CN108744517B (en) | Audio processing method, device, terminal and storage medium | |
CN114177613B (en) | Navigation grid updating method, device, equipment and computer readable storage medium | |
US20200401436A1 (en) | System and method to operate 3d applications through positional virtualization technology | |
CN110478898B (en) | Configuration method and device of virtual scene in game, storage medium and electronic equipment | |
CN111383355B (en) | Three-dimensional point cloud completion method, device and computer readable storage medium | |
CN111744199B (en) | Image processing method and device, computer readable storage medium and electronic equipment | |
CN111279394A (en) | Task execution method and device of virtual role and terminal equipment | |
KR102003481B1 (en) | Method and apparatus for creating virtual reality contents for virtual reality-based interior consulting service | |
CN109985386B (en) | Method and device for generating map | |
CN113849969A (en) | Millimeter wave radar simulation method and device and electronic equipment | |
CN110743161B (en) | Virtual object control method, device, terminal and storage medium | |
KR20140144714A (en) | Method for representing a participating media in a scene and corresponding device | |
CN115888081A (en) | Virtual road network generation method and device, storage medium and electronic equipment | |
CN115120980A (en) | Game scene generation method and device, storage medium and electronic device | |
CN109445868A (en) | The generation method and device of a kind of scene of game Road segment model | |
CN114297751A (en) | BIM rendering method and device, electronic equipment and storage medium | |
CN112184920A (en) | AR-based skiing blind area display method and device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |