CN109243472B - Audio processing method and audio processing system - Google Patents

Audio processing method and audio processing system Download PDF

Info

Publication number
CN109243472B
CN109243472B CN201811139540.2A CN201811139540A CN109243472B CN 109243472 B CN109243472 B CN 109243472B CN 201811139540 A CN201811139540 A CN 201811139540A CN 109243472 B CN109243472 B CN 109243472B
Authority
CN
China
Prior art keywords
resampling
audio
signals
signal
audio signal
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.)
Active
Application number
CN201811139540.2A
Other languages
Chinese (zh)
Other versions
CN109243472A (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.)
Guangzhou Xiaopeng Motors Technology Co Ltd
Original Assignee
Guangzhou Xiaopeng Motors 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 Xiaopeng Motors Technology Co Ltd filed Critical Guangzhou Xiaopeng Motors Technology Co Ltd
Priority to CN201811139540.2A priority Critical patent/CN109243472B/en
Publication of CN109243472A publication Critical patent/CN109243472A/en
Application granted granted Critical
Publication of CN109243472B publication Critical patent/CN109243472B/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/008Multichannel audio signal coding or decoding using interchannel correlation to reduce redundancy, e.g. joint-stereo, intensity-coding or matrixing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Tone Control, Compression And Expansion, Limiting Amplitude (AREA)
  • Amplifiers (AREA)
  • Stereophonic System (AREA)

Abstract

An audio processing method and an audio processing system, the method comprising: determining a resampling frequency of each audio signal according to an original sampling frequency of each audio signal, wherein the original sampling frequency of each audio signal is in integral multiple relation with the resampling frequency of each audio signal; resampling the audio signals according to the resampling frequency of the audio signals to obtain resampling signals corresponding to the audio signals; and mixing the analog signals converted from the resampling signals, and outputting the output audio signals obtained after mixing. By implementing the embodiment of the invention, a plurality of audio signals can be mixed into one audio signal and output under the condition of not influencing the tone quality, so that various types of sounds in the output audio signal can keep good tone quality, and the playing tone quality of a plurality of simultaneously output audio signals is improved.

Description

