Audio data processing method, device, equipment and computer readable storage medium

By using multiple buffers to process audio data in the digital audio matrix system, the problems of lagging and data accumulation when processing large amounts of data are solved, the processing efficiency and accuracy are improved, and the stability of audio data processing is ensured.

CN117316169BActive Publication Date: 2024-09-06PTN ELECTRONICS LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311598489.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2024-09-06
Estimated Expiration
2043-11-28

AI Technical Summary

Technical Problem

When a digital audio matrix system processes a large amount of data, it is easy for the processing link to take too long, causing lags, and may lead to data accumulation and distortion, affecting the efficiency and accuracy of the entire data processing.

Method used

In the process of audio data processing, multiple buffers are used to store and process audio stream data, including audio stream data to be processed, PCM data, multi-channel data and audio channel data. The buffer delay function reduces the delay between processing links. Correlation to avoid data accumulation and lag.

Benefits of technology

It effectively reduces distortion and failures caused by incomplete data, improves the efficiency and accuracy of audio data processing, and ensures the independence and stability of processing links.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117316169B
    Figure CN117316169B
Patent Text Reader

Abstract

The present application relates to an audio data processing method, device, equipment and computer-readable storage medium, belonging to the field of audio processing technology, the method comprising: performing audio format detection on audio stream data to be processed, and storing the audio stream data to be processed in a first buffer, the audio stream data to be processed includes a plurality of audio data to be processed corresponding to at least one audio format; for any audio data to be processed, obtaining an audio decoder corresponding to the audio format of the audio data to be processed, using the audio decoder to decode the audio data to be processed, and storing the generated PCM data in a second buffer; post-processing the plurality of PCM data read from the second buffer, and storing the generated plurality of multi-channel data in a third buffer; performing channel sorting on the plurality of multi-channel data read from the third buffer, and storing the generated plurality of audio channel data in a fourth buffer. The present application can reduce the situations of audio data processing freeze, distortion and failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio processing technology, and in particular to an audio data processing method, device, equipment and computer-readable storage medium. Background Art

[0002] The digital audio matrix system is generally a device consisting of multiple input ports and multiple output ports. It encodes the audio analog signal into a digital signal, then performs various DSP audio processing, and finally outputs the audio analog signal to the power amplifier for playback through analog-to-digital conversion. The digital audio matrix system manages and controls the transmission and distribution of audio signals, and provides signal routing, switching, distribution and control functions to achieve flexible operation and management of multi-source and multi-target audio. Therefore, the digital audio matrix system is widely used in control centers, command and dispatch centers, multimedia conference rooms, remote video conferencing centers, exhibition halls, banquet halls, stadiums and other scenes to meet the various application requirements of these scenes for public sound reinforcement systems.

[0003] At present, the DSP audio processing process in the digital audio matrix system includes multiple processing links, such as decoding, post-processing, channel sorting, etc., and the execution of these processes is in a serial relationship. When the amount of data of the audio signal input into the digital audio matrix system is large, it is easy to cause one or several processing links to take too long, making it impossible for the subsequent processing links to perform the corresponding processing in time, resulting in a jam; it may also cause the previous processing links to accumulate data and lose data, causing the subsequent data processing to be distorted or even fail due to incomplete data. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides an audio data processing method, device, equipment and computer-readable storage medium.

[0005] In a first aspect, the present application provides an audio data processing method, which is applied to a digital audio matrix system and adopts the following technical solution:

[0006] An audio data processing method, comprising:

[0007] Performing audio format detection on the audio stream data to be processed, and storing the audio stream data to be processed in a first buffer, wherein the audio stream data to be processed includes a plurality of audio data to be processed corresponding to at least one audio format;

[0008] For any of the audio data to be processed, obtaining an audio decoder corresponding to the audio format of the audio data to be processed, decoding the audio data to be processed by using the audio decoder to generate PCM data, and storing the PCM data in a second buffer;

[0009] Post-process the plurality of PCM data read from the second buffer to generate a plurality of multi-channel data, and store the plurality of multi-channel data in a third buffer;

