WO2019149017A1 - Audio data processing method, apparatus, electronic device and storage medium - Google Patents

Audio data processing method, apparatus, electronic device and storage medium Download PDF

Info

Publication number
WO2019149017A1
WO2019149017A1 PCT/CN2018/125945 CN2018125945W WO2019149017A1 WO 2019149017 A1 WO2019149017 A1 WO 2019149017A1 CN 2018125945 W CN2018125945 W CN 2018125945W WO 2019149017 A1 WO2019149017 A1 WO 2019149017A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio data
type
layer module
audio
language layer
Prior art date
Application number
PCT/CN2018/125945
Other languages
French (fr)
Chinese (zh)
Inventor
程乐
Original Assignee
北京金山云网络技术有限公司
北京金山云科技有限公司
北京金迅瑞博网络技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 北京金山云网络技术有限公司, 北京金山云科技有限公司, 北京金迅瑞博网络技术有限公司 filed Critical 北京金山云网络技术有限公司
Publication of WO2019149017A1 publication Critical patent/WO2019149017A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs

Definitions

  • the present application relates to the field of data processing technologies, and in particular, to an audio data processing method, apparatus, electronic device, and storage medium.
  • the development of mobile live broadcast is relatively rapid.
  • the scene of the anchor and the song is very common.
  • the time when the anchor hears the accompaniment is delayed or the accompaniment is not clear at all, which affects the live broadcast effect. Therefore, the anchor needs to wear the ear return and hear the accompaniment through the ear return. Your own voice, so that you can adjust your singing style, you can also add some sound effects (such as reverb, tone, etc.) to enhance the fun, get a better live broadcast effect.
  • the delay of the ear return is a very important parameter, and the delay will greatly reduce the experience of singing.
  • the general live app uses the non-low-latency ear-back mode to achieve the ear-return effect, and the delay is basically more than 200ms. Such a high delay is greatly reduced for the practicality of the ear return.
  • the low-latency ear-back mode is often used to play audio data.
  • the audio is played in the low-delay ear-back mode.
  • the data process is usually as follows: the operating system collects audio data in the C language layer module to obtain audio data, and the audio processing client processes the audio data collected by the operating system C language layer module through the callback function to obtain the processed audio data. The operating system then plays the processed audio data through a callback function.
  • the non-low-latency ear-back mode requires audio data to be transmitted through the JAVA layer, thereby achieving both low-latency ear-back mode and non-low Delayed ear-return mode will greatly increase the implementation complexity of the live app and the maintenance complexity and maintenance cost of the live app.
  • An object of the present application is to provide an audio data processing method, apparatus, electronic device, and computer readable storage medium to reduce the maintenance cost of software when a non-low delay ear return mode and a low delay ear return mode coexist.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides an audio data processing method, which is applied to a client, where the method includes: receiving a first implementation pointer and audio data sent by an operating system; wherein, if the currently used audio processing mode is non- The low-latency ear-back mode, the type of the first implementation pointer is a first type; if the currently used sound processing mode is a low-latency ear-back mode, the type of the first implementation pointer is a second type; The first implementation pointer is sent after the operating system collects the audio data; determining the type of the first implementation pointer; if it is determined that the type of the first implementation pointer is the first type, performing the received audio data Sound processing, obtaining non-low delay sound effect audio data; after obtaining the non-low delay sound effect audio data, generating a second implementation pointer of the first type, and the second implementation pointer and the non-low delay sound effect Transmitting audio data to the operating system, for triggering, by the operating system, the number of non-low delay audio
  • the operating system plays the low-latency audio audio data according to the second implementation pointer.
  • an embodiment of the present application provides an audio data processing method, which is applied to an operating system of a terminal, where the method includes: collecting audio data; determining from a non-low delay ear return mode and a low delay ear return mode.
  • the currently used sound processing mode according to the currently used sound processing mode, generating a first implementation pointer, when the sound processing mode is a non-low delay ear return mode, the first implementation pointer type is the first type,
  • the audio processing mode is the low delay ear return mode
  • the type of the first implementation pointer is the second type; the first implementation pointer and the audio data are sent to the client, so that the client determines the An implementation of the pointer type is a first type, obtaining the audio data sent by the operating system, performing audio processing on the audio data, to obtain non-low delay audio audio data, if the client determines the first implementation
  • the type of the pointer is a second type, and the audio data is called by the first callback function, and the audio data is processed by the sound effect to obtain a
  • Late sound effect audio data after obtaining the non-low delay sound effect audio data or the low delay sound effect audio data, feeding back the obtained data to the operating system; receiving the non-low delay sound effect sent by the client The audio data or the low-latency audio audio data is played back to the received audio data.
  • an embodiment of the present application provides an audio data processing apparatus, which is applied to a client, and includes: a data receiving module, configured to receive a first implementation pointer and audio data sent by an operating system;
  • the sound processing mode is a non-low delay ear return mode, and the type of the first implementation pointer is a first type; if the currently used sound processing mode is a low delay ear return mode, the type of the first implementation pointer is a second type; the first implementation pointer is sent after the operating system collects audio data;
  • the pointer type determining module is configured to determine a type of the first implementation pointer; and the first data processing module is configured to determine
  • the first implementation pointer is of a first type, and performs sound processing on the received audio data to obtain non-low delay audio audio data; and the first data sending module is configured to obtain the non-low delay audio audio data.
  • the second data processing module is configured to determine the first implementation
  • the type of the pointer is a second type, the audio data is called from the operating system by a first callback function, and the audio data is subjected to sound processing to obtain low-latency audio audio data; and the second data sending module is set to After obtaining the low-latency audio audio data, generating a second implementation pointer of the second type, and transmitting the second implementation pointer and the low-latency audio audio data to the operating system, for triggering the The operating system plays the low-latency audio audio data according to the second implementation pointer.
  • an embodiment of the present application provides an audio data processing apparatus, which is applied to an operating system of a terminal, where the apparatus includes: a data collection module configured to collect audio data; and a mode determining module configured to be non-low Determining the currently adopted sound effect processing mode in the delayed ear return mode and the low delay ear return mode; the pointer generating module is configured to generate a first implementation pointer according to the currently adopted sound effect processing mode, when the sound effect processing mode is non-low delay In the ear return mode, the type of the first implementation pointer is the first type, and when the sound processing mode is the low delay ear return mode, the type of the first implementation pointer is the second type; the data sending module is set to the client Transmitting the first implementation pointer and the audio data, so that if the client determines that the type of the first implementation pointer is a first type, obtaining the audio data sent by the operating system, the audio The data is subjected to sound processing to obtain non-low delay sound effect audio data, if the client determines
  • an embodiment of the present application provides an electronic device, including a processor and a memory, a memory configured to store a computer program, and a processor configured to execute a program stored on the memory, to implement any of the foregoing The steps of the client's audio data processing method.
  • an embodiment of the present application provides an electronic device, including a processor and a memory, a memory configured to store a computer program, and a processor configured to execute the program stored on the memory to implement any of the foregoing applications.
  • the steps of the audio data processing method of the operating system including a processor and a memory, a memory configured to store a computer program, and a processor configured to execute the program stored on the memory to implement any of the foregoing applications.
  • the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores instructions, when executed on a computer, causing the computer to execute any of the above-mentioned audio data applied to the client. Approach.
  • an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores an instruction, when it is run on a computer, causing the computer to perform any of the above applications to be set as a terminal operation.
  • the audio data processing method of the system is not limited to:
  • the embodiment of the present application provides a computer program product comprising instructions, when executed on a computer, causing the computer to execute any of the above-described audio data processing methods applied to the client.
  • the embodiment of the present application provides a computer program product comprising instructions, when executed on a computer, causing the computer to execute any of the above audio data processing methods applied to the terminal operating system.
  • the embodiment of the present application further provides a computer program that, when run on a computer, causes the computer to execute any of the above-described audio data processing methods applied to the client.
  • the embodiment of the present application further provides a computer program that, when run on a computer, causes the computer to execute any of the above-described audio data processing methods applied to the terminal operating system.
  • the client receives the audio data sent by the operating system and the first implementation pointer, and performs sound processing on the audio data when the type of the first implementation pointer is NULL. Obtaining non-low-latency audio audio data; when the first implementation pointer type is non-NULL, performing audio processing on the audio data to obtain low-latency audio audio data, and the client will perform non-low-latency audio data or low-latency sound effects.
  • the audio data and the second implementation pointer are sent to the operating system, and the operating system plays the received non-low delay audio audio data or the low delay audio audio data according to the second implementation pointer.
  • the present application can obtain non-low delay audio audio data and low delay audio audio data through a set of methods or devices, and play the above different audio data, thereby reducing the maintenance cost of the software.
  • FIG. 1 is a schematic flowchart diagram of an audio data processing method according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart diagram of an audio data processing method according to another embodiment of the present application.
  • FIG. 3 is a schematic flowchart diagram of an audio data processing method according to another embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of an audio data processing apparatus according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an audio data processing apparatus according to another embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
  • the audio data processing method, the device, the electronic device, and the storage medium are provided.
  • the audio data processing method applied to the client is described in detail in the embodiment of the present application.
  • the audio data processing method may include the following steps A1-A6:
  • A1 receiving a first implementation pointer and audio data sent by the operating system; wherein, if the currently adopted sound processing mode is a non-low delay ear return mode, the type of the first implementation pointer is the first type; if the currently used sound processing The mode is a low-latency ear-back mode, and the type of the first implementation pointer is the second type; the first implementation pointer is sent after the operating system collects the audio data.
  • the first type may be null NULL and the second type may be non-NULL.
  • the client includes a second JAVA language layer module; receiving the first implementation pointer and the audio data sent by the operating system, the second JAVA language layer module receiving the audio data sent by the operating system and the first Implement pointers.
  • the step of receiving, by the second JAVA language layer module, the audio data sent by the operating system and the first implementation pointer includes: receiving, by the second JAVA language layer module, the audio sent by the first JAVA language layer module Data and first implementation pointer.
  • the received audio data is subjected to sound processing to obtain non-low delay audio audio data.
  • the client further includes a second C language layer module; if it is determined that the type of the first implementation pointer is the first type, performing sound processing on the received audio data to obtain non-low delay audio audio data.
  • the step may include: if it is determined that the type of the first implementation pointer is the first type, the second C language layer module receives the audio data sent by the second JAVA language layer module; and the second C language layer module performs sound processing on the audio data to obtain Non-low latency audio audio data.
  • A4 after obtaining the non-low delay audio audio data, generating a second implementation pointer of the first type, and sending the second implementation pointer and the non-low delay audio audio data to the operating system, for triggering the operating system according to the second Implement pointers to play non-low latency audio data.
  • the client further includes a second C language layer module; if it is determined that the type of the first implementation pointer is the second type, the audio data is invoked from the operating system by the first callback function, and the audio data is processed.
  • the step of obtaining low-latency audio audio data includes: if it is determined that the type of the first implementation pointer is the second type, the second C language layer module receives the first implementation pointer sent by the second JAVA language layer module; the second C language layer The module calls the audio data through the first callback function, and performs audio processing on the audio data to obtain low-latency audio audio data.
  • the audio data is called from the operating system by the first callback function, and the audio data is subjected to sound processing to obtain low-latency audio audio data.
  • the operating system further includes a first C language layer module; the second C language layer module calls the audio data through the first callback function, and performs audio processing on the audio data to obtain low-latency audio audio data, including
  • the second C language layer module calls the audio data collected by the first C language layer module from the first C language layer module through the first callback function, and performs audio processing on the audio data to obtain low delay audio audio data.
  • A6 after obtaining the low-latency audio audio data, generating a second implementation pointer of the second type, and sending the second implementation pointer and the low-latency audio audio data to the operating system, for triggering the operating system according to the second implementation pointer Plays low-latency audio data.
  • FIG. 1 is a schematic flowchart of an audio data processing method according to an embodiment of the present disclosure.
  • the audio data processing method is applied to a client including a second JAVA language layer module and a second C language layer module, and the audio data processing method may be Including the following steps:
  • Step 101 The second JAVA language layer module receives the audio data sent by the operating system and the first implementation pointer; wherein, if the currently adopted sound effect processing mode is a non-low delay ear return mode, the type of the first implementation pointer is null NULL; If the currently used sound processing mode is the low delay ear return mode, the type of the first implementation pointer is non-NULL.
  • the audio data is often used in the process of acquisition, processing, and playback without the low-latency ear-back mode of the JAVA language layer to reduce the ear-back delay, but for the low support Terminal devices with delay characteristics, when the ear mode is implemented in the above mode, may cause noise or abnormal sound.
  • the non-low-latency ear-back mode and the low-latency ear-back mode may be separately selected according to the actual needs of the user or the attributes of the terminal device to perform mobile live broadcast: on the terminal device supporting low delay characteristics.
  • the non-low-latency ear-back mode is used on terminal devices that do not support low-latency characteristics, reducing software maintenance costs.
  • the second JAVA language layer module of the client may receive the audio data sent by the operating system and the first implementation pointer of the type NULL; when the ear return mode is specified In the low latency ear return mode, the client's second JAVA language layer module can receive the audio data sent by the operating system and the first implementation pointer of type non-NULL.
  • the audio data sent by the operating system may be an audio data collected by an operating system, and the collected audio data may be audio data in a PCM (Pulse Code Modulation) format, or may be The audio data of other formats, the embodiment of the present application does not limit the format of the audio data.
  • the operating system may include a first JAVA language layer module; at this time, the second JAVA language layer module receives the audio data sent by the operating system and the first implementation pointer, and may include: receiving, by the second JAVA language layer module The audio data sent by the first JAVA language layer module and the first implementation pointer.
  • Step 102 Determine the type of the first implementation pointer; if it is determined that the type of the first implementation pointer is NULL, step 103 is performed; if it is determined that the type of the first implementation pointer is non-NULL, step 104 is performed.
  • Step 103 The second JAVA language layer module sends the audio data to the second C language layer module.
  • the type of the first implementation pointer is NULL, that is, when the conventional non-low delay ear return mode is adopted, the client sends the received audio data from the second JAVA language layer module to the second C language layer.
  • the module is configured to perform audio processing on the audio data by the second C language layer module.
  • Step 104 The second JAVA language layer module sends the first implementation pointer to the second C language layer module.
  • the type of the first implementation pointer is non-NULL, that is, when the conventional low-latency ear-back mode is adopted, the client sends the non-NULL first implementation pointer to the second C language layer module.
  • Step 105 After receiving the audio data, the second C language layer module performs audio processing on the audio data to obtain non-low delay audio audio data, and sends the non-low delay audio audio data to the second JAVA language layer module.
  • the second C language layer module of the client may perform sound processing on the audio data to obtain non-low delay audio audio data.
  • the sound processing method may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, sound fade processing, etc., and those skilled in the art may understand the specific implementation manner of the sound effect processing. I will not repeat them here.
  • Step 106 After receiving the first implementation pointer of the non-NULL type, the second C language layer module calls the audio data through the first callback function, performs audio processing on the audio data, obtains low-latency audio audio data, and has low delay.
  • the audio audio data is sent to the second JAVA language layer module.
  • the second C language layer module of the client can directly call the audio data collected by the operating system through the callback function, and perform sound effect processing, for convenience.
  • the callback function can be the first callback function.
  • the audio processing method in this step may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, sound fade processing, etc., and those skilled in the art can understand the sound effect processing. The specific implementation manner is not described here.
  • the operating system includes a first C language layer module, and after receiving the first implementation pointer that is not NULL, the second C language layer module calls the audio data through the first callback function to perform sound effects on the audio data.
  • Processing, obtaining low-latency audio audio data may include: after receiving the first implementation pointer that is not NULL, the second C language layer module invokes the first C language layer from the first C language layer module by using the first callback function The audio data collected by the module is subjected to sound processing of the audio data to obtain low-latency audio data.
  • Step 107 After receiving the non-low delay audio audio data, the second JAVA language layer module generates a second implementation pointer of type NULL, and sends the second implementation pointer and the received non-low delay audio audio data to the operating system. And for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer.
  • the second JAVA language layer module After receiving the non-low delay audio audio data, the second JAVA language layer module generates a second implementation pointer of type NULL, and sends the second implementation pointer and the received non-low delay audio audio data to the operating system. And for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer.
  • Step 108 After receiving the low-latency audio audio data, the second JAVA language layer module generates a second implementation pointer of a non-NULL type, and sends the second implementation pointer and the received low-latency audio audio data to the operating system.
  • the triggering operating system plays the low-latency audio data according to the second implementation pointer.
  • step 107 and step 108 the client sends the audio data processed by the sound effect to the operating system for the non-low delay ear return mode and the low delay ear return mode, respectively, so that the operating system plays the processed audio data.
  • the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer, determining the type of the first implementation pointer, when the type of the first implementation pointer When NULL, the second JAVA language layer module sends the audio data to the second C language layer module; when the first implementation pointer type is non-NULL, the second JAVA language layer module sends the first implementation pointer to the second C a language layer module; after receiving the audio data, the second C language layer module performs sound processing on the audio data to obtain non-low delay sound effect audio data, and sends the non-low delay sound effect audio data to the second JAVA language layer module; After receiving the first implementation pointer of the non-NULL type, the second C language layer module calls the audio data through the first callback function, performs audio processing on the audio data, obtains low-latency audio audio data, and transmits the low-latency audio data.
  • the second JAVA language layer module To the second JAVA language layer module; the second JAVA language layer module generates a type after receiving non-low latency audio audio data a second implementation pointer of NULL, and sending the second implementation pointer and the received non-low delay audio audio data to the operating system, for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer; After receiving the low-latency audio data, the second JAVA language layer module generates a second implementation pointer of a non-NULL type, and sends the second implementation pointer and the received low-latency audio audio data to the operating system for triggering the operation. The system plays the low-latency audio audio data according to the second implementation pointer.
  • the present application can obtain non-low-latency audio audio data and low-latency audio audio data by a set of methods, and play the above different audio data, thereby reducing the maintenance cost of the software.
  • the audio data processing method applied to the operating system of the terminal is described in detail in the embodiment of the present application.
  • the audio data processing method may include the following steps B1-B5:
  • the operating system includes a first C language layer module and a first JAVA language layer module; when the sound effect processing mode is a low delay ear return mode, the step of collecting audio data includes: a first C language layer module Acquire audio data. When the sound processing mode is a non-low delay ear return mode, the step of collecting audio data includes: acquiring, by the first JAVA language layer module, audio data.
  • the sound processing mode is a non-low delay ear return mode
  • the first implementation pointer type is a first type
  • the sound processing mode is a low delay ear return mode
  • the type of the first implementation pointer is the second type.
  • the step may include: after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a second type The first implementation pointer of the type; when the sound processing mode is the non-low delay ear return mode, the step may include: after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of the first type.
  • the client sends the first implementation pointer and the audio data to the client, so that if the client determines that the type of the first implementation pointer is the first type, obtaining audio data sent by the operating system, performing audio processing on the audio data, and obtaining non-low delay Audio audio data, if the client determines that the type of the first implementation pointer is the second type, the audio data is called by the first callback function, the audio data is processed by the sound effect, and the low-latency audio audio data is obtained; and the non-low-latency audio audio data is obtained. Or after low-latency audio data, the resulting data is fed back to the operating system.
  • the step may include: the first JAVA language layer module sends the audio data and the first implementation pointer of the second type to the client;
  • the step may include the first JAVA language layer module transmitting the audio data and the first implementation pointer of the first type to the client.
  • the client includes a second JAVA language layer module.
  • the step of the first JAVA language layer module sending the audio data and the first implementation pointer of the second type to the client may include:
  • the first JAVA language layer module sends the audio data and the first implementation pointer of the second type to the second JAVA language layer module.
  • the client includes a second JAVA language layer module; the first JAVA language layer module sends the audio data and the first implementation pointer of the first type to the client, which may include The first JAVA language layer module sends the audio data and the first implementation pointer of the first type to the second JAVA language layer module.
  • B5. Receive non-low delay audio audio data or low delay audio audio data sent by the client, and play the received audio data.
  • the step may include: the first JAVA language layer module receiving the low-latency sound effect audio data sent by the client and the second implementation of the second type being the second type a pointer, and transmitting a second implementation pointer of the second type to the first C language layer module; the first C language layer module plays the low delay audio audio data according to the second implementation pointer of the second type; when the sound effect When the processing mode is the non-low delay ear return mode, the step may include: the first JAVA language layer module receives the low delay sound effect audio data sent by the client and the second implementation pointer of the second type type, and the type is the second A second implementation pointer of the type is sent to the first C language layer module; the first C language layer module plays the non-low latency audio audio data according to the second implementation pointer of the first type.
  • the audio data processing method provided by the operating system of the terminal in the embodiment of the present application will be described later with reference to FIG. 2 .
  • the steps of the audio data processing method provided by the embodiment of the present application refer to the introduction of the corresponding steps in the corresponding embodiment of FIG. 2 .
  • An audio data processing method provided by the operating system of the terminal in the embodiment of the present application is described below with reference to FIG.
  • FIG. 2 is a schematic flowchart of an audio data processing method according to another embodiment of the present application.
  • the audio data processing method is applied to an operating system including a first JAVA language layer module and a first C language layer module, and the audio data processing method is Can include:
  • Step 201 Determine a currently used sound effect processing mode from the non-low delay ear return mode and the low delay ear return mode.
  • the non-low delay ear return mode or the low delay ear return mode may be selected as the current sound processing mode for mobile live broadcast according to the actual needs of the user or the attributes of the terminal device: low delay is used on the terminal device supporting the low delay characteristic.
  • the ear-back mode uses a non-low-latency ear-back mode on a terminal device that does not support low-latency characteristics.
  • Step 202 When the sound effect processing mode is the low delay ear return mode, the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module.
  • the part of the operating system used to complete the audio data collection may be referred to as an audio collection unit.
  • the manner in which the audio collection unit collects audio data is different for different sound processing modes.
  • the sound processing mode is a low-latency ear-back mode.
  • the audio collecting unit performs the following steps to complete the audio data collection: first, obtain the nominal sampling rate and the atomic buffer size of the operating system, and then follow the name. Sampling rate, using OpenSL ES (a call interface in the operating system with audio data acquisition and playback) for audio data collection.
  • the collected audio data may be audio data in the PCM format, or may be audio data in other formats, which is not limited in this embodiment of the present application.
  • Step 203 When the sound effect processing mode is a non-low delay ear return mode, the first JAVA language layer module collects audio data.
  • the sound effect processing mode is a non-low delay ear return mode
  • the audio collecting unit can complete the collection of the audio data by first acquiring the nominal sampling rate and the buffer size of the operating system, according to the nominal sampling rate. Audio data acquisition is performed using Audio Record (a call interface in the operating system with audio data acquisition).
  • the collected audio data may be audio data in the PCM format, or may be audio data in other formats, which is not limited in this embodiment of the present application.
  • Step 204 After receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and sends the audio data and the first implementation pointer of the non-NULL type.
  • the client used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio data, generate a non-NULL second implementation pointer, and generate low-latency audio data and a second implementation of non-NULL type
  • the pointer returns to the first JAVA language layer module.
  • the first JAVA language layer module of the operating system may send the audio data and the first implementation pointer of the non-NULL type to the client.
  • the sound processing method in this step may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, The sound fade processing and the like can be understood, and those skilled in the art can understand the specific implementation of the sound processing, and details are not described herein.
  • the audio data is collected by using the first C language layer module of the operating system, so that the operating system can avoid the passage of the first JAVA language layer module when transmitting the audio data to the client for sound processing, thereby shortening the audio data transmission.
  • the length of time required for the process is the length of time required for the process.
  • Step 205 After acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and sends the audio data and the first implementation pointer of type NULL to the client, and is used to trigger the client pair.
  • the audio data is subjected to non-low delay sound processing to obtain non-low delay sound effect audio data, generating a second implementation pointer of type NULL, and returning non-low delay sound effect audio data and a second implementation pointer of type NULL to the first JAVA language Layer module.
  • the operating system can send the audio data collected by the first JAVA language layer module and the first implementation pointer of the type NULL to the client, so that the client performs non-low delay sound on the audio data.
  • the audio processing method in this step may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, sound fade processing, etc., and those skilled in the art can understand the sound effect. The specific implementation of the processing is not described here.
  • Step 206 After receiving the low-latency audio audio data sent by the client and the second implementation pointer of the non-NULL type, the first JAVA language layer module sends the second implementation pointer of the non-NULL type to the first C language layer. Module.
  • the first JAVA language layer module of the operating system may send the second implementation pointer of the non-NULL type sent by the client to the first C language layer module.
  • Step 207 The first JAVA language layer module sends the second implementation pointer of type NULL and the non-low delay audio audio data after receiving the non-low delay audio audio data sent by the client and the second implementation pointer of type NULL. To the first C language layer module.
  • the first JAVA language layer module of the operating system may send the non-low delay sound effect audio data sent by the client and the second implementation pointer of the type NULL to the first C language layer module.
  • Step 208 After receiving the second implementation pointer of the non-NULL type, the first C language layer module plays the low-latency audio audio data according to the second implementation pointer of the non-NULL type.
  • Step 209 After receiving the second implementation pointer of the type NULL and the non-low delay audio audio data, the first C language layer module plays the non-low delay audio audio data according to the second implementation pointer of the type NULL.
  • the first C language layer module of the operating system may use OpenSL ES for non-low-latency audio data or low-latency audio data according to a second implementation pointer of type NULL or non-NULL. Play.
  • the currently adopted sound effect processing mode is first determined.
  • the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module;
  • the sound effect processing mode is the non-low delay ear return mode, the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL.
  • the first implementation pointer is sent to the client, and is used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-latency audio data and non-
  • the second implementation pointer of NULL is returned to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and firstly sets the audio data and the type to NULL.
  • the implementation pointer is sent to the client, which is used to trigger the client to perform non-low delay sound processing on the audio data, and obtain non-low delay sound effect audio data.
  • the first JAVA language layer module receives the low sent by the client After delaying the audio audio data and the second implementation pointer of the non-NULL type, sending the second implementation pointer of the non-NULL type to the first C language layer module; the first JAVA language layer module receiving the non-lower sent by the client After delaying the audio audio data and the second implementation pointer of type NULL, transmitting the second implementation pointer of type NULL and the non-low delay audio audio data to the first C language layer module; the first C language layer module receives the type After the non-NULL second implementation pointer, the low-latency audio data is played according to the second implementation pointer of type non-NULL; the first C language layer module receives the second implementation pointer of type NULL and the non-low delay sound effect.
  • non-low-latency audio data is played according to the second implementation pointer of type NULL.
  • the present application can obtain non-low-latency audio audio data and low-latency audio audio data by a set of methods, and play the above different audio data, thereby reducing the maintenance cost of the software.
  • an audio data processing method provided by an embodiment of the present application is applied to a user terminal, and an operating system including a first JAVA language layer module and a first C language layer module is run on the user terminal.
  • the user terminal further includes a client that includes a second JAVA language layer module and a second C language layer module.
  • the audio data processing method may specifically include the following steps:
  • Step 301 Determine a currently adopted sound effect processing mode from the non-low delay ear return mode and the low delay ear return mode. If the currently used sound processing mode is the low delay ear return mode, the process proceeds to step 302; if the currently used sound effect processing mode is the non-low delay ear return mode, the process proceeds to step 309.
  • normal non-low delay audio data and low delay audio data can be obtained by a set of methods, and if the currently used sound processing mode is a non-low delay ear return mode, non-low delay sound can be obtained. Audio data; if the currently used sound processing mode is the low-latency ear-back mode, low-latency audio data can be obtained.
  • Step 302 When the sound effect processing mode is the low delay ear return mode, the first C language layer module of the operating system collects the audio data, and synchronizes the audio data to the first JAVA language layer module of the operating system.
  • the part of the operating system used to complete the audio data collection may be referred to as an audio collection unit.
  • the manner in which the audio collection unit collects audio data is different for different sound processing modes.
  • the sound processing mode is a low-latency ear-back mode.
  • the audio collecting unit can complete the collection of the audio data by first obtaining the nominal sampling rate and the atomic buffer size of the operating system, and then according to the name. Sampling rate, using OpenSL ES (a call interface in the operating system with audio data acquisition and playback) for audio data collection.
  • the collected audio data may be audio data in the PCM format, or may be audio data in other formats, which is not limited in this embodiment of the present application.
  • Step 303 After receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and sends the audio data and the first implementation pointer of the non-NULL type.
  • the second JAVA language layer module to the client.
  • Step 304 After receiving the audio data and the first implementation pointer of the non-NULL type, the second JAVA language layer module sends the implementation pointer of the non-NULL type to the second C language layer module.
  • Step 305 After receiving the first implementation pointer of the non-NULL type, the second C language layer module calls the audio data through the first callback function, performs audio processing on the audio data, obtains low-latency audio audio data, and has low delay.
  • the audio audio data is sent to the second JAVA language layer module.
  • the second C language layer module adopts the first callback function, and adopts the interface of the first callback function set in the first C language layer module of the operating system.
  • Directly calling the audio data collected by the first C language layer module of the operating system, and performing audio processing on the audio data according to the user's requirements, and obtaining low-latency audio audio data, and the specific sound processing method may include: mixing audio data.
  • the part of the client for completing the sound effect processing may be referred to as a sound effect processing unit, and the sound effect processing unit may be a single one for completing one of the above sound effect processing modes; meanwhile, the sound effect processing unit may also There are a plurality of, for example, a first sound processing unit, a second sound processing unit, a third sound processing unit, and the like, wherein each of the sound processing units is used to complete one of the sound processing methods.
  • the sound effects generated by the plurality of sound processing units may be superimposed on each other, that is, the output result of the first sound processing unit may be used as an input of the second sound processing unit;
  • the output of the unit, as an input to the third sound processing unit, and so on, results in the final low-latency audio audio data.
  • Step 306 After receiving the low-latency audio audio data, the second JAVA language layer module generates a second implementation pointer of a non-NULL type, and sends the second implementation pointer and the received low-latency audio audio data to the first JAVA. Language layer module.
  • Step 307 After receiving the low-latency audio audio data sent by the second JAVA language layer module and the second implementation pointer of the non-NULL type, the first JAVA language layer module sends the second implementation pointer of the non-NULL type to the first A C language layer module.
  • Step 308 after receiving the second implementation pointer of the non-NULL type, the first C language layer module plays the low delay audio audio data according to the second implementation pointer of the non-NULL type.
  • the part of the operating system for completing the audio data playing may be referred to as an audio playing unit.
  • the second implementation pointer type is non-NULL
  • the audio playing module may complete the playing of the audio data by the following steps: After the second implementation pointer of the non-NULL type, the second callback function is used to directly call the low-latency audio audio data processed by the audio processing unit, and the low-latency audio audio data is played by using OpenSL ES.
  • Step 309 when the sound effect processing mode is the non-low delay ear return mode, the first JAVA language layer module of the operating system collects the audio data.
  • the portion of the operating system used to complete the audio data collection may be referred to as an audio collection unit.
  • the manner in which the audio collection unit collects audio data is different for different audio processing modes.
  • the sound processing mode is a non-low delay ear return mode.
  • the audio collecting unit can complete the collection of the audio data by first obtaining the nominal sampling rate and the buffer size of the operating system, and sampling according to the nominal Rate, using Audio Record (a call interface in the operating system with audio data acquisition) for audio data collection.
  • the collected audio data may be audio data in the PCM format, or may be audio data in other formats, which is not limited in this embodiment of the present application.
  • Step 3010 After acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and sends the audio data and the first implementation pointer of the type NULL to the second JAVA language layer module of the client. .
  • Step 3011 After receiving the audio data and the first implementation pointer of the type NULL, the second JAVA language layer module sends the audio data to the second C language layer module.
  • Step 3012 After receiving the audio data, the second C language layer module performs audio processing on the audio data to obtain non-low delay audio audio data, and sends the non-low delay audio audio data to the second JAVA language layer module.
  • the second C language layer module performs sound processing on the audio data according to the user's requirements to obtain non-low delay audio audio data.
  • Specific sound processing methods may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, sound fade processing, etc., without limitation.
  • this step can also be performed by the sound effect processing unit, and the sound effect processing unit can be a single one for completing one of the above-mentioned sound effect processing modes; at the same time, the sound effect processing unit can also have multiple, such as: It can be named as the first sound processing unit, the second sound processing unit, the third sound processing unit, and the like, wherein each of the sound processing units is used to complete one of the above sound processing methods.
  • the sound effects generated by the plurality of sound processing units may be superimposed on each other, that is, the output result of the first sound processing unit may be used as an input of the second sound processing unit;
  • the output result of the unit, as an input of the third sound processing unit, and so on, obtains the final non-low delay sound effect audio data.
  • the second C language layer module can send the non-low delay sound effect audio data obtained by the sound processing to the second JAVA language layer module through a local interface (JNI) call.
  • JNI local interface
  • Step 3013 After receiving the non-low delay audio audio data, the second JAVA language layer module generates a second implementation pointer of type NULL, and sends the second implementation pointer and the received non-low delay audio audio data to the operating system.
  • the first JAVA language layer module After receiving the non-low delay audio audio data, the second JAVA language layer module generates a second implementation pointer of type NULL, and sends the second implementation pointer and the received non-low delay audio audio data to the operating system.
  • the first JAVA language layer module After receiving the non-low delay audio audio data, the second JAVA language layer module generates a second implementation pointer of type NULL, and sends the second implementation pointer and the received non-low delay audio audio data to the operating system.
  • the first JAVA language layer module After receiving the non-low delay audio audio data, the second JAVA language layer module generates a second implementation pointer of type NULL, and sends the second implementation pointer and the received non-low delay audio audio data to the operating system.
  • Step 3014 After receiving the non-low delay audio audio data sent by the client and the second implementation pointer of type NULL, the first JAVA language layer module sends the second implementation pointer of type NULL and the non-low delay audio audio data. To the first C language layer module.
  • Step 3015 After receiving the second implementation pointer of type NULL and the non-low delay audio audio data, the first C language layer module plays the non-low delay audio audio data according to the second implementation pointer of type NULL.
  • step 308 the portion of the operating system for completing audio data playback may be referred to as an audio playback unit.
  • the second implementation pointer type is NULL
  • the audio playback unit may perform audio data playback by the following steps. : After receiving the second implementation pointer of non-NULL type and non-low latency audio audio data, the non-low latency audio audio data is played using OpenSL ES.
  • the client receives the audio data sent by the operating system and the first implementation pointer.
  • the first implementation pointer type is NULL
  • the audio data is processed by the audio data to obtain non-low delay audio audio data
  • the pointer type is non-NULL
  • the audio data is processed to obtain low-latency audio data
  • the client sends the non-low-latency audio data or the low-delay audio data and the second implementation pointer to the operating system, and the operating system according to the operating system
  • the second implementation pointer plays the received non-low delay audio audio data or low delay audio audio data.
  • the present application can obtain non-low-latency audio audio data and low-latency audio audio data by a set of methods, and play the above different audio data, thereby reducing the maintenance cost of the software.
  • the embodiment of the present application provides an audio data processing apparatus applied to a client, where the audio data processing apparatus may include:
  • a data receiving module configured to receive a first implementation pointer and audio data sent by the operating system; wherein, if the currently adopted sound processing mode is a non-low delay ear return mode, the type of the first implementation pointer is a first type; If the currently used sound processing mode is a low-latency ear-back mode, the type of the first implementation pointer is a second type; the first implementation pointer is sent after the operating system collects audio data;
  • a pointer type determining module configured to determine a type of the first implementation pointer
  • the first data processing module is configured to: if it is determined that the type of the first implementation pointer is the first type, performing sound effect processing on the received audio data to obtain non-low delay audio effect audio data;
  • a first data sending module configured to generate a second implementation pointer of a first type after the non-low delay audio audio data is obtained, and send the second implementation pointer and the non-low delay audio audio data Up to the operating system, configured to trigger the operating system to play the non-low delay audio audio data according to the second implementation pointer;
  • a second data processing module configured to: if it is determined that the type of the first implementation pointer is a second type, invoke the audio data from the operating system by using a first callback function, and perform sound processing on the audio data to obtain Low latency audio audio data;
  • a second data sending module configured to generate a second implementation pointer of a second type after the low-latency audio audio data is obtained, and send the second implementation pointer and the low-latency audio audio data to the
  • the operating system is configured to trigger the operating system to play the low-latency audio audio data according to the second implementation pointer.
  • the client includes a second JAVA language layer module
  • the data receiving module is configured to: trigger the second JAVA language layer module to receive the audio data sent by the operating system and the first implementation pointer.
  • the operating system includes a first JAVA language layer module
  • the first data sending module is configured to: trigger the second JAVA language layer module to receive the first JAVA language layer module.
  • the transmitted audio data and the first implementation pointer is configured to: trigger the second JAVA language layer module to receive the first JAVA language layer module.
  • the client further includes a second C language layer module;
  • the first data processing module includes: a first data receiving unit, configured to determine that the type of the first implementation pointer is a type, the second C language layer module is triggered to receive the audio data sent by the second JAVA language layer module;
  • the first data processing unit is configured to trigger the second C language layer module to the audio data Performing sound processing to obtain non-low-latency audio audio data;
  • the first data processing module further includes: a second data receiving unit, configured to trigger the first if the type of the first implementation pointer is determined to be the second type
  • the second C language layer module receives the first implementation pointer sent by the second JAVA language layer module, and the second data processing unit is configured to trigger the second C language layer module to invoke the audio data by using a first callback function. Performing sound processing on the audio data to obtain low-latency audio audio data.
  • the operating system further includes a first C language layer module
  • the second C language layer module is configured to: invoke the first C language layer module from the first C language layer module by using a first callback function
  • the audio data collected by the first C language layer module performs sound processing on the audio data to obtain low-latency audio audio data.
  • the first type is null NULL and the second type is non-NULL.
  • An audio data processing method is applied to a client that includes a second JAVA language layer module and a second C language layer module according to the above embodiments of the present application. Accordingly, an embodiment of the present application further provides an audio data processing apparatus.
  • the client is located in the second JAVA language layer module and the second C language layer module.
  • the schematic diagram of the client is as shown in FIG. 4, and includes: a second JAVA language layer module 401 and a second C language layer module 402.
  • the second JAVA language layer module 401 is configured to receive the audio data sent by the operating system and the first implementation pointer; wherein, if the currently adopted sound effect processing mode is a non-low delay ear return mode, the type of the first implementation pointer is null NULL If the currently used sound processing mode is a low-latency ear-back mode, the type of the first implementation pointer is non-NULL; and the type of the first implementation pointer is determined; if the type of the first implementation pointer is determined to be NULL, Sending the audio data to the second C language layer module 402; if it is determined that the type of the first implementation pointer is non-NULL, the first implementation pointer is sent to the second C language layer module 402;
  • the second C language layer module 402 is configured to perform audio processing on the audio data after receiving the audio data, to obtain non-low delay audio audio data, and send the non-low delay audio audio data to the second JAVA language layer module 401; And, after receiving the first implementation pointer of the non-NULL type, calling the audio data through the first callback function, performing audio processing on the audio data, obtaining low-latency audio audio data, and transmitting the low-latency audio audio data to the second JAVA language layer module 401;
  • the second JAVA language layer module 401 is further configured to generate a second implementation pointer that is NULL after receiving the non-low delay audio audio data, and send the second implementation pointer and the received non-low delay audio audio data to the operation.
  • a system for triggering an operating system to play non-low-latency audio data according to a second implementation pointer and, after receiving low-latency audio audio data, generating a second implementation pointer of a non-NULL type, and implementing the second implementation
  • the pointer and the received low-latency audio audio data are sent to the operating system for triggering the operating system to play the low-latency audio audio data according to the second implementation pointer.
  • the operating system includes a first JAVA language layer module; the second JAVA language layer module 401 is configured to receive the audio data and the first implementation pointer sent by the first JAVA language layer module.
  • the operating system includes a first C language layer module
  • the second C language layer module 402 is specifically configured to: after receiving the first implementation pointer of the non-NULL type, pass the first callback function from the first C
  • the language layer module calls the audio data collected by the first C language layer module, and performs audio processing on the audio data to obtain low-latency audio audio data.
  • the functions of the above modules may correspond to the corresponding processing steps in the processes shown in FIG. 1 and FIG. 3, and details are not described herein again.
  • the second JAVA language layer module 401 receives the audio data sent by the operating system and the first implementation pointer.
  • the audio data is sent to the second C language layer module 402.
  • the first implementation pointer is sent to the second C language layer module 402; after receiving the audio data, the second C language layer module 402 performs audio processing on the audio data to obtain a non- Low-latency audio audio data, and transmitting non-low-latency audio audio data to the second JAVA language layer module 401; and, after receiving the first implementation pointer of the non-NULL type, calling the audio data through the first callback function,
  • the audio data is subjected to sound processing to obtain low-latency audio audio data, and the low-latency audio audio data is sent to the second JAVA language layer module 401; finally, after receiving the non-low-latency audio audio data, the second JAVA language layer module 401 Generating a second implementation pointer
  • an embodiment of the present application provides an audio data processing apparatus, which is applied to an operating system of a terminal, where the apparatus includes:
  • a data acquisition module configured to collect audio data
  • a mode determining module configured to determine a currently used sound effect processing mode from the non-low delay ear return mode and the low delay ear return mode
  • a pointer generating module configured to generate a first implementation pointer according to the currently adopted sound processing mode, and when the sound processing mode is a non-low delay earback mode, the first implementation pointer type is a first type, when the sound effect When the processing mode is the low delay ear return mode, the type of the first implementation pointer is the second type;
  • a data sending module configured to send the first implementation pointer and the audio data to a client, so that if the client determines that the type of the first implementation pointer is a first type, obtaining, sent by the operating system
  • the audio data is subjected to sound processing on the audio data to obtain non-low delay sound effect audio data. If the client determines that the type of the first implementation pointer is the second type, the audio is called by the first callback function.
  • Data performing audio processing on the audio data to obtain low-latency audio audio data; after obtaining the non-low-latency audio audio data or the low-latency audio audio data, feeding the obtained data to the operating system;
  • the data receiving module is configured to receive the non-low delay sound effect audio data or the low delay sound effect audio data sent by the client, and play the received audio data.
  • the operating system includes a first C language layer module and a first JAVA language layer module; when the sound effect processing mode is a low delay ear return mode, the data acquisition module is configured to: trigger The first C language layer module collects audio data; the pointer generating module is configured to: trigger the first JAVA language layer module to generate the audio data after receiving the audio data collected by the first C language layer module, and generate a type a first implementation pointer of the second type; the data sending module is configured to: trigger the first JAVA language layer module to send the audio data and the first implementation pointer of the second type to the client; The data receiving module is configured to: trigger the first JAVA language layer module to receive the low-latency sound effect audio data sent by the client, and a second implementation pointer of a second type, and the type is Sending a second implementation pointer of the second type to the first C language layer module; triggering the first C language layer module to play the second implementation pointer according to the type Low-latency sound audio data.
  • the operating system includes a first C language layer module and a first JAVA language layer module; when the sound effect processing mode is a non-low delay ear return mode, the data collection module is configured to: Triggering the first JAVA language layer module to collect audio data; the pointer generating module is configured to: trigger the first JAVA language layer module to generate a first implementation pointer of a first type after acquiring audio data; The data sending module is configured to: trigger the first JAVA language layer module to send the audio data and the first implementation pointer of the type to the client; the data receiving module is configured to: Trimming the first JAVA language layer module to receive the low-latency sound effect audio data sent by the client and a second implementation pointer of a second type, and send the second implementation pointer of the second type Up to the first C language layer module; triggering the first C language layer module to play the non-low delay sound effect audio according to the second implementation pointer of the type being the first type It is.
  • the client includes a second JAVA language layer module; the data sending module is configured to: the first JAVA language layer module sets the audio data and the type to a second type The first implementation pointer is sent to the second JAVA language layer module.
  • the client includes a second JAVA language layer module; the data sending module is configured to: the first JAVA language layer module sets the audio data and the type to a first type The first implementation pointer is sent to the second JAVA language layer module.
  • the audio data processing method applied to the terminal operating system including the first C language layer module and the first JAVA language layer module is provided according to the above embodiment of the present application. Accordingly, an embodiment of the present application further provides an audio data processing.
  • the device is located in the operating system of the terminal, and its structure is shown in FIG. 5, including:
  • the mode determination module 501 the first JAVA language layer module 502, and the first C language layer module 503.
  • the mode determining module 501 is configured to determine a currently adopted sound effect processing mode from the non-low delay ear return mode and the low delay ear return mode;
  • the first C language layer module 503 is configured to: when the sound effect processing mode is the low delay ear return mode, collect audio data, and send the audio data to the first JAVA language layer module;
  • the first JAVA language layer module 502 is configured to collect audio data when the sound processing mode is a non-low delay ear return mode; and after receiving the audio data collected by a C language layer module, generate a first implementation of a non-NULL type Pointer, and send the audio data and the first implementation pointer of the non-NULL type to the client, to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio data, and generate a second type of non-NULL Implementing a pointer, and returning low-latency audio data and a second implementation pointer of a non-NULL type to the first JAVA language layer module; after acquiring the audio data, generating a first implementation pointer of type NULL, and the audio data And transmitting a first implementation pointer of the type NULL to the client, for triggering the client to perform non-low delay sound processing on the audio data, obtaining non-low delay audio audio data, generating a second implementation pointer of type NULL, and Non-low latency audio audio data
  • the first C language layer module 503 is further configured to: after receiving the second implementation pointer of the non-NULL type, play the low-latency audio audio data according to the second implementation pointer of the non-NULL type; and receive the type NULL. After the second implementation of the pointer and the non-low delay audio data, the non-low latency audio audio data is played according to the second implementation pointer of type NULL.
  • the client includes a second JAVA language layer module and a second C language layer module; the first JAVA language layer module 502 is configured to generate a non-NULL type after receiving the audio data collected by the C language layer module 503.
  • the first implementation pointer, and the audio data and the first implementation pointer of type non-NULL are sent to the second JAVA language layer module.
  • the first JAVA language layer module 502 is configured to generate a first implementation pointer of type NULL after the audio data is collected, and send the audio data and the first implementation pointer of the type NULL to the second JAVA language.
  • Layer module The functions of the above modules may correspond to the corresponding processing steps in the processes shown in FIG. 2 and FIG. 3, and details are not described herein again.
  • the mode determining module 501 first determines the currently adopted sound effect processing mode.
  • the sound effect processing mode is the low delay ear return mode
  • the first C language layer module 503 is used to collect audio data, and the audio data is collected.
  • the first implementation pointer of the non-NULL type is generated, and the audio data and the first implementation pointer of the non-NULL type are sent to the client, which is used to trigger the client to perform low-latency sound processing on the audio data, Low-latency audio data, generating a second implementation pointer of type non-NULL, and returning low-latency audio data and a second implementation pointer of non-NULL type to the first JAVA language layer module; after acquiring the audio data, Generating
  • non-low latency audio data is played according to the second implementation pointer of type NULL.
  • non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of devices, and the different audio data is played, thereby reducing the maintenance cost of the software.
  • the audio data processing method applied to the client including the second JAVA language layer module and the second C language layer module is provided according to the above embodiment of the present application. Accordingly, the embodiment of the present application further provides an electronic device, as shown in FIG. 6 . Included, including processor 601 and memory 602,
  • a memory 602 configured to store a computer program
  • the processor 601 is configured to implement the audio data processing method applied to the client according to the first aspect of the present application when the program stored in the memory 602 is executed.
  • the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer.
  • the first implementation pointer type is NULL
  • the second JAVA language layer module will audio.
  • the data is sent to the second C language layer module;
  • the first implementation pointer type is non-NULL
  • the second JAVA language layer module sends the first implementation pointer to the second C language layer module;
  • the second C language layer module receives After the audio data, audio processing is performed on the audio data to obtain non-low delay audio audio data, and the non-low delay audio audio data is sent to the second JAVA language layer module;
  • the second C language layer module receives the non-NULL type.
  • the audio data is called by the first callback function, the audio data is subjected to sound processing, the low-latency audio audio data is obtained, and the low-latency audio audio data is sent to the second JAVA language layer module; the second JAVA language layer After receiving the non-low delay audio audio data, the module generates a second implementation pointer of type NULL, and the second implementation pointer and The received non-low delay audio audio data is sent to the operating system for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer; the second JAVA language layer module after receiving the low delay audio audio data Generating a second implementation pointer of a non-NULL type, and transmitting the second implementation pointer and the received low-latency audio audio data to the operating system, for triggering the operating system to perform low-latency audio audio data according to the second implementation pointer Play.
  • non-low delay audio audio data and low delay audio audio data can be respectively obtained through a set of electronic devices, and the
  • the memory mentioned in the above electronic device may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. Further, the memory may also be at least one storage device located away from the aforementioned processor.
  • RAM random access memory
  • non-volatile memory such as at least one disk storage.
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP for short), or a digital signal processor (DSP). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
  • CPU central processing unit
  • NP Network Processor
  • DSP digital signal processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the audio data processing method applied to the terminal operating system including the first C language layer module and the first JAVA language layer module is provided according to the above embodiment of the present application. Accordingly, the embodiment of the present application further provides an electronic device, such as As shown in FIG. 7, the processor 701 and the memory 702 are included.
  • a memory 702 configured to store a computer program
  • the processor 701 is configured to execute the program stored in the memory 702, and implement the audio data applied to the terminal operating system including the first C language layer module and the first JAVA language layer module according to the second aspect of the present application. Approach.
  • the currently adopted sound effect processing mode is first determined.
  • the sound processing mode is the low delay ear return mode
  • the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module;
  • the sound effect processing mode is the non-low delay ear return mode
  • the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL.
  • the first implementation pointer is sent to the client, and is used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-delay audio data and types.
  • the non-NULL second implementation pointer returns to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and the audio data and the type are null NULL
  • the first implementation pointer is sent to the client, and is used to trigger the client to perform non-low delay sound processing on the audio data to obtain a non-low delay audio effect number.
  • the non-low delay audio audio data and the second implementation pointer of type NULL are returned to the first JAVA language layer module;
  • the first JAVA language layer module is sent by the receiving client After the low latency audio audio data and the second implementation pointer of the non-NULL type, the second implementation pointer of the non-NULL type is sent to the first C language layer module;
  • the first JAVA language layer module receives the sending by the client After the non-low-latency audio audio data and the second implementation pointer of type NULL, the second implementation pointer of type NULL and the non-low delay audio audio data are sent to the first C language layer module;
  • the first C language layer module is receiving After the second implementation pointer of the non-NULL type, the low-definition audio audio data is played according to the second implementation pointer of the non-NULL type;
  • the first C language layer module receives the second implementation pointer of the type NULL and is non-low After delaying the audio data, non-low-latency audio data is played according to
  • the memory mentioned in the above electronic device may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. Further, the memory may also be at least one storage device located away from the aforementioned processor.
  • RAM random access memory
  • non-volatile memory such as at least one disk storage.
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP for short), or a digital signal processor (DSP). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
  • CPU central processing unit
  • NP Network Processor
  • DSP digital signal processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a computer readable storage medium having stored therein instructions that, when run on a computer, cause the computer to perform any of the above embodiments
  • the above is applied to an audio data processing method of a client including a second JAVA language layer module and a second C language layer module.
  • the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer.
  • the second JAVA language The layer module sends the audio data to the second C language layer module; when the type of the first implementation pointer is non-NULL, the second JAVA language layer module sends the first implementation pointer to the second C language layer module; the second C language After receiving the audio data, the layer module performs audio processing on the audio data to obtain non-low delay audio audio data, and sends the non-low delay audio audio data to the second JAVA language layer module; the second C language layer module receives the After the first implementation pointer of the non-NULL type, the audio data is called by the first callback function, the audio data is subjected to sound processing, the low-latency audio audio data is obtained, and the low-latency audio audio data is sent to the second JAVA language layer module;
  • the second JAVA language layer module When the type of the first implementation pointer is NULL, the second JAVA language The layer module sends
  • a computer readable storage medium having stored therein instructions that, when run on a computer, cause the computer to perform any of the above embodiments
  • the above is applied to an audio data processing method of a terminal operating system including a first C language layer module and a first JAVA language layer module.
  • the currently adopted sound effect processing mode is first determined.
  • the sound processing mode is the low delay ear return mode
  • the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module;
  • the sound effect processing mode is the non-low delay ear return mode
  • the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL.
  • the first implementation pointer is sent to the client, and is set to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-latency audio data and types.
  • the non-NULL second implementation pointer returns to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and the audio data and the type are null NULL
  • the first implementation pointer is sent to the client, and is used to trigger the client to perform non-low delay sound processing on the audio data to obtain non-low delay audio audio.
  • the first JAVA language layer module is sent at the receiving client After the low-latency audio audio data and the non-NULL second implementation pointer, the second implementation pointer of the non-NULL type is sent to the first C language layer module; the first JAVA language layer module receives the non-lower sent by the client.
  • non-low-latency audio data and low-latency audio audio data can be respectively obtained through a set of computer readable storage media, and the different audio data is played, which reduces the maintenance cost of the software.
  • a computer program product comprising instructions, when executed on a computer, causing the computer to perform any of the above embodiments to be set to include a second JAVA language layer
  • the audio data processing method of the module and the client of the second C language layer module is also provided.
  • the computer program product of the embodiment provided by the embodiment of the present application adopts the method that: the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer, when the first implementation pointer type is NULL, The second JAVA language layer module sends the audio data to the second C language layer module; when the first implementation pointer type is non-NULL, the second JAVA language layer module sends the first implementation pointer to the second C language layer module; After receiving the audio data, the second C language layer module performs sound processing on the audio data to obtain non-low delay sound effect audio data, and sends the non-low delay sound effect audio data to the second JAVA language layer module; the second C language layer module After receiving the first implementation pointer of the non-NULL type, the audio data is called by the first callback function, the audio data is processed by the sound, the low delay audio audio data is obtained, and the low delay audio audio data is sent to the second JAVA language.
  • the second JAVA language layer module generates a second type of NULL after receiving non-low latency audio audio data
  • the pointer is forwarded, and the second implementation pointer and the received non-low delay audio audio data are sent to the operating system for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer;
  • the second JAVA language layer After receiving the low-latency audio audio data, the module generates a second implementation pointer of a non-NULL type, and sends the second implementation pointer and the received low-latency audio audio data to the operating system for triggering the operating system according to the second Implement pointers to play low-latency audio data.
  • non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of computer program products including instructions, and the different audio data is played, thereby reducing the maintenance cost of the software.
  • a computer program product comprising instructions, when executed on a computer, causing a computer to perform any of the above-described embodiments for applying to include a first C language layer module And an audio data processing method of the terminal operating system of the first JAVA language layer module.
  • the computer program product including the instruction provided by the embodiment of the present application adopts the method of first determining the currently adopted sound effect processing mode.
  • the sound processing mode is the low delay ear return mode
  • the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module;
  • the sound effect processing mode is the non-low delay ear return mode
  • the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL.
  • the first implementation pointer is sent to the client, and is used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-delay audio data and types.
  • the non-NULL second implementation pointer returns to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and the audio data and the type are null NULL
  • the first implementation pointer is sent to the client, and is used to trigger the client to perform non-low delay sound processing on the audio data to obtain non-low delay audio audio.
  • the non-low delay audio audio data and the second implementation pointer of type NULL are returned to the first JAVA language layer module;
  • the first JAVA language layer module is sent by the receiving client After the low latency audio audio data and the second implementation pointer of the non-NULL type, the second implementation pointer of the non-NULL type is sent to the first C language layer module;
  • the first JAVA language layer module receives the sending by the client After the non-low-latency audio audio data and the second implementation pointer of type NULL, the second implementation pointer of type NULL and the non-low delay audio audio data are sent to the first C language layer module;
  • the first C language layer module is receiving After the second implementation pointer of the non-NULL type, the low-definition audio audio data is played according to the second implementation pointer of the non-NULL type;
  • the first C language layer module receives the second implementation pointer of the type NULL and is non-low After delaying the audio data, non-low-latency audio data is played according to
  • a computer program comprising instructions, when executed on a computer, causing the computer to perform any of the above embodiments to be set to include the first C language layer module And an audio data processing method of the terminal operating system of the first JAVA language layer module.
  • the computer program including the instruction provided by the embodiment of the present application adopts the method of first determining the currently adopted sound effect processing mode.
  • the sound processing mode is the low delay ear return mode
  • the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module;
  • the sound effect processing mode is the non-low delay ear return mode
  • the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL.
  • the first implementation pointer is sent to the client, and is used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-delay audio data and types.
  • the non-NULL second implementation pointer returns to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and the audio data and the type are null NULL
  • the first implementation pointer is sent to the client, and is used to trigger the client to perform non-low delay sound processing on the audio data to obtain non-low delay audio audio.
  • the non-low delay audio audio data and the second implementation pointer of type NULL are returned to the first JAVA language layer module;
  • the first JAVA language layer module is sent by the receiving client After the low latency audio audio data and the second implementation pointer of the non-NULL type, the second implementation pointer of the non-NULL type is sent to the first C language layer module;
  • the first JAVA language layer module receives the sending by the client After the non-low-latency audio audio data and the second implementation pointer of type NULL, the second implementation pointer of type NULL and the non-low delay audio audio data are sent to the first C language layer module;
  • the first C language layer module is receiving After the second implementation pointer of the non-NULL type, the low-definition audio audio data is played according to the second implementation pointer of the non-NULL type;
  • the first C language layer module receives the second implementation pointer of the type NULL and is non-low After delaying the audio data, non-low-latency audio data is played according to
  • a computer program comprising instructions, when executed on a computer, causing the computer to perform any of the above embodiments to be set to include a second JAVA language layer module And the audio data processing method of the client of the second C language layer module.
  • the computer program including the instruction provided by the embodiment of the present application adopts the method that: the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer, when the first implementation pointer type is NULL, The second JAVA language layer module sends the audio data to the second C language layer module; when the first implementation pointer type is non-NULL, the second JAVA language layer module sends the first implementation pointer to the second C language layer module; After receiving the audio data, the C language layer module performs audio processing on the audio data to obtain non-low delay audio audio data, and sends the non-low delay audio audio data to the second JAVA language layer module; the second C language layer module is After receiving the first implementation pointer of type non-NULL, the audio data is called by the first callback function, the audio data is processed, the low-latency audio data is obtained, and the low-latency audio data is sent to the second JAVA language.
  • non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of computer program products including instructions, and the different audio data is played, thereby reducing the maintenance cost of the software.
  • a computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, computer instructions can be wired from a website site, computer, server or data center (eg Coax, fiber, digital subscriber line (DSL) or wireless (eg, infrared, wireless, microwave, etc.) is transmitted to another website, computer, server, or data center.
  • the computer readable storage medium described above can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the above usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
  • the client receives the audio data sent by the operating system and the first implementation pointer.
  • the type of the first implementation pointer is NULL, Performing audio processing on the audio data to obtain non-low-latency audio audio data; when the first implementation pointer type is non-NULL, performing audio processing on the audio data to obtain low-latency audio audio data, and the client will have non-low delay
  • the audio audio data or the low-latency audio data and the second implementation pointer are sent to the operating system, and the operating system plays the received non-low-latency audio data or the low-delay audio data according to the second implementation pointer.
  • the present application can obtain non-low delay audio audio data and low delay audio audio data through a set of methods or devices, and play the above different audio data, thereby reducing the maintenance cost of the software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)