Audio processing method and audio processing system
Technical Field
The invention relates to the technical field of audio processing, in particular to an audio processing method and an audio processing system.
Background
With the development of digital audio technology, most audio is currently stored and transmitted in the form of digital signals. The key step in converting the original sound signal into a digital signal is to sample the sound signal at a specific frequency, so that each digital audio signal has its specific original sampling frequency. Generally, an audio playing system also has its own resampling frequency, so that when playing an audio signal, it may need to resample the audio signal according to the resampling frequency of the playing system, which will resample the audio signals with different original sampling frequencies into audio signals with the same sampling frequency. However, resampling may have a large impact on the sound quality, and especially, high frequency attenuation and intermodulation distortion are easily aggravated, especially when the resampling frequency is not consistent with the original sampling frequency of the audio signal, which is more likely to result in the sound quality being impaired.
In practice it has been found that in some possible application scenarios, multiple audios need to be played simultaneously. For example, if a user plays a game while listening to a song, it may be desirable to play the song and the game sound effects simultaneously. If the original sampling frequencies of the respective song and game sound effects are different, there may be inconsistency between the original sampling frequency and the resampling frequency of at least one audio when resampling according to the output sampling frequency, resulting in impairment of the sound quality of at least one audio, and thus it is difficult to improve the playing sound quality of a plurality of audio signals at the same time.
Disclosure of Invention
The embodiment of the invention discloses an audio processing method and an audio processing system, which can improve the playing tone quality of a plurality of audio signals output simultaneously.
The first aspect of the embodiments of the present invention discloses an audio processing method, which includes: determining the resampling frequency of each audio signal according to the original sampling frequency of each audio signal, wherein the original sampling frequency of each audio signal and the resampling frequency of each audio signal are in integral multiple relation;
resampling the audio signals according to the resampling frequency of the audio signals to obtain resampling signals corresponding to the audio signals;
and mixing the analog signals converted from the resampling signals, and outputting the output audio signals obtained after mixing.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the determining the resampling frequency of each audio signal according to the original sampling frequency of each audio signal includes:
and determining an output sampling frequency which is in integral multiple relation with the original sampling frequency of the audio signal from a plurality of preset output sampling frequencies as the resampling frequency of the audio signal for each audio signal in the audio signals, thereby obtaining the resampling frequency of each audio signal.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, mixing the analog signals into which the resampled signals are converted includes:
dividing the respective resampled signals into at least one signal group; the resampling frequencies corresponding to any two resampling signals in the same signal combination are the same, and the resampling frequencies corresponding to the resampling signals between any two signal groups are different;
mixing the resampling signals in the signal group to obtain mixed signals corresponding to the signal group;
and mixing the analog signals converted from the mixing signals corresponding to the obtained signal groups to obtain output audio signals.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the resampling the audio signals according to the resampling frequency of the audio signals to obtain the resampled signals corresponding to the audio signals includes:
judging whether the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal;
determining the audio signal as a corresponding resampled signal if the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal; and if the original sampling frequency of the audio signal is different from the resampling frequency of the audio signal, resampling the audio signal according to the resampling frequency of the audio signal to obtain a resampling signal corresponding to the audio signal, so as to obtain the resampling signal corresponding to each audio signal.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the preset output sampling frequency includes at least 44.1kHz and 48 kHz.
A second aspect of an embodiment of the present invention discloses an audio processing system, including: the determining unit is used for determining the resampling frequency of each audio signal according to the original sampling frequency of each audio signal, wherein the original sampling frequency of each audio signal and the resampling frequency of each audio signal are in integral multiple relation;
the resampling unit is used for resampling the audio signals according to the resampling frequency of the audio signals to obtain resampling signals corresponding to the audio signals;
a sound mixing unit, configured to mix sound of the analog signals converted from the resample signals;
and the output unit is used for outputting the output audio signal obtained after the sound mixing.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the manner that the determining unit is configured to determine the resampling frequency of each audio signal according to the original sampling frequency of each audio signal is specifically:
the determining unit is configured to determine, for each of the audio signals, an output sampling frequency that is an integer multiple of an original sampling frequency of the audio signal from a plurality of preset output sampling frequencies as a resampling frequency of the audio signal, thereby obtaining the resampling frequency of the audio signal.
As an optional implementation manner, in a second aspect of the embodiment of the present invention, the mixing unit includes:
a dividing module for dividing the respective resampled signals into at least one signal group; the resampling frequencies corresponding to any two resampling signals in the same signal combination are the same, and the resampling frequencies corresponding to the resampling signals between any two signal groups are different;
the digital sound mixing module is used for carrying out sound mixing on the resampling signals in the signal group to obtain sound mixing signals corresponding to the signal group;
and the analog sound mixing module is used for mixing sound of the analog signals converted from the sound mixing signals corresponding to the obtained signal groups to obtain output audio signals.
As an optional implementation manner, in a second aspect of the embodiment of the present invention, the resampling unit includes:
the judging module is used for judging whether the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal;
the resampling module is used for determining the audio signal as a corresponding resampling signal when the judging module judges that the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal; and when the judging module judges that the original sampling frequency of the audio signal is different from the resampling frequency of the audio signal, resampling the audio signal according to the resampling frequency of the audio signal to obtain a resampling signal corresponding to the audio signal, so as to obtain the resampling signal corresponding to each audio signal.
As an alternative implementation, in the second aspect of the embodiment of the present invention, the preset output sampling frequency includes at least 44.1kHz and 48 kHz.
A third aspect of an embodiment of the present invention discloses an audio processing system, including:
a memory storing executable program code;
a processor coupled with the memory;
a digital-to-analog converter, a codec, a power amplifier, and a speaker;
the processor calls the executable program code stored in the memory to execute any one of the methods disclosed in the first aspect of the embodiment of the present invention.
A fourth aspect of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute any one of the methods disclosed in the first aspect of the embodiments of the present invention.
A fifth aspect of the embodiments of the present invention discloses a computer program product, which, when running on a computer, causes the computer to execute any one of the methods disclosed in the first aspect of the embodiments of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
for a plurality of audio signals which need to be output simultaneously, determining the resampling frequency of each audio signal according to the original sampling frequency of each audio signal, wherein the resampling frequency of each audio signal is in integral multiple relation with the original sampling frequency, and then resampling the audio signals according to the resampling frequency of each audio signal, so that compared with a method of resampling according to a fixed resampling frequency, the method can reduce the tone quality damage of each audio signal caused by resampling; digital-to-analog conversion is carried out on each resampled signal obtained after resampling, each converted analog signal is subjected to sound mixing, a plurality of audio signals with different resampling frequencies can be mixed into one audio signal and output under the condition that the tone quality is not influenced, and therefore various types of sounds in the output audio signal can be kept with good tone quality, and the playing tone quality of a plurality of audio signals output at the same time is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described 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 creative efforts.
Fig. 1 is a schematic flow chart of an audio processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another audio processing method disclosed in the embodiment of the invention;
FIG. 3 is a comparison graph of sampling points for resampling an audio signal according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an audio processing system according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another audio processing system according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of another audio processing system disclosed in the embodiment of the present 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
It is to be noted that the terms "comprises" and "comprising" and any variations thereof in the embodiments and drawings of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses an audio processing method and an audio processing system, which can improve the playing tone quality of a plurality of audio signals output simultaneously. The following are detailed below.
Example one
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an audio processing method according to an embodiment of the present invention. The audio processing method described in fig. 1 is suitable for vehicle-mounted audio processing systems with audio processing functions, such as vehicle-mounted central control systems, vehicle-mounted infotainment systems, and the like; or an electronic device such as a smart phone, a tablet computer, and a personal computer, which is not limited in the embodiments of the present invention. As shown in fig. 1, the audio processing method may include the steps of:
101. the audio processing system determines a resampling frequency for each audio signal based on the original sampling frequency for each audio signal.
In the embodiment of the present invention, the original sampling frequency of the audio signal and the resampling frequency of the audio signal form an integer multiple relationship, where the original sampling frequency is an integer multiple of the resampling frequency or the resampling frequency is an integer multiple of the original sampling frequency (that is, the resampling frequency is one of N parts of the original sampling frequency or N times of the original sampling frequency, where N is an integer, and the audio signal may be up-resampled or down-resampled).
Referring to fig. 3, fig. 3 is a comparison graph of sampling points for resampling an audio signal. The original sampling points are sampling points when sampling is carried out according to the original sampling frequency, and the resampling points are sampling points when sampling is carried out according to the resampling frequency. The graph indicated by the waveform conversion in fig. 3 is a waveform of a resampled signal obtained by resampling the original audio signal at a resampling frequency. Comparing the waveform generated by the integral multiple sampling in fig. 3 with the waveform generated by the non-integral multiple sampling, it can be seen that the information amount lost by the non-integral multiple sampling is larger than the information amount lost by the integral multiple sampling, and the influence on the sound quality is larger. Therefore, the embodiment of the invention samples the resampling frequency which is in integral multiple relation with the original sampling frequency to resample the audio signal, and can reduce the tone quality loss caused by resampling.
102. The audio processing system resamples the audio signals according to the resampling frequency of the audio signals to obtain resampling signals corresponding to the audio signals.
In the embodiment of the present invention, resampling algorithms such as linear resampling, lagrangian resampling, sinusoidal resampling, and the like of linear interpolation may be adopted to resample the audio signal, which is not limited in the embodiment of the present invention.
103. And the audio processing system performs audio mixing on the analog signals converted from the resampling signals and outputs output audio signals obtained after audio mixing.
In the embodiment of the invention, digital-to-analog conversion is carried out on each resampled signal to convert the resampled signal into a corresponding analog signal. The analog signal is a continuous signal and is irrelevant to the resampling frequency, so the audio mixing of the analog signal can be carried out under the condition of not influencing the sound quality. Specifically, a codec (e.g., a codec chip) may be used to perform digital-to-analog conversion on the resampled signal and perform sound mixing, and then output the output audio signal obtained by the digital-to-analog conversion to a power amplifier, and the power amplifier drives a speaker of the audio system to play the output audio signal.
It can be seen that in the method described in fig. 1, for each audio signal, the audio processing system may resample the audio signal with a resampling frequency that is an integer multiple of the original sampling frequency of the audio signal, so that the influence of resampling on the audio quality may be reduced. Moreover, the resampled signal obtained by resampling is converted into an analog signal and mixed, so that an output audio signal mixed with multiple paths of audio signals is obtained, and the playing tone quality of a plurality of audio signals output simultaneously can be improved.
Example two
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating another audio processing method according to an embodiment of the disclosure. As shown in fig. 2, the audio processing method may include the steps of:
201. the audio processing system determines an output sampling frequency which is in integral multiple relation with the original sampling frequency of the audio signal from a plurality of preset output sampling frequencies as the resampling frequency of the audio signal aiming at each audio signal in each audio signal, thereby obtaining the resampling frequency of each audio signal.
In the embodiment of the present invention, the preset output sampling frequency may include 44.1kHz, 48kHz, 96kHz, 192kHz, or the like. Preferably, at least 44.1kHz and 48kHz can be included, and the original sampling frequency of the audio signal in most songs, games and video and audio is two frequencies or multiples of the two frequencies.
202. The audio processing system resamples the audio signals according to the resampling frequency of the audio signals to obtain resampling signals corresponding to the audio signals.
In the embodiment of the invention, the resampling frequency of a certain audio signal may be the same as the original sampling frequency, and the resampling operation may be skipped for the audio signal of the type. As an optional implementation manner, the manner of executing step 202 may specifically be:
the audio processing system judges whether the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal, if so, the audio signal is directly determined as a corresponding resampling signal (namely, the operation of skipping resampling is skipped), and if not, the audio signal is resampled according to the resampling frequency of the audio signal to obtain the resampling signal corresponding to the audio signal, so that the resampling signal corresponding to each audio signal is obtained. In the embodiment of the invention, the audio signals with the resampling frequency same as the original sampling frequency do not need to be resampled, so that the influence on the tone quality is reduced and the computing resources are saved.
In addition, because the time overhead and the sampling performance of different resampling algorithms are different, the embodiment of the invention can select the corresponding resampling algorithm according to the sound source type of the audio signal. As an optional implementation manner, when the audio system recognizes that the sound source type of the audio signal is the broadcast voice, a linear resampling algorithm may be selected to resample the audio signal; when the sound source type of the audio signal is identified as a song, a sinusoidal resampling algorithm can be selected to resample the audio signal. The linear resampling time cost is low but the sampling performance is general, and the sinusoidal resampling time cost is high but the sampling performance is good. Generally speaking, the user's requirement for the tone quality of broadcast voice is lower than the song's requirement for tone quality, and the time overhead of tone quality and resampling of audio signal can be balanced to the audio signal of different sound source types adoption corresponding resampling algorithm.
203. The audio processing system divides the respective resampled signals into at least one signal group.
In the embodiment of the invention, when the audio processing system divides the signals according to the resampling frequencies corresponding to the resampling signals, the resampling frequencies corresponding to any two resampling signals in the same signal combination are the same, and the resampling frequencies corresponding to the resampling signals between any two signal groups are different.
204. And the audio processing system performs audio mixing on the resampled signals in the signal group to obtain audio mixing signals corresponding to the signal group.
In the embodiment of the invention, the resampling signals are digital signals, and the corresponding resampling frequencies of the resampling signals in the same signal group are the same, so that the resampling signals are mixed, and the influence on the tone quality is small.
The specific manner in which the audio processing system executes the steps 201 to 204 is described below by taking preset output sampling frequencies of 44.1kHz and 48kHz and an operating system of the audio processing system as an Android system as an example:
establishing two playing devices (output devices) on an Android system and correspondingly establishing two playing threads (output threads), wherein the sampling rates of the two playing devices are 44.1kHz and 48kHz respectively;
aiming at each audio signal, identifying the integral multiple relation between the original sampling frequency of the audio signal and the sampling rate of which playing device, and adding the audio signal into a thread corresponding to the playing device with the integral multiple relation in the sampling rate;
resampling is carried out on all audio signals in the two playing threads according to the sampling frequency of the playing threads, and digital sound mixing is carried out on the resampled signals, so that sound mixing signals corresponding to the playing threads can be obtained.
By implementing the above embodiment, one playing device corresponds to one signal group, and the visible audio system may divide each resampled signal obtained after resampling into signal groups according to the corresponding resampling frequency, and mix the signals in each signal group, so as to obtain the mixed signal corresponding to each signal group. Moreover, the resampling of a plurality of audio signals can be performed by a plurality of independent threads, so that the resampling speed can be increased.
In addition, for the mixed Sound signals corresponding to the two playing threads, each mixed Sound signal can be transmitted to a codec for digital-to-analog conversion through a data transmission bus such as an Inter-IC Sound (I2S) built in the integrated circuit.
205. And the audio processing system performs audio mixing on the analog signals converted from the audio mixing signals corresponding to the obtained signal groups to obtain output audio signals.
The mixed sound of the analog signals is a hardware type mixed sound, and the input of each path of analog signals is mixed into one path of analog signals through a hardware circuit. Since the mixing of analog signals requires hardware circuit support, the more the number of signals that need to be subjected to analog mixing is, the more hardware resources need to be consumed. In the embodiment of the invention, the digital sound mixing is firstly carried out on the resampling signals with the same resampling frequency to obtain each sound mixing signal, then the sound mixing is carried out on the analog signals converted from each sound mixing signal, and finally the output audio signals are obtained, so that the number of the analog signals needing sound mixing can be reduced, the consumption of hardware resources can be reduced, the cost is saved, and the volume of a computing circuit is reduced. In addition, since the number of I2S interfaces of a general chip is limited, and a certain amount of computing resources are consumed for transmitting data to the I2S interface, the more signals I2S needs to transmit, the more chips are needed, and the more computing resources are consumed by the processor. Therefore, the embodiment of the present invention may further limit the number of resampling frequencies by setting a specific output sampling frequency, so as to limit the number of playing devices (i.e. signal groups) established by the system; further, the resampled signals with the same resampling frequency (i.e. the resampled signals in the same signal group) are digitally mixed to obtain mixed signals, and then the mixed signals are transmitted to the codec through I2S, so that the number of signals that need to be transmitted by I2S can be reduced, and the number of chips and the computational resources of the processor can be reduced.
206. The audio processing system outputs the output audio signal.
It can be seen that, in the method described in fig. 2, a plurality of output sampling frequencies can be preset according to the original sampling frequency of most of the audio signals, the resampling frequency of each audio signal is selected from the preset output sampling frequencies, and the resampling frequency and the original sampling frequency of the audio signal are in integral multiple relation; further, in the method described in fig. 2, by setting a specific output sampling frequency, and performing digital audio mixing on the resampled signals with the same resampling frequency to obtain each audio mixed signal, and then performing audio mixing on the analog signals converted from each audio mixed signal to obtain an output audio signal, the number of analog signals to be subjected to audio mixing can be reduced, the number of signals to be transmitted by data transmission buses such as I2S can be reduced, and thus, the consumption of hardware resources can be reduced, the cost can be saved, the volume of a computing circuit can be reduced, and the consumption of computing resources of a processor can be reduced.
EXAMPLE III
Referring to fig. 4, fig. 4 is a schematic structural diagram of an audio processing system according to an embodiment of the present invention. As shown in fig. 4, the audio processing system may include:
a determining unit 401, configured to determine a resampling frequency of each audio signal according to an original sampling frequency of each audio signal, where the original sampling frequency of each audio signal and the resampling frequency of each audio signal are in an integer multiple relationship;
a resampling unit 402, configured to resample the audio signal according to the resampling frequency of the audio signal determined by the determining unit 401, so as to obtain a resampling signal corresponding to each audio signal;
a mixing unit 403 for mixing the analog signals into which the respective resampled signals obtained by the resampling unit 402 are converted;
an output unit 404, configured to output the output audio signal mixed by the mixing unit 403.
It can be seen that, with the audio processing system shown in fig. 4, the audio signal can be resampled at a resampling frequency that is an integral multiple of the original sampling frequency of the audio signal, so that the influence of resampling on the audio quality can be reduced. Moreover, the resampled signal obtained by resampling is converted into an analog signal and mixed, so that an output audio signal mixed with multiple paths of audio signals is obtained, and the playing tone quality of a plurality of audio signals output simultaneously can be improved.
Example four
Referring to fig. 5, fig. 5 is a schematic structural diagram of another audio processing system according to an embodiment of the disclosure. The audio processing system shown in fig. 5 is optimized by the audio processing system shown in fig. 4. In contrast to the audio processing system shown in fig. 4, in the audio processing system shown in fig. 5:
the above-mentioned determining unit 401 may specifically determine the resampling frequency of each audio signal according to the original sampling frequency of each audio signal by:
the determining unit 401 is configured to determine, for each of the audio signals, an output sampling frequency that is an integer multiple of an original sampling frequency of the audio signal from a plurality of preset output sampling frequencies as a resampling frequency of the audio signal, thereby obtaining the resampling frequency of each audio signal.
In the embodiment of the present invention, the preset output sampling frequency may include 44.1kHz, 48kHz, 96kHz, 192kHz, or the like. Preferably, at least 44.1kHz and 48kHz may be included.
Optionally, in the audio processing system shown in fig. 5, the mixing unit 403 may include:
a dividing module 4031 configured to divide each resampled signal obtained by the resampling unit 402 into at least one signal group; the resampling frequencies corresponding to any two resampling signals in the same signal combination are the same, and the resampling frequencies corresponding to the resampling signals between any two signal groups are different;
a digital sound mixing module 4032, configured to mix the resampled signals in each signal group divided by the dividing module 4031 to obtain a sound mixing signal corresponding to the signal group;
and the analog sound mixing module 4033 is configured to mix sound of an analog signal into which a sound mixing signal corresponding to each signal group obtained by the digital sound mixing module 4032 is converted, so as to obtain an output audio signal.
That is to say, in the audio processing system shown in fig. 5, the mixing unit 403 performs digital mixing on the resampled signals with the same resampling frequency to obtain each mixed signal, and then performs analog mixing on each mixed signal to finally obtain an output audio signal, so as to reduce the number of analog signals that need to be mixed.
Further optionally, in the audio processing system shown in fig. 5, the resampling unit 402 may include:
a judging module 4021, configured to judge whether an original sampling frequency of the audio signal is the same as a resampling frequency of the audio signal determined by the determining unit 401;
a resampling module 4022, configured to determine, when the determining module 4021 determines that the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal, the audio signal as a corresponding resampling signal; and when the determining module 4021 determines that the original sampling frequency of the audio signal is different from the resampling frequency of the audio signal, resampling the audio signal according to the resampling frequency of the audio signal to obtain a resampled signal corresponding to the audio signal, so as to obtain a resampled signal corresponding to each audio signal.
That is to say, in the audio processing system shown in fig. 5, for an audio signal with a resampling frequency that is the same as the original sampling frequency, the resampling unit 402 may directly determine the audio signal as a corresponding resampling signal, so that the resampling operation may be avoided, and the sound quality loss caused by resampling may be reduced.
It can be seen that, with the audio processing system shown in fig. 5, the resampling frequency of each audio signal can be selected from the preset output sampling frequencies, and then each audio signal is resampled to obtain a resampled signal; in addition, the audio processing system shown in fig. 5 sets a specific output sampling frequency, and performs digital audio mixing on the resampled signals with the same resampling frequency to obtain each audio mixed signal, and then performs audio mixing on the analog signals converted from each audio mixed signal to finally obtain an output audio signal, so that the number of the analog signals needing to be subjected to audio mixing can be reduced, the number of signals needing to be transmitted by data transmission buses such as I2S and the like can be reduced, further, the consumption of hardware resources can be reduced, the cost is saved, the size of a computing circuit is reduced, and the consumption of computing resources of a processor can be reduced.
EXAMPLE five
Referring to fig. 6, fig. 6 is a schematic structural diagram of another audio processing system according to an embodiment of the disclosure. As shown in fig. 6, the audio processing system may include:
a memory 601 in which executable program code is stored;
a processor 602 coupled to a memory 601;
a digital-to-analog converter 603, a codec 604, a power amplifier 605, and a speaker 606;
the processor 602 calls the executable program code stored in the memory 601 to execute the audio processing method shown in fig. 1 or fig. 2, and includes the following steps:
determining the resampling frequency of each audio signal according to the original sampling frequency of each audio signal;
the control system resamples the audio signals according to the resampling frequency of the audio signals to obtain resampling signals corresponding to the audio signals;
outputting the resampled signals to a digital-to-analog converter 603, converting each resampled signal into an analog signal, and mixing the analog signals obtained by the digital-to-analog converter 603 through a codec 604 to obtain output audio signals; the output audio signal is output to the power amplifier 605 for power amplification to drive the speaker 606 to play the output audio signal.
Optionally, in the embodiment of the present invention, the output audio signal may be obtained by:
after the resampling signals corresponding to the audio signals are obtained, dividing the resampling signals into at least one signal group according to the resampling frequency, and mixing the resampling signals in the signal group to obtain mixed signals corresponding to the signal group; the audio mixing signals are output to the digital-to-analog converter 603, each audio mixing signal is converted into an analog signal, and each analog signal obtained by the digital-to-analog converter 603 is mixed by the codec 604, so that an output audio signal is obtained.
Further optionally, in this embodiment of the present invention, a manner in which the processor 602 resamples the audio signal according to the resampling frequency of the audio signal may specifically be:
the processor 602 determines whether the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal, if so, directly determines the audio signal as a corresponding resampling signal, and if not, resamples the audio signal according to the resampling frequency of the audio signal to obtain a resampling signal corresponding to the audio signal, thereby obtaining a resampling signal corresponding to each audio signal.
An embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute an audio processing method shown in fig. 1 or fig. 2.
An embodiment of the invention discloses a computer program product comprising a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the audio processing method shown in fig. 1 or fig. 2.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are exemplary and alternative embodiments, and that the acts and modules illustrated are not required in order to practice the invention.
In various embodiments of the present invention, it should be understood that the sequence numbers of the above-mentioned processes do not imply an inevitable order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in a computer accessible memory. Based on such understanding, the technical solution of the present invention, which is a part of or contributes to the prior art in essence, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for causing a computer device (which may be a personal computer, a server, a network device, or the like, and may specifically be a processor in the computer device) to execute part or all of the steps of the above-described method of each embodiment of the present invention.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
The audio processing method and the audio processing system disclosed in the embodiments of the present invention are described in detail above, and the principles and embodiments of the present invention are explained herein by applying specific examples, and the above description of the embodiments is only used to help understanding the method and the core idea of the present invention. Meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (6)