[0010] Channel sorting is performed on the multiple multi-channel data read from the third buffer to generate multiple audio channel data, and the multiple audio channel data is stored in a fourth buffer, so that the digital-to-analog conversion module reads the multiple audio channel data from the fourth buffer for digital-to-analog conversion.

[0011] Optionally, the first buffer includes a plurality of first sub-buffers, each of which can store a to-be-processed audio data; and storing the to-be-processed audio stream data in the first buffer includes:

[0012] For any of the audio data to be processed, the detected audio format information is associated with the audio data to be processed and stored in a corresponding first sub-buffer;

[0013] The second buffer includes a plurality of second sub-buffers, each of which can store a PCM data; and storing the plurality of PCM data in the second buffer includes:

[0014] For any of the PCM data, storing the PCM data in a corresponding second sub-buffer;

[0015] The third buffer includes a plurality of third sub-buffers, each of which can store multi-channel data; and storing the plurality of audio channel data in the fourth buffer includes:

[0016] For any of the multi-channel data, storing the multi-channel data in a corresponding third sub-buffer;

[0017] The fourth buffer includes a plurality of fourth sub-buffers, each of which can store multi-channel data; and storing the plurality of audio channel data in the fourth buffer includes:

[0018] For any of the audio channel data, the audio channel data is stored in a corresponding fourth sub-buffer.

[0019] Optionally, the second sub-buffer and the third sub-buffer both correspond one-to-one to audio input channels of the digital audio matrix system.

[0020] Optionally, storing the to-be-processed audio stream data in a first buffer includes:

[0021] For a plurality of audio data to be processed received through the same audio input channel, they are sequentially stored in the first sub-buffer corresponding to the audio input channel according to the receiving time.

[0022] Optionally, the fourth sub-buffer corresponds one-to-one to the audio output channel of the digital audio matrix system.

[0023] Optionally, before storing the plurality of audio channel data in the fourth buffer, the method further includes:

[0024] In response to an audio adjustment instruction input by a user, acquiring target audio adjustment information, wherein the target audio adjustment information includes a target volume and a target sound effect;

[0025] Before storing the plurality of audio channel data in the fourth buffer, the method further includes:

[0026] storing the plurality of audio channel data into a fifth buffer;

[0027] Reading the plurality of audio channel data from the fifth buffer, and performing audio adjustment on the plurality of audio channel data based on the target audio adjustment information;

[0028] The storing of the plurality of audio channel data into the fourth buffer comprises:

[0029] The plurality of audio channel data after audio adjustment are stored in the fourth buffer.

[0030] Optionally, the post-processing includes at least one of rendering, upmixing, downsampling, three-dimensional space remapping, filtering, and noise reduction.

[0031] In a second aspect, the present application provides an electronic device, which adopts the following technical solution:

[0032] An audio data processing device, applied to a digital audio matrix system, comprising:

[0033] A detection buffer module, configured to perform audio format detection on the audio stream data to be processed, and store the audio stream data to be processed in a first buffer, wherein the audio stream data to be processed includes a plurality of audio data to be processed corresponding to at least one audio format;

[0034] A decoding buffer module, configured to obtain, for any of the audio data to be processed, an audio decoder corresponding to the audio format of the audio data to be processed, decode the audio data to be processed using the audio decoder, generate PCM data, and store the PCM data in a second buffer;

[0035] A post-processing buffer module, used for post-processing the plurality of PCM data read from the second buffer to generate a plurality of multi-channel data, and storing the plurality of multi-channel data in a third buffer;

[0036] The sorting buffer module is used to perform channel sorting on the multiple multi-channel data read from the third buffer, generate multiple audio channel data, and store the multiple audio channel data in the fourth buffer, so that the digital-to-analog conversion module reads the multiple audio channel data from the fourth buffer for digital-to-analog conversion.

[0037] In a third aspect, the present application provides an electronic device, which adopts the following technical solution:

[0038] An electronic device comprises a memory and a processor; the memory stores a computer program that can be loaded and executed by the processor, and the computer program implements the function of the device described in any one of the first aspects.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:

[0040] A computer-readable storage medium stores a computer program that can be loaded and executed by a processor, wherein the computer program implements the function of the device described in any one of the first aspects.

