Search

CN-121996189-A - Audio data processing method, electronic device and storage medium

CN121996189ACN 121996189 ACN121996189 ACN 121996189ACN-121996189-A

Abstract

The embodiment of the application discloses an audio data processing method, electronic equipment and a storage medium. According to the audio data processing method, initial audio data received by the entity sound card from each sound source device are distributed to the corresponding virtual sound card according to the corresponding relation between the preset audio channel and the virtual sound card to be processed to obtain application audio data, each virtual sound card presents the corresponding sound source device type actually associated with the corresponding audio channel to a target application and sends the corresponding application audio data respectively, the target application can receive all the audio data received by the entity sound card from each audio channel, and flexibly select and use the audio data according to application requirements of the target application, so that the audio data use requirements of various applications can be met.

Inventors

  • LI LINRONG

Assignees

  • 广州视源电子科技股份有限公司
  • 广州视睿电子科技有限公司

Dates

Publication Date
20260508
Application Date
20241104

Claims (10)

  1. 1. An audio data processing method, comprising: acquiring initial audio data received by each audio channel through an entity sound card; Distributing initial audio data from the same sound source device to corresponding virtual sound cards for processing to obtain application audio data, wherein each virtual sound card is configured with a corresponding audio channel and a corresponding sound source device type; And sending the corresponding application audio data to a target application through each virtual sound card so that the target application carries out application processing on the application audio data corresponding to at least one sound source device, wherein the target application is an application requesting the initial audio data.
  2. 2. The audio data processing method according to claim 1, wherein the corresponding audio channels and the corresponding sound source device types configured by the virtual sound card are obtained by analyzing a preset configuration file through a preset function.
  3. 3. The audio data processing method according to claim 1, wherein the target application acquires the sound source device type corresponding to each virtual sound card by calling an acquisition interface of the sound source device type of the audio manager.
  4. 4. The audio data processing method according to claim 1, wherein the application process includes one or more of a mixing process, a remote transmission process, a playback process, an echo cancellation process, a noise reduction process, and a sound source localization process.
  5. 5. The method for processing audio data according to claim 1, wherein said transmitting, by each of the virtual sound cards, the corresponding application audio data to the target application to cause the target application to perform application processing on the application audio data corresponding to the at least one sound source device, comprises: And under the condition that the type of the request is an exclusive request, the corresponding initial audio data is sent to the target application corresponding to the exclusive request through each virtual sound card, so that the target application corresponding to the exclusive request carries out application processing on the application audio data corresponding to at least one sound source device.
  6. 6. The audio data processing method of claim 1, wherein each virtual sound card configures a plurality of audio channels, and wherein the audio channels configured by different virtual sound cards are different.
  7. 7. The audio data processing method of claim 1, wherein the sound source device type comprises a microphone, a projector interface, and at least one line input.
  8. 8. The audio data processing method according to claim 7, wherein the virtual sound card is provided in the form of a card.
  9. 9. An electronic device, comprising: One or more processors; A memory for storing one or more computer programs; When executed by the one or more processors, causes the electronic device to implement the audio data processing method as recited in any one of claims 1-8.
  10. 10. Computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the audio data processing method according to any of claims 1-8.

Description

Audio data processing method, electronic device and storage medium Technical Field The embodiment of the application relates to the technical field of audio, in particular to an audio data processing method, electronic equipment and a storage medium. Background With the continuous development and popularization of information technology, various types of electronic devices are continuously emerging. In an electronic device, accessing audio data provided by a sound source device through a sound card and inputting audio data to be played to a sound playing device are a common way for users to realize information receiving and sending in the process of using the electronic device. The inventor researches the existing electronic device based on the Android platform, and discovers that the application layer can only select one of the audio data provided by a plurality of sound source devices to use when the application layer processes the audio data provided by the sound source device received through the sound card, and the use of the audio data in the application layer is limited. Disclosure of Invention The invention provides an audio data processing method, electronic equipment and a storage medium, which are used for solving the technical problem that an application layer can only select one of audio data provided by a plurality of sound source devices. In a first aspect, an embodiment of the present application provides an audio data processing method, including: acquiring initial audio data received by each audio channel through an entity sound card; Distributing the initial audio data from the same sound source device to corresponding virtual sound cards for processing to obtain application audio data, wherein each virtual sound card is configured with a corresponding audio channel and a corresponding sound source device type; And sending the corresponding application audio data to a target application through each virtual sound card so that the target application carries out application processing on the application audio data corresponding to at least one sound source device, wherein the target application is an application requesting initial audio data. According to the initial audio data received by the entity sound card from each sound source device, the initial audio data are distributed to the corresponding virtual sound cards according to the corresponding relation between the preset audio channels and the virtual sound cards to be processed to obtain application audio data, each virtual sound card presents the sound source device type actually associated with the corresponding audio channel to the target application and respectively sends the corresponding application audio data, and the target application can receive all the audio data received by the entity sound card from each audio channel, flexibly select and use the audio data from all the audio data according to application requirements of the target application and can meet the audio data use requirements of various applications. The virtual sound card is configured to obtain a corresponding audio channel and a corresponding sound source device type through analyzing a preset configuration file through a preset function. The configuration file is analyzed through the preset function to obtain the audio channels corresponding to the virtual sound cards, and the configuration of the audio channels can be flexibly adjusted according to the needs in the configuration file. The target application acquires the sound source device type corresponding to each virtual sound card by calling an acquisition interface of the sound source device type of the audio manager. On the basis of the audio data processing architecture of the system, the type of the sound source equipment can be rapidly acquired through the interface provided by the audio manager, and the audio data can be accurately applied. The application process includes one or more of a mixing process, a remote transmission process, a playing process, an echo cancellation process, a noise reduction process, and a sound source positioning process. On the basis of comprehensively acquiring all the audio data, the audio data can be flexibly processed according to the requirements. The method for transmitting the application audio data to the target application through each virtual sound card so that the target application can process the application audio data corresponding to at least one sound source device comprises the following steps: and under the condition that the request type is an exclusive request, uniquely sending the corresponding initial audio data to a target application corresponding to the exclusive request through each virtual sound card, so that the target application corresponding to the exclusive request carries out application processing on the application audio data corresponding to at least one sound source device. According to the request type of the target application