CN110970008A - Embedded sound mixing method and device, embedded equipment and storage medium - Google Patents

Embedded sound mixing method and device, embedded equipment and storage medium Download PDF

Info

Publication number
CN110970008A
CN110970008A CN201811129620.XA CN201811129620A CN110970008A CN 110970008 A CN110970008 A CN 110970008A CN 201811129620 A CN201811129620 A CN 201811129620A CN 110970008 A CN110970008 A CN 110970008A
Authority
CN
China
Prior art keywords
audio data
digital audio
data
embedded
mixing
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.)
Pending
Application number
CN201811129620.XA
Other languages
Chinese (zh)
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.)
Guangzhou Lingpai Technology Co Ltd
Original Assignee
Guangzhou Lingpai 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 Guangzhou Lingpai Technology Co Ltd filed Critical Guangzhou Lingpai Technology Co Ltd
Priority to CN201811129620.XA priority Critical patent/CN110970008A/en
Publication of CN110970008A publication Critical patent/CN110970008A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K15/00Acoustics not otherwise provided for
    • G10K15/08Arrangements for producing a reverberation or echo sound
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/02Means for controlling the tone frequencies, e.g. attack or decay; Means for producing special musical effects, e.g. vibratos or glissandos
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • G10L25/18Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being spectral information of each sub-band

Abstract

The invention discloses an embedded sound mixing method, which is used for solving the problem that the existing sound mixing algorithm is not suitable for an embedded system. The method provided by the invention comprises the following steps: acquiring first digital audio data and second digital audio data to be mixed; if the first digital audio data and the second digital audio data are positive, adding the first digital audio data and the second digital audio data to obtain third audio data, and then subtracting the anti-overflow data from the third audio data to obtain audio data after audio mixing; if the first digital audio data and the second digital audio data are negative, adding the first digital audio data and the second digital audio data to obtain fourth audio data, and adding the fourth audio data with anti-overflow data to obtain audio data after audio mixing; and if the first digital audio data and the second digital audio data are not positive and the second digital audio data and the third digital audio data are not negative, adding the first digital audio data and the second digital audio data to obtain fifth audio data serving as audio data after audio mixing. The invention also provides an embedded sound mixing device, embedded equipment and a storage medium.

Description