[0041] By adopting the above technical solution, buffers are set in audio data processing links such as audio format detection, decoding, post-processing, and channel sorting, so that the processing efficiency of each processing link is not likely to have a significant adverse impact on the processing of other processing links, so that the correlation between the processing links is weakened. Even if the amount of audio data input to the digital audio matrix system is large, the delay effect of the buffer can prevent subsequent audio data processing links from generating data accumulation and causing audio processing failures or freezes, thereby reducing audio data processing distortion and failures, and improving the efficiency and accuracy of audio data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flowchart of an audio data processing method according to an embodiment of the present application.

[0043] Figure 2 It is a structural block diagram of an audio data processing device according to an embodiment of the present application.

[0044] Figure 3 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0046] Figure 1The following is a flow chart of an audio data processing method for a digital audio matrix system provided in an embodiment of the present application. Figure 1 As shown, the method mainly includes the following steps:

[0047] Step S101, performing audio format detection on the audio stream data to be processed, and storing the audio stream data to be processed in a first buffer, wherein the audio stream data to be processed includes a plurality of audio data to be processed corresponding to at least one audio format;

[0048] Step S102, for any audio data to be processed, obtaining an audio decoder corresponding to the audio format of the audio data to be processed, decoding the audio data to be processed by using the audio decoder to generate PCM data, and storing the PCM data in a second buffer;

[0049] Step S103, post-processing the multiple PCM data read from the second buffer to generate multiple multi-channel data, and storing the multiple multi-channel data in the third buffer;

[0050] Step S104, sorting the multiple multi-channel data read from the third buffer to generate multiple audio channel data, and storing the multiple audio channel data in the fourth buffer, so that the digital-to-analog conversion device reads the multiple audio channel data from the fourth buffer for digital-to-analog conversion.

[0051] In the present embodiment, buffers are set in multiple audio data processing links such as audio format detection, decoding, post-processing, and channel sorting. Even if the amount of audio data to be processed is large, the delay effect of the buffer will not easily cause data accumulation in subsequent audio data processing links to cause audio processing failure or jamming. The processing efficiency of each processing link is not likely to have a significant adverse impact on the processing of other processing links, so that the correlation between the processing links is weakened; and it is not easy to lose data due to data accumulation, which can effectively reduce the distortion and failure of the entire audio processing due to incomplete data, thereby improving the efficiency and accuracy of audio data processing.

[0052] It should be noted that the digital audio matrix system receives audio signals input from various audio sources through the audio input ports provided thereon. The audio sources include but are not limited to microphones, electronic musical instruments, PCs, DVD players, and laptop computers; the audio input ports include but are not limited to at least one of ordinary HDMI interfaces, HDMI interfaces with ARC functions, digital optical audio interfaces, USB interfaces, AES / EBU interfaces, and RCA audio interfaces.

[0053] In this embodiment, the audio stream data to be processed is a digital audio signal. Therefore, if the audio signal input by the audio source is an analog signal, it needs to be converted into a digital signal first to generate a digital audio signal, and then the digital audio signal is spliced ​​to obtain the audio stream data to be processed.

[0054] The digital-to-analog conversion device reads multiple audio channel data from the fourth buffer for digital-to-analog conversion, generates a multi-channel audio analog signal, and outputs it to the power amplifier device connected to the digital audio matrix system for playback. The power amplifier device is a multi-channel sound system, which is provided with multiple speakers, and the speakers correspond to the audio output channels one by one, and each audio output channel outputs a corresponding mono audio signal.

[0055] In some embodiments, the size setting of each buffer is related to the processing capacity of each processing link. The processing capacity of all processing links is ranked, and the capacity of the buffer corresponding to each processing link is inversely proportional to the processing capacity.

[0056] In this embodiment, the audio format includes but is not limited to MP3, WMA, WAV, AAC, FLAC, APE, WV, ASF, VQF, MID, and OGG.

[0057] In this embodiment, post-processing may include but is not limited to at least one of rendering, upmixing, downsampling, three-dimensional space remapping, filtering, and noise reduction, which is not specifically limited in this embodiment.

[0058] In some embodiments, each buffer zone may be further divided as follows:

[0059] (1) The first buffer includes a plurality of first sub-buffers, each of which can store a piece of audio data to be processed; for any piece of audio data to be processed, the detected audio format information is associated with the audio data to be processed and stored in the corresponding first sub-buffer.

