Search

CN-121996188-A - Audio data transmission method, electronic device, and storage medium

CN121996188ACN 121996188 ACN121996188 ACN 121996188ACN-121996188-A

Abstract

The embodiment of the application discloses an audio data sending method, electronic equipment and a storage medium. Based on the audio data sending method in the embodiment of the application, the application audio data obtained by processing the received initial audio data by each virtual sound card is stored in the corresponding buffer space, and the access address of the buffer space is sent to the target application, so that the target application accesses the application audio data required by the target application according to the access address. The finally available application audio data only needs to be stored once after the virtual sound card is generated, only access address information needs to be transmitted between a target application needing to use the application audio data and the virtual sound card, and the target application can acquire the needed data from the cache space according to the access address information, so that the data transmission amount among different data processing nodes is reduced, and the data transmission and storage efficiency is improved.

Inventors

  • YANG ZILONG

Assignees

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

Dates

Publication Date
20260508
Application Date
20241104

Claims (10)

  1. 1. An audio data transmission method, comprising: The method comprises the steps that initial audio data received by an entity sound card from each sound source device are distributed to a virtual sound card for processing to obtain application audio data, and the virtual sound card corresponds to the sound source devices one by one; Storing the application audio data corresponding to each virtual sound card into a pre-associated cache space; And sending the access address of the buffer memory space corresponding to each virtual sound card to a target application, so that the target application reads data according to at least one access address to obtain application audio data for application processing, wherein the target application is an application requesting the initial audio data.
  2. 2. The audio data transmission method according to claim 1, wherein each of the sound source devices is correspondingly connected to an audio channel of the physical sound card, and each of the virtual sound cards is configured with an audio channel of the corresponding sound source device and a corresponding sound source device type.
  3. 3. The audio data transmission 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.
  4. 4. The audio data transmission method according to claim 1, wherein the sound source device type includes a line input device and a microphone.
  5. 5. The audio data transmission method according to claim 4, wherein the target application comprises an echo cancellation application; correspondingly, the sending the access address of the buffer memory space corresponding to each virtual sound card to the target application, so that the target application reads data according to at least one access address, obtains application audio data, and performs application processing, including: And sending the access address of the buffer memory space corresponding to each virtual sound card to an echo cancellation application, so that the echo cancellation application can read data according to the access address of the buffer memory space corresponding to the virtual sound card corresponding to the line input device and the microphone, and obtain application audio data for echo cancellation processing.
  6. 6. The audio data transmission method according to claim 1, wherein the transmitting the access address of the buffer space corresponding to each virtual sound card to the target application, so that the target application reads data according to at least one access address, and obtains application audio data for application processing, includes: And under the condition that the request type is an exclusive request, sending the access address of the corresponding cache space to the target application corresponding to the exclusive request through each virtual sound card, so that the target application corresponding to the exclusive request reads data according to at least one access address, and obtaining application audio data for application processing.
  7. 7. The audio data transmission method according to claim 1, wherein each of the virtual sound cards configures a plurality of audio channels, and the audio channels configured by different virtual sound cards are different.
  8. 8. The audio data transmission method according to claim 1, 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 transmission method of any 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 transmission method according to any one of claims 1 to 8.

Description

Audio data transmission 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 sending 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 finds that when researching the process of processing the audio data provided by the sound source device through the sound card by the application layer, the application layer receives the audio data provided by the sound source device from the sound card to the application layer finally receives the available audio data, and needs to perform fixed data processing and sending for many times, and the application layer can only receive part of original audio data through data transmission for many times. Disclosure of Invention The invention provides an audio data transmitting method, electronic equipment and a storage medium, which are used for solving the technical problems that the application layer only can receive part of original audio data through multiple data transmission due to the fact that multiple fixed data processing and transmitting are needed when the audio data provided by a sound source device are received from a sound card to the application layer and finally available audio data are received. In a first aspect, an embodiment of the present application provides an audio data transmission method, including: the method comprises the steps that initial audio data received by an entity sound card from each sound source device are distributed to a virtual sound card for processing to obtain application audio data, and the virtual sound card corresponds to the sound source devices one by one; Storing the application audio data corresponding to each virtual sound card into a pre-associated cache space; and sending the access address of the buffer memory space corresponding to each virtual sound card to a target application, so that the target application reads data according to at least one access address, obtains application audio data, processes the application audio data, and the target application is an application requesting initial audio data. And storing the application audio data obtained by processing the received initial audio data by each virtual sound card into the corresponding buffer space, and sending the access address of the buffer space to the target application so that the target application accesses the application audio data required by the target application according to the access address. The finally available application audio data only needs to be stored once after the virtual sound card is generated, only access address information needs to be transmitted between a target application needing to use the application audio data and the virtual sound card, and the target application can acquire the needed data from the cache space according to the access address information, so that the data transmission amount among different data processing nodes is reduced, and the data transmission and storage efficiency is improved. Each sound source device is correspondingly connected with the audio channel of the physical sound card, and each virtual sound card is configured with the audio channel of the corresponding sound source device and the corresponding sound source device type. The sound source device corresponds to the height of the audio channel of the physical sound card, and the virtual sound card is fixed to quickly acquire audio data from the configured audio channel. 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. Wherein the sound source device type includes a line input device and a microphone. The configuration of the line input device and the sound source device of the microphone can realize the efficient communication in a manner of taking voice as information transfer at the near end and the far end aiming at the conference scene. Wherein the target application comprises an echo cancellation application; Correspondingly, the access address of the buffer memory space corresponding to each virtual sound card is sent to the target application, so that the target application reads data acc