Embedded sound mixing method and device, embedded equipment and storage medium
Technical Field
The present invention relates to the field of embedded device technologies, and in particular, to an embedded audio mixing method and apparatus, an embedded device, and a storage medium.
Background
Computer systems often require mixing calculations when processing multiple paths of digital audio data. For example, in a voice conference system, when audio collected by a user a and a user B through respective microphones needs to be simultaneously transmitted to a user C, audio data of the user a and the user B need to be mixed.
In the prior art, when mixing is processed, in order to reduce the problems of pop sound and too small volume which may occur during mixing, a normalized mixing algorithm is generally adopted, and the algorithm dynamically adjusts an attenuation factor according to the energy of audio, so that a better mixing effect can be achieved.
However, the normalized mixing algorithm requires a computer system to undertake a large number of operations, especially floating point operations, and usually a dedicated computing chip is adopted or a large system computing resource is occupied, which requires the computer system to have a high computing capability, which is just hard to achieve by an embedded system.
Therefore, finding a mixing method suitable for embedded systems with low requirements for system computing power is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention provides an embedded sound mixing method, an embedded sound mixing device, embedded equipment and a storage medium, and aims to solve the problem that the existing sound mixing algorithm is not suitable for an embedded system.
An embedded mixing method, comprising:
acquiring first digital audio data and second digital audio data to be mixed, wherein the sampling bit width and the sampling frequency of the first digital audio data and the second digital audio data are the same;
if the first digital audio data and the second digital audio data are both positive, adding the first digital audio data and the second digital audio data to obtain third audio data, and then subtracting anti-overflow data from the third audio data to obtain audio data after sound mixing, wherein the anti-overflow data is obtained by multiplying the first digital audio data and the second digital audio data and then carrying out sign right shift on an assigned digit, and the assigned digit is determined according to the sampling bit width;
if the first digital audio data and the second digital audio data are both negative, adding the first digital audio data and the second digital audio data to obtain fourth audio data, and then adding the overflow prevention data to the fourth audio data to obtain audio data after sound mixing;
and if the first digital audio data and the second digital audio data are not both positive and are not negative, performing addition operation on the first digital audio data and the second digital audio data to obtain fifth audio data serving as audio data after audio mixing.
An embedded mixing apparatus, comprising:
the audio acquisition module to be mixed is used for acquiring first digital audio data and second digital audio data to be mixed, wherein the sampling bit width and the sampling frequency of the first digital audio data and the second digital audio data are the same;
the first audio mixing processing module is configured to, if the first digital audio data and the second digital audio data are both positive, perform an addition operation on the first digital audio data and the second digital audio data to obtain third audio data, and then subtract anti-overflow data from the third audio data to obtain audio data after audio mixing, where the anti-overflow data is obtained by performing a multiplication operation on the first digital audio data and the second digital audio data and then performing a sign right shift on an assigned digit, and the assigned digit is determined according to the sampling bit width;
the second audio mixing processing module is used for performing addition operation on the first digital audio data and the second digital audio data to obtain fourth audio data if the first digital audio data and the second digital audio data are both negative, and then adding the fourth audio data to the anti-overflow data to obtain audio data after audio mixing;
and the third sound mixing processing module is used for performing addition operation on the first digital audio data and the second digital audio data if the first digital audio data and the second digital audio data are not both positive and uneven to be negative, and obtaining fifth audio data as audio data after sound mixing.
An embedded device comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the embedded mixing method when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the above-described embedded mixing method.
Firstly, acquiring first digital audio data and second digital audio data to be mixed, wherein the sampling bit width and the sampling frequency of the first digital audio data and the second digital audio data are the same; if the first digital audio data and the second digital audio data are both positive, adding the first digital audio data and the second digital audio data to obtain third audio data, and then subtracting anti-overflow data from the third audio data to obtain audio data after sound mixing, wherein the anti-overflow data is obtained by performing multiplication operation on the first digital audio data and the second digital audio data and then carrying out right-shift on the sign by the sampling bit width; if the first digital audio data and the second digital audio data are both negative, adding the first digital audio data and the second digital audio data to obtain fourth audio data, and then adding the overflow prevention data to the fourth audio data to obtain audio data after sound mixing; and if the first digital audio data and the second digital audio data are not both positive and are not negative, performing addition operation on the first digital audio data and the second digital audio data to obtain fifth audio data serving as audio data after audio mixing. Therefore, when calculating two paths of digital audio data, the invention only needs to use addition, subtraction, multiplication and bit operation, does not need to use division operation, also does not need to require that a computer system has floating point operation capability, can realize the calculation of multi-path audio mixing with less operation performance, and is suitable for an embedded system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic diagram of an application environment of an embedded audio mixing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of an embedded audio mixing method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of an embedded audio mixing method for calculating overflow-preventing data in an application scenario according to an embodiment of the present invention;
fig. 4 is a schematic flow chart illustrating that the embedded mixing method determines the specified number of bits in an application scenario according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an embedded mixing apparatus according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embedded audio mixing method provided by the application can be applied to the application environment shown in fig. 1, wherein a client capable of acquiring audio data can be in communication connection with an embedded device. Wherein the client may be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.
In an embodiment, as shown in fig. 2, an embedded audio mixing method is provided, which is described by taking the embedded device in fig. 1 as an example, and includes the following steps:
101. acquiring first digital audio data and second digital audio data to be mixed, wherein the sampling bit width and the sampling frequency of the first digital audio data and the second digital audio data are the same;
in this embodiment, the client may acquire two paths of audio data, which are the first digital audio data and the second digital audio data, through the audio acquisition device on the client, where the audio acquisition device may specifically be a microphone. It should be noted that, in this embodiment, the first digital audio data and the second digital audio data to be mixed may be from two different clients respectively, or may be from the same client, and only the sampling bit width and the sampling frequency of the two paths of digital audio data, that is, the first digital audio data and the second digital audio data, are the same. For example, in a certain application scenario, a microphone a and a microphone B having the same sampling bit width and sampling frequency are respectively provided, the user 1 uses the microphone a to record voice to obtain first digital audio data, and the user 2 uses the microphone B to record voice to obtain second digital audio data.
102. Judging whether the first digital audio data and the second digital audio data are both positive or both negative, if so, executing step 103 and step 104, if both are negative, executing step 105 and step 106, and if not, executing step 107;
it can be understood that, when audio is collected and converted into digital audio data, the converted digital audio data has positive and negative scores due to the difference of the audio vibration directions. In this embodiment, the first digital audio data and the second digital audio data to be mixed, which are obtained in step 101, are converted, that is, digitized, and the positive and negative of the two paths of audio data are determined. Considering that the positive-negative relationship between the first digital audio data and the second digital audio data affects whether the two audio data will overflow after audio mixing, for this reason, the embedded device needs to determine whether both the first digital audio data and the second digital audio data are positive or negative, if both the first digital audio data and the second digital audio data are positive, step 103 and step 104 are executed, if both the first digital audio data and the second digital audio data are negative, step 105 and step 106 are executed, if both the first digital audio data and the second digital audio data are not positive and not both are negative, that is, under the condition that the first digital audio data and the second digital audio data are positive and negative, step 107 is executed.
103. Adding the first digital audio data and the second digital audio data to obtain third audio data;
104. subtracting overflow prevention data from the third audio data to obtain audio data after audio mixing, wherein the overflow prevention data is obtained by multiplying the first digital audio data and the second digital audio data and then performing right shift with a sign to indicate a digit, and the indicated digit is determined according to the sampling bit width;
when the first digital audio data and the second digital audio data are both positive, it can be understood that after the first digital audio data and the second digital audio data are mixed, because the vibration directions of the two paths of audio data are the same, there is a possibility of positive overflow, so that the first digital audio data and the second digital audio data are subjected to addition operation in step 103, after the third audio data is obtained, the anti-overflow data needs to be subtracted from the third audio data, the positive overflow of the data can be prevented, and the situation of 'popping' does not occur in the obtained mixed audio data.
The anti-overflow data is obtained by multiplying the first digital audio data and the second digital audio data and then carrying out right shift with a sign on an appointed digit, wherein the appointed digit is determined according to the sampling bit width. Specifically, as shown in fig. 3, the anti-overflow data may be calculated by:
201. performing multiplication operation on the first digital audio data and the second digital audio data to obtain sixth audio data;
202. and right shifting the sixth audio data with the symbol by the designated digit to obtain the anti-overflow data.
As for step 201, it can be understood that, because multiplication operations occupy less operation resources of the system relatively, the embedded device in this embodiment may perform multiplication operations on the first digital audio data and the second digital audio data to obtain sixth audio data, and a large operation burden is not brought to the embedded device.
For step 202, in this embodiment, the calculation idea of the anti-overflow data is to multiply the first digital audio data and the second digital audio data, and then divide by the maximum value of the sampling precision. However, considering that division requires floating-point operation capability in the system, and the embedded device cannot meet this requirement, the present embodiment uses bit operation instead of division. It is noted that, after the sixth audio data is obtained in step 202, the sixth audio data may be shifted to the right with the symbol by the specified number of bits, so as to obtain the anti-overflow data. The effect of indicating the number of bits by right shift with a symbol is the same as the effect of dividing by the maximum value of the sampling precision, so that the anti-overflow data can be obtained.
The calculation process of the above steps 201 and 202 can be expressed by the following formula:
Y=(A×B)>>K
wherein, A is first digital audio data, B is second digital audio data, K is a designated digit, and Y is anti-overflow data. The designated bit number K is determined according to the sampling bit width, the sampling bit width is generally 8bit, 16bit or 24bit, and if the sampling bit width of the first digital audio data and the second digital audio data is 8bit, K is 8; if the sampling bit width of the first digital audio data and the second digital audio data is 16 bits, K is 16; if the sampling bit width of the first digital audio data and the second digital audio data is 24 bits, K is 24.
Further, as shown in fig. 4, the specified number of bits may be determined by:
301. acquiring the sampling bit width of the first digital audio data or the second digital audio data;
302. and determining the value of the sampling bit width as a specified bit number.
With respect to step 301 and step 302, it can be understood that, since the sampling bit width of the first digital audio data and the second digital audio data is the same, only the sampling bit width of any one of the first digital audio data and the second digital audio data needs to be obtained. After the sampling bit width is obtained, the value of the sampling bit width can be directly determined to be the designated bit number. For example, if the sampling bit width is 8 bits, the designated bit number is 8; if the sampling bit width is 16 bits, the designated bit number is 16; if the sampling bit width is 24 bits, the designated bit number is 24.
105. Adding the first digital audio data and the second digital audio data to obtain fourth audio data;
106. adding the fourth audio data to the anti-overflow data to obtain audio data after audio mixing;
when the first digital audio data and the second digital audio data are both negative, it can be understood that after the first digital audio data and the second digital audio data are mixed, because the vibration directions of the two paths of audio data are the same, there is a possibility of negative overflow, so that the first digital audio data and the second digital audio data are subjected to addition operation in step 105, after the fourth audio data is obtained, the fourth audio data needs to be added with the anti-overflow data, so that negative overflow of the data can be prevented, and thus the situation of 'popping' does not occur in the obtained mixed audio data.
It should be noted that the overflow prevention data and the designated bit number in step 105 and step 106 are the same as those in step 103 and step 104, and are not described herein again.
107. And performing addition operation on the first digital audio data and the second digital audio data to obtain fifth audio data serving as audio data after audio mixing.
It can be understood that, when the first digital audio data and the second digital audio data are not both positive and are not both negative, that is, the first digital audio data and the second digital audio data are positive and negative, and the two paths of audio data have opposite vibrations, in this case, there is no possibility of data overflow after the first digital audio data and the second digital audio data are mixed, so in this embodiment, the addition operation may be directly performed on the first digital audio data and the second digital audio data, and the fifth audio data is obtained as the mixed audio data.
The above step 103-107 can be simply summarized as the following formula:
Figure BDA0001811091860000091
wherein, A is first digital audio data, B is second digital audio data, K is a designated digit, and C is audio data after audio mixing.
In an application scenario, the sampling bit width is 16 bits, and when the calculation formula of C is implemented by C + + code, the code is as follows:
Figure BDA0001811091860000092
in the embodiment of the invention, first digital audio data and second digital audio data to be mixed are obtained, wherein the sampling bit width and the sampling frequency of the first digital audio data and the second digital audio data are the same; if the first digital audio data and the second digital audio data are both positive, adding the first digital audio data and the second digital audio data to obtain third audio data, and then subtracting anti-overflow data from the third audio data to obtain audio data after sound mixing, wherein the anti-overflow data is obtained by performing multiplication operation on the first digital audio data and the second digital audio data and then carrying out right-shift on the sign by the sampling bit width; if the first digital audio data and the second digital audio data are both negative, adding the first digital audio data and the second digital audio data to obtain fourth audio data, and then adding the overflow prevention data to the fourth audio data to obtain audio data after sound mixing; and if the first digital audio data and the second digital audio data are not both positive and are not negative, performing addition operation on the first digital audio data and the second digital audio data to obtain fifth audio data serving as audio data after audio mixing. Therefore, when calculating two paths of digital audio data, the invention only needs to use addition, subtraction, multiplication and bit operation, does not need to use division operation, also does not need to require that a computer system has floating point operation capability, can realize the calculation of multi-path audio mixing with less operation performance, and is suitable for an embedded system.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, an embedded audio mixing apparatus is provided, where the embedded audio mixing apparatus corresponds to the embedded audio mixing method in the above embodiments one to one. As shown in fig. 5, the embedded mixing apparatus includes an audio acquiring module 401 to be mixed, a first mixing processing module 402, a second mixing processing module 403, and a third mixing processing module 404. The functional modules are explained in detail as follows:
a to-be-mixed audio obtaining module 401, configured to obtain first digital audio data and second digital audio data to be mixed, where sampling bit widths and sampling frequencies of the first digital audio data and the second digital audio data are the same;
a first audio mixing processing module 402, configured to, if the first digital audio data and the second digital audio data are both positive, perform an addition operation on the first digital audio data and the second digital audio data to obtain third audio data, and then subtract anti-overflow data from the third audio data to obtain audio data after audio mixing, where the anti-overflow data is obtained by performing a multiplication operation on the first digital audio data and the second digital audio data and then performing a sign right shift on an assigned digit, where the assigned digit is determined according to the sampling bit width;
a second audio mixing processing module 403, configured to add the first digital audio data and the second digital audio data to obtain fourth audio data if the first digital audio data and the second digital audio data are both negative, and then add the fourth audio data to the anti-overflow data to obtain audio data after audio mixing;
a third audio mixing processing module 404, configured to, if the first digital audio data and the second digital audio data are not both positive and uneven are negative, perform an addition operation on the first digital audio data and the second digital audio data to obtain fifth audio data as audio data after audio mixing.
Further, the anti-overflow data can be calculated by the following modules:
the multiplication module is used for performing multiplication operation on the first digital audio data and the second digital audio data to obtain sixth audio data;
and the bit operation module is used for right shifting the sixth audio data with the symbol by the designated bit number to obtain the anti-overflow data.
Further, the specified number of bits can be determined by:
a sampling bit width obtaining module, configured to obtain a sampling bit width of the first digital audio data or the second digital audio data;
and the bit number determining module is used for determining the value of the sampling bit width as a designated bit number.
Further, the sampling bit width may be 8 bits, 16 bits, or 24 bits.
For the specific limitations of the embedded mixing apparatus, reference may be made to the above limitations of the embedded mixing method, which are not described herein again. The modules in the embedded mixing device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the embedded device, and can also be stored in a memory in the embedded device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, an embedded device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the steps of the embedded mixing method in the above embodiments, such as steps 101 to 107 shown in fig. 2. Alternatively, the processor, when executing the computer program, implements the functions of the modules of the embedded mixing apparatus in the above embodiments, such as the functions of the modules 401 to 404 shown in fig. 5. To avoid repetition, further description is omitted here.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the steps of the embedded mixing method in the above-described embodiments, such as steps 101 to 107 shown in fig. 2. Alternatively, the computer program, when executed by the processor, implements the functions of the modules of the embedded mixing apparatus in the above-described embodiments, such as the functions of the modules 401 to 404 shown in fig. 5. To avoid repetition, further description is omitted here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An embedded audio mixing method, comprising:
acquiring first digital audio data and second digital audio data to be mixed, wherein the sampling bit width and the sampling frequency of the first digital audio data and the second digital audio data are the same;
if the first digital audio data and the second digital audio data are both positive, adding the first digital audio data and the second digital audio data to obtain third audio data, and then subtracting anti-overflow data from the third audio data to obtain audio data after sound mixing, wherein the anti-overflow data is obtained by multiplying the first digital audio data and the second digital audio data and then carrying out sign right shift on an assigned digit, and the assigned digit is determined according to the sampling bit width;
if the first digital audio data and the second digital audio data are both negative, adding the first digital audio data and the second digital audio data to obtain fourth audio data, and then adding the overflow prevention data to the fourth audio data to obtain audio data after sound mixing;
and if the first digital audio data and the second digital audio data are not both positive and are not negative, performing addition operation on the first digital audio data and the second digital audio data to obtain fifth audio data serving as audio data after audio mixing.
2. The embedded mixing method according to claim 1, wherein the overflow prevention data is calculated by the following steps:
performing multiplication operation on the first digital audio data and the second digital audio data to obtain sixth audio data;
and right shifting the sixth audio data with the symbol by the designated digit to obtain the anti-overflow data.
3. The embedded mixing method according to claim 1, wherein the specified number of bits is determined by:
acquiring the sampling bit width of the first digital audio data or the second digital audio data;
and determining the value of the sampling bit width as a specified bit number.
4. The embedded mixing method according to any one of claims 1 to 3, wherein the sampling bit width is 8bit, 16bit or 24 bit.
5. An embedded mixing apparatus, comprising:
the audio acquisition module to be mixed is used for acquiring first digital audio data and second digital audio data to be mixed, wherein the sampling bit width and the sampling frequency of the first digital audio data and the second digital audio data are the same;
the first audio mixing processing module is configured to, if the first digital audio data and the second digital audio data are both positive, perform an addition operation on the first digital audio data and the second digital audio data to obtain third audio data, and then subtract anti-overflow data from the third audio data to obtain audio data after audio mixing, where the anti-overflow data is obtained by performing a multiplication operation on the first digital audio data and the second digital audio data and then performing a sign right shift on an assigned digit, and the assigned digit is determined according to the sampling bit width;
the second audio mixing processing module is used for performing addition operation on the first digital audio data and the second digital audio data to obtain fourth audio data if the first digital audio data and the second digital audio data are both negative, and then adding the fourth audio data to the anti-overflow data to obtain audio data after audio mixing;
and the third sound mixing processing module is used for performing addition operation on the first digital audio data and the second digital audio data if the first digital audio data and the second digital audio data are not both positive and uneven to be negative, and obtaining fifth audio data as audio data after sound mixing.
6. The embedded mixing apparatus as claimed in claim 5, wherein the overflow prevention data is calculated by:
the multiplication module is used for performing multiplication operation on the first digital audio data and the second digital audio data to obtain sixth audio data;
and the bit operation module is used for right shifting the sixth audio data with the symbol by the designated bit number to obtain the anti-overflow data.
7. The embedded mixing apparatus as claimed in claim 5, wherein the specified number of bits is determined by:
a sampling bit width obtaining module, configured to obtain a sampling bit width of the first digital audio data or the second digital audio data;
and the bit number determining module is used for determining the value of the sampling bit width as a designated bit number.
8. The embedded mixing apparatus according to any one of claims 5 to 7, wherein the sampling bit width is 8bit, 16bit or 24 bit.
9. An embedded device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the embedded mixing method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the embedded mixing method according to any one of claims 1 to 5.
CN201811129620.XA 2018-09-28 2018-09-28 Embedded sound mixing method and device, embedded equipment and storage medium Pending CN110970008A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811129620.XA CN110970008A (en) 2018-09-28 2018-09-28 Embedded sound mixing method and device, embedded equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811129620.XA CN110970008A (en) 2018-09-28 2018-09-28 Embedded sound mixing method and device, embedded equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110970008A true CN110970008A (en) 2020-04-07