[0060] (2) The second buffer includes a plurality of second sub-buffers, each of which can store a PCM data; for any PCM data, the PCM data is stored in the corresponding second sub-buffer.

[0061] (3) The third buffer includes a plurality of third sub-buffers, each of which can store a multi-channel data; for any multi-channel data, the multi-channel data is stored in the corresponding third sub-buffer.

[0062] Optionally, the digital audio matrix system has multiple audio input ports (i.e., audio input channels). Therefore, for the first buffer, the second buffer, and the third buffer, each buffer can be divided into sub-buffers according to the number of audio input channels, that is, the first sub-buffer, the second sub-buffer, and the third sub-buffer all correspond one-to-one to the audio input channels of the digital audio matrix system.

[0063] Furthermore, a plurality of audio data to be processed received through the same audio input channel may be sequentially stored in a first sub-buffer corresponding to the audio input channel according to the receiving time.

[0064] (4) The fourth buffer includes a plurality of fourth sub-buffers, each of which can store multi-channel data; for any audio channel data, the audio channel data is stored in the corresponding fourth sub-buffer.

[0065] Optionally, the digital audio matrix system has multiple audio output ports (ie, audio output channels), and therefore, the fourth buffer zone can be sub-divided according to the audio output channels, that is, the fourth sub-buffer zone corresponds one-to-one to the audio output channels of the digital audio matrix system.

[0066] Furthermore, for each buffer zone, in addition to the divided sub-buffer zones, a spare buffer zone may be set, and the capacities of the spare buffer zones corresponding to each buffer zone may be set to be the same or different.

[0067] When the used capacity ratio of a sub-buffer reaches a first preset value (for example, 90%), a preset buffer is extracted from the spare buffer corresponding to the buffer to which the sub-buffer belongs as a spare sub-buffer of the sub-buffer; when the used capacity ratio of the sub-buffer reaches 100%, the to-be-processed audio data corresponding to the buffer to which the sub-buffer belongs continues to be stored in the spare sub-buffer of the sub-buffer.

[0068] The used capacity ratio is the ratio of the used capacity to the total capacity. The capacity of the preset buffer can be set to the total capacity of the backup buffer / N, where N can be n times the total number of buffers, and n>0, for example, n=1, n=2, and n=0.5.

[0069] Of course, the N value of the preset buffer corresponding to each sub-buffer may be the same or different. If different, it may be inversely proportional to the capacity share of the sub-buffer in the buffer to which it belongs. For example, the first buffer includes the first sub-buffer a, the first sub-buffer b and the first sub-buffer c, and the ratio of the total capacity of each first sub-buffer to the total capacity of the first buffer, that is, the capacity share, is calculated respectively, which are A, B, C, and A>B>C, and the N values ​​of the preset buffers corresponding to the first sub-buffer a, the first sub-buffer b and the first sub-buffer c are N1, N2 and N3, respectively, and N1<N2<N3 is set at this time.

[0070] In some embodiments, the user may input an audio adjustment instruction to the digital audio matrix system to adjust the volume and sound effects. Before storing the multiple audio channel data in the fourth buffer, the digital audio matrix system obtains target audio adjustment information in response to the audio adjustment instruction input by the user, wherein the target audio adjustment information includes a target volume and a target sound effect. The multiple audio channel data are stored in the fifth buffer; the multiple audio channel data are read from the fifth buffer, and audio adjustment is performed on the multiple audio channel data based on the target audio adjustment information; and the multiple audio channel data after audio adjustment are stored in the fourth buffer.

[0071] It should be noted that the fifth buffer area may also be divided into a fifth sub-buffer area according to the sub-buffer area division method of the fourth buffer area, and the details are not repeated here.

[0072] Figure 2 FIG. 2 is a structural block diagram of an audio data processing device 200 applied to a digital audio matrix system provided in an embodiment of the present application. Figure 2 As shown, the device 200 mainly includes:

[0073] The detection buffer module 201 is used to perform audio format detection on the audio stream data to be processed, and store the audio stream data to be processed in a first buffer, wherein the audio stream data to be processed includes a plurality of audio data to be processed corresponding to at least one audio format;