Abstract

Provided are an audio data processing method, an apparatus, an electronic device and a storage medium. The method comprises: a client receives audio data and a first implementation pointer sent by an operating system; when the first implementation pointer is NULL, performing sound effect processing on the audio data to obtain the audio data of non-low latency sound effect; when the first implementation pointer is non-NULL, performing sound effect processing on the audio data to obtain the audio data of low latency sound effect; the client sends the audio data of non-low latency sound effect or the audio data of low latency sound effect and a second implementation pointer to the operating system; and the operating system plays the received audio data of non-low latency sound effect or audio data of low latency sound effect according to the second implementation pointer. The apparatus can respectively obtain the audio data of non-low latency sound effect or the audio data of low latency sound effect, and play the different audio data, thereby reducing the maintenance cost of software.

Description

一种音频数据处理方法、装置、电子设备及存储介质Audio data processing method, device, electronic device and storage medium
本申请要求于2018年1月31日提交中国专利局、申请号为201810099469.3申请名称为“一种音频数据处理方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application entitled "Audio Data Processing Method, Apparatus, Electronic Device and Storage Medium" filed on January 31, 2018 by the Chinese Patent Office, Application No. 201810099469.3, the entire contents of which are incorporated by reference. The citations are incorporated herein by reference.
技术领域Technical field
本申请涉及数据处理技术领域,特别是涉及一种音频数据处理方法、装置、电子设备及存储介质。The present application relates to the field of data processing technologies, and in particular, to an audio data processing method, apparatus, electronic device, and storage medium.
背景技术Background technique
目前,移动直播的发展比较迅速,在移动直播场景下,主播跟唱歌曲的场景非常常见。但由于伴奏传播过程中可能会出现声音的延迟或变质,导致主播听到伴奏的时间有延迟或根本听不清楚伴奏,影响直播效果,因此,主播需要佩戴耳返,通过耳返听到伴奏以及自己的声音,从而对自己的唱歌方式进行调节,同时还可以加入一些声音特效(比如混响、变调等)来增强趣味性,取得比较好的直播效果。At present, the development of mobile live broadcast is relatively rapid. In the mobile live broadcast scenario, the scene of the anchor and the song is very common. However, due to the delay or deterioration of the sound during the accompaniment, the time when the anchor hears the accompaniment is delayed or the accompaniment is not clear at all, which affects the live broadcast effect. Therefore, the anchor needs to wear the ear return and hear the accompaniment through the ear return. Your own voice, so that you can adjust your singing style, you can also add some sound effects (such as reverb, tone, etc.) to enhance the fun, get a better live broadcast effect.
耳返的延时是一个非常重要的参数,延时过大会大幅降低跟唱的体验。在Android平台上,一般直播App使用非低延迟耳返模式实现耳返效果,其延时基本都在200ms以上,这么高的延时对于耳返的实用性大打折扣。The delay of the ear return is a very important parameter, and the delay will greatly reduce the experience of singing. On the Android platform, the general live app uses the non-low-latency ear-back mode to achieve the ear-return effect, and the delay is basically more than 200ms. Such a high delay is greatly reduced for the practicality of the ear return.
目前,要想使用普通的耳机在Android平台上使用低延迟耳返模式,实现低延迟耳返效果,常采用低延迟耳返模式播放音频数据,现有技术中,采用低延迟耳返模式播放音频数据的过程通常为:操作系统在C语言层模块进行音频数据采集,得到音频数据,音频处理客户端通过回调函数对操作系统C语言层模块所采集的音频数据进行处理,得到处理后的音频数据,操作系统再通过回调函数对处理后的音频数据进行播放。At present, in order to use the low-frequency ear-back mode on the Android platform to achieve low-latency ear-back effect, the low-latency ear-back mode is often used to play audio data. In the prior art, the audio is played in the low-delay ear-back mode. The data process is usually as follows: the operating system collects audio data in the C language layer module to obtain audio data, and the audio processing client processes the audio data collected by the operating system C language layer module through the callback function to obtain the processed audio data. The operating system then plays the processed audio data through a callback function.
但是,由于有些类型的终端设备不支持低延迟特性,对于该类终端设备,在其客户端上使用上述现有技术实现低延迟耳返时,会出现耳返有杂音或者声音不正常的问题,也就是说,部分机型的终端设备可能不支持低延迟特性,因此,为避免上述问题的发生,开发者需要同时实现非低延迟耳返模式和低延迟耳返模式,在支持低延迟特性的终端设备上使用低延迟耳返模式,在不支持低延迟特性的终端设备上使用非低延迟耳返模式。However, since some types of terminal devices do not support low-latency characteristics, for such terminal devices, when the low-frequency ear return is implemented on the client using the above-mentioned prior art, there is a problem that the ear returns have a noise or the sound is abnormal. That is to say, some terminal equipments may not support low-latency characteristics. Therefore, in order to avoid the above problems, developers need to implement both non-low-latency ear-back mode and low-delay ear-back mode, while supporting low-latency characteristics. The low-latency ear-back mode is used on the terminal device, and the non-low-latency ear-back mode is used on the terminal device that does not support the low-latency feature.
但由于低延迟耳返模式要求音频数据在采集、处理、播放的过程中不经 过JAVA层,而非低延迟耳返模式要求音频数据通过JAVA层传递,因此同时实现低延迟耳返模式和非低延迟耳返模式,会大大增加直播App的实现复杂度,以及直播APP后期的维护复杂度和维护成本。However, since the low-latency ear-back mode requires that the audio data does not pass through the JAVA layer during acquisition, processing, and playback, the non-low-latency ear-back mode requires audio data to be transmitted through the JAVA layer, thereby achieving both low-latency ear-back mode and non-low Delayed ear-return mode will greatly increase the implementation complexity of the live app and the maintenance complexity and maintenance cost of the live app.
发明内容Summary of the invention
本申请实施例的目的在于提供一种音频数据处理方法、装置、电子设备及计算机可读存储介质,以降低非低延迟耳返模式与低延迟耳返模式共存时,软件的维护成本。具体技术方案如下:An object of the present application is to provide an audio data processing method, apparatus, electronic device, and computer readable storage medium to reduce the maintenance cost of software when a non-low delay ear return mode and a low delay ear return mode coexist. The specific technical solutions are as follows:
第一方面,本申请实施例提供了一种音频数据处理方法,应用于客户端,其中,包括:接收操作系统发送的第一实现指针和音频数据;其中,若当前采用的音效处理模式为非低延迟耳返模式,则所述第一实现指针的类型为第一类型;若当前采用的音效处理模式为低延迟耳返模式,则所述第一实现指针的类型为第二类型;所述第一实现指针为所述操作系统采集到音频数据后发送的;判断所述第一实现指针的类型;若判定所述第一实现指针的类型为第一类型,对所接收到的音频数据进行音效处理,得到非低延迟音效音频数据;在得到所述非低延迟音效音频数据之后,生成类型为第一类型的第二实现指针,并将所述第二实现指针及所述非低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述非低延迟音效音频数据进行播放;若判定所述第一实现指针的类型为第二类型,通过第一回调函数从所述操作系统中调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;在得到所述低延迟音效音频数据之后,生成类型为第二类型的第二实现指针,并将所述第二实现指针及所述低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述低延迟音效音频数据进行播放。In a first aspect, an embodiment of the present application provides an audio data processing method, which is applied to a client, where the method includes: receiving a first implementation pointer and audio data sent by an operating system; wherein, if the currently used audio processing mode is non- The low-latency ear-back mode, the type of the first implementation pointer is a first type; if the currently used sound processing mode is a low-latency ear-back mode, the type of the first implementation pointer is a second type; The first implementation pointer is sent after the operating system collects the audio data; determining the type of the first implementation pointer; if it is determined that the type of the first implementation pointer is the first type, performing the received audio data Sound processing, obtaining non-low delay sound effect audio data; after obtaining the non-low delay sound effect audio data, generating a second implementation pointer of the first type, and the second implementation pointer and the non-low delay sound effect Transmitting audio data to the operating system, for triggering, by the operating system, the number of non-low delay audio effects according to the second implementation pointer Performing playback; if it is determined that the type of the first implementation pointer is the second type, the audio data is called from the operating system by using a first callback function, and audio processing is performed on the audio data to obtain low-latency audio audio data. After obtaining the low-latency audio audio data, generating a second implementation pointer of the second type, and transmitting the second implementation pointer and the low-latency audio audio data to the operating system for triggering The operating system plays the low-latency audio audio data according to the second implementation pointer.
第二方面,本申请实施例提供了一种音频数据处理方法,应用于终端的操作系统,其中,所述方法包括:采集音频数据;从非低延迟耳返模式和低延迟耳返模式中确定出当前采用的音效处理模式;根据当前采用的音效处理模式,生成第一实现指针,当所述音效处理模式为非低延迟耳返模式时,第一实现指针的类型为第一类型,当所述音效处理模式为低延迟耳返模式时,第一实现指针的类型为第二类型;向客户端发送所述第一实现指针和所述音频数据,以使得所述客户端若判定所述第一实现指针的类型为第一类型,获得所述操作系统发送的所述音频数据,对所述音频数据进行音效处理,得到 非低延迟音效音频数据,若所述客户端判定所述第一实现指针的类型为第二类型,通过第一回调函数调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;在得到所述非低延迟音效音频数据或所述低延迟音效音频数据后,将所得到的数据反馈给所述操作系统;接收所述客户端发送的所述非低延迟音效音频数据或所述低延迟音效音频数据,对所接收到的音频数据进行播放。In a second aspect, an embodiment of the present application provides an audio data processing method, which is applied to an operating system of a terminal, where the method includes: collecting audio data; determining from a non-low delay ear return mode and a low delay ear return mode. The currently used sound processing mode; according to the currently used sound processing mode, generating a first implementation pointer, when the sound processing mode is a non-low delay ear return mode, the first implementation pointer type is the first type, When the audio processing mode is the low delay ear return mode, the type of the first implementation pointer is the second type; the first implementation pointer and the audio data are sent to the client, so that the client determines the An implementation of the pointer type is a first type, obtaining the audio data sent by the operating system, performing audio processing on the audio data, to obtain non-low delay audio audio data, if the client determines the first implementation The type of the pointer is a second type, and the audio data is called by the first callback function, and the audio data is processed by the sound effect to obtain a low delay. Late sound effect audio data; after obtaining the non-low delay sound effect audio data or the low delay sound effect audio data, feeding back the obtained data to the operating system; receiving the non-low delay sound effect sent by the client The audio data or the low-latency audio audio data is played back to the received audio data.
第三方面,本申请实施例提供了一种音频数据处理装置,应用于客户端,其中,包括:数据接收模块,设置为接收操作系统发送的第一实现指针和音频数据;其中,若当前采用的音效处理模式为非低延迟耳返模式,则所述第一实现指针的类型为第一类型;若当前采用的音效处理模式为低延迟耳返模式,则所述第一实现指针的类型为第二类型;所述第一实现指针为所述操作系统采集到音频数据后发送的;指针类型判断模块,设置为判断所述第一实现指针的类型;第一数据处理模块,设置为若判定所述第一实现指针的类型为第一类型,对所接收到的音频数据进行音效处理,得到非低延迟音效音频数据;第一数据发送模块,设置为在得到所述非低延迟音效音频数据之后,生成类型为第一类型的第二实现指针,并将所述第二实现指针及所述非低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述非低延迟音效音频数据进行播放;第二数据处理模块,设置为若判定所述第一实现指针的类型为第二类型,通过第一回调函数从所述操作系统中调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;第二数据发送模块,设置为在得到所述低延迟音效音频数据之后,生成类型为第二类型的第二实现指针,并将所述第二实现指针及所述低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述低延迟音效音频数据进行播放。In a third aspect, an embodiment of the present application provides an audio data processing apparatus, which is applied to a client, and includes: a data receiving module, configured to receive a first implementation pointer and audio data sent by an operating system; The sound processing mode is a non-low delay ear return mode, and the type of the first implementation pointer is a first type; if the currently used sound processing mode is a low delay ear return mode, the type of the first implementation pointer is a second type; the first implementation pointer is sent after the operating system collects audio data; the pointer type determining module is configured to determine a type of the first implementation pointer; and the first data processing module is configured to determine The first implementation pointer is of a first type, and performs sound processing on the received audio data to obtain non-low delay audio audio data; and the first data sending module is configured to obtain the non-low delay audio audio data. Thereafter, generating a second implementation pointer of the first type, and the second implementation pointer and the non-low latency sound effect Sending data to the operating system, for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer; and the second data processing module is configured to determine the first implementation The type of the pointer is a second type, the audio data is called from the operating system by a first callback function, and the audio data is subjected to sound processing to obtain low-latency audio audio data; and the second data sending module is set to After obtaining the low-latency audio audio data, generating a second implementation pointer of the second type, and transmitting the second implementation pointer and the low-latency audio audio data to the operating system, for triggering the The operating system plays the low-latency audio audio data according to the second implementation pointer.
第四方面,本申请实施例提供了一种音频数据处理装置,应用于终端的操作系统,其中,所述装置包括:数据采集模块,设置为采集音频数据;模式确定模块,设置为从非低延迟耳返模式和低延迟耳返模式中确定出当前采用的音效处理模式;指针生成模块,设置为根据当前采用的音效处理模式,生成第一实现指针,当所述音效处理模式为非低延迟耳返模式时,第一实现指针的类型为第一类型,当所述音效处理模式为低延迟耳返模式时,第一实现指针的类型为第二类型;数据发送模块,设置为向客户端发送所述第一实 现指针和所述音频数据,以使得所述客户端若判定所述第一实现指针的类型为第一类型,获得所述操作系统发送的所述音频数据,对所述音频数据进行音效处理,得到非低延迟音效音频数据,若所述客户端判定所述第一实现指针的类型为第二类型,通过第一回调函数调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;在得到所述非低延迟音效音频数据或所述低延迟音效音频数据后,将所得到的数据反馈给所述操作系统;数据接收模块,设置为接收所述客户端发送的所述非低延迟音效音频数据或所述低延迟音效音频数据,对所接收到的音频数据进行播放。In a fourth aspect, an embodiment of the present application provides an audio data processing apparatus, which is applied to an operating system of a terminal, where the apparatus includes: a data collection module configured to collect audio data; and a mode determining module configured to be non-low Determining the currently adopted sound effect processing mode in the delayed ear return mode and the low delay ear return mode; the pointer generating module is configured to generate a first implementation pointer according to the currently adopted sound effect processing mode, when the sound effect processing mode is non-low delay In the ear return mode, the type of the first implementation pointer is the first type, and when the sound processing mode is the low delay ear return mode, the type of the first implementation pointer is the second type; the data sending module is set to the client Transmitting the first implementation pointer and the audio data, so that if the client determines that the type of the first implementation pointer is a first type, obtaining the audio data sent by the operating system, the audio The data is subjected to sound processing to obtain non-low delay sound effect audio data, if the client determines that the type of the first implementation pointer is a second type, the audio data is called by the first callback function, and the audio data is subjected to sound processing to obtain low-latency audio audio data; after the non-low-latency audio audio data or the low-delay audio audio data is obtained And the received data is fed back to the operating system; the data receiving module is configured to receive the non-low delay sound effect audio data or the low delay sound effect audio data sent by the client, and the received audio data Play it.
第五方面,本申请实施例提供了一种电子设备,包括处理器和存储器;存储器,设置为存放计算机程序;处理器,设置为执行存储器上所存放的程序时,实现上述任一应设置为客户端的音频数据处理方法的步骤。In a fifth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, a memory configured to store a computer program, and a processor configured to execute a program stored on the memory, to implement any of the foregoing The steps of the client's audio data processing method.
第六方面,本申请实施例提供了一种电子设备,包括处理器和存储器;存储器,设置为存放计算机程序;处理器,设置为执行存储器上所存放的程序时,实现上述任一应用于终端操作系统的音频数据处理方法的步骤。In a sixth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, a memory configured to store a computer program, and a processor configured to execute the program stored on the memory to implement any of the foregoing applications. The steps of the audio data processing method of the operating system.
第七方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述任一应用于客户端的音频数据处理方法。In a seventh aspect, the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores instructions, when executed on a computer, causing the computer to execute any of the above-mentioned audio data applied to the client. Approach.
第八方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述任一应用于设置为终端操作系统的音频数据处理方法。In an eighth aspect, an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores an instruction, when it is run on a computer, causing the computer to perform any of the above applications to be set as a terminal operation. The audio data processing method of the system.
第九方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一应用于客户端的音频数据处理方法。In a ninth aspect, the embodiment of the present application provides a computer program product comprising instructions, when executed on a computer, causing the computer to execute any of the above-described audio data processing methods applied to the client.
第十方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一应用于终端操作系统的音频数据处理方法。In a tenth aspect, the embodiment of the present application provides a computer program product comprising instructions, when executed on a computer, causing the computer to execute any of the above audio data processing methods applied to the terminal operating system.
第十一方面,本申请实施例还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述任一应用于客户端的音频数据处理方法。In an eleventh aspect, the embodiment of the present application further provides a computer program that, when run on a computer, causes the computer to execute any of the above-described audio data processing methods applied to the client.
第十二方面,本申请实施例还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述任一应用于终端操作系统的音频数据处理方法。In a twelfth aspect, the embodiment of the present application further provides a computer program that, when run on a computer, causes the computer to execute any of the above-described audio data processing methods applied to the terminal operating system.
本申请实施例提供的一种音频数据处理方法及装置中,客户端接收操作 系统发送的音频数据和第一实现指针,当第一实现指针的类型为NULL时,对所述音频数据进行音效处理,得到非低延迟音效音频数据;当第一实现指针的类型为非NULL时,对所述音频数据进行音效处理,得到低延迟音效音频数据,客户端将非低延迟音效音频数据或低延迟音效音频数据及第二实现指针发送至操作系统,操作系统根据第二实现指针,对接收到的非低延迟音效音频数据或低延迟音效音频数据进行播放。本申请可以通过一套方法或装置分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the audio data processing method and apparatus provided by the embodiment of the present application, the client receives the audio data sent by the operating system and the first implementation pointer, and performs sound processing on the audio data when the type of the first implementation pointer is NULL. Obtaining non-low-latency audio audio data; when the first implementation pointer type is non-NULL, performing audio processing on the audio data to obtain low-latency audio audio data, and the client will perform non-low-latency audio data or low-latency sound effects. The audio data and the second implementation pointer are sent to the operating system, and the operating system plays the received non-low delay audio audio data or the low delay audio audio data according to the second implementation pointer. The present application can obtain non-low delay audio audio data and low delay audio audio data through a set of methods or devices, and play the above different audio data, thereby reducing the maintenance cost of the software.
当然,实施本申请的任一产品或方法并不一定需要同时达到以上所述的所有优点。Of course, implementing any of the products or methods of the present application does not necessarily require that all of the advantages described above be achieved at the same time.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1为本申请一个实施例提供的音频数据处理方法的流程示意图;FIG. 1 is a schematic flowchart diagram of an audio data processing method according to an embodiment of the present application;
图2为本申请另一个实施例提供的音频数据处理方法的流程示意图;2 is a schematic flowchart diagram of an audio data processing method according to another embodiment of the present application;
图3为本申请又一个实施例提供的音频数据处理方法的流程示意图;FIG. 3 is a schematic flowchart diagram of an audio data processing method according to another embodiment of the present disclosure;
图4为本申请一个实施例提供的音频数据处理装置的结构示意图;4 is a schematic structural diagram of an audio data processing apparatus according to an embodiment of the present application;
图5为本申请另一个实施例提供的音频数据处理装置的结构示意图;FIG. 5 is a schematic structural diagram of an audio data processing apparatus according to another embodiment of the present disclosure;
图6为本申请一个实施例提供的电子设备的结构示意图;FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图7为本申请另一个实施例提供的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
为了解决终端中非低延迟耳返模式与低延迟耳返模式共存时,软件的维护成本较高的技术问题,本申请实施例提供了一种音频数据处理方法、装置、电子设备及存储介质。In order to solve the technical problem that the maintenance cost of the software is high, the audio data processing method, the device, the electronic device, and the storage medium are provided.
第一方面,对本申请实施例提供了一种应用于客户端的音频数据处理方法进行详细介绍,该音频数据处理方法可以包括如下步骤A1-A6:In the first aspect, the audio data processing method applied to the client is described in detail in the embodiment of the present application. The audio data processing method may include the following steps A1-A6:
A1,接收操作系统发送的第一实现指针和音频数据;其中,若当前采用的音效处理模式为非低延迟耳返模式,则第一实现指针的类型为第一类型;若当前采用的音效处理模式为低延迟耳返模式,则第一实现指针的类型为第二类型;第一实现指针为操作系统采集到音频数据后发送的。A1, receiving a first implementation pointer and audio data sent by the operating system; wherein, if the currently adopted sound processing mode is a non-low delay ear return mode, the type of the first implementation pointer is the first type; if the currently used sound processing The mode is a low-latency ear-back mode, and the type of the first implementation pointer is the second type; the first implementation pointer is sent after the operating system collects the audio data.
其中,在一种实施方式中,第一类型可以为空NULL,第二类型可以为非NULL。Wherein, in an embodiment, the first type may be null NULL and the second type may be non-NULL.
在一种实施方式中,客户端包括第二JAVA语言层模块;接收操作系统发送的第一实现指针和音频数据的步骤,包括:第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针。In an embodiment, the client includes a second JAVA language layer module; receiving the first implementation pointer and the audio data sent by the operating system, the second JAVA language layer module receiving the audio data sent by the operating system and the first Implement pointers.
作为本申请实施例的一种实施方式,第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针的步骤,包括:第二JAVA语言层模块接收第一JAVA语言层模块发送的音频数据和第一实现指针。As an implementation manner of the embodiment of the present application, the step of receiving, by the second JAVA language layer module, the audio data sent by the operating system and the first implementation pointer includes: receiving, by the second JAVA language layer module, the audio sent by the first JAVA language layer module Data and first implementation pointer.
A2,判断第一实现指针的类型。A2, determining the type of the first implementation pointer.
A3,若判定第一实现指针的类型为第一类型,对所接收到的音频数据进行音效处理,得到非低延迟音效音频数据。A3. If it is determined that the type of the first implementation pointer is the first type, the received audio data is subjected to sound processing to obtain non-low delay audio audio data.
在一种实施方式中,客户端还包括第二C语言层模块;若判定第一实现指针的类型为第一类型,对所接收到的音频数据进行音效处理,得到非低延迟音效音频数据的步骤,可以包括:若判定第一实现指针的类型为第一类型,第二C语言层模块接收第二JAVA语言层模块发送的音频数据;第二C语言层模块对音频数据进行音效处理,得到非低延迟音效音频数据。In an embodiment, the client further includes a second C language layer module; if it is determined that the type of the first implementation pointer is the first type, performing sound processing on the received audio data to obtain non-low delay audio audio data. The step may include: if it is determined that the type of the first implementation pointer is the first type, the second C language layer module receives the audio data sent by the second JAVA language layer module; and the second C language layer module performs sound processing on the audio data to obtain Non-low latency audio audio data.
A4,在得到非低延迟音效音频数据之后,生成类型为第一类型的第二实现指针,并将第二实现指针及非低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对非低延迟音效音频数据进行播放。A4, after obtaining the non-low delay audio audio data, generating a second implementation pointer of the first type, and sending the second implementation pointer and the non-low delay audio audio data to the operating system, for triggering the operating system according to the second Implement pointers to play non-low latency audio data.
在一种实施方式中,客户端还包括第二C语言层模块;若判定第一实现指针的类型为第二类型,通过第一回调函数从操作系统中调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据的步骤,包括:若判定第一实现指针的类型为第二类型,第二C语言层模块接收第二JAVA语言层模块发送的第一实现指针;第二C语言层模块通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据。In an embodiment, the client further includes a second C language layer module; if it is determined that the type of the first implementation pointer is the second type, the audio data is invoked from the operating system by the first callback function, and the audio data is processed. The step of obtaining low-latency audio audio data includes: if it is determined that the type of the first implementation pointer is the second type, the second C language layer module receives the first implementation pointer sent by the second JAVA language layer module; the second C language layer The module calls the audio data through the first callback function, and performs audio processing on the audio data to obtain low-latency audio audio data.
A5,若判定第一实现指针的类型为第二类型,通过第一回调函数从操作系统中调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据。A5. If it is determined that the type of the first implementation pointer is the second type, the audio data is called from the operating system by the first callback function, and the audio data is subjected to sound processing to obtain low-latency audio audio data.
在一种实施方式中,操作系统还包括第一C语言层模块;第二C语言层模块通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据的步骤,包括:第二C语言层模块通过第一回调函数,从第一C语言层模块调用第一C语言层模块采集的音频数据,对音频数据进行音效处理,得到低延迟音效音频数据。In an embodiment, the operating system further includes a first C language layer module; the second C language layer module calls the audio data through the first callback function, and performs audio processing on the audio data to obtain low-latency audio audio data, including The second C language layer module calls the audio data collected by the first C language layer module from the first C language layer module through the first callback function, and performs audio processing on the audio data to obtain low delay audio audio data.
A6,在得到低延迟音效音频数据之后,生成类型为第二类型的第二实现指针,并将第二实现指针及低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对低延迟音效音频数据进行播放。A6, after obtaining the low-latency audio audio data, generating a second implementation pointer of the second type, and sending the second implementation pointer and the low-latency audio audio data to the operating system, for triggering the operating system according to the second implementation pointer Plays low-latency audio data.
为了方案清楚,后续结合附图1对本申请实施例从客户端角度所提供的音频数据处理方法进行介绍。关于上述的本申请实施例所提供的一种音频数据处理方法的各个步骤的详细介绍内容,可以参见图1所对应实施例中相应步骤的介绍内容。下面结合附图1对本申请实施例从客户端角度所提供的一种音频数据处理方法进行介绍。For the sake of clarity of the scheme, the audio data processing method provided by the client from the perspective of the embodiment of the present application will be described later with reference to FIG. For details of the steps of the audio data processing method provided by the embodiment of the present application, refer to the introduction of the corresponding steps in the corresponding embodiment of FIG. An audio data processing method provided by the client from the perspective of the embodiment of the present application is described below with reference to FIG.
图1为本申请一个实施例提供的音频数据处理方法的流程示意图,该音频数据处理方法应用于包括第二JAVA语言层模块和第二C语言层模块的客户端中,该音频数据处理方法可以包括如下步骤:1 is a schematic flowchart of an audio data processing method according to an embodiment of the present disclosure. The audio data processing method is applied to a client including a second JAVA language layer module and a second C language layer module, and the audio data processing method may be Including the following steps:
步骤101,第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针;其中,若当前采用的音效处理模式为非低延迟耳返模式,则第一实现指针的类型为空NULL;若当前采用的音效处理模式为低延迟耳返模式时,则第一实现指针的类型为非NULL。Step 101: The second JAVA language layer module receives the audio data sent by the operating system and the first implementation pointer; wherein, if the currently adopted sound effect processing mode is a non-low delay ear return mode, the type of the first implementation pointer is null NULL; If the currently used sound processing mode is the low delay ear return mode, the type of the first implementation pointer is non-NULL.
使用耳返进行移动直播时,耳返的延时越低,则直播效果越好。目前,与传统的非低延迟耳返模式相比,常采用音频数据在采集、处理、播放的过程中不经过JAVA语言层的低延迟耳返模式来降低耳返延时,但对于不支持低延迟特性的终端设备,采用上述模式进行耳返实现时,会导致出现杂音或者声音不正常的情况。When using the ear return for mobile live broadcast, the lower the delay of the ear return, the better the live broadcast effect. At present, compared with the traditional non-low-latency ear-back mode, the audio data is often used in the process of acquisition, processing, and playback without the low-latency ear-back mode of the JAVA language layer to reduce the ear-back delay, but for the low support Terminal devices with delay characteristics, when the ear mode is implemented in the above mode, may cause noise or abnormal sound.
在本实施例的方案中,可以根据用户实际需要或者终端设备的属性,通过一套方法分别选择非低延迟耳返模式和低延迟耳返模式进行移动直播:在支持低延迟特性的终端设备上使用低延迟耳返模式,在不支持低延迟特性的终端设备上使用非低延迟耳返模式,降低了软件的维护成本。In the solution of the embodiment, the non-low-latency ear-back mode and the low-latency ear-back mode may be separately selected according to the actual needs of the user or the attributes of the terminal device to perform mobile live broadcast: on the terminal device supporting low delay characteristics. Using the low-latency ear-back mode, the non-low-latency ear-back mode is used on terminal devices that do not support low-latency characteristics, reducing software maintenance costs.
本步骤中,当指定耳返模式为非低延迟耳返模式时,客户端的第二JAVA语言层模块可以接收操作系统发送的音频数据和类型为空NULL的第一实现指针;当指定耳返模式为低延迟耳返模式时,客户端的第二JAVA语言层模块可以接收操作系统发送的音频数据和类型为非NULL的第一实现指针。其中,操作系统发送的音频数据可以为由操作系统调用音频数据采集接口,所采集到的音频数据,上述音频数据可以是PCM(Pulse Code Modulation,脉码调制录音)格式的音频数据,也可以是其他格式的音频数据,本申请实施例对音频数据的格式不作限制。In this step, when the ear return mode is specified as the non-low delay ear return mode, the second JAVA language layer module of the client may receive the audio data sent by the operating system and the first implementation pointer of the type NULL; when the ear return mode is specified In the low latency ear return mode, the client's second JAVA language layer module can receive the audio data sent by the operating system and the first implementation pointer of type non-NULL. The audio data sent by the operating system may be an audio data collected by an operating system, and the collected audio data may be audio data in a PCM (Pulse Code Modulation) format, or may be The audio data of other formats, the embodiment of the present application does not limit the format of the audio data.
在一种实现方式中,操作系统可以包括第一JAVA语言层模块;此时,第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针,可以包括:第二JAVA语言层模块接收第一JAVA语言层模块发送的音频数据和第一实现指针。In an implementation, the operating system may include a first JAVA language layer module; at this time, the second JAVA language layer module receives the audio data sent by the operating system and the first implementation pointer, and may include: receiving, by the second JAVA language layer module The audio data sent by the first JAVA language layer module and the first implementation pointer.
步骤102,判断第一实现指针的类型;若判定第一实现指针的类型为NULL,则执行步骤103;若判定第一实现指针的类型为非NULL,则执行步骤104。Step 102: Determine the type of the first implementation pointer; if it is determined that the type of the first implementation pointer is NULL, step 103 is performed; if it is determined that the type of the first implementation pointer is non-NULL, step 104 is performed.
步骤103,第二JAVA语言层模块将音频数据发送至第二C语言层模块;Step 103: The second JAVA language layer module sends the audio data to the second C language layer module.
与步骤101相对应地,第一实现指针的类型为NULL,即采用传统的非低延迟耳返模式时,客户端将接收到的音频数据从第二JAVA语言层模块发送至第二C语言层模块,以备第二C语言层模块对音频数据进行音效处理。Corresponding to step 101, the type of the first implementation pointer is NULL, that is, when the conventional non-low delay ear return mode is adopted, the client sends the received audio data from the second JAVA language layer module to the second C language layer. The module is configured to perform audio processing on the audio data by the second C language layer module.
步骤104,第二JAVA语言层模块将第一实现指针发送至第二C语言层模块。Step 104: The second JAVA language layer module sends the first implementation pointer to the second C language layer module.
与步骤101相对应地,第一实现指针的类型为非NULL,即采用传统的低延迟耳返模式时,客户端将上述非NULL的第一实现指针发送至第二C语言层模块。Corresponding to step 101, the type of the first implementation pointer is non-NULL, that is, when the conventional low-latency ear-back mode is adopted, the client sends the non-NULL first implementation pointer to the second C language layer module.
步骤105,第二C语言层模块在接收到音频数据后,对音频数据进行音效处理,得到非低延迟音效音频数据,并将非低延迟音效音频数据发送至第二JAVA语言层模块。Step 105: After receiving the audio data, the second C language layer module performs audio processing on the audio data to obtain non-low delay audio audio data, and sends the non-low delay audio audio data to the second JAVA language layer module.
与步骤103对应地,客户端的第二C语言层模块在接收到音频数据后,可以对上述音频数据进行音效处理,得到非低延迟音效音频数据。其中,音效处理的方式可以包括:对音频数据进行混音、录制、音量增益、高潮截取、男女变声、节奏快慢调节、声音淡入淡出处理等,本领域技术人员可以理解音效处理的具体实现方式,在此不再赘述。Corresponding to step 103, after receiving the audio data, the second C language layer module of the client may perform sound processing on the audio data to obtain non-low delay audio audio data. The sound processing method may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, sound fade processing, etc., and those skilled in the art may understand the specific implementation manner of the sound effect processing. I will not repeat them here.
步骤106,第二C语言层模块在接收到类型为非NULL的第一实现指针之后, 通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据,并将低延迟音效音频数据发送至第二JAVA语言层模块。Step 106: After receiving the first implementation pointer of the non-NULL type, the second C language layer module calls the audio data through the first callback function, performs audio processing on the audio data, obtains low-latency audio audio data, and has low delay. The audio audio data is sent to the second JAVA language layer module.
与步骤104对应地,客户端的第二C语言层模块在接收到类型为非NULL的第一实现指针之后,则可以通过回调函数直接调用操作系统中采集的音频数据,并进行音效处理,为了方便描述,可以将该回调函数成为第一回调函数。这样,可以避免因音频数据经过第二JAVA语言层模块,而引起的延迟增加的问题,降低音频数据从采集到音效处理这一过程所花费的时长。同样地,本步骤中的音效处理方式可以包括:对音频数据进行混音、录制、音量增益、高潮截取、男女变声、节奏快慢调节、声音淡入淡出处理等,本领域技术人员可以理解音效处理的具体实现方式,在此不再赘述。Corresponding to step 104, after receiving the first implementation pointer of the non-NULL type, the second C language layer module of the client can directly call the audio data collected by the operating system through the callback function, and perform sound effect processing, for convenience. Description, the callback function can be the first callback function. In this way, the problem of increased delay caused by the audio data passing through the second JAVA language layer module can be avoided, and the time taken for the audio data to be processed from the acquisition to the sound effect processing is reduced. Similarly, the audio processing method in this step may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, sound fade processing, etc., and those skilled in the art can understand the sound effect processing. The specific implementation manner is not described here.
在一种实施方式中,操作系统包括第一C语言层模块,第二C语言层模块在接收到为非NULL的第一实现指针之后,通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据,可以包括:第二C语言层模块在接收到为非NULL的第一实现指针之后,通过第一回调函数,从第一C语言层模块调用第一C语言层模块采集的音频数据,对音频数据进行音效处理,得到低延迟音效音频数据。In an embodiment, the operating system includes a first C language layer module, and after receiving the first implementation pointer that is not NULL, the second C language layer module calls the audio data through the first callback function to perform sound effects on the audio data. Processing, obtaining low-latency audio audio data, may include: after receiving the first implementation pointer that is not NULL, the second C language layer module invokes the first C language layer from the first C language layer module by using the first callback function The audio data collected by the module is subjected to sound processing of the audio data to obtain low-latency audio data.
步骤107,第二JAVA语言层模块在接收到非低延迟音效音频数据之后,生成类型为NULL的第二实现指针,并将第二实现指针及接收到的非低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对非低延迟音效音频数据进行播放。Step 107: After receiving the non-low delay audio audio data, the second JAVA language layer module generates a second implementation pointer of type NULL, and sends the second implementation pointer and the received non-low delay audio audio data to the operating system. And for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer.
步骤108,第二JAVA语言层模块在接收到低延迟音效音频数据之后,生成类型为非NULL的第二实现指针,并将第二实现指针及接收到的低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对低延迟音效音频数据进行播放。Step 108: After receiving the low-latency audio audio data, the second JAVA language layer module generates a second implementation pointer of a non-NULL type, and sends the second implementation pointer and the received low-latency audio audio data to the operating system. The triggering operating system plays the low-latency audio data according to the second implementation pointer.
步骤107和步骤108中,客户端分别针对非低延迟耳返模式和低延迟耳返模式,将音效处理后的音频数据发送给操作系统,以使操作系统对上述处理后的音频数据进行播放。In step 107 and step 108, the client sends the audio data processed by the sound effect to the operating system for the non-low delay ear return mode and the low delay ear return mode, respectively, so that the operating system plays the processed audio data.
在本申请实施例提供的音频数据处理方法中,客户端的第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针后,判断第一实现指针的类型,当第一实现指针的类型为NULL时,第二JAVA语言层模块将音频数据发送至第二C语言层模块;当第一实现指针的类型为非NULL时,第二JAVA语 言层模块将第一实现指针发送至第二C语言层模块;第二C语言层模块在接收到音频数据后,对音频数据进行音效处理,得到非低延迟音效音频数据,并将非低延迟音效音频数据发送至第二JAVA语言层模块;第二C语言层模块在接收到类型为非NULL的第一实现指针之后,通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据,并将低延迟音效音频数据发送至第二JAVA语言层模块;第二JAVA语言层模块在接收到非低延迟音效音频数据之后,生成类型为NULL的第二实现指针,并将第二实现指针及接收到的非低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对非低延迟音效音频数据进行播放;第二JAVA语言层模块在接收到低延迟音效音频数据之后,生成类型为非NULL的第二实现指针,并将第二实现指针及接收到的低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对低延迟音效音频数据进行播放。本申请可以通过一套方法分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the audio data processing method provided by the embodiment of the present application, after the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer, determining the type of the first implementation pointer, when the type of the first implementation pointer When NULL, the second JAVA language layer module sends the audio data to the second C language layer module; when the first implementation pointer type is non-NULL, the second JAVA language layer module sends the first implementation pointer to the second C a language layer module; after receiving the audio data, the second C language layer module performs sound processing on the audio data to obtain non-low delay sound effect audio data, and sends the non-low delay sound effect audio data to the second JAVA language layer module; After receiving the first implementation pointer of the non-NULL type, the second C language layer module calls the audio data through the first callback function, performs audio processing on the audio data, obtains low-latency audio audio data, and transmits the low-latency audio data. To the second JAVA language layer module; the second JAVA language layer module generates a type after receiving non-low latency audio audio data a second implementation pointer of NULL, and sending the second implementation pointer and the received non-low delay audio audio data to the operating system, for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer; After receiving the low-latency audio data, the second JAVA language layer module generates a second implementation pointer of a non-NULL type, and sends the second implementation pointer and the received low-latency audio audio data to the operating system for triggering the operation. The system plays the low-latency audio audio data according to the second implementation pointer. The present application can obtain non-low-latency audio audio data and low-latency audio audio data by a set of methods, and play the above different audio data, thereby reducing the maintenance cost of the software.
第二方面,对本申请实施例提供了一种应用于终端的操作系统的音频数据处理方法进行详细介绍,该音频数据处理方法可以包括如下步骤B1-B5:In a second aspect, the audio data processing method applied to the operating system of the terminal is described in detail in the embodiment of the present application. The audio data processing method may include the following steps B1-B5:
B1,采集音频数据;B1, collecting audio data;
在一种实施方式中,操作系统包括第一C语言层模块和第一JAVA语言层模块;当音效处理模式为低延迟耳返模式时,采集音频数据的步骤,包括:第一C语言层模块采集音频数据。当音效处理模式为非低延迟耳返模式时,采集音频数据的步骤,包括:第一JAVA语言层模块采集音频数据。In an embodiment, the operating system includes a first C language layer module and a first JAVA language layer module; when the sound effect processing mode is a low delay ear return mode, the step of collecting audio data includes: a first C language layer module Acquire audio data. When the sound processing mode is a non-low delay ear return mode, the step of collecting audio data includes: acquiring, by the first JAVA language layer module, audio data.
B2,从非低延迟耳返模式和低延迟耳返模式中确定出当前采用的音效处理模式;B2, determining a currently used sound processing mode from the non-low delay ear return mode and the low delay ear return mode;
B3,根据当前采用的音效处理模式,生成第一实现指针,当音效处理模式为非低延迟耳返模式时,第一实现指针的类型为第一类型,当音效处理模式为低延迟耳返模式时,第一实现指针的类型为第二类型。B3, according to the currently used sound processing mode, generating a first implementation pointer. When the sound processing mode is a non-low delay ear return mode, the first implementation pointer type is a first type, and the sound processing mode is a low delay ear return mode. At the time, the type of the first implementation pointer is the second type.
在一种实施方式中,当音效处理模式为低延迟耳返模式时,该步骤可以包括:第一JAVA语言层模块在接收到第一C语言层模块采集的音频数据后,生成类型为第二类型的第一实现指针;当音效处理模式为非低延迟耳返模式时,该步骤可以包括:第一JAVA语言层模块在采集到音频数据之后,生成类型为第一类型的第一实现指针。In an embodiment, when the sound processing mode is a low-latency ear-back mode, the step may include: after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a second type The first implementation pointer of the type; when the sound processing mode is the non-low delay ear return mode, the step may include: after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of the first type.
B4,向客户端发送第一实现指针和音频数据,以使得客户端若判定第一实现指针的类型为第一类型,获得操作系统发送的音频数据,对音频数据进行音效处理,得到非低延迟音效音频数据,若客户端判定第一实现指针的类型为第二类型,通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据;在得到非低延迟音效音频数据或低延迟音效音频数据后,将所得到的数据反馈给操作系统。B4, sending the first implementation pointer and the audio data to the client, so that if the client determines that the type of the first implementation pointer is the first type, obtaining audio data sent by the operating system, performing audio processing on the audio data, and obtaining non-low delay Audio audio data, if the client determines that the type of the first implementation pointer is the second type, the audio data is called by the first callback function, the audio data is processed by the sound effect, and the low-latency audio audio data is obtained; and the non-low-latency audio audio data is obtained. Or after low-latency audio data, the resulting data is fed back to the operating system.
在一种实施方式中,当音效处理模式为低延迟耳返模式时,该步骤可以包括:第一JAVA语言层模块将音频数据和类型为第二类型的第一实现指针发送至客户端;当音效处理模式为低延迟耳返模式时,该步骤可以包括:第一JAVA语言层模块将音频数据和类型为第一类型的第一实现指针发送至客户端。In an embodiment, when the sound effect processing mode is the low delay ear return mode, the step may include: the first JAVA language layer module sends the audio data and the first implementation pointer of the second type to the client; When the sound processing mode is the low delay ear return mode, the step may include the first JAVA language layer module transmitting the audio data and the first implementation pointer of the first type to the client.
作为本申请实施例的一种实现方式,客户端包括第二JAVA语言层模块;第一JAVA语言层模块将音频数据和类型为第二类型的第一实现指针发送至客户端的步骤,可以包括:第一JAVA语言层模块将音频数据和类型为第二类型的第一实现指针发送至第二JAVA语言层模块。As an implementation of the embodiment of the present application, the client includes a second JAVA language layer module. The step of the first JAVA language layer module sending the audio data and the first implementation pointer of the second type to the client may include: The first JAVA language layer module sends the audio data and the first implementation pointer of the second type to the second JAVA language layer module.
作为本申请实施例的另一种实现方式,客户端包括第二JAVA语言层模块;第一JAVA语言层模块将音频数据和类型为第一类型的第一实现指针发送至客户端的步骤,可以包括:第一JAVA语言层模块将音频数据和类型为第一类型的第一实现指针发送至第二JAVA语言层模块。As another implementation manner of the embodiment of the present application, the client includes a second JAVA language layer module; the first JAVA language layer module sends the audio data and the first implementation pointer of the first type to the client, which may include The first JAVA language layer module sends the audio data and the first implementation pointer of the first type to the second JAVA language layer module.
B5,接收客户端发送的非低延迟音效音频数据或低延迟音效音频数据,对所接收到的音频数据进行播放。B5. Receive non-low delay audio audio data or low delay audio audio data sent by the client, and play the received audio data.
在一种实施方式中,当音效处理模式为低延迟耳返模式时,该步骤可以包括:第一JAVA语言层模块接收客户端发送的低延迟音效音频数据和类型为第二类型的第二实现指针,并将类型为第二类型的第二实现指针发送至第一C语言层模块;第一C语言层模块根据类型为第二类型的第二实现指针,播放低延迟音效音频数据;当音效处理模式为非低延迟耳返模式时,该步骤可以包括:第一JAVA语言层模块接收客户端发送的低延迟音效音频数据和类型为第二类型的第二实现指针,并将类型为第二类型的第二实现指针发送至第一C语言层模块;第一C语言层模块根据类型为第一类型的第二实现指针,播放非低延迟音效音频数据。In an embodiment, when the sound effect processing mode is a low-latency ear-back mode, the step may include: the first JAVA language layer module receiving the low-latency sound effect audio data sent by the client and the second implementation of the second type being the second type a pointer, and transmitting a second implementation pointer of the second type to the first C language layer module; the first C language layer module plays the low delay audio audio data according to the second implementation pointer of the second type; when the sound effect When the processing mode is the non-low delay ear return mode, the step may include: the first JAVA language layer module receives the low delay sound effect audio data sent by the client and the second implementation pointer of the second type type, and the type is the second A second implementation pointer of the type is sent to the first C language layer module; the first C language layer module plays the non-low latency audio audio data according to the second implementation pointer of the first type.
为了方案清楚,后续结合附图2对本申请实施例从终端的操作系统角度所提供的音频数据处理方法进行介绍。关于上述的本申请实施例所提供的一种 音频数据处理方法的各个步骤的详细介绍内容,可以参见图2所对应实施例中相应步骤的介绍内容。下面结合附图2对本申请实施例从终端的操作系统角度所提供的一种音频数据处理方法进行介绍。For the sake of clarity, the audio data processing method provided by the operating system of the terminal in the embodiment of the present application will be described later with reference to FIG. 2 . For details of the steps of the audio data processing method provided by the embodiment of the present application, refer to the introduction of the corresponding steps in the corresponding embodiment of FIG. 2 . An audio data processing method provided by the operating system of the terminal in the embodiment of the present application is described below with reference to FIG.
图2为本申请另一个实施例提供的音频数据处理方法的流程示意图,该音频数据处理方法应用于包括第一JAVA语言层模块和第一C语言层模块的操作系统中,该音频数据处理方法可以包括:2 is a schematic flowchart of an audio data processing method according to another embodiment of the present application. The audio data processing method is applied to an operating system including a first JAVA language layer module and a first C language layer module, and the audio data processing method is Can include:
步骤201,从非低延迟耳返模式和低延迟耳返模式中确定出当前采用的音效处理模式。Step 201: Determine a currently used sound effect processing mode from the non-low delay ear return mode and the low delay ear return mode.
在该步骤中,可以根据用户实际需要或者终端设备的属性,选择非低延迟耳返模式或者低延迟耳返模式作为当前音效处理模式进行移动直播:在支持低延迟特性的终端设备上使用低延迟耳返模式,在不支持低延迟特性的终端设备上使用非低延迟耳返模式。In this step, the non-low delay ear return mode or the low delay ear return mode may be selected as the current sound processing mode for mobile live broadcast according to the actual needs of the user or the attributes of the terminal device: low delay is used on the terminal device supporting the low delay characteristic. The ear-back mode uses a non-low-latency ear-back mode on a terminal device that does not support low-latency characteristics.
步骤202,当音效处理模式为低延迟耳返模式时,第一C语言层模块采集音频数据,并将音频数据发送至第一JAVA语言层模块。Step 202: When the sound effect processing mode is the low delay ear return mode, the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module.
可以将操作系统中用于完成音频数据采集的部分称为音频采集单元,针对不同的音效处理模式,上述音频采集单元采集音频数据的方式有所不同。在本步骤中,音效处理模式为低延迟耳返模式,相应的,上述音频采集单元主要通过如下步骤完成音频数据的采集:首先获取操作系统的名义采样率和原子缓冲区大小,然后按照该名义采样率,采用OpenSL ES(操作系统中的一种调用接口,具有音频数据采集和播放功能)进行音频数据采集。采集到的音频数据可以是PCM格式的音频数据,也可以是其他格式的音频数据,本申请实施例对此不作限制。The part of the operating system used to complete the audio data collection may be referred to as an audio collection unit. The manner in which the audio collection unit collects audio data is different for different sound processing modes. In this step, the sound processing mode is a low-latency ear-back mode. Correspondingly, the audio collecting unit performs the following steps to complete the audio data collection: first, obtain the nominal sampling rate and the atomic buffer size of the operating system, and then follow the name. Sampling rate, using OpenSL ES (a call interface in the operating system with audio data acquisition and playback) for audio data collection. The collected audio data may be audio data in the PCM format, or may be audio data in other formats, which is not limited in this embodiment of the present application.
步骤203,当音效处理模式为非低延迟耳返模式时,第一JAVA语言层模块采集音频数据。Step 203: When the sound effect processing mode is a non-low delay ear return mode, the first JAVA language layer module collects audio data.
与步骤202对应地,音效处理模式为非低延迟耳返模式,上述音频采集单元可以通过如下步骤完成音频数据的采集:首先获取操作系统的名义采样率和缓冲区大小,按照该名义采样率,采用Audio Record(操作系统中的一种调用接口,具有音频数据采集功能)进行音频数据采集。采集到的音频数据可以是PCM格式的音频数据,也可以是其他格式的音频数据,本申请实施例对此不作限制。Corresponding to step 202, the sound effect processing mode is a non-low delay ear return mode, and the audio collecting unit can complete the collection of the audio data by first acquiring the nominal sampling rate and the buffer size of the operating system, according to the nominal sampling rate. Audio data acquisition is performed using Audio Record (a call interface in the operating system with audio data acquisition). The collected audio data may be audio data in the PCM format, or may be audio data in other formats, which is not limited in this embodiment of the present application.
步骤204,第一JAVA语言层模块在接收到第一C语言层模块采集的音频数 据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行低延迟音效处理,得到低延迟音效音频数据,生成非NULL的第二实现指针,并将低延迟音效音频数据和类型为非NULL的第二实现指针返回至第一JAVA语言层模块。Step 204: After receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and sends the audio data and the first implementation pointer of the non-NULL type. To the client, used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio data, generate a non-NULL second implementation pointer, and generate low-latency audio data and a second implementation of non-NULL type The pointer returns to the first JAVA language layer module.
在低延迟耳返模式下,操作系统的第一JAVA语言层模块在接收到第一C语言层模块采集的音频数据后,可以将上述音频数据及类型为非NULL的第一实现指针发送给客户端,以使客户端对音频数据进行低延迟音效处理,同样地,本步骤中的音效处理方式可以包括:对音频数据进行混音、录制、音量增益、高潮截取、男女变声、节奏快慢调节、声音淡入淡出处理等,本领域技术人员可以理解音效处理的具体实现方式,在此不再赘述。In the low-latency ear-back mode, after receiving the audio data collected by the first C language layer module, the first JAVA language layer module of the operating system may send the audio data and the first implementation pointer of the non-NULL type to the client. To enable the client to perform low-latency sound processing on the audio data. Similarly, the sound processing method in this step may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, The sound fade processing and the like can be understood, and those skilled in the art can understand the specific implementation of the sound processing, and details are not described herein.
本步骤中,使用操作系统的第一C语言层模块采集音频数据,可以使操作系统在将音频数据发送至客户端进行音效处理时,避免经过第一JAVA语言层模块,从而可以缩短音频数据传播过程所需时长。In this step, the audio data is collected by using the first C language layer module of the operating system, so that the operating system can avoid the passage of the first JAVA language layer module when transmitting the audio data to the client for sound processing, thereby shortening the audio data transmission. The length of time required for the process.
步骤205,第一JAVA语言层模块在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行非低延迟音效处理,得到非低延迟音效音频数据,生成类型为NULL的第二实现指针,并将非低延迟音效音频数据和类型为NULL的第二实现指针返回至第一JAVA语言层模块。Step 205: After acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and sends the audio data and the first implementation pointer of type NULL to the client, and is used to trigger the client pair. The audio data is subjected to non-low delay sound processing to obtain non-low delay sound effect audio data, generating a second implementation pointer of type NULL, and returning non-low delay sound effect audio data and a second implementation pointer of type NULL to the first JAVA language Layer module.
在非低延迟耳返模式下,操作系统可以将其第一JAVA语言层模块采集的音频数据及类型为NULL的第一实现指针发送给客户端,以使客户端对音频数据进行非低延迟音效处理,同样地,本步骤中的音效处理方式可以包括:对音频数据进行混音、录制、音量增益、高潮截取、男女变声、节奏快慢调节、声音淡入淡出处理等,本领域技术人员可以理解音效处理的具体实现方式,在此不再赘述。In the non-low delay ear return mode, the operating system can send the audio data collected by the first JAVA language layer module and the first implementation pointer of the type NULL to the client, so that the client performs non-low delay sound on the audio data. Processing, in the same manner, the audio processing method in this step may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, sound fade processing, etc., and those skilled in the art can understand the sound effect. The specific implementation of the processing is not described here.
步骤206,第一JAVA语言层模块在接收到客户端发送的低延迟音效音频数据和类型为非NULL的第二实现指针之后,将类型为非NULL的第二实现指针发送至第一C语言层模块。Step 206: After receiving the low-latency audio audio data sent by the client and the second implementation pointer of the non-NULL type, the first JAVA language layer module sends the second implementation pointer of the non-NULL type to the first C language layer. Module.
低延迟耳返模式下,操作系统的第一JAVA语言层模块可以将客户端发送的类型为非NULL的第二实现指针发送给第一C语言层模块。In the low-latency ear-back mode, the first JAVA language layer module of the operating system may send the second implementation pointer of the non-NULL type sent by the client to the first C language layer module.
步骤207,第一JAVA语言层模块在接收到客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针之后,将类型为NULL的第二实现指针和 非低延迟音效音频数据发送至第一C语言层模块。Step 207: The first JAVA language layer module sends the second implementation pointer of type NULL and the non-low delay audio audio data after receiving the non-low delay audio audio data sent by the client and the second implementation pointer of type NULL. To the first C language layer module.
非低延迟耳返模式下,操作系统的第一JAVA语言层模块可以将客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针发送给第一C语言层模块。In the non-low delay ear return mode, the first JAVA language layer module of the operating system may send the non-low delay sound effect audio data sent by the client and the second implementation pointer of the type NULL to the first C language layer module.
步骤208,第一C语言层模块在接收到类型为非NULL的第二实现指针之后,根据类型为非NULL的第二实现指针,播放低延迟音效音频数据。Step 208: After receiving the second implementation pointer of the non-NULL type, the first C language layer module plays the low-latency audio audio data according to the second implementation pointer of the non-NULL type.
步骤209,第一C语言层模块在接收到类型为NULL的第二实现指针和非低延迟音效音频数据之后,根据类型为NULL的第二实现指针,播放非低延迟音效音频数据。Step 209: After receiving the second implementation pointer of the type NULL and the non-low delay audio audio data, the first C language layer module plays the non-low delay audio audio data according to the second implementation pointer of the type NULL.
步骤208和209中,操作系统的第一C语言层模块可以根据类型为NULL的或者类型为非NULL的第二实现指针,对非低延迟音效音频数据或者低延迟音效音频数据,采用OpenSL ES进行播放。In steps 208 and 209, the first C language layer module of the operating system may use OpenSL ES for non-low-latency audio data or low-latency audio data according to a second implementation pointer of type NULL or non-NULL. Play.
在本申请实施例提供的图2所示的音频数据处理方法中,首先确定当前采用的音效处理模式。当音效处理模式为低延迟耳返模式时,第一C语言层模块采集音频数据,并将音频数据发送至第一JAVA语言层模块;当音效处理模式为非低延迟耳返模式时,第一JAVA语言层模块采集音频数据;第一JAVA语言层模块在接收到第一C语言层模块采集的音频数据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行低延迟音效处理,得到低延迟音效音频数据,生成类型为非NULL的第二实现指针,并将低延迟音效音频数据和非NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为空NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行非低延迟音效处理,得到非低延迟音效音频数据,生成类型为NULL的第二实现指针,并将非低延迟音效音频数据和类型为NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在接收到客户端发送的低延迟音效音频数据和类型为非NULL的第二实现指针之后,将类型为非NULL的第二实现指针发送至第一C语言层模块;第一JAVA语言层模块在接收到客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针之后,将类型为NULL的第二实现指针和非低延迟音效音频数据发送至第一C语言层模块;第一C语言层模块在接收到类型为非NULL的第二实现指针之后,根据类型为非NULL的第 二实现指针,播放低延迟音效音频数据;第一C语言层模块在接收到类型为NULL的第二实现指针和非低延迟音效音频数据之后,根据类型为NULL的第二实现指针,播放非低延迟音效音频数据。本申请可以通过一套方法分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the audio data processing method shown in FIG. 2 provided by the embodiment of the present application, the currently adopted sound effect processing mode is first determined. When the sound processing mode is the low delay ear return mode, the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module; when the sound effect processing mode is the non-low delay ear return mode, the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL. The first implementation pointer is sent to the client, and is used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-latency audio data and non- The second implementation pointer of NULL is returned to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and firstly sets the audio data and the type to NULL. The implementation pointer is sent to the client, which is used to trigger the client to perform non-low delay sound processing on the audio data, and obtain non-low delay sound effect audio data. Forming a second implementation pointer of type NULL, and returning the non-low latency audio audio data and the second implementation pointer of type NULL to the first JAVA language layer module; the first JAVA language layer module receives the low sent by the client After delaying the audio audio data and the second implementation pointer of the non-NULL type, sending the second implementation pointer of the non-NULL type to the first C language layer module; the first JAVA language layer module receiving the non-lower sent by the client After delaying the audio audio data and the second implementation pointer of type NULL, transmitting the second implementation pointer of type NULL and the non-low delay audio audio data to the first C language layer module; the first C language layer module receives the type After the non-NULL second implementation pointer, the low-latency audio data is played according to the second implementation pointer of type non-NULL; the first C language layer module receives the second implementation pointer of type NULL and the non-low delay sound effect. After the audio data, non-low-latency audio data is played according to the second implementation pointer of type NULL. The present application can obtain non-low-latency audio audio data and low-latency audio audio data by a set of methods, and play the above different audio data, thereby reducing the maintenance cost of the software.
下面结合附图,对本申请实施例提供的音频数据处理方法、装置、电子设备及存储介质进行详细描述。如附图3所示,本申请实施例提供的一种音频数据处理方法,应用于用户终端,该用户终端上运行了包括第一JAVA语言层模块和第一C语言层模块的操作系统,同时,该用户终端上还安装有包括第二JAVA语言层模块和第二C语言层模块的客户端,该音频数据处理方法具体可以包括如下步骤:The audio data processing method, device, electronic device and storage medium provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings. As shown in FIG. 3, an audio data processing method provided by an embodiment of the present application is applied to a user terminal, and an operating system including a first JAVA language layer module and a first C language layer module is run on the user terminal. The user terminal further includes a client that includes a second JAVA language layer module and a second C language layer module. The audio data processing method may specifically include the following steps:
步骤301,从非低延迟耳返模式和低延迟耳返模式中确定出当前采用的音效处理模式。若当前采用的音效处理模式为低延迟耳返模式,进入步骤302;若当前采用的音效处理模式为非低延迟耳返模式,进入步骤309。Step 301: Determine a currently adopted sound effect processing mode from the non-low delay ear return mode and the low delay ear return mode. If the currently used sound processing mode is the low delay ear return mode, the process proceeds to step 302; if the currently used sound effect processing mode is the non-low delay ear return mode, the process proceeds to step 309.
本实施例中,可以通过一套方法,分别获得普通非低延迟音效音频数据和低延迟音效音频数据,若当前采用的音效处理模式为非低延迟耳返模式时,则可以获得非低延迟音效音频数据;若当前采用的音效处理模式为低延迟耳返模式时,则可以获得低延迟音效音频数据。In this embodiment, normal non-low delay audio data and low delay audio data can be obtained by a set of methods, and if the currently used sound processing mode is a non-low delay ear return mode, non-low delay sound can be obtained. Audio data; if the currently used sound processing mode is the low-latency ear-back mode, low-latency audio data can be obtained.
步骤302,当音效处理模式为低延迟耳返模式时,操作系统的第一C语言层模块采集音频数据,并将音频数据同步至操作系统的第一JAVA语言层模块。Step 302: When the sound effect processing mode is the low delay ear return mode, the first C language layer module of the operating system collects the audio data, and synchronizes the audio data to the first JAVA language layer module of the operating system.
可以将操作系统中用于完成音频数据采集的部分称为音频采集单元,针对不同的音效处理模式,上述音频采集单元采集音频数据的方式有所不同。在本步骤中,音效处理模式为低延迟耳返模式,相应的,上述音频采集单元可以通过如下步骤完成音频数据的采集:首先获取操作系统的名义采样率和原子缓冲区大小,然后按照该名义采样率,采用OpenSL ES(操作系统中的一种调用接口,具有音频数据采集和播放功能)进行音频数据采集。采集到的音频数据可以是PCM格式的音频数据,也可以是其他格式的音频数据,本申请实施例对此不作限制。The part of the operating system used to complete the audio data collection may be referred to as an audio collection unit. The manner in which the audio collection unit collects audio data is different for different sound processing modes. In this step, the sound processing mode is a low-latency ear-back mode. Accordingly, the audio collecting unit can complete the collection of the audio data by first obtaining the nominal sampling rate and the atomic buffer size of the operating system, and then according to the name. Sampling rate, using OpenSL ES (a call interface in the operating system with audio data acquisition and playback) for audio data collection. The collected audio data may be audio data in the PCM format, or may be audio data in other formats, which is not limited in this embodiment of the present application.
步骤303,第一JAVA语言层模块在接收到第一C语言层模块采集的音频数据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至客户端的第二JAVA语言层模块。Step 303: After receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and sends the audio data and the first implementation pointer of the non-NULL type. The second JAVA language layer module to the client.
步骤304,第二JAVA语言层模块在收到音频数据和类型为非NULL的第一实现指针后,将类型为非NULL的实现指针发送至第二C语言层模块。Step 304: After receiving the audio data and the first implementation pointer of the non-NULL type, the second JAVA language layer module sends the implementation pointer of the non-NULL type to the second C language layer module.
步骤305,第二C语言层模块在接收到类型为非NULL的第一实现指针之后,通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据,并将低延迟音效音频数据发送至第二JAVA语言层模块。Step 305: After receiving the first implementation pointer of the non-NULL type, the second C language layer module calls the audio data through the first callback function, performs audio processing on the audio data, obtains low-latency audio audio data, and has low delay. The audio audio data is sent to the second JAVA language layer module.
在本步骤中,第二C语言层模块接收到类型为非NULL第一实现指针后,会采用第一回调函数,通过在操作系统的第一C语言层模块中设置的第一回调函数的接口,直接调用操作系统第一C语言层模块采集的音频数据,并根据用户需求,对上述音频数据进行音效处理,得到低延迟音效音频数据,具体的音效处理方式可以包括:对音频数据进行混音、录制、音量增益、高潮截取、男女变声、节奏快慢调节、声音淡入淡出处理等,本申请实施例对此不作限制。此处,可以将客户端中用于完成音效处理的部分称为音效处理单元,音效处理单元可以为单独的一个,用于完成上述音效处理方式中的某一项;同时,音效处理单元也可以有多个,如:可以命名为第一音效处理单元、第二音效处理单元、第三音效处理单元等,其中各个音效处理单元分别用于完成上述音效处理方式中的某一项。当音效处理单元有多个时,多个音效处理单元产生的音效可以相互叠加,也就是说:可以将第一音效处理单元的输出结果,作为第二音效处理单元的输入;将第二音效处理单元的输出结果,作为第三音效处理单元的输入,依次类推,得到最终的低延迟音效音频数据。In this step, after receiving the non-NULL first implementation pointer, the second C language layer module adopts the first callback function, and adopts the interface of the first callback function set in the first C language layer module of the operating system. Directly calling the audio data collected by the first C language layer module of the operating system, and performing audio processing on the audio data according to the user's requirements, and obtaining low-latency audio audio data, and the specific sound processing method may include: mixing audio data. The recording, the volume gain, the climax interception, the male and female voice change, the rhythm speed adjustment, the sound fade processing, and the like, and the embodiment of the present application does not limit this. Here, the part of the client for completing the sound effect processing may be referred to as a sound effect processing unit, and the sound effect processing unit may be a single one for completing one of the above sound effect processing modes; meanwhile, the sound effect processing unit may also There are a plurality of, for example, a first sound processing unit, a second sound processing unit, a third sound processing unit, and the like, wherein each of the sound processing units is used to complete one of the sound processing methods. When there are multiple sound processing units, the sound effects generated by the plurality of sound processing units may be superimposed on each other, that is, the output result of the first sound processing unit may be used as an input of the second sound processing unit; The output of the unit, as an input to the third sound processing unit, and so on, results in the final low-latency audio audio data.
步骤306,第二JAVA语言层模块在接收到低延迟音效音频数据之后,生成类型为非NULL的第二实现指针,并将第二实现指针及接收到的低延迟音效音频数据发送至第一JAVA语言层模块。Step 306: After receiving the low-latency audio audio data, the second JAVA language layer module generates a second implementation pointer of a non-NULL type, and sends the second implementation pointer and the received low-latency audio audio data to the first JAVA. Language layer module.
步骤307,第一JAVA语言层模块在接收到第二JAVA语言层模块发送的低延迟音效音频数据和类型为非NULL的第二实现指针之后,将类型为非NULL的第二实现指针发送至第一C语言层模块。Step 307: After receiving the low-latency audio audio data sent by the second JAVA language layer module and the second implementation pointer of the non-NULL type, the first JAVA language layer module sends the second implementation pointer of the non-NULL type to the first A C language layer module.
步骤308,第一C语言层模块在接收到类型为非NULL的第二实现指针之后,根据类型为非NULL的第二实现指针,播放低延迟音效音频数据 Step 308, after receiving the second implementation pointer of the non-NULL type, the first C language layer module plays the low delay audio audio data according to the second implementation pointer of the non-NULL type.
可以将操作系统中用于完成音频数据播放的部分称为音频播放单元,在本步骤中,第二实现指针类型为非NULL,上述音频播放模块可以通过如下步骤完成音频数据的播放:在接收到为类型为非NULL的第二实现指针后,采用第二回调函数,直接调用经音效处理单元处理得到的低延迟音效音频数据, 并采用OpenSL ES对上述低延迟音效音频数据进行播放。The part of the operating system for completing the audio data playing may be referred to as an audio playing unit. In this step, the second implementation pointer type is non-NULL, and the audio playing module may complete the playing of the audio data by the following steps: After the second implementation pointer of the non-NULL type, the second callback function is used to directly call the low-latency audio audio data processed by the audio processing unit, and the low-latency audio audio data is played by using OpenSL ES.
步骤309,当音效处理模式为非低延迟耳返模式时,操作系统的第一JAVA语言层模块采集音频数据。 Step 309, when the sound effect processing mode is the non-low delay ear return mode, the first JAVA language layer module of the operating system collects the audio data.
如步骤302中,可以将操作系统中用于完成音频数据采集的部分称为音频采集单元,针对不同的音效处理模式,上述音频采集单元采集音频数据的方式有所不同。在本步骤中,音效处理模式为非低延迟耳返模式,相应的,上述音频采集单元可以通过如下步骤完成音频数据的采集:首先获取操作系统的名义采样率和缓冲区大小,按照该名义采样率,采用Audio Record(操作系统中的一种调用接口,具有音频数据采集功能)进行音频数据采集。In step 302, the portion of the operating system used to complete the audio data collection may be referred to as an audio collection unit. The manner in which the audio collection unit collects audio data is different for different audio processing modes. In this step, the sound processing mode is a non-low delay ear return mode. Correspondingly, the audio collecting unit can complete the collection of the audio data by first obtaining the nominal sampling rate and the buffer size of the operating system, and sampling according to the nominal Rate, using Audio Record (a call interface in the operating system with audio data acquisition) for audio data collection.
采集到的音频数据可以是PCM格式的音频数据,也可以是其他格式的音频数据,本申请实施例对此不作限制。The collected audio data may be audio data in the PCM format, or may be audio data in other formats, which is not limited in this embodiment of the present application.
步骤3010,第一JAVA语言层模块在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为空NULL的第一实现指针发送至客户端的第二JAVA语言层模块。Step 3010: After acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and sends the audio data and the first implementation pointer of the type NULL to the second JAVA language layer module of the client. .
步骤3011,第二JAVA语言层模块在接收到音频数据和类型为空NULL的第一实现指针后,将音频数据发送至第二C语言层模块。Step 3011: After receiving the audio data and the first implementation pointer of the type NULL, the second JAVA language layer module sends the audio data to the second C language layer module.
步骤3012,第二C语言层模块在接收到音频数据后,对音频数据进行音效处理,得到非低延迟音效音频数据,并将非低延迟音效音频数据发送至第二JAVA语言层模块。Step 3012: After receiving the audio data, the second C language layer module performs audio processing on the audio data to obtain non-low delay audio audio data, and sends the non-low delay audio audio data to the second JAVA language layer module.
在本步骤中,当第一实现指针类型为NULL时,第二C语言层模块接收到音频数据后,根据用户需求,对上述音频数据进行音效处理,得到非低延迟音效音频数据。具体的音效处理方式可以包括:对音频数据进行混音、录制、音量增益、高潮截取、男女变声、节奏快慢调节、声音淡入淡出处理等,对此不作限制。与步骤305相同,此步骤也可以由音效处理单元执行,音效处理单元可以为单独的一个,用于完成上述音效处理方式中的某一项;同时,音效处理单元也可以有多个,如:可以命名为第一音效处理单元、第二音效处理单元、第三音效处理单元等,其中各个音效处理单元分别用于完成上述音效处理方式中的某一项。当音效处理单元有多个时,多个音效处理单元产生的音效可以相互叠加,也就是说:可以将第一音效处理单元的输出结果,作为第二音效处理单元的输入;将第二音效处理单元的输出结果,作为第三音效处理单元的输入,依次类推,得到最终的非低延迟音效音频数据。In this step, when the first implementation pointer type is NULL, after receiving the audio data, the second C language layer module performs sound processing on the audio data according to the user's requirements to obtain non-low delay audio audio data. Specific sound processing methods may include: mixing audio data, recording, volume gain, climax interception, male and female voice change, rhythm speed adjustment, sound fade processing, etc., without limitation. The same as step 305, this step can also be performed by the sound effect processing unit, and the sound effect processing unit can be a single one for completing one of the above-mentioned sound effect processing modes; at the same time, the sound effect processing unit can also have multiple, such as: It can be named as the first sound processing unit, the second sound processing unit, the third sound processing unit, and the like, wherein each of the sound processing units is used to complete one of the above sound processing methods. When there are multiple sound processing units, the sound effects generated by the plurality of sound processing units may be superimposed on each other, that is, the output result of the first sound processing unit may be used as an input of the second sound processing unit; The output result of the unit, as an input of the third sound processing unit, and so on, obtains the final non-low delay sound effect audio data.
第二C语言层模块可以通过本地接口(JNI)调用将经过音效处理后得到的非低延迟音效音频数据发送给第二JAVA语言层模块。The second C language layer module can send the non-low delay sound effect audio data obtained by the sound processing to the second JAVA language layer module through a local interface (JNI) call.
步骤3013,第二JAVA语言层模块在接收到非低延迟音效音频数据之后,生成类型为NULL的第二实现指针,并将第二实现指针及接收到的非低延迟音效音频数据发送至操作系统的第一JAVA语言层模块。Step 3013: After receiving the non-low delay audio audio data, the second JAVA language layer module generates a second implementation pointer of type NULL, and sends the second implementation pointer and the received non-low delay audio audio data to the operating system. The first JAVA language layer module.
步骤3014,第一JAVA语言层模块在接收到客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针之后,将类型为NULL的第二实现指针和非低延迟音效音频数据发送至第一C语言层模块。Step 3014: After receiving the non-low delay audio audio data sent by the client and the second implementation pointer of type NULL, the first JAVA language layer module sends the second implementation pointer of type NULL and the non-low delay audio audio data. To the first C language layer module.
步骤3015,第一C语言层模块在接收到类型为NULL的第二实现指针和非低延迟音效音频数据之后,根据类型为NULL的第二实现指针,播放非低延迟音效音频数据。Step 3015: After receiving the second implementation pointer of type NULL and the non-low delay audio audio data, the first C language layer module plays the non-low delay audio audio data according to the second implementation pointer of type NULL.
如步骤308中,可以将操作系统中用于完成音频数据播放的部分称为音频播放单元,在本步骤中,第二实现指针类型为NULL,上述音频播放单元可以通过如下步骤完成音频数据的播放:在接收到类型为非NULL的第二实现指针和非低延迟音效音频数据之后,采用OpenSL ES对非低延迟音效音频数据进行播放。In step 308, the portion of the operating system for completing audio data playback may be referred to as an audio playback unit. In this step, the second implementation pointer type is NULL, and the audio playback unit may perform audio data playback by the following steps. : After receiving the second implementation pointer of non-NULL type and non-low latency audio audio data, the non-low latency audio audio data is played using OpenSL ES.
在本申请实施例中,客户端接收操作系统发送的音频数据和第一实现指针,当第一实现指针类型为NULL时,对音频数据进行音效处理,得到非低延迟音效音频数据;当第一实现指针类型为非NULL时,对音频数据进行音效处理,得到低延迟音效音频数据,客户端将非低延迟音效音频数据或低延迟音效音频数据及第二实现指针发送至操作系统,操作系统根据第二实现指针,对接收到的非低延迟音效音频数据或低延迟音效音频数据进行播放。本申请可以通过一套方法分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the embodiment of the present application, the client receives the audio data sent by the operating system and the first implementation pointer. When the first implementation pointer type is NULL, the audio data is processed by the audio data to obtain non-low delay audio audio data; When the pointer type is non-NULL, the audio data is processed to obtain low-latency audio data, and the client sends the non-low-latency audio data or the low-delay audio data and the second implementation pointer to the operating system, and the operating system according to the operating system The second implementation pointer plays the received non-low delay audio audio data or low delay audio audio data. The present application can obtain non-low-latency audio audio data and low-latency audio audio data by a set of methods, and play the above different audio data, thereby reducing the maintenance cost of the software.
第三方面,本申请实施例提供了一种应用于客户端的音频数据处理装置,该音频数据处理装置可以包括:In a third aspect, the embodiment of the present application provides an audio data processing apparatus applied to a client, where the audio data processing apparatus may include:
数据接收模块,设置为接收操作系统发送的第一实现指针和音频数据;其中,若当前采用的音效处理模式为非低延迟耳返模式,则所述第一实现指针的类型为第一类型;若当前采用的音效处理模式为低延迟耳返模式,则所述第一实现指针的类型为第二类型;所述第一实现指针为所述操作系统采集到音频数据后发送的;a data receiving module, configured to receive a first implementation pointer and audio data sent by the operating system; wherein, if the currently adopted sound processing mode is a non-low delay ear return mode, the type of the first implementation pointer is a first type; If the currently used sound processing mode is a low-latency ear-back mode, the type of the first implementation pointer is a second type; the first implementation pointer is sent after the operating system collects audio data;
指针类型判断模块,设置为判断所述第一实现指针的类型;a pointer type determining module, configured to determine a type of the first implementation pointer;
第一数据处理模块,设置为若判定所述第一实现指针的类型为第一类型,对所接收到的音频数据进行音效处理,得到非低延迟音效音频数据;The first data processing module is configured to: if it is determined that the type of the first implementation pointer is the first type, performing sound effect processing on the received audio data to obtain non-low delay audio effect audio data;
第一数据发送模块,设置为在得到所述非低延迟音效音频数据之后,生成类型为第一类型的第二实现指针,并将所述第二实现指针及所述非低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述非低延迟音效音频数据进行播放;a first data sending module, configured to generate a second implementation pointer of a first type after the non-low delay audio audio data is obtained, and send the second implementation pointer and the non-low delay audio audio data Up to the operating system, configured to trigger the operating system to play the non-low delay audio audio data according to the second implementation pointer;
第二数据处理模块,设置为若判定所述第一实现指针的类型为第二类型,通过第一回调函数从所述操作系统中调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;a second data processing module, configured to: if it is determined that the type of the first implementation pointer is a second type, invoke the audio data from the operating system by using a first callback function, and perform sound processing on the audio data to obtain Low latency audio audio data;
第二数据发送模块,设置为在得到所述低延迟音效音频数据之后,生成类型为第二类型的第二实现指针,并将所述第二实现指针及所述低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述低延迟音效音频数据进行播放。a second data sending module, configured to generate a second implementation pointer of a second type after the low-latency audio audio data is obtained, and send the second implementation pointer and the low-latency audio audio data to the The operating system is configured to trigger the operating system to play the low-latency audio audio data according to the second implementation pointer.
在一种实施方式中,所述客户端包括第二JAVA语言层模块;所述数据接收模块,设置为:触发所述第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针。In an embodiment, the client includes a second JAVA language layer module, and the data receiving module is configured to: trigger the second JAVA language layer module to receive the audio data sent by the operating system and the first implementation pointer.
在一种实施方式中,所述操作系统包括第一JAVA语言层模块;所述第一数据发送模块,设置为:用于触发所述第二JAVA语言层模块接收所述第一JAVA语言层模块发送的音频数据和第一实现指针。In an embodiment, the operating system includes a first JAVA language layer module, and the first data sending module is configured to: trigger the second JAVA language layer module to receive the first JAVA language layer module. The transmitted audio data and the first implementation pointer.
在一种实施方式中,所述客户端还包括第二C语言层模块;所述第一数据处理模块,包括:第一数据接收单元,设置为若判定所述第一实现指针的类型为第一类型,触发所述第二C语言层模块接收所述第二JAVA语言层模块发送的所述音频数据;第一数据处理单元,设置为触发所述第二C语言层模块对所述音频数据进行音效处理,得到非低延迟音效音频数据;所述第一数据处理模块,还包括:第二数据接收单元,设置为若判定所述第一实现指针的类型为第二类型,触发所述第二C语言层模块接收所述第二JAVA语言层模块发送的所述第一实现指针;第二数据处理单元,设置为触发所述第二C语言层模块通过第一回调函数调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据。In an embodiment, the client further includes a second C language layer module; the first data processing module includes: a first data receiving unit, configured to determine that the type of the first implementation pointer is a type, the second C language layer module is triggered to receive the audio data sent by the second JAVA language layer module; the first data processing unit is configured to trigger the second C language layer module to the audio data Performing sound processing to obtain non-low-latency audio audio data; the first data processing module further includes: a second data receiving unit, configured to trigger the first if the type of the first implementation pointer is determined to be the second type The second C language layer module receives the first implementation pointer sent by the second JAVA language layer module, and the second data processing unit is configured to trigger the second C language layer module to invoke the audio data by using a first callback function. Performing sound processing on the audio data to obtain low-latency audio audio data.
在一种实施方式中,所述操作系统还包括第一C语言层模块;所述第二C 语言层模块,设置为:通过第一回调函数,从所述第一C语言层模块调用所述第一C语言层模块采集的音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据。In an embodiment, the operating system further includes a first C language layer module, and the second C language layer module is configured to: invoke the first C language layer module from the first C language layer module by using a first callback function The audio data collected by the first C language layer module performs sound processing on the audio data to obtain low-latency audio audio data.
在一种实施方式中,所述第一类型为空NULL,所述第二类型为非NULL。In one embodiment, the first type is null NULL and the second type is non-NULL.
根据本申请上述实施例提供的应用于包括第二JAVA语言层模块和第二C语言层模块的客户端的音频数据处理方法,相应地,本申请一个实施例还提供了一种音频数据处理装置,位于包括第二JAVA语言层模块和第二C语言层模块的客户端,其结构示意图如图4所示,包括:第二JAVA语言层模块401和第二C语言层模块402。An audio data processing method is applied to a client that includes a second JAVA language layer module and a second C language layer module according to the above embodiments of the present application. Accordingly, an embodiment of the present application further provides an audio data processing apparatus. The client is located in the second JAVA language layer module and the second C language layer module. The schematic diagram of the client is as shown in FIG. 4, and includes: a second JAVA language layer module 401 and a second C language layer module 402.
第二JAVA语言层模块401,设置为接收操作系统发送的音频数据和第一实现指针;其中,若当前采用的音效处理模式为非低延迟耳返模式,则第一实现指针的类型为空NULL;若当前采用的音效处理模式为低延迟耳返模式时,则第一实现指针的类型为非NULL;并判断所述第一实现指针的类型;若判定第一实现指针的类型为NULL时,将音频数据发送至第二C语言层模块402;若判定第一实现指针的类型为非NULL时,将第一实现指针发送至第二C语言层模块402;The second JAVA language layer module 401 is configured to receive the audio data sent by the operating system and the first implementation pointer; wherein, if the currently adopted sound effect processing mode is a non-low delay ear return mode, the type of the first implementation pointer is null NULL If the currently used sound processing mode is a low-latency ear-back mode, the type of the first implementation pointer is non-NULL; and the type of the first implementation pointer is determined; if the type of the first implementation pointer is determined to be NULL, Sending the audio data to the second C language layer module 402; if it is determined that the type of the first implementation pointer is non-NULL, the first implementation pointer is sent to the second C language layer module 402;
第二C语言层模块402,设置为在接收到音频数据后,对音频数据进行音效处理,得到非低延迟音效音频数据,并将非低延迟音效音频数据发送至第二JAVA语言层模块401;以及,在接收到类型为非NULL的第一实现指针之后,通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据,并将低延迟音效音频数据发送至第二JAVA语言层模块401;The second C language layer module 402 is configured to perform audio processing on the audio data after receiving the audio data, to obtain non-low delay audio audio data, and send the non-low delay audio audio data to the second JAVA language layer module 401; And, after receiving the first implementation pointer of the non-NULL type, calling the audio data through the first callback function, performing audio processing on the audio data, obtaining low-latency audio audio data, and transmitting the low-latency audio audio data to the second JAVA language layer module 401;
第二JAVA语言层模块401,还设置为在接收到非低延迟音效音频数据之后,生成为NULL的第二实现指针,并将第二实现指针及接收到的非低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对非低延迟音效音频数据进行播放;以及在接收到低延迟音效音频数据之后,生成类型为非NULL的第二实现指针,并将第二实现指针及接收到的低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对低延迟音效音频数据进行播放。The second JAVA language layer module 401 is further configured to generate a second implementation pointer that is NULL after receiving the non-low delay audio audio data, and send the second implementation pointer and the received non-low delay audio audio data to the operation. a system for triggering an operating system to play non-low-latency audio data according to a second implementation pointer; and, after receiving low-latency audio audio data, generating a second implementation pointer of a non-NULL type, and implementing the second implementation The pointer and the received low-latency audio audio data are sent to the operating system for triggering the operating system to play the low-latency audio audio data according to the second implementation pointer.
进一步的,操作系统包括第一JAVA语言层模块;第二JAVA语言层模块401,设置为接收第一JAVA语言层模块发送的音频数据和第一实现指针。Further, the operating system includes a first JAVA language layer module; the second JAVA language layer module 401 is configured to receive the audio data and the first implementation pointer sent by the first JAVA language layer module.
进一步的,所述操作系统包括第一C语言层模块;第二C语言层模块402, 具体设置为在接收到类型为非NULL的第一实现指针之后,通过第一回调函数,从第一C语言层模块调用第一C语言层模块采集的音频数据,对音频数据进行音效处理,得到低延迟音效音频数据。上述各模块的功能可对应于图1和图3所示流程中的相应处理步骤,在此不再赘述。Further, the operating system includes a first C language layer module, and the second C language layer module 402 is specifically configured to: after receiving the first implementation pointer of the non-NULL type, pass the first callback function from the first C The language layer module calls the audio data collected by the first C language layer module, and performs audio processing on the audio data to obtain low-latency audio audio data. The functions of the above modules may correspond to the corresponding processing steps in the processes shown in FIG. 1 and FIG. 3, and details are not described herein again.
在本申请实施例中,第二JAVA语言层模块401接收操作系统发送的音频数据和第一实现指针,当第一实现指针类型为NULL时,再将音频数据发送给第二C语言层模块402;当第一实现指针类型为非NULL时,将第一实现指针发送至第二C语言层模块402;第二C语言层模块402在接收到音频数据后,对音频数据进行音效处理,得到非低延迟音效音频数据,并将非低延迟音效音频数据发送至第二JAVA语言层模块401;以及,在接收到类型为非NULL的第一实现指针之后,通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据,并将低延迟音效音频数据发送至第二JAVA语言层模块401;最后,第二JAVA语言层模块401在接收到非低延迟音效音频数据之后,生成类型为NULL的第二实现指针,并将第二实现指针及接收到的非低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对非低延迟音效音频数据进行播放;在接收到低延迟音效音频数据之后,生成类型为非NULL的第二实现指针,并将第二实现指针及接收到的低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对低延迟音效音频数据进行播放。本实施例可以通过一套装置分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the embodiment of the present application, the second JAVA language layer module 401 receives the audio data sent by the operating system and the first implementation pointer. When the first implementation pointer type is NULL, the audio data is sent to the second C language layer module 402. When the first implementation pointer type is non-NULL, the first implementation pointer is sent to the second C language layer module 402; after receiving the audio data, the second C language layer module 402 performs audio processing on the audio data to obtain a non- Low-latency audio audio data, and transmitting non-low-latency audio audio data to the second JAVA language layer module 401; and, after receiving the first implementation pointer of the non-NULL type, calling the audio data through the first callback function, The audio data is subjected to sound processing to obtain low-latency audio audio data, and the low-latency audio audio data is sent to the second JAVA language layer module 401; finally, after receiving the non-low-latency audio audio data, the second JAVA language layer module 401 Generating a second implementation pointer of type NULL and sending the second implementation pointer and the received non-low latency audio audio data to the operating system The triggering operating system plays the non-low delay audio audio data according to the second implementation pointer; after receiving the low delay audio audio data, generates a second implementation pointer of a non-NULL type, and the second implementation pointer and the receiving The low-latency audio audio data that is sent to the operating system is used to trigger the operating system to play the low-latency audio audio data according to the second implementation pointer. In this embodiment, non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of devices, and the different audio data is played, thereby reducing the maintenance cost of the software.
第四方面,本申请实施例提供了一种音频数据处理装置,应用于终端的操作系统,其中,所述装置包括:In a fourth aspect, an embodiment of the present application provides an audio data processing apparatus, which is applied to an operating system of a terminal, where the apparatus includes:
数据采集模块,设置为采集音频数据;a data acquisition module configured to collect audio data;
模式确定模块,设置为从非低延迟耳返模式和低延迟耳返模式中确定出当前采用的音效处理模式;a mode determining module configured to determine a currently used sound effect processing mode from the non-low delay ear return mode and the low delay ear return mode;
指针生成模块,设置为根据当前采用的音效处理模式,生成第一实现指针,当所述音效处理模式为非低延迟耳返模式时,第一实现指针的类型为第一类型,当所述音效处理模式为低延迟耳返模式时,第一实现指针的类型为第二类型;a pointer generating module, configured to generate a first implementation pointer according to the currently adopted sound processing mode, and when the sound processing mode is a non-low delay earback mode, the first implementation pointer type is a first type, when the sound effect When the processing mode is the low delay ear return mode, the type of the first implementation pointer is the second type;
数据发送模块,设置为向客户端发送所述第一实现指针和所述音频数据, 以使得所述客户端若判定所述第一实现指针的类型为第一类型,获得所述操作系统发送的所述音频数据,对所述音频数据进行音效处理,得到非低延迟音效音频数据,若所述客户端判定所述第一实现指针的类型为第二类型,通过第一回调函数调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;在得到所述非低延迟音效音频数据或所述低延迟音效音频数据后,将所得到的数据反馈给所述操作系统;a data sending module, configured to send the first implementation pointer and the audio data to a client, so that if the client determines that the type of the first implementation pointer is a first type, obtaining, sent by the operating system The audio data is subjected to sound processing on the audio data to obtain non-low delay sound effect audio data. If the client determines that the type of the first implementation pointer is the second type, the audio is called by the first callback function. Data, performing audio processing on the audio data to obtain low-latency audio audio data; after obtaining the non-low-latency audio audio data or the low-latency audio audio data, feeding the obtained data to the operating system;
数据接收模块,设置为接收所述客户端发送的所述非低延迟音效音频数据或所述低延迟音效音频数据,对所接收到的音频数据进行播放。The data receiving module is configured to receive the non-low delay sound effect audio data or the low delay sound effect audio data sent by the client, and play the received audio data.
在一种实施方式中,所述操作系统包括第一C语言层模块和第一JAVA语言层模块;当所述音效处理模式为低延迟耳返模式时,所述数据采集模块,设置为:触发所述第一C语言层模块采集音频数据;所述指针生成模块,设置为:触发所述第一JAVA语言层模块在接收到所述第一C语言层模块采集的音频数据后,生成类型为第二类型的第一实现指针;所述数据发送模块,设置为:触发所述第一JAVA语言层模块将所述音频数据和所述类型为第二类型的第一实现指针发送至客户端;所述数据接收模块,设置为:触发所述第一JAVA语言层模块接收所述客户端发送的所述低延迟音效音频数据和类型为第二类型的第二实现指针,并将所述类型为第二类型的第二实现指针发送至所述第一C语言层模块;触发所述第一C语言层模块根据所述类型为第二类型的第二实现指针,播放所述低延迟音效音频数据。In an embodiment, the operating system includes a first C language layer module and a first JAVA language layer module; when the sound effect processing mode is a low delay ear return mode, the data acquisition module is configured to: trigger The first C language layer module collects audio data; the pointer generating module is configured to: trigger the first JAVA language layer module to generate the audio data after receiving the audio data collected by the first C language layer module, and generate a type a first implementation pointer of the second type; the data sending module is configured to: trigger the first JAVA language layer module to send the audio data and the first implementation pointer of the second type to the client; The data receiving module is configured to: trigger the first JAVA language layer module to receive the low-latency sound effect audio data sent by the client, and a second implementation pointer of a second type, and the type is Sending a second implementation pointer of the second type to the first C language layer module; triggering the first C language layer module to play the second implementation pointer according to the type Low-latency sound audio data.
在一种实施方式中,所述操作系统包括第一C语言层模块和第一JAVA语言层模块;当所述音效处理模式为非低延迟耳返模式时,所述数据采集模块,设置为:触发所述第一JAVA语言层模块采集音频数据;所述指针生成模块,设置为:触发所述第一JAVA语言层模块在采集到音频数据之后,生成类型为第一类型的第一实现指针;所述数据发送模块,设置为:触发所述第一JAVA语言层模块将所述音频数据和所述类型为第一类型的第一实现指针发送至客户端;所述数据接收模块,设置为:触发所述第一JAVA语言层模块接收所述客户端发送的所述低延迟音效音频数据和类型为第二类型的第二实现指针,并将所述类型为第二类型的第二实现指针发送至所述第一C语言层模块;触发所述第一C语言层模块根据所述类型为第一类型的第二实现指针,播放所述非低延迟音效音频数据。In an embodiment, the operating system includes a first C language layer module and a first JAVA language layer module; when the sound effect processing mode is a non-low delay ear return mode, the data collection module is configured to: Triggering the first JAVA language layer module to collect audio data; the pointer generating module is configured to: trigger the first JAVA language layer module to generate a first implementation pointer of a first type after acquiring audio data; The data sending module is configured to: trigger the first JAVA language layer module to send the audio data and the first implementation pointer of the type to the client; the data receiving module is configured to: Trimming the first JAVA language layer module to receive the low-latency sound effect audio data sent by the client and a second implementation pointer of a second type, and send the second implementation pointer of the second type Up to the first C language layer module; triggering the first C language layer module to play the non-low delay sound effect audio according to the second implementation pointer of the type being the first type It is.
在一种实施方式中,所述客户端包括第二JAVA语言层模块;所述数据发 送模块,设置为:所述第一JAVA语言层模块将所述音频数据和所述类型为第二类型的第一实现指针发送至所述第二JAVA语言层模块。In an embodiment, the client includes a second JAVA language layer module; the data sending module is configured to: the first JAVA language layer module sets the audio data and the type to a second type The first implementation pointer is sent to the second JAVA language layer module.
在一种实施方式中,所述客户端包括第二JAVA语言层模块;所述数据发送模块,设置为:所述第一JAVA语言层模块将所述音频数据和所述类型为第一类型的第一实现指针发送至第二JAVA语言层模块。In an embodiment, the client includes a second JAVA language layer module; the data sending module is configured to: the first JAVA language layer module sets the audio data and the type to a first type The first implementation pointer is sent to the second JAVA language layer module.
根据本申请上述实施例提供的应用于包括第一C语言层模块和第一JAVA语言层模块的终端操作系统的音频数据处理方法,相应地,本申请一个实施例还提供了一种音频数据处理装置,位于终端的操作系统,其结构示意图如图5所示,包括:The audio data processing method applied to the terminal operating system including the first C language layer module and the first JAVA language layer module is provided according to the above embodiment of the present application. Accordingly, an embodiment of the present application further provides an audio data processing. The device is located in the operating system of the terminal, and its structure is shown in FIG. 5, including:
模式确定模块501、第一JAVA语言层模块502和第一C语言层模块503。The mode determination module 501, the first JAVA language layer module 502, and the first C language layer module 503.
模式确定模块501,设置为从非低延迟耳返模式和低延迟耳返模式中确定出当前采用的音效处理模式;The mode determining module 501 is configured to determine a currently adopted sound effect processing mode from the non-low delay ear return mode and the low delay ear return mode;
第一C语言层模块503,设置为当音效处理模式为低延迟耳返模式时,采集音频数据,并将音频数据发送至第一JAVA语言层模块;The first C language layer module 503 is configured to: when the sound effect processing mode is the low delay ear return mode, collect audio data, and send the audio data to the first JAVA language layer module;
第一JAVA语言层模块502,设置为当音效处理模式为非低延迟耳返模式时,采集音频数据;在接收到一C语言层模块采集的音频数据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行低延迟音效处理,得到低延迟音效音频数据,生成类型为非NULL的第二实现指针,并将低延迟音效音频数据和类型为非NULL的第二实现指针返回至第一JAVA语言层模块;在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为空NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行非低延迟音效处理,得到非低延迟音效音频数据,生成类型为NULL的第二实现指针,并将非低延迟音效音频数据和类型为NULL的第二实现指针返回至第一JAVA语言层模块;以及在接收到客户端发送的低延迟音效音频数据和类型为非NULL的第二实现指针之后,将类型为非NULL的第二实现指针发送至第一C语言层模块;在接收到客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针之后,将类型为NULL的第二实现指针和非低延迟音效音频数据发送至第一C语言层模块;The first JAVA language layer module 502 is configured to collect audio data when the sound processing mode is a non-low delay ear return mode; and after receiving the audio data collected by a C language layer module, generate a first implementation of a non-NULL type Pointer, and send the audio data and the first implementation pointer of the non-NULL type to the client, to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio data, and generate a second type of non-NULL Implementing a pointer, and returning low-latency audio data and a second implementation pointer of a non-NULL type to the first JAVA language layer module; after acquiring the audio data, generating a first implementation pointer of type NULL, and the audio data And transmitting a first implementation pointer of the type NULL to the client, for triggering the client to perform non-low delay sound processing on the audio data, obtaining non-low delay audio audio data, generating a second implementation pointer of type NULL, and Non-low latency audio audio data and a second implementation pointer of type NULL are returned to the first JAVA language layer module; and upon receipt of the client After sending the low-latency audio audio data and the second implementation pointer of the non-NULL type, the second implementation pointer of the non-NULL type is sent to the first C language layer module; after receiving the non-low delay audio audio sent by the client After the data and the second implementation pointer of type NULL, the second implementation pointer of type NULL and the non-low delay audio audio data are sent to the first C language layer module;
第一C语言层模块503,还设置为在接收到类型为非NULL的第二实现指针之后,根据类型为非NULL的第二实现指针,播放低延迟音效音频数据;在接 收到类型为NULL的第二实现指针和非低延迟音效音频数据之后,根据类型为NULL的第二实现指针,播放非低延迟音效音频数据。The first C language layer module 503 is further configured to: after receiving the second implementation pointer of the non-NULL type, play the low-latency audio audio data according to the second implementation pointer of the non-NULL type; and receive the type NULL. After the second implementation of the pointer and the non-low delay audio data, the non-low latency audio audio data is played according to the second implementation pointer of type NULL.
进一步的,客户端包括第二JAVA语言层模块和第二C语言层模块;第一JAVA语言层模块502,设置为在接收到一C语言层模块503采集的音频数据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至第二JAVA语言层模块。Further, the client includes a second JAVA language layer module and a second C language layer module; the first JAVA language layer module 502 is configured to generate a non-NULL type after receiving the audio data collected by the C language layer module 503. The first implementation pointer, and the audio data and the first implementation pointer of type non-NULL are sent to the second JAVA language layer module.
进一步的,第一JAVA语言层模块502,设置为在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为空NULL的第一实现指针发送至第二JAVA语言层模块。上述各模块的功能可对应于图2和图3所示流程中的相应处理步骤,在此不再赘述。Further, the first JAVA language layer module 502 is configured to generate a first implementation pointer of type NULL after the audio data is collected, and send the audio data and the first implementation pointer of the type NULL to the second JAVA language. Layer module. The functions of the above modules may correspond to the corresponding processing steps in the processes shown in FIG. 2 and FIG. 3, and details are not described herein again.
在本申请实施例中,首先通过模式确定模块501确定出当前采用的音效处理模式,当音效处理模式为低延迟耳返模式时,采用第一C语言层模块503采集音频数据,并将音频数据发送至第一JAVA语言层模块502;当音效处理模式为非低延迟耳返模式时,第一JAVA语言层模块502采集音频数据;第一JAVA语言层模块502在接收到一C语言层模块采集的音频数据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行低延迟音效处理,得到低延迟音效音频数据,生成类型为非NULL的第二实现指针,并将低延迟音效音频数据和类型为非NULL的第二实现指针返回至第一JAVA语言层模块;在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为空NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行非低延迟音效处理,得到非低延迟音效音频数据,生成类型为NULL的第二实现指针,并将非低延迟音效音频数据和类型为NULL的第二实现指针返回至第一JAVA语言层模块;以及在接收到客户端发送的低延迟音效音频数据和类型为非NULL的第二实现指针之后,将类型为非NULL的第二实现指针发送至第一C语言层模块;在接收到客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针之后,将类型为NULL的第二实现指针和非低延迟音效音频数据发送至第一C语言层模块;最后,第一C语言层模块503在接收到类型为非NULL的第二实现指针之后,根据类型为非NULL的第二实现指针,播放低延迟音效音频数据;在接收到类型为NULL的第二实现指针和非低延迟音效音频数据之后,根据类型为NULL的第二实现指针,播放非低延迟音效音频数据。 本实施例可以通过一套装置分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the embodiment of the present application, the mode determining module 501 first determines the currently adopted sound effect processing mode. When the sound effect processing mode is the low delay ear return mode, the first C language layer module 503 is used to collect audio data, and the audio data is collected. Sending to the first JAVA language layer module 502; when the sound effect processing mode is the non-low delay ear return mode, the first JAVA language layer module 502 collects audio data; the first JAVA language layer module 502 receives a C language layer module to collect After the audio data, the first implementation pointer of the non-NULL type is generated, and the audio data and the first implementation pointer of the non-NULL type are sent to the client, which is used to trigger the client to perform low-latency sound processing on the audio data, Low-latency audio data, generating a second implementation pointer of type non-NULL, and returning low-latency audio data and a second implementation pointer of non-NULL type to the first JAVA language layer module; after acquiring the audio data, Generating a first implementation pointer of type NULL and sending the audio data and the first implementation pointer of type NULL to the client for The client performs non-low delay sound processing on the audio data, obtains non-low delay sound audio data, generates a second implementation pointer of type NULL, and returns non-low delay sound audio data and a second implementation pointer of type NULL to a first JAVA language layer module; and after receiving the low-latency audio audio data sent by the client and the second implementation pointer of the non-NULL type, sending the second implementation pointer of the non-NULL type to the first C language layer module Transmitting the second implementation pointer of the type NULL and the non-low delay audio audio data to the first C language layer module after receiving the non-low delay audio audio data sent by the client and the second implementation pointer of the type NULL; Finally, after receiving the second implementation pointer of the non-NULL type, the first C language layer module 503 plays the low-latency audio audio data according to the second implementation pointer of the non-NULL type; and receives the second type of the type NULL. After the pointer and non-low latency audio data are implemented, the non-low latency audio data is played according to the second implementation pointer of type NULL. In this embodiment, non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of devices, and the different audio data is played, thereby reducing the maintenance cost of the software.
根据本申请上述实施例提供的应用于包括第二JAVA语言层模块和第二C语言层模块的客户端的音频数据处理方法,相应地,本申请实施例还提供了一种电子设备,如图6所示,包括处理器601和存储器602,The audio data processing method applied to the client including the second JAVA language layer module and the second C language layer module is provided according to the above embodiment of the present application. Accordingly, the embodiment of the present application further provides an electronic device, as shown in FIG. 6 . Included, including processor 601 and memory 602,
存储器602,设置为存放计算机程序;a memory 602, configured to store a computer program;
处理器601,设置为执行存储器602上所存放的程序时,实现本申请实施例第一方面所述的应用于客户端的音频数据处理方法。The processor 601 is configured to implement the audio data processing method applied to the client according to the first aspect of the present application when the program stored in the memory 602 is executed.
在本申请实施例提供的电子设备中,客户端的第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针,当第一实现指针类型为NULL时,第二JAVA语言层模块将音频数据发送至第二C语言层模块;当第一实现指针类型为非NULL时,第二JAVA语言层模块将第一实现指针发送至第二C语言层模块;第二C语言层模块在接收到音频数据后,对音频数据进行音效处理,得到非低延迟音效音频数据,并将非低延迟音效音频数据发送至第二JAVA语言层模块;第二C语言层模块在接收到类型为非NULL的第一实现指针之后,通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据,并将低延迟音效音频数据发送至第二JAVA语言层模块;第二JAVA语言层模块在接收到非低延迟音效音频数据之后,生成类型为NULL的第二实现指针,并将第二实现指针及接收到的非低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对非低延迟音效音频数据进行播放;第二JAVA语言层模块在接收到低延迟音效音频数据之后,生成类型为非NULL的第二实现指针,并将第二实现指针及接收到的低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对低延迟音效音频数据进行播放。本实施例可以通过一套电子设备分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the electronic device provided by the embodiment of the present application, the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer. When the first implementation pointer type is NULL, the second JAVA language layer module will audio. The data is sent to the second C language layer module; when the first implementation pointer type is non-NULL, the second JAVA language layer module sends the first implementation pointer to the second C language layer module; the second C language layer module receives After the audio data, audio processing is performed on the audio data to obtain non-low delay audio audio data, and the non-low delay audio audio data is sent to the second JAVA language layer module; the second C language layer module receives the non-NULL type. After the first implementation of the pointer, the audio data is called by the first callback function, the audio data is subjected to sound processing, the low-latency audio audio data is obtained, and the low-latency audio audio data is sent to the second JAVA language layer module; the second JAVA language layer After receiving the non-low delay audio audio data, the module generates a second implementation pointer of type NULL, and the second implementation pointer and The received non-low delay audio audio data is sent to the operating system for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer; the second JAVA language layer module after receiving the low delay audio audio data Generating a second implementation pointer of a non-NULL type, and transmitting the second implementation pointer and the received low-latency audio audio data to the operating system, for triggering the operating system to perform low-latency audio audio data according to the second implementation pointer Play. In this embodiment, non-low delay audio audio data and low delay audio audio data can be respectively obtained through a set of electronic devices, and the different audio data is played, which reduces the maintenance cost of the software.
上述电子设备提到的存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。进一步的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory mentioned in the above electronic device may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. Further, the memory may also be at least one storage device located away from the aforementioned processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing  Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP for short), or a digital signal processor (DSP). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
根据本申请上述实施例提供的应用于包括第一C语言层模块和第一JAVA语言层模块的终端操作系统的音频数据处理方法,相应地,本申请实施例还提供了一种电子设备,如图7所示,包括处理器701和存储器702,The audio data processing method applied to the terminal operating system including the first C language layer module and the first JAVA language layer module is provided according to the above embodiment of the present application. Accordingly, the embodiment of the present application further provides an electronic device, such as As shown in FIG. 7, the processor 701 and the memory 702 are included.
存储器702,设置为存放计算机程序;a memory 702, configured to store a computer program;
处理器701,设置为执行存储器702上所存放的程序时,实现本申请实施例第二方面所述的应用于包括第一C语言层模块和第一JAVA语言层模块的终端操作系统的音频数据处理方法。The processor 701 is configured to execute the program stored in the memory 702, and implement the audio data applied to the terminal operating system including the first C language layer module and the first JAVA language layer module according to the second aspect of the present application. Approach.
在本申请实施例提供的电子设备中,首先确定当前采用的音效处理模式。当音效处理模式为低延迟耳返模式时,第一C语言层模块采集音频数据,并将音频数据发送至第一JAVA语言层模块;当音效处理模式为非低延迟耳返模式时,第一JAVA语言层模块采集音频数据;第一JAVA语言层模块在接收到第一C语言层模块采集的音频数据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行低延迟音效处理,得到低延迟音效音频数据,生成类型为非NULL的第二实现指针,并将低延迟音效音频数据和类型为非NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为空NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行非低延迟音效处理,得到非低延迟音效音频数据,生成类型为NULL的第二实现指针,并将非低延迟音效音频数据和类型为NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在接收到客户端发送的低延迟音效音频数据和类型为非NULL的第二实现指针之后,将类型为非NULL的第二实现指针发送至第一C语言层模块;第一JAVA语言层模块在接收到客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针之后,将类型为NULL的第二实现指针和非低延迟音效音频数据发送至第一C语言层模块;第一C语言层模块在接收到类型为非NULL的第二实现指针之后,根据类型为非NULL的第二实 现指针,播放低延迟音效音频数据;第一C语言层模块在接收到类型为NULL的第二实现指针和非低延迟音效音频数据之后,根据类型为NULL的第二实现指针,播放非低延迟音效音频数据。本实施例可以通过一套电子设备分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the electronic device provided by the embodiment of the present application, the currently adopted sound effect processing mode is first determined. When the sound processing mode is the low delay ear return mode, the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module; when the sound effect processing mode is the non-low delay ear return mode, the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL. The first implementation pointer is sent to the client, and is used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-delay audio data and types. Returning the non-NULL second implementation pointer to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and the audio data and the type are null NULL The first implementation pointer is sent to the client, and is used to trigger the client to perform non-low delay sound processing on the audio data to obtain a non-low delay audio effect number. According to the second implementation pointer of type NULL, the non-low delay audio audio data and the second implementation pointer of type NULL are returned to the first JAVA language layer module; the first JAVA language layer module is sent by the receiving client After the low latency audio audio data and the second implementation pointer of the non-NULL type, the second implementation pointer of the non-NULL type is sent to the first C language layer module; the first JAVA language layer module receives the sending by the client After the non-low-latency audio audio data and the second implementation pointer of type NULL, the second implementation pointer of type NULL and the non-low delay audio audio data are sent to the first C language layer module; the first C language layer module is receiving After the second implementation pointer of the non-NULL type, the low-definition audio audio data is played according to the second implementation pointer of the non-NULL type; the first C language layer module receives the second implementation pointer of the type NULL and is non-low After delaying the audio data, non-low-latency audio data is played according to the second implementation pointer of type NULL. In this embodiment, non-low delay audio audio data and low delay audio audio data can be respectively obtained through a set of electronic devices, and the different audio data is played, which reduces the maintenance cost of the software.
上述电子设备提到的存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。进一步的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory mentioned in the above electronic device may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. Further, the memory may also be at least one storage device located away from the aforementioned processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP for short), or a digital signal processor (DSP). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例中任一上述应用于包括第二JAVA语言层模块和第二C语言层模块的客户端的音频数据处理方法。In still another embodiment provided by the present application, there is provided a computer readable storage medium having stored therein instructions that, when run on a computer, cause the computer to perform any of the above embodiments The above is applied to an audio data processing method of a client including a second JAVA language layer module and a second C language layer module.
在本申请实施例提供的计算机可读存储介质中,客户端的第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针,当第一实现指针的类型为NULL时,第二JAVA语言层模块将音频数据发送至第二C语言层模块;当第一实现指针的类型为非NULL时,第二JAVA语言层模块将第一实现指针发送至第二C语言层模块;第二C语言层模块在接收到音频数据后,对音频数据进行音效处理,得到非低延迟音效音频数据,并将非低延迟音效音频数据发送至第二JAVA语言层模块;第二C语言层模块在接收到类型为非NULL的第一实现指针之后,通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据,并将低延迟音效音频数据发送至第二JAVA语言层模块;第二JAVA语言层模块在接收到非低延迟音效音频数据之后,生成类型为NULL的第二实现指针,并将第二实现指针及接收到的非低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对非低延迟音效 音频数据进行播放;第二JAVA语言层模块在接收到低延迟音效音频数据之后,生成类型为非NULL的第二实现指针,并将第二实现指针及接收到的低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对低延迟音效音频数据进行播放。本实施例可以通过一套计算机可读存储介质分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the computer readable storage medium provided by the embodiment of the present application, the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer. When the type of the first implementation pointer is NULL, the second JAVA language The layer module sends the audio data to the second C language layer module; when the type of the first implementation pointer is non-NULL, the second JAVA language layer module sends the first implementation pointer to the second C language layer module; the second C language After receiving the audio data, the layer module performs audio processing on the audio data to obtain non-low delay audio audio data, and sends the non-low delay audio audio data to the second JAVA language layer module; the second C language layer module receives the After the first implementation pointer of the non-NULL type, the audio data is called by the first callback function, the audio data is subjected to sound processing, the low-latency audio audio data is obtained, and the low-latency audio audio data is sent to the second JAVA language layer module; The second JAVA language layer module generates a second implementation pointer of type NULL after receiving non-low latency audio audio data, and The second implementation pointer and the received non-low delay audio audio data are sent to the operating system for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer; the second JAVA language layer module receives the low delay After the audio audio data is generated, a second implementation pointer of a non-NULL type is generated, and the second implementation pointer and the received low-latency audio audio data are sent to the operating system for triggering the operating system according to the second implementation pointer, and the low delay Audio audio data is played. In this embodiment, non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of computer readable storage media, and the different audio data is played, which reduces the maintenance cost of the software.
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例中任一上述应用于包括第一C语言层模块和第一JAVA语言层模块的终端操作系统的音频数据处理方法。In still another embodiment provided by the present application, there is provided a computer readable storage medium having stored therein instructions that, when run on a computer, cause the computer to perform any of the above embodiments The above is applied to an audio data processing method of a terminal operating system including a first C language layer module and a first JAVA language layer module.
在本申请实施例提供的计算机可读存储介质中,首先确定当前采用的音效处理模式。当音效处理模式为低延迟耳返模式时,第一C语言层模块采集音频数据,并将音频数据发送至第一JAVA语言层模块;当音效处理模式为非低延迟耳返模式时,第一JAVA语言层模块采集音频数据;第一JAVA语言层模块在接收到第一C语言层模块采集的音频数据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至客户端,设置为触发客户端对音频数据进行低延迟音效处理,得到低延迟音效音频数据,生成类型为非NULL的第二实现指针,并将低延迟音效音频数据和类型为非NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为空NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行非低延迟音效处理,得到非低延迟音效音频数据,生成类型为NULL的第二实现指针,并将非低延迟音效音频数据和类型为NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在接收到客户端发送的低延迟音效音频数据和非NULL的第二实现指针之后,将类型为非NULL的第二实现指针发送至第一C语言层模块;第一JAVA语言层模块在接收到客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针之后,将类型为NULL的第二实现指针和非低延迟音效音频数据发送至第一C语言层模块;第一C语言层模块在接收到类型为非NULL的第二实现指针之后,根据类型为非NULL的第二实现指针,播放低延迟音效音频数据;第一C语言层模块在接收到类型为NULL的第二实现指针和非低延迟音效音频数据之后,根据类型为NULL的第 二实现指针,播放非低延迟音效音频数据。本实施例可以通过一套计算机可读存储介质分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。In the computer readable storage medium provided by the embodiment of the present application, the currently adopted sound effect processing mode is first determined. When the sound processing mode is the low delay ear return mode, the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module; when the sound effect processing mode is the non-low delay ear return mode, the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL. The first implementation pointer is sent to the client, and is set to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-latency audio data and types. Returning the non-NULL second implementation pointer to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and the audio data and the type are null NULL The first implementation pointer is sent to the client, and is used to trigger the client to perform non-low delay sound processing on the audio data to obtain non-low delay audio audio. Data, generating a second implementation pointer of type NULL, and returning non-low latency audio audio data and a second implementation pointer of type NULL to the first JAVA language layer module; the first JAVA language layer module is sent at the receiving client After the low-latency audio audio data and the non-NULL second implementation pointer, the second implementation pointer of the non-NULL type is sent to the first C language layer module; the first JAVA language layer module receives the non-lower sent by the client. After delaying the audio audio data and the second implementation pointer of type NULL, transmitting the second implementation pointer of type NULL and the non-low delay audio audio data to the first C language layer module; the first C language layer module receives the type After the non-NULL second implementation pointer, the low-latency audio data is played according to the second implementation pointer of type non-NULL; the first C language layer module receives the second implementation pointer of type NULL and the non-low delay sound effect. After the audio data, non-low-latency audio data is played according to the second implementation pointer of type NULL. In this embodiment, non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of computer readable storage media, and the different audio data is played, which reduces the maintenance cost of the software.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一上述应设置为包括第二JAVA语言层模块和第二C语言层模块的客户端的音频数据处理方法。In still another embodiment provided by the present application, there is also provided a computer program product comprising instructions, when executed on a computer, causing the computer to perform any of the above embodiments to be set to include a second JAVA language layer The audio data processing method of the module and the client of the second C language layer module.
本申请实施例提供的包含指令的计算机程序产品,其采用的方法为:客户端的第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针,当第一实现指针类型为NULL时,第二JAVA语言层模块将音频数据发送至第二C语言层模块;当第一实现指针类型为非NULL时,第二JAVA语言层模块将第一实现指针发送至第二C语言层模块;第二C语言层模块在接收到音频数据后,对音频数据进行音效处理,得到非低延迟音效音频数据,并将非低延迟音效音频数据发送至第二JAVA语言层模块;第二C语言层模块在接收到类型为非NULL的第一实现指针之后,通过第一回调函数调用音频数据,对音频数据进行音效处理,得到低延迟音效音频数据,并将低延迟音效音频数据发送至第二JAVA语言层模块;第二JAVA语言层模块在接收到非低延迟音效音频数据之后,生成类型为NULL的第二实现指针,并将第二实现指针及接收到的非低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对非低延迟音效音频数据进行播放;第二JAVA语言层模块在接收到低延迟音效音频数据之后,生成类型为非NULL的第二实现指针,并将第二实现指针及接收到的低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对低延迟音效音频数据进行播放。本实施例可以通过一套包含指令的计算机程序产品分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。The computer program product of the embodiment provided by the embodiment of the present application adopts the method that: the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer, when the first implementation pointer type is NULL, The second JAVA language layer module sends the audio data to the second C language layer module; when the first implementation pointer type is non-NULL, the second JAVA language layer module sends the first implementation pointer to the second C language layer module; After receiving the audio data, the second C language layer module performs sound processing on the audio data to obtain non-low delay sound effect audio data, and sends the non-low delay sound effect audio data to the second JAVA language layer module; the second C language layer module After receiving the first implementation pointer of the non-NULL type, the audio data is called by the first callback function, the audio data is processed by the sound, the low delay audio audio data is obtained, and the low delay audio audio data is sent to the second JAVA language. Layer module; the second JAVA language layer module generates a second type of NULL after receiving non-low latency audio audio data The pointer is forwarded, and the second implementation pointer and the received non-low delay audio audio data are sent to the operating system for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer; the second JAVA language layer After receiving the low-latency audio audio data, the module generates a second implementation pointer of a non-NULL type, and sends the second implementation pointer and the received low-latency audio audio data to the operating system for triggering the operating system according to the second Implement pointers to play low-latency audio data. In this embodiment, non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of computer program products including instructions, and the different audio data is played, thereby reducing the maintenance cost of the software.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一上述应用于包括第一C语言层模块和第一JAVA语言层模块的终端操作系统的音频数据处理方法。In still another embodiment provided by the present application, there is also provided a computer program product comprising instructions, when executed on a computer, causing a computer to perform any of the above-described embodiments for applying to include a first C language layer module And an audio data processing method of the terminal operating system of the first JAVA language layer module.
本申请实施例提供的包含指令的计算机程序产品,其采用的方法为:首先确定当前采用的音效处理模式。当音效处理模式为低延迟耳返模式时,第 一C语言层模块采集音频数据,并将音频数据发送至第一JAVA语言层模块;当音效处理模式为非低延迟耳返模式时,第一JAVA语言层模块采集音频数据;第一JAVA语言层模块在接收到第一C语言层模块采集的音频数据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行低延迟音效处理,得到低延迟音效音频数据,生成类型为非NULL的第二实现指针,并将低延迟音效音频数据和类型为非NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为空NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行非低延迟音效处理,得到非低延迟音效音频数据,生成类型为NULL的第二实现指针,并将非低延迟音效音频数据和类型为NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在接收到客户端发送的低延迟音效音频数据和类型为非NULL的第二实现指针之后,将类型为非NULL的第二实现指针发送至第一C语言层模块;第一JAVA语言层模块在接收到客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针之后,将类型为NULL的第二实现指针和非低延迟音效音频数据发送至第一C语言层模块;第一C语言层模块在接收到类型为非NULL的第二实现指针之后,根据类型为非NULL的第二实现指针,播放低延迟音效音频数据;第一C语言层模块在接收到类型为NULL的第二实现指针和非低延迟音效音频数据之后,根据类型为NULL的第二实现指针,播放非低延迟音效音频数据。本实施例可以通过一套包含指令的计算机程序产品分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。The computer program product including the instruction provided by the embodiment of the present application adopts the method of first determining the currently adopted sound effect processing mode. When the sound processing mode is the low delay ear return mode, the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module; when the sound effect processing mode is the non-low delay ear return mode, the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL. The first implementation pointer is sent to the client, and is used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-delay audio data and types. Returning the non-NULL second implementation pointer to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and the audio data and the type are null NULL The first implementation pointer is sent to the client, and is used to trigger the client to perform non-low delay sound processing on the audio data to obtain non-low delay audio audio. According to the second implementation pointer of type NULL, the non-low delay audio audio data and the second implementation pointer of type NULL are returned to the first JAVA language layer module; the first JAVA language layer module is sent by the receiving client After the low latency audio audio data and the second implementation pointer of the non-NULL type, the second implementation pointer of the non-NULL type is sent to the first C language layer module; the first JAVA language layer module receives the sending by the client After the non-low-latency audio audio data and the second implementation pointer of type NULL, the second implementation pointer of type NULL and the non-low delay audio audio data are sent to the first C language layer module; the first C language layer module is receiving After the second implementation pointer of the non-NULL type, the low-definition audio audio data is played according to the second implementation pointer of the non-NULL type; the first C language layer module receives the second implementation pointer of the type NULL and is non-low After delaying the audio data, non-low-latency audio data is played according to the second implementation pointer of type NULL. In this embodiment, non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of computer program products including instructions, and the different audio data is played, thereby reducing the maintenance cost of the software.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序,当其在计算机上运行时,使得计算机执行上述实施例中任一上述应设置为包括第一C语言层模块和第一JAVA语言层模块的终端操作系统的音频数据处理方法。In still another embodiment provided by the present application, there is also provided a computer program comprising instructions, when executed on a computer, causing the computer to perform any of the above embodiments to be set to include the first C language layer module And an audio data processing method of the terminal operating system of the first JAVA language layer module.
本申请实施例提供的包含指令的计算机程序,其采用的方法为:首先确定当前采用的音效处理模式。当音效处理模式为低延迟耳返模式时,第一C语言层模块采集音频数据,并将音频数据发送至第一JAVA语言层模块;当音效处理模式为非低延迟耳返模式时,第一JAVA语言层模块采集音频数据;第一 JAVA语言层模块在接收到第一C语言层模块采集的音频数据后,生成类型为非NULL的第一实现指针,并将音频数据和类型为非NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行低延迟音效处理,得到低延迟音效音频数据,生成类型为非NULL的第二实现指针,并将低延迟音效音频数据和类型为非NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在采集到音频数据之后,生成类型为NULL的第一实现指针,并将音频数据和类型为空NULL的第一实现指针发送至客户端,用于触发客户端对音频数据进行非低延迟音效处理,得到非低延迟音效音频数据,生成类型为NULL的第二实现指针,并将非低延迟音效音频数据和类型为NULL的第二实现指针返回至第一JAVA语言层模块;第一JAVA语言层模块在接收到客户端发送的低延迟音效音频数据和类型为非NULL的第二实现指针之后,将类型为非NULL的第二实现指针发送至第一C语言层模块;第一JAVA语言层模块在接收到客户端发送的非低延迟音效音频数据和类型为NULL的第二实现指针之后,将类型为NULL的第二实现指针和非低延迟音效音频数据发送至第一C语言层模块;第一C语言层模块在接收到类型为非NULL的第二实现指针之后,根据类型为非NULL的第二实现指针,播放低延迟音效音频数据;第一C语言层模块在接收到类型为NULL的第二实现指针和非低延迟音效音频数据之后,根据类型为NULL的第二实现指针,播放非低延迟音效音频数据。本实施例可以通过一套包含指令的计算机程序产品分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。The computer program including the instruction provided by the embodiment of the present application adopts the method of first determining the currently adopted sound effect processing mode. When the sound processing mode is the low delay ear return mode, the first C language layer module collects the audio data, and sends the audio data to the first JAVA language layer module; when the sound effect processing mode is the non-low delay ear return mode, the first The JAVA language layer module collects the audio data; after receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a non-NULL type, and the audio data and the type are non-NULL. The first implementation pointer is sent to the client, and is used to trigger the client to perform low-latency sound processing on the audio data, obtain low-latency audio audio data, generate a second implementation pointer of a non-NULL type, and generate low-delay audio data and types. Returning the non-NULL second implementation pointer to the first JAVA language layer module; after acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of type NULL, and the audio data and the type are null NULL The first implementation pointer is sent to the client, and is used to trigger the client to perform non-low delay sound processing on the audio data to obtain non-low delay audio audio. According to the second implementation pointer of type NULL, the non-low delay audio audio data and the second implementation pointer of type NULL are returned to the first JAVA language layer module; the first JAVA language layer module is sent by the receiving client After the low latency audio audio data and the second implementation pointer of the non-NULL type, the second implementation pointer of the non-NULL type is sent to the first C language layer module; the first JAVA language layer module receives the sending by the client After the non-low-latency audio audio data and the second implementation pointer of type NULL, the second implementation pointer of type NULL and the non-low delay audio audio data are sent to the first C language layer module; the first C language layer module is receiving After the second implementation pointer of the non-NULL type, the low-definition audio audio data is played according to the second implementation pointer of the non-NULL type; the first C language layer module receives the second implementation pointer of the type NULL and is non-low After delaying the audio data, non-low-latency audio data is played according to the second implementation pointer of type NULL. In this embodiment, non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of computer program products including instructions, and the different audio data is played, thereby reducing the maintenance cost of the software.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序,当其在计算机上运行时,使得计算机执行上述实施例中任一上述应设置为包括第二JAVA语言层模块和第二C语言层模块的客户端的音频数据处理方法。In still another embodiment provided by the present application, there is also provided a computer program comprising instructions, when executed on a computer, causing the computer to perform any of the above embodiments to be set to include a second JAVA language layer module And the audio data processing method of the client of the second C language layer module.
本申请实施例提供的包含指令的计算机程序,其采用的方法为:客户端的第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针,当第一实现指针类型为NULL时,第二JAVA语言层模块将音频数据发送至第二C语言层模块;当第一实现指针类型为非NULL时,第二JAVA语言层模块将第一实现指针发送至第二C语言层模块;第二C语言层模块在接收到音频数据后,对音频数据进行音效处理,得到非低延迟音效音频数据,并将非低延迟音效音频数据发送至第二JAVA语言层模块;第二C语言层模块在接收到为类型为非NULL的第一实现指针之后,通过第一回调函数调用音频数据,对音频数据 进行音效处理,得到低延迟音效音频数据,并将低延迟音效音频数据发送至第二JAVA语言层模块;第二JAVA语言层模块在接收到非低延迟音效音频数据之后,生成类型为NULL的第二实现指针,并将第二实现指针及接收到的非低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对非低延迟音效音频数据进行播放;第二JAVA语言层模块在接收到低延迟音效音频数据之后,生成类型为非NULL的第二实现指针,并将第二实现指针及接收到的低延迟音效音频数据发送至操作系统,用于触发操作系统根据第二实现指针,对低延迟音效音频数据进行播放。本实施例可以通过一套包含指令的计算机程序产品分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。The computer program including the instruction provided by the embodiment of the present application adopts the method that: the second JAVA language layer module of the client receives the audio data sent by the operating system and the first implementation pointer, when the first implementation pointer type is NULL, The second JAVA language layer module sends the audio data to the second C language layer module; when the first implementation pointer type is non-NULL, the second JAVA language layer module sends the first implementation pointer to the second C language layer module; After receiving the audio data, the C language layer module performs audio processing on the audio data to obtain non-low delay audio audio data, and sends the non-low delay audio audio data to the second JAVA language layer module; the second C language layer module is After receiving the first implementation pointer of type non-NULL, the audio data is called by the first callback function, the audio data is processed, the low-latency audio data is obtained, and the low-latency audio data is sent to the second JAVA language. a layer module; after receiving the non-low delay audio audio data, the second JAVA language layer module generates a second real type of NULL a pointer, and sending the second implementation pointer and the received non-low delay audio audio data to the operating system, for triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer; the second JAVA language layer module After receiving the low-latency audio audio data, generating a second implementation pointer of a non-NULL type, and transmitting the second implementation pointer and the received low-latency audio audio data to the operating system for triggering the operating system according to the second implementation Pointer for playing low-latency audio data. In this embodiment, non-low-latency audio audio data and low-latency audio audio data can be respectively obtained through a set of computer program products including instructions, and the different audio data is played, thereby reducing the maintenance cost of the software.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行上述计算机程序指令时,全部或部分地产生按照本申请实施例上述的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。上述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。上述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the above computer program instructions are loaded and executed on a computer, the above described processes or functions in accordance with embodiments of the present application are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, computer instructions can be wired from a website site, computer, server or data center (eg Coax, fiber, digital subscriber line (DSL) or wireless (eg, infrared, wireless, microwave, etc.) is transmitted to another website, computer, server, or data center. The computer readable storage medium described above can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media. The above usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素, 并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置和电子设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element, without further limitation. The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and the electronic device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上所述仅为本申请的较佳实施例而已,并非设置为限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。The above is only the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the scope of the present application.
工业实用性Industrial applicability
基于本申请实施例提供的上述一种音频数据处理方法、装置、电子设备及存储介质,客户端接收操作系统发送的音频数据和第一实现指针,当第一实现指针的类型为NULL时,对所述音频数据进行音效处理,得到非低延迟音效音频数据;当第一实现指针的类型为非NULL时,对所述音频数据进行音效处理,得到低延迟音效音频数据,客户端将非低延迟音效音频数据或低延迟音效音频数据及第二实现指针发送至操作系统,操作系统根据第二实现指针,对接收到的非低延迟音效音频数据或低延迟音效音频数据进行播放。本申请可以通过一套方法或装置分别获得非低延迟音效音频数据和低延迟音效音频数据,并对上述不同音频数据进行播放,降低了软件的维护成本。Based on the foregoing audio data processing method, device, electronic device and storage medium provided by the embodiment of the present application, the client receives the audio data sent by the operating system and the first implementation pointer. When the type of the first implementation pointer is NULL, Performing audio processing on the audio data to obtain non-low-latency audio audio data; when the first implementation pointer type is non-NULL, performing audio processing on the audio data to obtain low-latency audio audio data, and the client will have non-low delay The audio audio data or the low-latency audio data and the second implementation pointer are sent to the operating system, and the operating system plays the received non-low-latency audio data or the low-delay audio data according to the second implementation pointer. The present application can obtain non-low delay audio audio data and low delay audio audio data through a set of methods or devices, and play the above different audio data, thereby reducing the maintenance cost of the software.

Claims (28)

  1. 一种音频数据处理方法,应用于客户端,其中,包括:An audio data processing method is applied to a client, which includes:
    接收操作系统发送的第一实现指针和音频数据;其中,若当前采用的音效处理模式为非低延迟耳返模式,则所述第一实现指针的类型为第一类型;若当前采用的音效处理模式为低延迟耳返模式,则所述第一实现指针的类型为第二类型;所述第一实现指针为所述操作系统采集到音频数据后发送的;Receiving a first implementation pointer and audio data sent by the operating system; wherein, if the currently adopted sound processing mode is a non-low delay ear return mode, the type of the first implementation pointer is a first type; if the currently used sound processing The mode is a low-latency ear-back mode, and the type of the first implementation pointer is a second type; the first implementation pointer is sent after the operating system collects audio data;
    判断所述第一实现指针的类型;Determining a type of the first implementation pointer;
    若判定所述第一实现指针的类型为第一类型,对所接收到的音频数据进行音效处理,得到非低延迟音效音频数据;If it is determined that the type of the first implementation pointer is the first type, performing sound processing on the received audio data to obtain non-low delay audio effect audio data;
    在得到所述非低延迟音效音频数据之后,生成类型为第一类型的第二实现指针,并将所述第二实现指针及所述非低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述非低延迟音效音频数据进行播放;After obtaining the non-low delay sound effect audio data, generating a second implementation pointer of a first type, and transmitting the second implementation pointer and the non-low delay audio audio data to the operating system for Triggering the operating system to play the non-low delay audio audio data according to the second implementation pointer;
    若判定所述第一实现指针的类型为第二类型,通过第一回调函数从所述操作系统中调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;If it is determined that the type of the first implementation pointer is the second type, the audio data is invoked from the operating system by using a first callback function, and audio processing is performed on the audio data to obtain low-latency audio audio data;
    在得到所述低延迟音效音频数据之后,生成类型为第二类型的第二实现指针,并将所述第二实现指针及所述低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述低延迟音效音频数据进行播放。After obtaining the low-latency audio audio data, generating a second implementation pointer of the second type, and transmitting the second implementation pointer and the low-latency audio audio data to the operating system for triggering The operating system plays the low-latency audio audio data according to the second implementation pointer.
  2. 根据权利要求1所述的方法,其中,所述客户端包括第二JAVA语言层模块;The method of claim 1 wherein said client comprises a second JAVA language layer module;
    所述接收操作系统发送的第一实现指针和音频数据的步骤,包括:The step of receiving the first implementation pointer and the audio data sent by the operating system includes:
    所述第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针。The second JAVA language layer module receives the audio data sent by the operating system and the first implementation pointer.
  3. 根据权利要求2所述的方法,其中,所述操作系统包括第一JAVA语言层模块;The method of claim 2, wherein the operating system comprises a first JAVA language layer module;
    所述第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针的步骤,包括:The step of receiving, by the second JAVA language layer module, the audio data sent by the operating system and the first implementation pointer includes:
    所述第二JAVA语言层模块接收所述第一JAVA语言层模块发送的音频数据和第一实现指针。The second JAVA language layer module receives the audio data and the first implementation pointer sent by the first JAVA language layer module.
  4. 根据权利要求2所述的方法,其中,所述客户端还包括第二C语言层模 块;The method of claim 2 wherein said client further comprises a second C language layer module;
    所述若判定所述第一实现指针的类型为第一类型,对所接收到的音频数据进行音效处理,得到非低延迟音效音频数据的步骤,包括:If the type of the first implementation pointer is determined to be the first type, the step of performing sound processing on the received audio data to obtain non-low delay audio audio data includes:
    若判定所述第一实现指针的类型为第一类型,所述第二C语言层模块接收所述第二JAVA语言层模块发送的所述音频数据;If the type of the first implementation pointer is determined to be the first type, the second C language layer module receives the audio data sent by the second JAVA language layer module;
    所述第二C语言层模块对所述音频数据进行音效处理,得到非低延迟音效音频数据;The second C language layer module performs sound processing on the audio data to obtain non-low delay sound effect audio data;
    所述若判定所述第一实现指针的类型为第二类型,通过第一回调函数从所述操作系统中调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据的步骤,包括:If it is determined that the type of the first implementation pointer is the second type, the audio data is called from the operating system by using a first callback function, and the audio data is subjected to sound processing to obtain low-delay audio audio data. Steps, including:
    若判定所述第一实现指针的类型为第二类型,所述第二C语言层模块接收所述第二JAVA语言层模块发送的所述第一实现指针;If the type of the first implementation pointer is determined to be the second type, the second C language layer module receives the first implementation pointer sent by the second JAVA language layer module;
    所述第二C语言层模块通过第一回调函数调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据。The second C language layer module calls the audio data through a first callback function, and performs audio processing on the audio data to obtain low-latency audio audio data.
  5. 根据权利要求4所述的方法,其中,所述操作系统还包括第一C语言层模块;The method of claim 4, wherein the operating system further comprises a first C language layer module;
    所述第二C语言层模块通过第一回调函数调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据的步骤,包括:The step of the second C language layer module calling the audio data by using a first callback function, performing sound processing on the audio data, and obtaining low-latency audio audio data, including:
    所述第二C语言层模块通过第一回调函数,从所述第一C语言层模块调用所述第一C语言层模块采集的音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据。The second C language layer module calls the audio data collected by the first C language layer module from the first C language layer module by using a first callback function, and performs sound processing on the audio data to obtain a low delay sound effect. Audio data.
  6. 根据权利要求1至5任一项所述的方法,其中,所述第一类型为空NULL,所述第二类型为非NULL。The method according to any one of claims 1 to 5, wherein the first type is null NULL and the second type is non-NULL.
  7. 一种音频数据处理方法,应用于终端的操作系统,其中,所述方法包括:An audio data processing method is applied to an operating system of a terminal, where the method includes:
    采集音频数据;Collecting audio data;
    从非低延迟耳返模式和低延迟耳返模式中确定出当前采用的音效处理模式;Determining the currently used sound processing mode from the non-low delay ear return mode and the low delay ear return mode;
    根据当前采用的音效处理模式,生成第一实现指针,当所述音效处理模式为非低延迟耳返模式时,第一实现指针的类型为第一类型,当所述音效处理模式为低延迟耳返模式时,第一实现指针的类型为第二类型;Generating a first implementation pointer according to the currently adopted sound processing mode. When the sound processing mode is a non-low delay ear return mode, the type of the first implementation pointer is a first type, and when the sound processing mode is a low delay ear When returning to the mode, the type of the first implementation pointer is the second type;
    向客户端发送所述第一实现指针和所述音频数据,以使得所述客户端若判定所述第一实现指针的类型为第一类型,获得所述操作系统发送的所述音频数据,对所述音频数据进行音效处理,得到非低延迟音效音频数据,若所述客户端判定所述第一实现指针的类型为第二类型,通过第一回调函数调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;在得到所述非低延迟音效音频数据或所述低延迟音效音频数据后,将所得到的数据反馈给所述操作系统;Sending the first implementation pointer and the audio data to the client, so that if the client determines that the type of the first implementation pointer is the first type, obtaining the audio data sent by the operating system, Performing audio processing on the audio data to obtain non-low delay audio audio data. If the client determines that the type of the first implementation pointer is the second type, the audio data is called by the first callback function, and the audio is The data is subjected to sound processing to obtain low-latency audio audio data; after the non-low-latency audio audio data or the low-delay audio audio data is obtained, the obtained data is fed back to the operating system;
    接收所述客户端发送的所述非低延迟音效音频数据或所述低延迟音效音频数据,对所接收到的音频数据进行播放。Receiving the non-low delay sound effect audio data or the low delay sound effect audio data sent by the client, and playing the received audio data.
  8. 根据权利要求7所述的方法,其中,所述操作系统包括第一C语言层模块和第一JAVA语言层模块;The method of claim 7, wherein the operating system comprises a first C language layer module and a first JAVA language layer module;
    当所述音效处理模式为低延迟耳返模式时,所述采集音频数据的步骤,包括:When the sound processing mode is a low-latency ear-back mode, the step of collecting audio data includes:
    所述第一C语言层模块采集音频数据;The first C language layer module collects audio data;
    所述根据当前采用的音效处理模式,生成第一实现指针的步骤,包括:The step of generating a first implementation pointer according to the currently adopted sound processing mode includes:
    所述第一JAVA语言层模块在接收到所述第一C语言层模块采集的音频数据后,生成类型为第二类型的第一实现指针;After receiving the audio data collected by the first C language layer module, the first JAVA language layer module generates a first implementation pointer of a second type;
    所述向客户端发送所述第一实现指针和所述音频数据的步骤,包括:The step of sending the first implementation pointer and the audio data to a client includes:
    所述第一JAVA语言层模块将所述音频数据和所述类型为第二类型的第一实现指针发送至客户端;Transmitting, by the first JAVA language layer module, the audio data and the first implementation pointer of the second type to a client;
    所述接收所述客户端发送的所述非低延迟音效音频数据或所述低延迟音效音频数据,对所接收到的音频数据进行播放的步骤,包括:The step of receiving the non-low delay audio effect audio data or the low delay audio effect audio data sent by the client, and playing the received audio data, includes:
    所述第一JAVA语言层模块接收所述客户端发送的所述低延迟音效音频数据和类型为第二类型的第二实现指针,并将所述类型为第二类型的第二实现指针发送至所述第一C语言层模块;The first JAVA language layer module receives the low-latency sound effect audio data sent by the client and a second implementation pointer of a second type, and sends the second implementation pointer of the second type to The first C language layer module;
    所述第一C语言层模块根据所述类型为第二类型的第二实现指针,播放所述低延迟音效音频数据。The first C language layer module plays the low-latency audio audio data according to the second implementation pointer of the second type.
  9. 根据权利要求7所述的方法,其中,所述操作系统包括第一C语言层模块和第一JAVA语言层模块;The method of claim 7, wherein the operating system comprises a first C language layer module and a first JAVA language layer module;
    当所述音效处理模式为非低延迟耳返模式时,所述采集音频数据的步骤,包括:所述第一JAVA语言层模块采集音频数据;When the audio processing mode is a non-low delay ear return mode, the step of collecting audio data includes: the first JAVA language layer module collecting audio data;
    所述根据当前采用的音效处理模式,生成第一实现指针的步骤,包括:The step of generating a first implementation pointer according to the currently adopted sound processing mode includes:
    所述第一JAVA语言层模块在采集到音频数据之后,生成类型为第一类型的第一实现指针;After acquiring the audio data, the first JAVA language layer module generates a first implementation pointer of a first type;
    所述向客户端发送所述第一实现指针和所述音频数据的步骤,包括:The step of sending the first implementation pointer and the audio data to a client includes:
    所述第一JAVA语言层模块将所述音频数据和所述类型为第一类型的第一实现指针发送至客户端;The first JAVA language layer module sends the audio data and the first implementation pointer of the type of the first type to a client;
    所述接收所述客户端发送的所述非低延迟音效音频数据或所述低延迟音效音频数据,对所接收到的音频数据进行播放的步骤,包括:The step of receiving the non-low delay audio effect audio data or the low delay audio effect audio data sent by the client, and playing the received audio data, includes:
    所述第一JAVA语言层模块接收所述客户端发送的所述低延迟音效音频数据和类型为第二类型的第二实现指针,并将所述类型为第二类型的第二实现指针发送至所述第一C语言层模块;The first JAVA language layer module receives the low-latency sound effect audio data sent by the client and a second implementation pointer of a second type, and sends the second implementation pointer of the second type to The first C language layer module;
    所述第一C语言层模块根据所述类型为第一类型的第二实现指针,播放所述非低延迟音效音频数据。The first C language layer module plays the non-low delay audio audio data according to the second implementation pointer of the first type.
  10. 根据权利要求8所述的方法,其中,所述客户端包括第二JAVA语言层模块;The method of claim 8 wherein said client comprises a second JAVA language layer module;
    所述第一JAVA语言层模块将所述音频数据和所述类型为第二类型的第一实现指针发送至客户端的步骤,包括:The step of the first JAVA language layer module sending the audio data and the first implementation pointer of the second type to the client, including:
    所述第一JAVA语言层模块将所述音频数据和所述类型为第二类型的第一实现指针发送至所述第二JAVA语言层模块。The first JAVA language layer module sends the audio data and the first implementation pointer of the second type to the second JAVA language layer module.
  11. 根据权利要求9所述的方法,其中,所述客户端包括第二JAVA语言层模块;The method of claim 9, wherein the client comprises a second JAVA language layer module;
    所述第一JAVA语言层模块将所述音频数据和所述类型为第一类型的第一实现指针发送至客户端的步骤,包括:The step of the first JAVA language layer module sending the audio data and the first implementation pointer of the first type to the client, including:
    所述第一JAVA语言层模块将所述音频数据和所述类型为第一类型的第一实现指针发送至第二JAVA语言层模块。The first JAVA language layer module sends the audio data and the first implementation pointer of the type of the first type to a second JAVA language layer module.
  12. 一种音频数据处理装置,应用于客户端,其中,包括:An audio data processing device is applied to a client, wherein:
    数据接收模块,设置为接收操作系统发送的第一实现指针和音频数据;其中,若当前采用的音效处理模式为非低延迟耳返模式,则所述第一实现指针的类型为第一类型;若当前采用的音效处理模式为低延迟耳返模式,则所述第一实现指针的类型为第二类型;所述第一实现指针为所述操作系统采集到音频数据后发送的;a data receiving module, configured to receive a first implementation pointer and audio data sent by the operating system; wherein, if the currently adopted sound processing mode is a non-low delay ear return mode, the type of the first implementation pointer is a first type; If the currently used sound processing mode is a low-latency ear-back mode, the type of the first implementation pointer is a second type; the first implementation pointer is sent after the operating system collects audio data;
    指针类型判断模块,设置为判断所述第一实现指针的类型;a pointer type determining module, configured to determine a type of the first implementation pointer;
    第一数据处理模块,设置为若判定所述第一实现指针的类型为第一类型,对所接收到的音频数据进行音效处理,得到非低延迟音效音频数据;The first data processing module is configured to: if it is determined that the type of the first implementation pointer is the first type, performing sound effect processing on the received audio data to obtain non-low delay audio effect audio data;
    第一数据发送模块,设置为在得到所述非低延迟音效音频数据之后,生成类型为第一类型的第二实现指针,并将所述第二实现指针及所述非低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述非低延迟音效音频数据进行播放;a first data sending module, configured to generate a second implementation pointer of a first type after the non-low delay audio audio data is obtained, and send the second implementation pointer and the non-low delay audio audio data Up to the operating system, configured to trigger the operating system to play the non-low delay audio audio data according to the second implementation pointer;
    第二数据处理模块,设置为若判定所述第一实现指针的类型为第二类型,通过第一回调函数从所述操作系统中调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;a second data processing module, configured to: if it is determined that the type of the first implementation pointer is a second type, invoke the audio data from the operating system by using a first callback function, and perform sound processing on the audio data to obtain Low latency audio audio data;
    第二数据发送模块,设置为在得到所述低延迟音效音频数据之后,生成类型为第二类型的第二实现指针,并将所述第二实现指针及所述低延迟音效音频数据发送至所述操作系统,用于触发所述操作系统根据所述第二实现指针,对所述低延迟音效音频数据进行播放。a second data sending module, configured to generate a second implementation pointer of a second type after the low-latency audio audio data is obtained, and send the second implementation pointer and the low-latency audio audio data to the The operating system is configured to trigger the operating system to play the low-latency audio audio data according to the second implementation pointer.
  13. 根据权利要求12所述的装置,其中,所述客户端包括第二JAVA语言层模块;The apparatus of claim 12, wherein the client comprises a second JAVA language layer module;
    所述数据接收模块,设置为:The data receiving module is configured to:
    触发所述第二JAVA语言层模块接收操作系统发送的音频数据和第一实现指针。The second JAVA language layer module is triggered to receive the audio data sent by the operating system and the first implementation pointer.
  14. 根据权利要求13所述的装置,其中,所述操作系统包括第一JAVA语言层模块;The apparatus of claim 13, wherein the operating system comprises a first JAVA language layer module;
    所述第一数据发送模块,设置为:The first data sending module is configured to:
    用于触发所述第二JAVA语言层模块接收所述第一JAVA语言层模块发送的音频数据和第一实现指针。And the triggering, by the second JAVA language layer module, the audio data and the first implementation pointer sent by the first JAVA language layer module.
  15. 根据权利要求13所述的装置,其中,所述客户端还包括第二C语言层模块;The apparatus of claim 13, wherein the client further comprises a second C language layer module;
    所述第一数据处理模块,包括:The first data processing module includes:
    第一数据接收单元,设置为若判定所述第一实现指针的类型为第一类型,触发所述第二C语言层模块接收所述第二JAVA语言层模块发送的所述音频数据;The first data receiving unit is configured to: if it is determined that the type of the first implementation pointer is the first type, triggering the second C language layer module to receive the audio data sent by the second JAVA language layer module;
    第一数据处理单元,设置为触发所述第二C语言层模块对所述音频数据进 行音效处理,得到非低延迟音效音频数据;a first data processing unit, configured to trigger the second C language layer module to perform sound processing on the audio data to obtain non-low delay audio audio data;
    所述第一数据处理模块,还包括:The first data processing module further includes:
    第二数据接收单元,设置为若判定所述第一实现指针的类型为第二类型,触发所述第二C语言层模块接收所述第二JAVA语言层模块发送的所述第一实现指针;a second data receiving unit, configured to: if it is determined that the type of the first implementation pointer is a second type, triggering the second C language layer module to receive the first implementation pointer sent by the second JAVA language layer module;
    第二数据处理单元,设置为触发所述第二C语言层模块通过第一回调函数调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据。The second data processing unit is configured to trigger the second C language layer module to call the audio data through the first callback function, and perform sound effect processing on the audio data to obtain low-latency audio audio data.
  16. 根据权利要求15所述的装置,其中,所述操作系统还包括第一C语言层模块;The apparatus of claim 15, wherein the operating system further comprises a first C language layer module;
    所述第二C语言层模块,设置为:The second C language layer module is set to:
    通过第一回调函数,从所述第一C语言层模块调用所述第一C语言层模块采集的音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据。The audio data collected by the first C language layer module is invoked from the first C language layer module by the first callback function, and the audio data is subjected to sound processing to obtain low-latency audio audio data.
  17. 根据权利要求12至16任一项所述的装置,其中,所述第一类型为空NULL,所述第二类型为非NULL。Apparatus according to any one of claims 12 to 16, wherein said first type is null NULL and said second type is non-NULL.
  18. 一种音频数据处理装置,应用于终端的操作系统,其中,所述装置包括:An audio data processing apparatus is applied to an operating system of a terminal, wherein the apparatus comprises:
    数据采集模块,设置为采集音频数据;a data acquisition module configured to collect audio data;
    模式确定模块,设置为从非低延迟耳返模式和低延迟耳返模式中确定出当前采用的音效处理模式;a mode determining module configured to determine a currently used sound effect processing mode from the non-low delay ear return mode and the low delay ear return mode;
    指针生成模块,设置为根据当前采用的音效处理模式,生成第一实现指针,当所述音效处理模式为非低延迟耳返模式时,第一实现指针的类型为第一类型,当所述音效处理模式为低延迟耳返模式时,第一实现指针的类型为第二类型;a pointer generating module, configured to generate a first implementation pointer according to the currently adopted sound processing mode, and when the sound processing mode is a non-low delay earback mode, the first implementation pointer type is a first type, when the sound effect When the processing mode is the low delay ear return mode, the type of the first implementation pointer is the second type;
    数据发送模块,设置为向客户端发送所述第一实现指针和所述音频数据,以使得所述客户端若判定所述第一实现指针的类型为第一类型,获得所述操作系统发送的所述音频数据,对所述音频数据进行音效处理,得到非低延迟音效音频数据,若所述客户端判定所述第一实现指针的类型为第二类型,通过第一回调函数调用所述音频数据,对所述音频数据进行音效处理,得到低延迟音效音频数据;在得到所述非低延迟音效音频数据或所述低延迟音效音频数据后,将所得到的数据反馈给所述操作系统;a data sending module, configured to send the first implementation pointer and the audio data to a client, so that if the client determines that the type of the first implementation pointer is a first type, obtaining the sending by the operating system The audio data is subjected to sound processing on the audio data to obtain non-low delay sound effect audio data. If the client determines that the type of the first implementation pointer is the second type, the audio is called by the first callback function. Data, performing audio processing on the audio data to obtain low-latency audio audio data; after obtaining the non-low-latency audio audio data or the low-latency audio audio data, feeding the obtained data to the operating system;
    数据接收模块,设置为接收所述客户端发送的所述非低延迟音效音频数据或所述低延迟音效音频数据,对所接收到的音频数据进行播放。The data receiving module is configured to receive the non-low delay sound effect audio data or the low delay sound effect audio data sent by the client, and play the received audio data.
  19. 根据权利要求18所述的装置,其中,所述操作系统包括第一C语言层模块和第一JAVA语言层模块;The apparatus of claim 18, wherein the operating system comprises a first C language layer module and a first JAVA language layer module;
    当所述音效处理模式为低延迟耳返模式时,所述数据采集模块,设置为:触发所述第一C语言层模块采集音频数据;The data acquisition module is configured to: trigger the first C language layer module to collect audio data, when the sound processing mode is a low-latency ear-back mode;
    所述指针生成模块,设置为:触发所述第一JAVA语言层模块在接收到所述第一C语言层模块采集的音频数据后,生成类型为第二类型的第一实现指针;The pointer generating module is configured to: trigger the first JAVA language layer module to generate a first implementation pointer of a second type after receiving the audio data collected by the first C language layer module;
    所述数据发送模块,设置为:触发所述第一JAVA语言层模块将所述音频数据和所述类型为第二类型的第一实现指针发送至客户端;The data sending module is configured to: trigger the first JAVA language layer module to send the audio data and the first implementation pointer of the second type to the client;
    所述数据接收模块,设置为:触发所述第一JAVA语言层模块接收所述客户端发送的所述低延迟音效音频数据和类型为第二类型的第二实现指针,并将所述类型为第二类型的第二实现指针发送至所述第一C语言层模块;触发所述第一C语言层模块根据所述类型为第二类型的第二实现指针,播放所述低延迟音效音频数据。The data receiving module is configured to: trigger the first JAVA language layer module to receive the low-latency sound effect audio data sent by the client, and a second implementation pointer of a second type, and the type is Sending, by the first C language layer module, the second implementation pointer of the second type to the first C language layer module, according to the second implementation pointer of the second type, playing the low delay audio audio data .
  20. 根据权利要求18所述的装置,其中,所述操作系统包括第一C语言层模块和第一JAVA语言层模块;The apparatus of claim 18, wherein the operating system comprises a first C language layer module and a first JAVA language layer module;
    当所述音效处理模式为非低延迟耳返模式时,所述数据采集模块,设置为:触发所述第一JAVA语言层模块采集音频数据;The data acquisition module is configured to: trigger the first JAVA language layer module to collect audio data, when the sound processing mode is a non-low delay ear return mode;
    所述指针生成模块,设置为:触发所述第一JAVA语言层模块在采集到音频数据之后,生成类型为第一类型的第一实现指针;The pointer generating module is configured to: trigger the first JAVA language layer module to generate a first implementation pointer of a first type after acquiring audio data;
    所述数据发送模块,设置为:触发所述第一JAVA语言层模块将所述音频数据和所述类型为第一类型的第一实现指针发送至客户端;The data sending module is configured to: trigger the first JAVA language layer module to send the audio data and the first implementation pointer of the type to the first type to the client;
    所述数据接收模块,设置为:触发所述第一JAVA语言层模块接收所述客户端发送的所述低延迟音效音频数据和类型为第二类型的第二实现指针,并将所述类型为第二类型的第二实现指针发送至所述第一C语言层模块;触发所述第一C语言层模块根据所述类型为第一类型的第二实现指针,播放所述非低延迟音效音频数据。The data receiving module is configured to: trigger the first JAVA language layer module to receive the low-latency sound effect audio data sent by the client, and a second implementation pointer of a second type, and the type is Transmitting the second implementation pointer of the second type to the first C language layer module; triggering the first C language layer module to play the non-low delay audio audio according to the second implementation pointer of the type being the first type data.
  21. 根据权利要求19所述的装置,其中,所述客户端包括第二JAVA语言层模块;The apparatus of claim 19, wherein the client comprises a second JAVA language layer module;
    所述数据发送模块,设置为:所述第一JAVA语言层模块将所述音频数据 和所述类型为第二类型的第一实现指针发送至所述第二JAVA语言层模块。The data sending module is configured to: the first JAVA language layer module sends the audio data and the first implementation pointer of the second type to the second JAVA language layer module.
  22. 根据权利要求20所述的装置,其中,所述客户端包括第二JAVA语言层模块;所述数据发送模块,设置为:所述第一JAVA语言层模块将所述音频数据和所述类型为第一类型的第一实现指针发送至第二JAVA语言层模块。The apparatus of claim 20, wherein the client comprises a second JAVA language layer module; the data sending module is configured to: the first JAVA language layer module sets the audio data and the type to A first implementation pointer of the first type is sent to the second JAVA language layer module.
  23. 一种电子设备,其中,包括处理器和存储器;An electronic device including a processor and a memory;
    存储器,设置为存放计算机程序;a memory, configured to store a computer program;
    处理器,设置为执行存储器上所存放的程序时,实现权利要求1-6任一所述的方法步骤。The method steps of any of claims 1-6 are implemented when the processor is configured to execute a program stored on the memory.
  24. 一种电子设备,其中,包括处理器和存储器;An electronic device including a processor and a memory;
    存储器,设置为存放计算机程序;a memory, configured to store a computer program;
    处理器,设置为执行存储器上所存放的程序时,实现权利要求7-11任一所述的方法步骤。The method steps of any of claims 7-11 are implemented when the processor is configured to execute a program stored on the memory.
  25. 一种计算机可读存储介质,其中,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的方法步骤。A computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program being executed by a processor to implement the method steps of any of claims 1-6.
  26. 一种计算机可读存储介质,其中,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求7-11任一所述的方法步骤。A computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program being executed by a processor to implement the method steps of any of claims 7-11.
  27. 一种计算机程序,所述应用程序用于在运行时执行权利要求1-6任一项所述的方法步骤。A computer program for performing the method steps of any of claims 1-6 at runtime.
  28. 一种计算机程序,所述应用程序用于在运行时执行权利要求7-11任一项所述的方法步骤。A computer program for performing the method steps of any of claims 7-11 at runtime.
PCT/CN2018/125945 2018-01-31 2018-12-30 Audio data processing method, apparatus, electronic device and storage medium WO2019149017A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810099469.3 2018-01-31
CN201810099469.3A CN110096250B (en) 2018-01-31 2018-01-31 Audio data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2019149017A1 true WO2019149017A1 (en) 2019-08-08

Family

ID=67443372

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/125945 WO2019149017A1 (en) 2018-01-31 2018-12-30 Audio data processing method, apparatus, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN110096250B (en)
WO (1) WO2019149017A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023160100A1 (en) * 2022-02-25 2023-08-31 海信视像科技股份有限公司 Display device, external device, and audio playing and sound effect processing method
CN114615536B (en) * 2022-02-25 2024-05-28 海信视像科技股份有限公司 Display device and sound effect processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192203A (en) * 2006-11-30 2008-06-04 中兴通讯股份有限公司 Mobile phones audio frequency playing method
CN102484757A (en) * 2009-09-03 2012-05-30 罗伯特·博世有限公司 Delay unit for a conference audio system, method for delaying audio input signals, computer program and conference audio system
CN105786441A (en) * 2016-01-29 2016-07-20 腾讯科技(深圳)有限公司 Audio processing method, server, user equipment and system
CN106293659A (en) * 2015-05-21 2017-01-04 阿里巴巴集团控股有限公司 A kind of audio frequency real-time processing method, device and intelligent terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710857A (en) * 2012-05-24 2012-10-03 武汉诚迈科技有限公司 Karaoke method suitable for android smart phone
US9445184B2 (en) * 2013-12-03 2016-09-13 Bose Corporation Active noise reduction headphone
CN106325804B (en) * 2015-07-03 2019-05-31 深圳市中兴微电子技术有限公司 Audio-frequency processing method and system
CN106205580B (en) * 2016-06-30 2019-07-26 维沃移动通信有限公司 A kind of audio data processing method and terminal
CN107329726B (en) * 2017-06-09 2020-09-01 海信视像科技股份有限公司 Method and device for processing input audio data in Android system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192203A (en) * 2006-11-30 2008-06-04 中兴通讯股份有限公司 Mobile phones audio frequency playing method
CN102484757A (en) * 2009-09-03 2012-05-30 罗伯特·博世有限公司 Delay unit for a conference audio system, method for delaying audio input signals, computer program and conference audio system
CN106293659A (en) * 2015-05-21 2017-01-04 阿里巴巴集团控股有限公司 A kind of audio frequency real-time processing method, device and intelligent terminal
CN105786441A (en) * 2016-01-29 2016-07-20 腾讯科技(深圳)有限公司 Audio processing method, server, user equipment and system

Also Published As

Publication number Publication date
CN110096250B (en) 2020-05-29
CN110096250A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
JP6641430B2 (en) Multi-device interaction method, device, device and program
US9653083B2 (en) Data processing method and system
CN110832579B (en) Audio playing system, streaming audio player and related methods
US10089988B2 (en) Techniques to provide a standard interface to a speech recognition platform
US8019276B2 (en) Audio transmission method and system
WO2016180100A1 (en) Method and device for improving audio processing performance
JP6999631B2 (en) Audio processing methods, devices, electronic devices and storage media
CN106791244B (en) Echo cancellation method and device and call equipment
JP6971292B2 (en) Methods, devices, servers, computer-readable storage media and computer programs for aligning paragraphs and images
US10490203B2 (en) Echo cancellation for keyword spotting
WO2019149017A1 (en) Audio data processing method, apparatus, electronic device and storage medium
WO2022110943A1 (en) Speech preview method and apparatus
WO2020125074A1 (en) Message arrival rate determination method and device, data statistics server and storage medium
WO2022142619A1 (en) Method and device for private audio or video call
WO2018014696A1 (en) Method and apparatus for sending and receiving voice of browser, and voice intercom system
US20240177726A1 (en) Speech enhancement
JP2001282261A (en) Speech data setting device and method, speech data forming device and method, recording medium
WO2020103562A1 (en) Voice processing method and apparatus
WO2020125325A1 (en) Method for eliminating echo and device
JP2023553554A (en) Heterogeneous computing systems and methods for clock synchronization
US10693944B1 (en) Media-player initialization optimization
TWI223231B (en) Digital audio with parameters for real-time time scaling
US10699729B1 (en) Phase inversion for virtual assistants and mobile music apps
WO2022227625A1 (en) Signal processing method and apparatus
WO2022160669A1 (en) Audio processing method and audio processing apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18903361

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 181120)

122 Ep: pct application non-entry in european phase

Ref document number: 18903361

Country of ref document: EP

Kind code of ref document: A1