Family

ID=70026985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811129620.XA Pending CN110970008A (en) 2018-09-28 2018-09-28 Embedded sound mixing method and device, embedded equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110970008A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112951197A (en) * 2021-04-02 2021-06-11 北京百瑞互联技术有限公司 Audio mixing method, device, medium and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070286426A1 (en) * 2006-06-07 2007-12-13 Pei Xiang Mixing techniques for mixing audio
US20110022402A1 (en) * 2006-10-16 2011-01-27 Dolby Sweden Ab Enhanced coding and parameter representation of multichannel downmixed object coding
CN102968995A (en) * 2012-11-16 2013-03-13 新奥特(北京)视频技术有限公司 Sound mixing method and device of audio signal
CN103247292A (en) * 2013-03-27 2013-08-14 深圳市文鼎创数据科技有限公司 Audio communication method and device
CN104205211A (en) * 2012-04-05 2014-12-10 华为技术有限公司 Multi-channel audio encoder and method for encoding a multi-channel audio signal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070286426A1 (en) * 2006-06-07 2007-12-13 Pei Xiang Mixing techniques for mixing audio
US20110022402A1 (en) * 2006-10-16 2011-01-27 Dolby Sweden Ab Enhanced coding and parameter representation of multichannel downmixed object coding
CN104205211A (en) * 2012-04-05 2014-12-10 华为技术有限公司 Multi-channel audio encoder and method for encoding a multi-channel audio signal
CN102968995A (en) * 2012-11-16 2013-03-13 新奥特(北京)视频技术有限公司 Sound mixing method and device of audio signal
CN103247292A (en) * 2013-03-27 2013-08-14 深圳市文鼎创数据科技有限公司 Audio communication method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112951197A (en) * 2021-04-02 2021-06-11 北京百瑞互联技术有限公司 Audio mixing method, device, medium and equipment
CN112951197B (en) * 2021-04-02 2022-06-24 北京百瑞互联技术有限公司 Audio mixing method, device, medium and equipment