[0074] The decoding buffer module 202 is used for obtaining an audio decoder corresponding to the audio format of any audio data to be processed, decoding the audio data to be processed by using the audio decoder to generate PCM data, and storing the PCM data in a second buffer;

[0075] A post-processing buffer module 203 is used to post-process the multiple PCM data read from the second buffer to generate multiple multi-channel data, and store the multiple multi-channel data in a third buffer;

[0076] The sorting buffer module 204 is used to sort the multiple multi-channel data read from the third buffer, generate multiple audio channel data, and store the multiple audio channel data in the fourth buffer, so that the digital-to-analog conversion device reads the multiple audio channel data from the fourth buffer for digital-to-analog conversion.

[0077] As an optional implementation of this embodiment, the first buffer includes multiple first sub-buffers, each of which can store an audio data to be processed; the detection buffer module 201 is specifically used to store the detected audio format information together with the audio data to be processed in the corresponding first sub-buffer for any audio data to be processed.

[0078] As an optional implementation of this embodiment, the second buffer includes a plurality of second sub-buffers, each of which can store a PCM data; the decoding buffer module 202 is specifically used to store the PCM data in the corresponding second sub-buffer for any PCM data;

[0079] As an optional implementation of this embodiment, the third buffer includes multiple third sub-buffers, each of which can store multi-channel data; the post-processing buffer module 203 is specifically used to store the multi-channel data in the corresponding third sub-buffer for any multi-channel data.

[0080] Optionally, the second sub-buffer and the third sub-buffer both correspond one-to-one to audio input channels of the digital audio matrix system.

[0081] Optionally, the detection buffer module 201 is further specifically configured to store multiple to-be-processed audio data received through the same audio input channel in sequence according to the receiving time into a first sub-buffer corresponding to the audio input channel.

[0082] As an optional implementation of this embodiment, the fourth buffer includes multiple fourth sub-buffers, each of which can store multi-channel data; the sorting buffer module 204 is specifically used to store the audio channel data in the corresponding fourth sub-buffer for any audio channel data.

[0083] Optionally, the fourth sub-buffer corresponds one-to-one to the audio output channel of the digital audio matrix system.

[0084] As an optional implementation of this embodiment, the device further includes:

[0085] A response acquisition module, configured to acquire target audio adjustment information in response to an audio adjustment instruction input by a user, wherein the target audio adjustment information includes a target volume and a target sound effect;

[0086] an adjustment buffer module, configured to store the plurality of audio channel data in a fifth buffer before storing the plurality of audio channel data in a fourth buffer; read the plurality of audio channel data from the fifth buffer, and perform audio adjustment on the plurality of audio channel data based on target audio adjustment information;

[0087] The sorting buffer module 204 is specifically configured to store the multiple audio channel data after the audio adjustment into a fourth buffer.

[0088] As an optional implementation manner of this embodiment, post-processing includes at least one of rendering, up-mixing, down-sampling, three-dimensional space remapping, filtering, and noise reduction.

[0089] The various variations and specific examples of the method provided in the embodiment of the present application are also applicable to the audio data processing device provided in the present embodiment. Through the above detailed description of the audio data processing method, those skilled in the art can clearly understand the implementation method of the audio data processing device in the present embodiment. For the sake of brevity of the specification, it will not be described in detail here.

[0090] Each functional module in the embodiment of the present application can be integrated together to form an independent unit, for example, integrated in a processing unit, or each module can exist physically separately, or two or more modules can be integrated to form an independent unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including several instructions to enable an electronic device (which can be a personal computer, a server or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of each embodiment of the present application. 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, a random access memory, a magnetic disk or an optical disk.

[0091] Figure 3 FIG. 3 is a structural block diagram of an electronic device 300 provided in an embodiment of the present application. Figure 3 As shown, the electronic device 300 includes a memory 301 , a processor 302 , and a communication bus 303 ; the memory 301 and the processor 302 are connected via the communication bus 303 .

[0092] The memory 301 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 301 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, and instructions for implementing the functions of the audio data processing method provided in the above embodiment, etc.; the data storage area may store data involved in the audio data processing method provided in the above embodiment, etc.

[0093] The processor 302 may include one or more processing cores. The processor 302 calls the data stored in the memory 301 by running or executing the instructions, programs, code sets or instruction sets stored in the memory 301, and performs various functions and processes data of the present application. The processor 302 may be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller and a microprocessor. It is understandable that for different devices, the electronic device used to implement the above-mentioned processor 302 function can also be other, and the embodiment of the present application is not specifically limited.

[0094] The communication bus 303 may include a path to transmit information between the above components. The communication bus 303 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 303 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one double arrow is used in the diagram, but it does not mean that there is only one bus or one type of bus. Figure 3 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0095] An embodiment of the present application provides a computer-readable storage medium storing a computer program that can be loaded and executed by a processor to implement the audio data processing method provided in the above embodiment.

[0096] In this embodiment, the computer-readable storage medium may be a tangible device that holds and stores instructions used by the instruction execution device. The computer-readable storage medium may be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof. Specifically, the computer-readable storage medium may be a portable computer disk, a hard disk, a USB flash drive, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a podium random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, an optical disk, a magnetic disk, a mechanical encoding device, and any combination thereof.

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

[0098] In addition, it is to be understood that relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprises," "comprising," or any other variation thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or elements that are inherent to such process, method, article, or device.

[0099] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An audio data processing method, characterized in that: The invention is applied to a digital audio matrix system, and comprises: performing audio format detection on audio stream data to be processed, and storing the audio stream data to be processed in a first buffer, wherein the audio stream data to be processed includes a plurality of audio data to be processed; for any of the audio data to be processed, obtaining an audio decoder corresponding to the audio format of the audio data to be processed, decoding the audio data to be processed by using the audio decoder, generating PCM data, and storing the PCM data in a second buffer; post-processing the plurality of PCM data read from the second buffer, generating a plurality of multi-channel data, and storing the plurality of multi-channel data in a third buffer; performing channel sorting on the plurality of multi-channel data read from the third buffer, generating a plurality of audio channel data, and storing the plurality of audio channel data in a fourth buffer, so that a digital-to-analog conversion module reads the plurality of audio channel data from the fourth buffer for digital-to-analog conversion; The first buffer includes a plurality of first sub-buffers, each of which can store a to-be-processed audio data; the storing of the to-be-processed audio stream data into the first buffer includes: for any of the to-be-processed audio data, the detected audio format information is associated with the to-be-processed audio data and stored in the corresponding first sub-buffer; the second buffer includes a plurality of second sub-buffers, each of which can store a PCM data; the storing of the plurality of PCM data into the second buffer includes: for any of the PCM data, the PCM data is stored in the corresponding second sub-buffer; the third buffer includes a plurality of third sub-buffers, each of which can store a multi-channel data; the storing of the plurality of audio channel data into the fourth buffer includes: for any of the multi-channel data, the multi-channel data is stored in the corresponding third sub-buffer; the fourth buffer includes a plurality of fourth sub-buffers, each of which can store a multi-channel data; the storing of the plurality of audio channel data into the fourth buffer includes: for any of the audio channel data, the audio channel data is stored in the corresponding fourth sub-buffer; Before storing the plurality of audio channel data in the fourth buffer, the method further includes: in response to an audio adjustment instruction input by a user, obtaining target audio adjustment information, wherein the target audio adjustment information includes a target volume and a target sound effect; storing the plurality of audio channel data in a fifth buffer; reading the plurality of audio channel data from the fifth buffer, and performing audio adjustment on the plurality of audio channel data based on the target audio adjustment information; storing the plurality of audio channel data in the fourth buffer includes: storing the plurality of audio channel data after audio adjustment in the fourth buffer; For each buffer, a spare buffer is set, and the capacity of the spare buffer corresponding to each buffer is set to be the same or different; when the used capacity ratio of a sub-buffer reaches a first preset value, a preset buffer is extracted from the spare buffer corresponding to the buffer to which the sub-buffer belongs as a spare sub-buffer of the sub-buffer, and when the used capacity ratio of the sub-buffer reaches 100%, the to-be-processed audio data corresponding to the buffer to which the sub-buffer belongs continues to be stored in the spare sub-buffer of the sub-buffer; wherein the used capacity ratio is the ratio of the used capacity to the total capacity.

