CN113763970A - Audio transmission method and device and audio transmission equipment - Google Patents

Audio transmission method and device and audio transmission equipment Download PDF

Info

Publication number
CN113763970A
CN113763970A CN202111045440.5A CN202111045440A CN113763970A CN 113763970 A CN113763970 A CN 113763970A CN 202111045440 A CN202111045440 A CN 202111045440A CN 113763970 A CN113763970 A CN 113763970A
Authority
CN
China
Prior art keywords
audio
sampling rate
bit depth
parameters
list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111045440.5A
Other languages
Chinese (zh)
Other versions
CN113763970B (en
Inventor
彭伟中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fiio Electronics Technology Co ltd
Original Assignee
Fiio Electronics Technology Co ltd
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 Fiio Electronics Technology Co ltd filed Critical Fiio Electronics Technology Co ltd
Priority to CN202111045440.5A priority Critical patent/CN113763970B/en
Publication of CN113763970A publication Critical patent/CN113763970A/en
Application granted granted Critical
Publication of CN113763970B publication Critical patent/CN113763970B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/167Audio streaming, i.e. formatting and decoding of an encoded audio signal representation into a data stream for transmission or storage purposes
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/008Multichannel audio signal coding or decoding using interchannel correlation to reduce redundancy, e.g. joint-stereo, intensity-coding or matrixing
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes
    • G10L19/20Vocoders using multiple modes using sound class specific coding, hybrid encoders or object based coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Mathematical Physics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application provides an audio transmission method, an audio transmission device and audio transmission equipment. The audio transmission method comprises the following steps: acquiring data parameters of audio to be transmitted and configuration parameters of a USB sound card; if the data parameters are matched with the configuration parameters and the coding mode of the audio is direct data signal stream coding, transmitting the audio to first audio playing equipment; and if the data parameters and the configuration parameters are not adaptive or the coding mode of the audio is not direct data signal stream coding, transmitting the audio to second audio playing equipment. According to the method and the device, the data parameters of the audio to be transmitted and the configuration parameters of the USB sound card are firstly obtained, and then the corresponding transmission method is selected according to whether the data parameters of the audio to be transmitted and the configuration parameters of the USB sound card are the same or not. The audio transmission method does not need to limit the data parameters of the audio to be consistent with the configuration parameters of the USB sound card, and the data format of the audio which can be transmitted by the USB sound card is less limited and has high flexibility.

Description

Audio transmission method and device and audio transmission equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an audio transmission method and apparatus, and an audio transmission device.
Background
With the continuous development of audio transmission technology and the popularization of mobile terminal equipment, a sound card for transmitting audio streams is installed on the mobile terminal equipment, and audio playing can be realized through the mobile terminal with the sound card. In order to meet the requirement of users for pursuing high-quality audio, how to control a sound card to transmit audio becomes a very interesting problem in the technical field of audio transmission.
In the prior art, when audio is transmitted, configuration information of a sound card is acquired first, and then the audio is transmitted and transmitted according to the configuration information of the sound card. In the existing audio transmission method, the data format of the audio supported by the sound card corresponds to the configuration information of the sound card, and the configuration of the sound card is relatively fixed, so that the data format of the audio capable of being transmitted by the sound card is greatly limited and the flexibility is not high during audio transmission.
Disclosure of Invention
In order to solve the above technical problem, the present application provides an audio transmission method, an audio transmission device, and an audio transmission apparatus, and the specific scheme is as follows:
in a first aspect, an embodiment of the present application provides an audio transmission method, where the method includes:
acquiring data parameters of audio to be transmitted and configuration parameters of a USB sound card;
if the data parameters are matched with the configuration parameters and the coding mode of the audio is direct data signal stream coding, transmitting the audio to first audio playing equipment;
and if the data parameters are not adaptive to the configuration parameters or the coding mode of the audio is not direct data signal stream coding, transmitting the audio to a second audio playing device.
According to a specific embodiment of the present disclosure, the data parameters include a sampling rate and a bit depth, and the configuration parameters include a sampling rate list and a bit depth list.
According to a specific embodiment disclosed in the present application, the step of determining whether the data parameter and the configuration parameter are adapted includes:
judging whether the sampling rate and the bit depth of the audio respectively belong to a sampling rate list and a bit depth list of the USB sound card;
if the sampling rate and the bit depth of the audio frequency respectively belong to the sampling rate list and the bit depth list of the USB sound card, judging that the data parameters are matched with the configuration parameters;
and if the sampling rate of the audio to be transmitted does not belong to the sampling rate list and/or the bit depth of the audio to be transmitted does not belong to the bit depth list, judging that the data parameters are not adaptive to the configuration parameters.
According to a specific embodiment disclosed in the present application, if the data parameter is not adapted to the configuration parameter, the step of transmitting the audio to be transmitted to the second audio playing device includes:
respectively randomly selecting a target sampling rate and a target bit depth from the sampling rate list and the bit depth list;
recoding the audio to be transmitted according to the target sampling rate and the target bit depth to obtain a target audio;
and transmitting the target audio to a second audio playing device.
According to a specific embodiment of the present disclosure, the step of transmitting the audio to the first audio playing device includes:
executing an audio transmission process through a first thread, wherein the audio transmission process is used for transmitting the audio to a first audio playing device;
the step of transmitting the audio to a second audio playing device includes:
executing an audio transmission process through a second thread, wherein the audio transmission process is used for transmitting the audio to a second audio playing device;
the first thread and the second thread are any two parallel threads in an audio transmission process.
In a second aspect, an embodiment of the present application provides an audio transmission apparatus, including:
the acquisition module is used for acquiring data parameters of audio to be transmitted and configuration parameters of the USB sound card;
a transmission module, configured to transmit the audio to a first audio playing device if the data parameter is adapted to the configuration parameter and the audio coding mode is direct data stream coding;
and if the data parameters are not adaptive to the configuration parameters or the audio sampling mode is not direct data signal stream coding, transmitting the audio to a second audio playing device.
According to a specific embodiment disclosed in the present application, the apparatus further comprises:
the judging module is used for judging whether the sampling rate and the bit depth of the audio respectively belong to the sampling rate list and the bit depth list of the USB sound card;
if the sampling rate and the bit depth of the audio frequency respectively belong to the sampling rate list and the bit depth list of the USB sound card, judging that the data parameters are matched with the configuration parameters;
and if the sampling rate of the audio to be transmitted does not belong to the sampling rate list and/or the bit depth of the audio to be transmitted does not belong to the bit depth list, judging that the data parameters are not adaptive to the configuration parameters.
According to a specific embodiment disclosed in the present application, the transmission module is specifically configured to transmit the audio to a first audio playing device through a first thread;
or, the audio is transmitted to a second audio playing device through a second thread;
the first thread and the second thread are any two parallel threads in an audio transmission process.
In a third aspect, an embodiment of the present application provides an audio transmission device, where the audio transmission device includes a processor and a memory, where the memory stores a computer program, and the computer program, when executed on the processor, implements the audio transmission method described in any one of the embodiments of the first aspect.
In a fourth aspect, this application provides a computer-readable storage medium storing a computer program, which when executed on a processor implements the audio transmission method described in any one of the embodiments of the first aspect.
Compared with the prior art, the method has the following beneficial effects:
according to the method and the device, the data parameters of the audio to be transmitted and the configuration parameters of the USB sound card are firstly obtained, and then the corresponding transmission method is selected according to whether the data parameters of the audio to be transmitted and the configuration parameters of the USB sound card are the same or not. The audio transmission method does not need to limit the data parameters of the audio to be consistent with the configuration parameters of the USB sound card, and the data format of the audio which can be transmitted by the USB sound card is less limited and has high flexibility.
Drawings
In order to more clearly explain the technical solutions of the present application, the drawings needed to be used in the embodiments are briefly introduced below, and it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope of protection of the present application. Like components are numbered similarly in the various figures.
Fig. 1 is a schematic flowchart of an audio transmission method according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a pulse density modulation principle involved in an audio transmission method according to an embodiment of the present application;
fig. 3 is a block diagram of an audio transmission apparatus according to an embodiment of the present disclosure;
fig. 4 is a second block diagram of an audio transmission apparatus according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present application, are intended to indicate only specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the present application belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, a schematic flow chart of an audio transmission method provided in an embodiment of the present application is shown in fig. 1, where the method mainly includes:
step S101, acquiring data parameters of the audio to be transmitted and configuration parameters of the USB sound card.
When the USB sound card is connected to the audio transmission equipment, the interface of the audio transmission equipment can automatically acquire the configuration parameters of the USB sound card. The audio transmission device may be various mobile terminal devices such as a computer and a mobile phone, which can be configured with a sound card, and is not limited specifically here. The configuration parameters of the USB sound card include, but are not limited to, a sampling rate list, a bit depth list, and supported DSD transmission interfaces supported by the USB sound card. Through the interface of the audio transmission device, the data parameters of the audio to be transmitted can also be automatically acquired, and the data parameters include, but are not limited to, the sampling rate and bit depth of the audio.
The sampling rate and bit depth are two dimensions of the digital audio. Recording sound digitally requires multiple samples. The sampling rate is the number of times of sampling the sound waveform in 1 second, and the higher the sampling rate is, the clearer and more concrete the recording of the sound shape is. Typically, the standard sampling rate for VCD is 44100HZ and for DVD is 48000 HZ. And the bit depth is used to record the dynamic range of sound loudness. The range of the volume from maximum to minimum is the dynamic range. The larger the bit depth is, the more obvious the volume contrast of the sound is, and the richer the hierarchy is. A 16Bit can provide a dynamic range of 96db, with an increase in loudness range of approximately 6db for each increase in quantization accuracy of one Bit; a 24Bit can provide a dynamic range of 144 db.
The sampling rate determines the morphology or accuracy of the sound and the bit rate determines the loudness range or dynamic range of the sound. The high sampling rate can accurately transmit the texture of music, and the high bit rate can completely transmit the emotional intensity in the music. When recording audio, properly adjusting some parameters higher in the range supported by hardware devices such as a microphone and a sound card can make the recording of audio better. However, in the prior art, the playing or transmission process of the audio is subject to the limit value of the sound card configuration, and if the data parameters such as the sampling rate and the bit depth of the recorded audio are not matched with the configuration parameters of the sound card, audio distortion is caused.
Step S102, if the data parameter is adapted to the configuration parameter and the coding mode of the audio is direct data signal stream coding, transmitting the audio to a first audio playing device.
After the data parameters of the audio to be transmitted and the configuration parameters of the USB sound card are obtained, whether the data parameters are matched with the configuration parameters or not is judged, and then corresponding specific transmission methods are selected to transmit the audio respectively according to 'the data parameters are matched with the configuration parameters' and 'the data parameters are not matched with the configuration parameters'.
And when the sampling rate and the bit depth of the audio frequency belong to the sampling rate list and the bit depth list supported by the USB sound card respectively, judging that the data parameters are matched with the configuration parameters. After the data parameters are judged to be adaptive to the configuration parameters, whether the coding mode of the audio is Direct Stream Digital (DSD) coding is further judged, and if the audio is coded through DSD, an audio transmission process is executed through a preset first thread, wherein the audio transmission process is used for transmitting the audio to a first audio playing device.
DSD and Pulse-code modulation (PCM) are two different audio coding formats. The PCM divides the intensity of the signal into several segments according to the same pitch and then quantizes it with a unique binary value. The DSD is most different from the PCM in that it is implemented based on pulse-density modulation (PDM). Referring to fig. 2, fig. 2 is a schematic diagram of a pulse density modulation principle involved in an audio transmission method according to an embodiment of the present application. The PDM represents the analog audio signal by density, and the PDM has a 1-bit precision per sample. The larger bit rate of the DSD may lead to richer sound details relative to the PCM, and the DSD is able to record more audio data and possess a wider frequency response.
In specific implementation, "after the data parameter is determined to be adapted to the configuration parameter, it is further determined whether the coding mode of the audio is the direct data signal stream coding" or "determine whether the coding mode of the audio is the PCM coding" or other coding modes, such as the DOP, according to the user requirement or the actual configuration parameter of the sound card, the "determining whether the coding mode of the audio is the direct data signal stream coding" may be changed to "determine whether the coding mode of the audio is the PCM coding" or other coding modes, such as the DOP, which is not specifically limited herein.
Step S103, if the data parameter is not adapted to the configuration parameter or the encoding mode of the audio is not direct data stream encoding, transmitting the audio to a second audio playing device.
In specific implementation, if the sampling rate of the audio to be transmitted does not belong to the sampling rate list and/or the bit depth of the audio to be transmitted does not belong to the bit depth list, it is determined that the data parameters are not adapted to the configuration parameters. Further, a target sampling rate and a target bit depth can be randomly selected from a sampling rate list and a bit depth list supported by the USB device, the audio to be transmitted is re-encoded according to the target sampling rate and the target bit depth to obtain a target audio, and then the target audio is transmitted to the second audio playing device. Or, although the sampling rate and the bit depth of the audio respectively belong to the sampling rate list and the bit depth list supported by the USB sound card, the encoding mode of the audio is not consistent with the preset encoding mode, for example, the encoding mode of the audio is not direct data stream encoding, and the audio may also be transmitted to the second audio playing device. The first audio playing device and the first audio playing device are music or audio playing devices which have the same function and can be replaced with each other. The first audio playing device and the operation that the first audio playing device can perform on the received audio include, but are not limited to, decoding, playing or storing, and are not specifically limited herein.
Most audio samples are either 48000Hz or 44100Hz, and therefore most USB sound card configuration parameters will include both. However, the data formats of different audios are different, and if the data parameters such as the sampling Rate and the bit depth of the audio to be transmitted are not consistent with the configuration parameters of the USB sound card, the sampling Rate of the audio may be converted through resampling (SRC for short), so that the audio that is originally not adapted to the sampling Rate supported by the USB sound card is converted into the audio that can be supported by the USB sound card.
In specific implementation, the step of "transmitting the target audio to the second audio playing device" may execute an audio transmission process through the second thread, where the audio transmission process is used to transmit the audio to the second audio playing device. The first thread and the second thread are any two parallel threads in the audio transmission process. Specifically, a thread refers to an execution unit in a process, which is responsible for executing a program in a current process, and at least one thread is provided in one process. If there are multiple threads in a process, the application may also be referred to as a multithreaded program. According to the method and the device, after whether the data parameters of the audio to be transmitted are consistent with the configuration parameters of the USB sound card or not is judged, the process of transmitting the audio is executed by adopting different threads according to different judgment results, the use efficiency of resources can be improved, and the operation efficiency and the overall processing performance of the audio transmission equipment are further improved.
According to the audio transmission method, the data parameters of the audio to be transmitted and the configuration parameters of the USB sound card are obtained, and then whether the data parameters are matched with the configuration parameters or not is judged. If the data parameters are matched with the configuration parameters and the coding mode of the audio is direct data signal stream coding, the audio is processed through a first thread and is transmitted to first audio playing equipment; and if the data parameters are not matched with the configuration parameters or the coding mode of the audio is not the direct data signal stream coding and is resampled, the audio is processed by a second thread and is transmitted to second audio playing equipment. The audio transmission method does not need to limit the data parameters of the audio to be consistent with the configuration parameters of the USB sound card, the data format of the audio which can be transmitted by the USB sound card is less limited, the flexibility is high, different threads can be adopted to execute the process of transmitting the audio according to different judgment results, and the use efficiency of resources can be improved.
Corresponding to the above method embodiment, referring to fig. 3, the present application further provides an audio transmission device 300, where the audio transmission device 300 includes:
an obtaining module 301, configured to obtain data parameters of an audio to be transmitted and configuration parameters of a USB sound card;
a transmission module 302, configured to transmit the audio to a first audio playing device if the data parameter is adapted to the configuration parameter and the encoding mode of the audio is direct data stream encoding;
and if the data parameters are not adaptive to the configuration parameters or the audio sampling mode is not direct data signal stream coding, transmitting the audio to a second audio playing device.
Referring to fig. 4, in an implementation, the audio transmission apparatus 300 further includes:
a judging module 303, configured to judge whether the sampling rate and the bit depth of the audio respectively belong to a sampling rate list and a bit depth list of the USB sound card;
if the sampling rate and the bit depth of the audio frequency respectively belong to the sampling rate list and the bit depth list of the USB sound card, judging that the data parameters are matched with the configuration parameters;
and if the sampling rate of the audio to be transmitted does not belong to the sampling rate list and/or the bit depth of the audio to be transmitted does not belong to the bit depth list, judging that the data parameters are not adaptive to the configuration parameters.
In specific implementation, the transmission module 302 is specifically configured to transmit the audio to a first audio playing device through a first thread;
or, the audio is transmitted to a second audio playing device through a second thread;
the first thread and the second thread are any two parallel threads in an audio transmission process.
Furthermore, an audio transmission device is provided, comprising a processor and a memory, the memory storing a computer program, the computer program implementing the audio transmission method described above when executed on the processor.
Furthermore, a computer-readable storage medium is provided, which stores a computer program, which when executed on a processor implements the above-described audio transmission method.
According to the audio transmission device, the audio transmission equipment and the computer readable storage medium, whether the data parameters are matched with the configuration parameters or not is judged by acquiring the data parameters of the audio to be transmitted and the configuration parameters of the USB sound card. If the data parameters are matched with the configuration parameters and the coding mode of the audio is direct data signal stream coding, the audio is processed through a first thread and is transmitted to first audio playing equipment; and if the data parameters are not matched with the configuration parameters or the coding mode of the audio is not the direct data signal stream coding and is resampled, the audio is processed by a second thread and is transmitted to second audio playing equipment. By the technical means, the data parameters of the audio do not need to be limited to be consistent with the configuration parameters of the USB sound card, the data format of the audio which can be transmitted by the USB sound card is less limited, the flexibility is high, different threads can be adopted to execute the process of transmitting the audio according to different judgment results, and the use efficiency of resources can be improved.
For specific implementation processes of the audio transmission device and the computer-readable storage medium, reference may be made to the specific implementation processes of the audio transmission method provided in the foregoing embodiments, and details are not repeated here.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing an audio transmission device (which may be a smart phone, a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (10)

1. A method of audio transmission, the method comprising:
acquiring data parameters of audio to be transmitted and configuration parameters of a USB sound card;
if the data parameters are matched with the configuration parameters and the coding mode of the audio is direct data signal stream coding, transmitting the audio to first audio playing equipment;
and if the data parameters are not adaptive to the configuration parameters or the coding mode of the audio is not direct data signal stream coding, transmitting the audio to a second audio playing device.
2. The method of claim 1, wherein the data parameters comprise a sampling rate and a bit depth, and wherein the configuration parameters comprise a sampling rate list and a bit depth list.
3. The method according to claim 2, wherein the step of determining whether the data parameter and the configuration parameter are adapted comprises:
judging whether the sampling rate and the bit depth of the audio respectively belong to a sampling rate list and a bit depth list of the USB sound card;
if the sampling rate and the bit depth of the audio frequency respectively belong to the sampling rate list and the bit depth list of the USB sound card, judging that the data parameters are matched with the configuration parameters;
and if the sampling rate of the audio to be transmitted does not belong to the sampling rate list and/or the bit depth of the audio to be transmitted does not belong to the bit depth list, judging that the data parameters are not adaptive to the configuration parameters.
4. The method according to claim 3, wherein the step of transmitting the audio to be transmitted to a second audio playback device if the data parameter is not adapted to the configuration parameter comprises:
respectively randomly selecting a target sampling rate and a target bit depth from the sampling rate list and the bit depth list;
recoding the audio to be transmitted according to the target sampling rate and the target bit depth to obtain a target audio;
and transmitting the target audio to a second audio playing device.
5. The method of claim 1, wherein the step of transmitting the audio to a first audio playback device comprises:
executing an audio transmission process through a first thread, wherein the audio transmission process is used for transmitting the audio to a first audio playing device;
the step of transmitting the audio to a second audio playing device includes:
executing an audio transmission process through a second thread, wherein the audio transmission process is used for transmitting the audio to a second audio playing device;
the first thread and the second thread are any two parallel threads in an audio transmission process.
6. An audio transmission apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring data parameters of audio to be transmitted and configuration parameters of the USB sound card;
a transmission module, configured to transmit the audio to a first audio playing device if the data parameter is adapted to the configuration parameter and the audio coding mode is direct data stream coding;
and if the data parameters are not adaptive to the configuration parameters or the audio sampling mode is not direct data signal stream coding, transmitting the audio to a second audio playing device.
7. The apparatus of claim 6, further comprising:
the judging module is used for judging whether the sampling rate and the bit depth of the audio respectively belong to the sampling rate list and the bit depth list of the USB sound card;
if the sampling rate and the bit depth of the audio frequency respectively belong to the sampling rate list and the bit depth list of the USB sound card, judging that the data parameters are matched with the configuration parameters;
and if the sampling rate of the audio to be transmitted does not belong to the sampling rate list and/or the bit depth of the audio to be transmitted does not belong to the bit depth list, judging that the data parameters are not adaptive to the configuration parameters.
8. The apparatus according to claim 7, wherein the transmission module is specifically configured to transmit the audio to a first audio playing device through a first thread;
or, the audio is transmitted to a second audio playing device through a second thread;
the first thread and the second thread are any two parallel threads in an audio transmission process.
9. An audio transmission device, characterized in that the audio transmission device comprises a processor and a memory, the memory storing a computer program which, when executed on the processor, implements the audio transmission method of any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed on a processor, implements the audio transmission method of any of claims 1 to 5.
CN202111045440.5A 2021-09-07 2021-09-07 Audio transmission method and device and audio transmission equipment Active CN113763970B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111045440.5A CN113763970B (en) 2021-09-07 2021-09-07 Audio transmission method and device and audio transmission equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111045440.5A CN113763970B (en) 2021-09-07 2021-09-07 Audio transmission method and device and audio transmission equipment

Publications (2)

Publication Number Publication Date
CN113763970A true CN113763970A (en) 2021-12-07
CN113763970B CN113763970B (en) 2023-09-22

Family

ID=78793627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111045440.5A Active CN113763970B (en) 2021-09-07 2021-09-07 Audio transmission method and device and audio transmission equipment

Country Status (1)

Country Link
CN (1) CN113763970B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5515474A (en) * 1992-11-13 1996-05-07 International Business Machines Corporation Audio I/O instruction interpretation for audio card
WO2008101407A1 (en) * 2007-02-13 2008-08-28 Ivt (Beijing) Software Technology Inc. Audio data flow input/output method and system
US7561932B1 (en) * 2003-08-19 2009-07-14 Nvidia Corporation System and method for processing multi-channel audio
US20120059496A1 (en) * 2009-05-25 2012-03-08 Zte Corporation Method and device for transmitting audio data over universal serial bus by a wireless data terminal
CN102378081A (en) * 2010-08-23 2012-03-14 联想(北京)有限公司 Electronic device and sound producing method thereof and sound box
CN106293603A (en) * 2016-06-30 2017-01-04 微鲸科技有限公司 Audio output system and output intent
CN106294265A (en) * 2015-05-19 2017-01-04 深圳市超越自然多媒体有限公司 A kind of audio data transmission method between USB sound card and smart machine
CN106897045A (en) * 2017-02-28 2017-06-27 广东欧珀移动通信有限公司 Audio frequency playing method, device and computer equipment
CN107957861A (en) * 2017-12-11 2018-04-24 中标软件有限公司 Immediately the method and device of sound card signal input channel sound intermediate frequency data is played
CN108668203A (en) * 2017-03-30 2018-10-16 腾讯科技(深圳)有限公司 Audio frequency playing method, system and device
CN109101213A (en) * 2018-08-23 2018-12-28 广州酷狗计算机科技有限公司 Control the method, apparatus and storage medium of sound card transmission audio
CN109218894A (en) * 2017-06-29 2019-01-15 长城汽车股份有限公司 Vehicle-mounted orientation sound system, control method and vehicle
CN109828742A (en) * 2019-02-01 2019-05-31 珠海全志科技股份有限公司 Voice-frequency-multichannel synchronism output method, computer installation and computer readable storage medium
KR20210101553A (en) * 2020-02-10 2021-08-19 삼성전자주식회사 Electronic device and method for recognizing audio output device connected to usb type-c connector using the same

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5515474A (en) * 1992-11-13 1996-05-07 International Business Machines Corporation Audio I/O instruction interpretation for audio card
US7561932B1 (en) * 2003-08-19 2009-07-14 Nvidia Corporation System and method for processing multi-channel audio
WO2008101407A1 (en) * 2007-02-13 2008-08-28 Ivt (Beijing) Software Technology Inc. Audio data flow input/output method and system
US20120059496A1 (en) * 2009-05-25 2012-03-08 Zte Corporation Method and device for transmitting audio data over universal serial bus by a wireless data terminal
CN102378081A (en) * 2010-08-23 2012-03-14 联想(北京)有限公司 Electronic device and sound producing method thereof and sound box
CN106294265A (en) * 2015-05-19 2017-01-04 深圳市超越自然多媒体有限公司 A kind of audio data transmission method between USB sound card and smart machine
CN106293603A (en) * 2016-06-30 2017-01-04 微鲸科技有限公司 Audio output system and output intent
CN106897045A (en) * 2017-02-28 2017-06-27 广东欧珀移动通信有限公司 Audio frequency playing method, device and computer equipment
CN108668203A (en) * 2017-03-30 2018-10-16 腾讯科技(深圳)有限公司 Audio frequency playing method, system and device
CN109218894A (en) * 2017-06-29 2019-01-15 长城汽车股份有限公司 Vehicle-mounted orientation sound system, control method and vehicle
CN107957861A (en) * 2017-12-11 2018-04-24 中标软件有限公司 Immediately the method and device of sound card signal input channel sound intermediate frequency data is played
CN109101213A (en) * 2018-08-23 2018-12-28 广州酷狗计算机科技有限公司 Control the method, apparatus and storage medium of sound card transmission audio
CN109828742A (en) * 2019-02-01 2019-05-31 珠海全志科技股份有限公司 Voice-frequency-multichannel synchronism output method, computer installation and computer readable storage medium
KR20210101553A (en) * 2020-02-10 2021-08-19 삼성전자주식회사 Electronic device and method for recognizing audio output device connected to usb type-c connector using the same

Also Published As

Publication number Publication date
CN113763970B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
US10224894B2 (en) Metadata for ducking control
JP2008503793A (en) Reverberation sound signal coding
CN106024035B (en) A kind of method and terminal of audio processing
US11050971B2 (en) Pulse code modulation (PCM) data-marking
US7714223B2 (en) Reproduction device, reproduction method and computer usable medium having computer readable reproduction program emodied therein
CN105869647B (en) A kind of primary DSD audio-frequency decoding method of smart phone, system and smart phone
CN113763970B (en) Audio transmission method and device and audio transmission equipment
CN111181949B (en) Sound detection method, device, terminal equipment and storage medium
US6759585B2 (en) Musical-file-processing apparatus, musical-file-processing method and musical-file-processing method program
WO2004090886A1 (en) Fragile audio watermark related to a buried data channel
US11308968B2 (en) Audio signal output device, audio system, and audio signal output method
CN109375892B (en) Method and apparatus for playing audio
US10074378B2 (en) Data encoding detection
CN113765918B (en) Audio transmission control method and device and audio transmission control equipment
JP2005122034A (en) Audio data compression method
US8368569B2 (en) Data converting device, program and method
JP4822697B2 (en) Digital signal encoding apparatus and digital signal recording apparatus
CN113763971A (en) Audio decoding control method and device and audio decoding control equipment
US10348880B2 (en) System and method for generating audio data
JP2000347697A (en) Voice record regenerating device and record medium
KR100776432B1 (en) Apparatus for writing and playing audio and audio coding method in the apparatus
CN113301206A (en) Audio adjusting method and device, electronic equipment and readable storage medium
US8392203B2 (en) Encoding method and system
KR20200026815A (en) Signal processing apparatus, signal processing method, and program
GB2447986A (en) Signal reproduction circuitry

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant