CN-119544684-B - Delay synchronization and mixing processing method and system between acoustic equipment cascade
Abstract
The invention discloses a delay synchronization and mixing processing method and system between acoustic equipment cascade connection, which comprise a master equipment and a plurality of slave equipment, wherein the master equipment and the slave equipment establish a communication network, the master equipment sends information to all the slave equipment, the communication time delay from the sending of the master equipment to the receiving of the replies of the slave equipment is recorded, the master equipment sends a starting instruction to all the slave equipment, the receiving of the slave equipment audio data sent by each slave equipment is carried out synchronization with all the slave equipment according to the communication time delay T (n) at preset time intervals, and the master equipment mixes the synchronized slave equipment audio data sent by the slave equipment and outputs the audio data after the mixing. The slave equipment is sent to instruct to confirm the delay, the channel data is shifted and synchronized according to the delay, the delay is confirmed in real time in the data transmission process, and the mixing is carried out according to the channel weight, so that the balance and quality of the mixing are ensured, and the synchronization rate of the multi-channel audio data is ensured.
Inventors
- ZHOU ZIRUI
- ZHU ZHENGHUI
- LI CHANGLV
- ZHANG CHANGHUA
Assignees
- 广东保伦电子股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241129
Claims (4)
- 1. The delay synchronization and mixing processing method between acoustic device cascade connection comprises a master device and a plurality of slave devices, and is characterized by comprising the following steps: The method comprises the steps that a communication network is established between a master device and slave devices, the master device sends information to all the slave devices, the communication time delay from the sending of the master device to the receiving of replies of the slave devices is recorded, and the communication time delay between the master device and an nth slave device is recorded as T (n); The master device sends a starting instruction to all the slave devices, the master device starts to receive the slave device audio data sent by each slave device, and the master device synchronizes with all the slave devices at preset time intervals according to the communication time delay T (n) to monitor the data transmission state; the master device mixes the audio data of all the synchronized slave devices sent by the slave devices, outputs the audio data after mixing, The master device synchronizes with all slave devices at preset time intervals according to the communication time delay T (n), the specific implementation method comprises the steps of obtaining local time delay L (n) from the start instruction receiving of each slave device to the start of audio data transmission, sending a synchronization instruction to all slave devices by the master device at preset time intervals, requesting all slave devices to report the frame number of the audio data of the transmitted slave devices, updating the communication time delay T (n), carrying out frame calibration and alignment on the audio data of all slave devices according to the frame number of the audio data transmitted by each slave device by combining the communication time delay T (n) and the local time delay L (n), The specific implementation mode of the frame calibration is that for each slave device, after the communication delay and the local delay of the corresponding slave device are added by the master device, the calibration is carried out according to the frame number of the audio data of the slave device which is reported by the corresponding slave device and is sent, when the frame number of the audio data frame received by the master device is not coincident with the frame number of the audio data frame sent by the slave device, the frame is complemented by the missing audio data frame with zero value, the redundant audio data frame is thrown, The master device mixes the audio data of all the slave devices sent by the slave devices after synchronization, and the specific implementation mode is that each slave device corresponds to one channel, calculates the mixing weight of each channel, performs mixing processing according to the mixing weight, The method for calculating the mixing weight specifically comprises the following steps of calculating an average value A of amplitudes of all sampling points of one channel within one second for each channel: Where N represents the sampling frequency, Representing the amplitude of the channel at the ith sample point; the amplitude ratio within one second per channel is calculated: wherein j represents a j-th channel, B represents a sampling bit depth, and M represents a maximum value of a data type; calculating a weight quantization factor of each channel: Wherein, the Representing the weight quantization factor of the j-th channel, The specific implementation method comprises multiplying the value of each channel at the current sampling point by the weight quantization factor of the corresponding channel, and adding to obtain the mixing result : Wherein, the Representing the amplitude of the jth channel at the ith sample point, Representing the weight quantization factor of the j-th channel.
- 2. The method for delay synchronization and mixing between acoustic device cascades according to claim 1, wherein the master device and the slave device establish a communication network, specifically comprising establishing the communication network through socks.
- 3. The method for processing delay synchronization and mixing between acoustic device cascades according to claim 1, wherein the alignment is implemented by calibrating slave device audio data sent by each slave device according to a communication time delay T (n), and the master device delays or advances each slave device audio data until the frame order of the slave device audio data received by the master device at the same time is the same.
- 4. A delay synchronization and mixing processing system between acoustic device cascades, comprising a master device and a plurality of slave devices, characterized by comprising: The communication establishing module is used for enabling the master equipment and the slave equipment to establish a communication network, the master equipment sends information to all the slave equipment, the communication time delay from the sending of the master equipment to the receiving of the replies of the slave equipment is recorded, and the communication time delay between the master equipment and the nth slave equipment is recorded as T (n); a data synchronization module for enabling the master device to send a start instruction to all the slave devices, the master device starts to receive the slave device audio data sent by each slave device, the master device synchronizes with all the slave devices at preset time intervals according to the communication time delay T (n), monitors the data transmission state, The master device synchronizes with all slave devices at preset time intervals according to the communication time delay T (n), the specific implementation method comprises the steps of obtaining local time delay L (n) from the start instruction receiving of each slave device to the start of audio data transmission, sending a synchronization instruction to all slave devices by the master device at preset time intervals, requesting all slave devices to report the frame number of the audio data of the transmitted slave devices, updating the communication time delay T (n), carrying out frame calibration and alignment on the audio data of all slave devices according to the frame number of the audio data transmitted by each slave device by combining the communication time delay T (n) and the local time delay L (n), For each slave device, after the communication delay and the local delay of the corresponding slave device are added by the master device, calibrating according to the frame number of the audio data of the slave device which is reported by the corresponding slave device and is sent, when the frame number of the audio data frame received by the master device is not consistent with the frame number of the audio data frame sent by the slave device, supplementing the frame of the missing audio data frame by using a zero value, and throwing the frame of the redundant audio data frame; an audio mixing module for enabling the master device to mix all the synchronized slave device audio data sent by the slave device, outputting the mixed audio data, The master device mixes the audio data of all the slave devices sent by the slave devices after synchronization, and the specific implementation mode is that each slave device corresponds to one channel, calculates the mixing weight of each channel, performs mixing processing according to the mixing weight, The method for calculating the mixing weight specifically comprises the following steps of calculating an average value A of amplitudes of all sampling points of one channel within one second for each channel: Where N represents the sampling frequency, Representing the amplitude of the channel at the ith sample point; the amplitude ratio within one second per channel is calculated: wherein j represents a j-th channel, B represents a sampling bit depth, and M represents a maximum value of a data type; calculating a weight quantization factor of each channel: Wherein, the Representing the weight quantization factor of the j-th channel, The specific implementation method comprises multiplying the value of each channel at the current sampling point by the weight quantization factor of the corresponding channel, and adding to obtain the mixing result : Wherein, the Representing the amplitude of the jth channel at the ith sample point, Representing the weight quantization factor of the j-th channel.
Description
Delay synchronization and mixing processing method and system between acoustic equipment cascade Technical Field The present invention relates to the field of audio processing technologies, and in particular, to a method and a system for processing delay synchronization and mixing between acoustic device cascades. Background Mixing is the integration of audio from multiple sources into a single or stereo track. These mixed sound signals, which may originate from different instruments, voices or strings, often have multiple channels of audio to be mixed, so how to synchronize and balance the multiple channels of audio is particularly critical. The wired cascade acoustic equipment is one of application scenes of mixing, and in the existing POE cascade acoustic equipment or other wired cascade acoustic equipment, a data synchronization and mixing method during recording and playing is lacked. In the prior art, ultrasonic signals are mostly used as audio time stamps for synchronization, when the frequency supported by a loudspeaker power amplifier is low, the method cannot be used, or optimization is performed on hardware, and the method cannot be conveniently applied to software. Meanwhile, when data addition is carried out in a general sound mixing algorithm, problems such as data overflow, sound distortion and the like can be caused, or the data cannot be well adaptively adjusted according to each channel. Therefore, there is a need for a method of improving the mixing quality of a wired tandem acoustic device while guaranteeing the synchronization rate. Disclosure of Invention In order to solve the problems, the invention provides a delay synchronization and mixing processing method and system between acoustic equipment cascades, which synchronize multi-channel audio by collecting communication delay and mix according to channel weights, thereby solving the problems that the existing wired cascade mixing cannot be used for balancing data synchronization and mixing quality. In order to achieve the above purpose, the present invention provides the following technical solutions: A delay synchronization and mixing processing method between acoustic device cascade connection comprises a master device and a plurality of slave devices, and comprises the following steps: the master device establishes a communication network with the slave devices, the master device sends information to all the slave devices, the communication time delay from the sending of the master device to the receiving of the replies of the slave devices is recorded, and the communication time delay between the master device and the nth slave device is recorded as T (n). Further, the master device and the slave device establish a communication network, which specifically includes establishing the communication network through socks. Further, the master device synchronizes with all the slave devices at preset time intervals according to the communication time delay T (n), and further comprises the step of obtaining the local time delay L (n) from the start instruction receiving to the start of audio data sending of each slave device. The master device sends out synchronous instructions to all the slave devices at preset time intervals, and the master device requests all the slave devices to report the frame number of the sent slave device audio data, updates the communication time delay T (n), and performs frame calibration and alignment on all the slave device audio data according to the frame number of the sent slave device audio data and the communication time delay T (n) and the local time delay L (n). Further, the frame calibration is specifically implemented in such a way that for each slave device, after the communication delay and the local delay of the corresponding slave device are added to the master device, calibration is performed according to the number of frames of the audio data of the slave device, which are reported by the corresponding slave device and are sent, and when the number of frames of the audio data frame received by the master device does not coincide with the number of frames of the audio data frame sent by the slave device, the missing audio data frame is subjected to frame filling by using a zero value, and the redundant audio data frame is subjected to frame dropping. Further, the alignment is specifically implemented by calibrating slave device audio data sent by each slave device according to the communication time delay T (n), and the master device delays or advances each slave device audio data until the slave device audio data frames received by the master device at the same time are identical in order. Furthermore, the master device mixes the audio data of all the slave devices sent by the slave devices after synchronization, and the specific implementation manner is that each slave device corresponds to one channel, the mixing weight of each channel is calculated, and the mixing processing is carried out