Similar Documents

Publication Publication Date Title
US8549059B2 (en) In-place fast fourier transform processor
WO2021088688A1 (en) Convolution acceleration operation method and apparatus, storage medium and terminal device
CN110019283B (en) Extremum determining method and device, electronic equipment and storage medium
CN110569984B (en) Configuration information generation method, device, equipment and storage medium
CN109769255B (en) Data compression method and device, computer equipment and storage medium
US20230024048A1 (en) Data Processing Apparatus and Method, Base Station, and Storage Medium
WO2022161330A1 (en) Data storage method and apparatus, storage medium, user equipment, and network side device
CN110970008A (en) Embedded sound mixing method and device, embedded equipment and storage medium
JP6286592B2 (en) Device and method for calculating channel estimates
CN106681691A (en) Data processing method and modular multiplication operation method and apparatus based on Montgomery modular-multiplication
CN111158907A (en) Data processing method and device, electronic equipment and storage medium
WO2022127476A1 (en) Harmonic elimination method and apparatus, storage medium, and terminal
US8793295B2 (en) Method for fast calculation of the beginning of pseudo random sequences for long term evolution
CN104750494A (en) Processor and audio processing method thereof
CN114584285A (en) Secure multiparty processing method and related device
Han et al. A new twiddle factor merging method for low complexity and high speed FFT architecture
US20120157008A1 (en) Method for avoiding overflow of multiplication of roots-of-unity by using overflow safe approximated values table
CN108173608B (en) Method, apparatus and storage medium for obtaining power estimation value and electronic device
CN116700999B (en) Data processing method, device, computer equipment and storage medium
CN112822139A (en) Data input and data conversion method and device
Saraswathi et al. VLSI architectureof autocorrelation module for cyclostationary detector-CR
CN111130582A (en) Method for calculating emission weight in coherent joint emission JT and corresponding device
CN114500198B (en) Interference elimination method, device, electronic equipment and storage medium
WO2021129063A1 (en) Data processing method and apparatus, storage medium, and electronic device
US20210135683A1 (en) Method, electronic device and computer program product for processing data

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200407