2. The method according to claim 1, characterized in that: The first sub-buffer, the second sub-buffer, and the third sub-buffer all correspond one-to-one to the audio input channels of the digital audio matrix system.

3. The method according to claim 2, characterized in that The storing the to-be-processed audio stream data into the first buffer includes: storing a plurality of to-be-processed audio data received through the same audio input channel in sequence according to the receiving time into a first sub-buffer corresponding to the audio input channel.

4. The method according to any one of claims 1 to 3, characterized in that: The fourth sub-buffer corresponds one-to-one to the audio output channels of the digital audio matrix system.

5. The method according to any one of claims 1 to 3, characterized in that: The post-processing includes at least one of rendering, up-mixing, down-sampling, three-dimensional space remapping, filtering, and noise reduction.

6. An audio data processing device, characterized in that: The invention is applied to a digital audio matrix system, and comprises: a detection buffer module, which is used to perform audio format detection on audio stream data to be processed, and store the audio stream data to be processed in a first buffer, wherein the audio stream data to be processed includes a plurality of audio data to be processed corresponding to at least one audio format; a decoding buffer module, which is used to obtain an audio decoder corresponding to the audio format of any of the audio data to be processed, decode the audio data to be processed by using the audio decoder, generate PCM data, and store the PCM data in a second buffer; a post-processing buffer module, which is used to perform post-processing on the plurality of PCM data read from the second buffer, generate a plurality of multi-channel data, and store the plurality of multi-channel data in a third buffer; a sorting buffer module, which is used to perform channel sorting on the plurality of multi-channel data read from the third buffer, generate a plurality of audio channel data, and store the plurality of audio channel data in a fourth buffer, so that a digital-to-analog conversion module reads the plurality of audio channel data from the fourth buffer for digital-to-analog conversion; The first buffer includes a plurality of first sub-buffers, each of which can store a piece of audio data to be processed; the storing of the audio stream data to be processed in the first buffer includes: for any of the audio data to be processed, the detected audio format information is associated with the audio data to be processed and stored in the corresponding first sub-buffer; the second buffer includes a plurality of second sub-buffers, each of which can store a piece of PCM data; the storing of the plurality of PCM data in the second buffer includes: for any of the PCM data, the PCM data is stored in the corresponding second sub-buffer; the third buffer includes a plurality of third sub-buffers, each of which can store a piece of multi-channel data; the storing of the plurality of audio channel data in the fourth buffer includes: for any of the multi-channel data, the multi-channel data is stored in the corresponding third sub-buffer The fourth buffer includes a plurality of fourth sub-buffers, each of which can store a multi-channel data; the storing of the plurality of audio channel data to the fourth buffer includes: for any of the audio channel data, storing the audio channel data in the corresponding fourth sub-buffer; before storing the plurality of audio channel data to the fourth buffer, it also includes: in response to an audio adjustment instruction input by a user, obtaining target audio adjustment information, wherein the target audio adjustment information includes a target volume and a target sound effect; storing the plurality of audio channel data to a fifth buffer; reading the plurality of audio channel data from the fifth buffer, and performing audio adjustment on the plurality of audio channel data based on the target audio adjustment information; storing the plurality of audio channel data to the fourth buffer includes: storing the plurality of audio channel data after audio adjustment to the fourth buffer; For each buffer, a spare buffer is set, and the capacity of the spare buffer corresponding to each buffer is set to be the same or different; when the used capacity ratio of a sub-buffer reaches a first preset value, a preset buffer is extracted from the spare buffer corresponding to the buffer to which the sub-buffer belongs as a spare sub-buffer of the sub-buffer, and when the used capacity ratio of the sub-buffer reaches 100%, the to-be-processed audio data corresponding to the buffer to which the sub-buffer belongs continues to be stored in the spare sub-buffer of the sub-buffer; wherein the used capacity ratio is the ratio of the used capacity to the total capacity.

7. An electronic device, characterized in that: The method comprises a memory and a processor; the memory stores a computer program that can be loaded by the processor and execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that can be loaded by a processor and execute the method according to any one of claims 1 to 5.