1. The audio processing method is characterized by being applied to a vehicle-mounted audio processing system; the method comprises the following steps:
for each audio signal in each audio signal, determining an output sampling frequency which is in integral multiple relation with the original sampling frequency of the audio signal from a plurality of preset output sampling frequencies as the resampling frequency of the audio signal, thereby obtaining the resampling frequency of each audio signal; wherein, each output sampling frequency corresponds to a playing thread;
in a playing thread corresponding to the resampling frequency of each audio signal, resampling the audio signals according to the resampling frequency of the audio signals to obtain resampling signals corresponding to the audio signals;
dividing the respective resampled signals into at least one signal group; the resampling frequencies corresponding to any two resampling signals in the same signal group are the same, and the resampling frequencies corresponding to the resampling signals between any two signal groups are different;
mixing the resampling signals in the signal groups to obtain mixed signals corresponding to the signal groups, and sending the mixed signals corresponding to each signal group to a coder-decoder through an integrated circuit built-in audio bus;
and mixing the analog signals converted from the mixed sound signals corresponding to the signal groups by the coder and the decoder to obtain output audio signals.
2. The audio processing method according to claim 1, wherein the resampling the audio signals according to the resampling frequency of the audio signals to obtain the resampled signals corresponding to the respective audio signals comprises:
judging whether the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal;
if the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal, determining the audio signal as a corresponding resampling signal; and if the original sampling frequency of the audio signal is different from the resampling frequency of the audio signal, resampling the audio signal according to the resampling frequency of the audio signal to obtain a resampling signal corresponding to the audio signal, so as to obtain the resampling signal corresponding to each audio signal.
3. The audio processing method according to claim 1, wherein the predetermined output sampling frequency comprises at least 44.1kHz and 48 kHz.
4. An audio processing system, wherein an operating system of the audio processing system is an android system, the system comprising:
the device comprises a determining unit, a judging unit and a processing unit, wherein the determining unit is used for determining an output sampling frequency which is in integral multiple relation with the original sampling frequency of each audio signal from a plurality of preset output sampling frequencies as the resampling frequency of the audio signal so as to obtain the resampling frequency of each audio signal; wherein, each output sampling frequency corresponds to a playing thread;
the resampling unit is used for resampling the audio signals according to the resampling frequency of the audio signals in the playing thread corresponding to the resampling frequency of each audio signal to obtain the resampling signals corresponding to the audio signals;
a sound mixing unit, configured to mix sound of the analog signals converted from the resample signals; wherein the mixing unit includes: a dividing module for dividing the respective resampled signals into at least one signal group; the resampling frequencies corresponding to any two resampling signals in the same signal group are the same, and the resampling frequencies corresponding to the resampling signals between any two signal groups are different; the digital audio mixing module is used for mixing the resampling signals in the signal groups to obtain audio mixing signals corresponding to the signal groups, and sending the audio mixing signals corresponding to the signal groups to a coder-decoder through an integrated circuit built-in audio bus; the analog audio mixing module is used for mixing audio of analog signals converted from audio mixing signals corresponding to the signal groups through the coder and the decoder to obtain output audio signals;
and the output unit is used for outputting the output audio signal obtained after the sound mixing.
5. The audio processing system of claim 4, wherein the resampling unit comprises:
the judging module is used for judging whether the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal;
the resampling module is used for determining the audio signal as a corresponding resampling signal when the judging module judges that the original sampling frequency of the audio signal is the same as the resampling frequency of the audio signal; and when the judging module judges that the original sampling frequency of the audio signal is different from the resampling frequency of the audio signal, resampling the audio signal according to the resampling frequency of the audio signal to obtain a resampling signal corresponding to the audio signal, so as to obtain the resampling signal corresponding to each audio signal.
6. The audio processing system of claim 4, wherein the predetermined output sampling frequency comprises at least 44.1kHz and 48 kHz.
CN201811139540.2A 2018-09-28 2018-09-28 Audio processing method and audio processing system Active CN109243472B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811139540.2A CN109243472B (en) 2018-09-28 2018-09-28 Audio processing method and audio processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811139540.2A CN109243472B (en) 2018-09-28 2018-09-28 Audio processing method and audio processing system

Publications (2)

Publication Number Publication Date
CN109243472A CN109243472A (en) 2019-01-18
CN109243472B true CN109243472B (en) 2022-08-16

Family

ID=65057551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811139540.2A Active CN109243472B (en) 2018-09-28 2018-09-28 Audio processing method and audio processing system

Country Status (1)

Country Link
CN (1) CN109243472B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112346700B (en) * 2020-11-04 2023-06-13 浙江华创视讯科技有限公司 Audio transmission method, device and computer readable storage medium
CN114138226B (en) * 2021-11-30 2023-05-23 重庆长安汽车股份有限公司 Car machine audio mixing method and device, controller and car

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070100606A1 (en) * 2005-11-01 2007-05-03 Rogers Kevin C Pre-resampling to achieve continuously variable analysis time/frequency resolution
CN102610267A (en) * 2012-03-16 2012-07-25 广东步步高电子工业有限公司 Method for improving audio playing quality of playing system
CN105280212A (en) * 2014-07-25 2016-01-27 中兴通讯股份有限公司 Audio mixing and playing method and device
CN106205649A (en) * 2015-04-30 2016-12-07 无锡冰河计算机科技发展有限公司 Adjust method and the audio-frequence player device of audio frequency output
CN106528040A (en) * 2016-11-02 2017-03-22 福建星网视易信息系统有限公司 Method and apparatus for improving audio quality of android device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070100606A1 (en) * 2005-11-01 2007-05-03 Rogers Kevin C Pre-resampling to achieve continuously variable analysis time/frequency resolution
CN102610267A (en) * 2012-03-16 2012-07-25 广东步步高电子工业有限公司 Method for improving audio playing quality of playing system
CN105280212A (en) * 2014-07-25 2016-01-27 中兴通讯股份有限公司 Audio mixing and playing method and device
CN106205649A (en) * 2015-04-30 2016-12-07 无锡冰河计算机科技发展有限公司 Adjust method and the audio-frequence player device of audio frequency output
CN106528040A (en) * 2016-11-02 2017-03-22 福建星网视易信息系统有限公司 Method and apparatus for improving audio quality of android device

Also Published As

Publication number Publication date
CN109243472A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
US9947318B2 (en) System and method for processing an audio signal captured from a microphone
CN106910510A (en) Vehicle-mounted power amplifying device, vehicle and its audio play handling method
CN109243472B (en) Audio processing method and audio processing system
CN109905814B (en) In-vehicle multi-audio playing method, vehicle-mounted audio system and vehicle
CN105989824B (en) Karaoke system of mobile equipment and mobile equipment
KR20020000878A (en) Musical sound generator
TW200903447A (en) Efficient identification of sets of audio parameters
CN113270082A (en) Vehicle-mounted KTV control method and device and vehicle-mounted intelligent networking terminal
CN112307161B (en) Method and apparatus for playing audio
JP3901475B2 (en) Signal coupling device, signal coupling method and program
CN108491473A (en) Audio file playing method and device, electronic equipment and medium
WO2010084830A1 (en) Voice processing device, chat system, voice processing method, information storage medium, and program
CN109274826B (en) Voice playing mode switching method and device, terminal and computer readable storage medium
CN112685000A (en) Audio processing method and device, computer equipment and storage medium
CN111767022A (en) Audio adjusting method and device, electronic equipment and computer readable storage medium
US20050262256A1 (en) Method and device for multimedia processing
CN111477218A (en) Multi-voice recognition method, device, terminal and non-transitory computer-readable storage medium
CN110164481A (en) A kind of song recordings method, apparatus, equipment and storage medium
CN1632859B (en) Method for implementing simultaneous playing of MIDI music and sound effect by MIDI synthesizer
US20090116653A1 (en) Audio signal processing device, audio signal processing method, program thereof, and recording meduim containing the program
US20040234078A1 (en) Method for automatically testing output audio signals
CN115223582B (en) Audio noise processing method, system, electronic device and medium
WO2023026555A1 (en) Information processing device, information processing method, and program
JP7105320B2 (en) Speech Recognition Device, Speech Recognition Device Control Method, Content Playback Device, and Content Transmission/Reception System
US8914475B2 (en) Method, device and terminal for editing and playing music according to data download speed

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