Bluetooth audio playback processing method and device, chip and Bluetooth device
By calculating and adaptively adjusting the delay value of Bluetooth audio devices, the problem of delay in TWS Bluetooth audio devices after audio data transmission is solved, low-latency playback and stable audio output are achieved, and user experience and product competitiveness are improved.
Patent Information
- Application Number
- CN202111165554.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2041-09-30
AI Technical Summary
After the audio data is transmitted from the host to the device wirelessly, there is a certain delay, which affects the user experience, and consumers want this delay to be reduced as much as possible.
By calculating the overall delay of audio data from entering the Bluetooth buffer to output from the audio buffer, and adaptively adjusting the target delay value, adjusting the playback speed of audio data to control the delay according to the frame interval time and the underloading of the audio buffer.
It realizes low-latency playback, meets users' demand for low-latency experience, improves product competitiveness, and maintains playback stability under unstable audio data transmission.
Smart Images

Figure CN114268932B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of audio data processing, and particularly to a Bluetooth audio playback processing method, apparatus, chip, and Bluetooth device. Background Art
[0002] With the application and popularization of TWS (True Wireless Stereo) audio devices, consumers' expectations for the performance of TWS audio devices are getting higher and higher. Audio data is wirelessly transmitted from a host (such as a mobile phone, computer, iPad, etc.) to a Bluetooth audio device (such as TWS Bluetooth headphones, TWS Bluetooth speakers, etc.). After the TWS audio device processes the audio data and outputs it, there is a certain delay in the audio data output from the host audio data to the TWS audio device, and consumers hope to minimize this delay.
[0003] Taking TWS Bluetooth headphones as an example for illustration, more and more users hope that using TWS Bluetooth headphones can also achieve or approach the delay level of traditional wired headphones, that is, low-delay playback. Therefore, developers have begun to pay more attention to controlling the data delay level of the receiving section of Bluetooth headphones, and expect to control the delay of receiving-end playback within a smaller range to achieve the purpose of low-delay playback, so as to meet user needs and improve product competitiveness. Summary of the Invention
[0004] Based on the above situation, the main purpose of the present invention is to provide a low-delay playback solution, and in particular, to provide a Bluetooth audio playback processing method, apparatus, chip, and Bluetooth device.
[0005] To achieve the above object, the technical solution adopted by the present invention is as follows: A Bluetooth audio playback processing method includes the steps of: Step S100: calculating the overall delay t of audio data from entering the Bluetooth buffer to being output from the audio buffer; Step S200: calculating the average value of the overall delay t within a preset duration T; Step S300: comparing the average value of the overall delay t with a target delay value d to obtain a difference Δt, and adaptively adjusting the target delay value d according to the frame interval time t0 for the Bluetooth buffer to receive audio data and the underrun condition of the audio buffer; wherein, the target delay value d is not less than the frame interval time t0; Step S400: comparing the difference Δt with a preset delay difference tp, and determining whether to adjust the number of sampling points for resampling the audio data in the audio buffer according to the comparison result; and Step S500: resampling the audio data in the audio buffer according to the number of sampling points to control the playback speed of the audio data in the audio buffer.
[0006] Preferably, the step S100 specifically includes the following steps: Step S101: Obtain the audio data buffer delay t1 of the Bluetooth buffer; Step S102: Obtain the input data volume a1 of the audio buffer and the output data volume a2 of the audio buffer, calculate the data volume difference a, and calculate the audio output delay t2 corresponding to the data volume difference a, where a = a1 - a2; and Step S103: Calculate the overall delay t, where t = t1 + t2.
[0007] Preferably, in step S101, obtain the encoding information and the total data volume of the audio data in the Bluetooth buffer, calculate the number of sampling points of the audio data in the Bluetooth buffer, and calculate the audio data buffer delay t1 of the Bluetooth buffer through the number of sampling points and the sampling rate; in step S102, calculate the number of sampling points corresponding to a according to the data volume included in each sampling point, and calculate the audio output delay t2 through the number of sampling points and the sampling rate.
[0008] Preferably, in step S300, when it is detected that the frame interval time t0 increases or the audio buffer is underrun, increase the target delay value d; when it is detected that the audio buffer has not been underrun for a period of time, decrease the target delay value d.
[0009] Preferably, the maximum value of the target delay value d is max_d; in step S300, adaptively adjusting the target delay value d according to the frame interval time t0 for the Bluetooth buffer to receive audio data specifically includes: Step S311: Detect the frame interval time t0; Step S312: Compare the frame interval time t0 with the maximum frame interval time max_t0; if t0 > max_t0, update the maximum frame interval time max_t0 to the frame interval time t0, and enter step S313; if t0 ≤ max_t0, return to step S311; Step S313: Compare the maximum frame interval time max_t0 with the current target delay value d and the maximum target delay value max_d respectively. If d < max_t0 < max_d, update the target delay value d to the maximum frame interval time max_t0; if max_t0 > max_d, update the target delay value d to the maximum target delay value max_d; if max_t0 < d, return to step S311.
[0010] Preferably, in step S300, adaptively adjusting the target delay value d according to the underrun condition of the audio buffer specifically includes: Step S321: Detect whether the audio buffer is underrun; if it is underrun, enter step S322, if it is not underrun, and after the duration of no underrun reaches the preset duration Ti, enter step S323; Step S322: Increase the target delay value d; Step S323: Decrease the target delay value d.
[0011] Preferably, step S322 is: Compare the target delay value d with (max_t0 + m), where m > 0, and the maximum value of the target delay value d is max_d; if d < (max_t0 + m), and (max_t0 + m) > max_d, then update the target delay value d to max_d; if d < (max_t0 + m), and (max_t0 + m) < max_d, then update the target delay value d to (max_t0 + m); if d > (max_t0 + m), and (d + m) > max_d, then update the target delay value d to max_d; if d > (max_t0 + m), and (d + m) < max_d, then increase the target delay value d by m.
[0012] Preferably, 10 ≤ m ≤ 60, 300ms ≤ max_d ≤ 700ms.
[0013] Preferably, the minimum value of the target delay value d is A, and the maximum value is max_d; step S323 includes: Step S323a: Compare the target delay value d with the minimum target delay value A and max_t0 respectively. If d > A and max_t0 < d, then transfer to step S323b, otherwise return to step S321; Step S323b: Judge whether (d - n) is less than A. If (d - n) < A, then transfer to step S323c. If not, then update the target delay value d to (d - n), where n > 0; Step S323c: Judge whether A is less than (max_t0 + x). If so, update the target delay value d to (max_t0 + x), otherwise update the target delay value d to the minimum target delay value A, where x > 0.
[0014] Preferably, 10 ≤ n ≤ 60, 1 ≤ x ≤ 10, 10ms ≤ A ≤ 100ms, 300ms ≤ max_d ≤ 700ms.
[0015] Preferably, step S321 includes: step S321a: detecting whether an underrun occurs in the audio buffer; step S321b: if it is detected that an underrun occurs in the audio buffer, setting the underrun flag to underrun, otherwise, maintaining the underrun flag as non-underrun; step S321c: detecting whether the underrun flag is underrun; if it is underrun, initializing the underrun flag to non-underrun and transferring to step S322, if it is detected that the underrun flag is non-underrun, then executing step S321d; step S321d: detecting whether the time when the underrun flag is non-underrun exceeds a preset duration Ti, if so, transferring to step S323, otherwise returning to step S321a.
[0016] Preferably, in step S400, when the mean value of the overall delay t is less than the target delay value d and |Δt| > tp, the number of sampling points is increased; when the mean value of the overall delay t is greater than the target delay value d and |Δt| > tp, the number of sampling points is decreased.
[0017] Preferably, in step S400, when |Δt| < tp, the number of sampling points is not adjusted; when |Δt| > tp, the number of sampling points is adjusted to a first number of sampling points, where the first number of sampling points is a certain number of sampling points in the sampling point interval, and the sampling interval is the set of the number of sampling points for resampling the audio data in the audio buffer corresponding to when |Δt| remains less than the delay difference tp.
[0018] Preferably, the first number of sampling points is the number of sampling points corresponding to the target delay value d.
[0019] Preferably, in step S400, the number of sampling points is adjusted to the first number of sampling points at a set step size uniformly. Or in step S400, the number of sampling points is adjusted to the first number of sampling points in a first mode; where in the first mode, the number of sampling points is adjusted by first uniform acceleration, uniform speed, and second uniform acceleration in sequence, the acceleration of the first uniform acceleration is positive, and the acceleration of the second uniform acceleration is negative.
[0020] Preferably, in the first mode, a maximum adjustment speed is set; when the number of sampling points is adjusted to the first number of sampling points, the adjustment speed tends to 0.
[0021] The present invention also provides a Bluetooth audio playback processing device, including: a delay calculation module for calculating the overall delay t of audio data from entering the Bluetooth buffer to being output from the audio buffer; a delay average calculation module for calculating the average value of the overall delay t within a preset duration T; a target delay value adjustment module for adaptively adjusting the target delay value d according to the frame interval time t0 at which the Bluetooth buffer receives audio data and the underrun condition of the audio buffer; wherein the target delay value d is not less than the frame interval time t0; a comparison module for comparing the average value of the overall delay t with the target delay value d to obtain a difference Δt; a sampling point number adjustment module for determining whether to adjust the sampling point number of resampling the audio data in the audio buffer according to the comparison result; and a resampling module for resampling the audio data in the audio buffer according to the sampling point number to control the playback speed of the audio data in the audio buffer.
[0022] Preferably, the delay calculation module includes: a first calculation module for obtaining the audio data buffer delay t1 of the Bluetooth buffer; a second calculation module for calculating the data volume difference a and calculating the audio output delay t2 corresponding to the data volume difference a, where a = a1 - a2, where a1 is the input data volume a1 of the audio buffer and a2 is the output data volume of the audio buffer; and an overall delay calculation module for calculating the overall delay t, where t = t1 + t2.
[0023] Preferably, the target delay value adjustment module increases the target delay value d when the frame interval time t0 increases or the audio buffer experiences an underrun; and decreases the target delay value d when the audio buffer has not experienced an underrun for a period of time.
[0024] Preferably, the maximum value of the target delay value d is max_d, and the target delay value adjustment module includes: a Bluetooth feedback module for updating the target delay value d according to the frame interval time t0; if t0 > max_t0, then the maximum frame interval time max_t0 is updated to the frame interval time t0, if t0 ≤ max_t0, then the target delay value d is not updated; after max_t0 is updated, if d < max_t0 < max_d, then the target delay value d is updated to the maximum frame interval time max_t0; if max_t0 > max_d, then the target delay value d is updated to the maximum frame interval time max_d; if max_t0 < d, the target delay value d is not updated.
[0025] Preferably, the target delay value adjustment module includes: an audio feedback module for updating the target delay value d according to the underrun condition of the audio buffer; when the audio buffer has an underrun, the target delay value d is increased, and when the audio buffer has not had an underrun for a preset duration Ti, the target delay value d is decreased.
[0026] Preferably, the minimum value of the target delay value d is A, the maximum value is max_d, m > 0, n > 0; when the audio buffer has an underrun, the rule for the audio feedback module to update the target delay value d is as follows: if the target delay value d < (max_t0 + m) and (max_t0 + m) > max_d, then the target delay value d is updated to max_d; if the target delay value d < (max_t0 + m) and (max_t0 + m) < max_d, then the target delay value d is updated to (max_t0 + m); if the target delay value d > (max_t0 + m) and (d + m) > max_d, then the target delay value d is updated to max_d; if the target delay value d > (max_t0 + m) and (d + m) < max_d, then the target delay value d is increased by m; when the audio buffer has not had an underrun for a duration Ti, the rule for the audio feedback module to update the target delay value d is as follows: if d > A and max_t0 < d, then it is determined whether (d - n) is less than A, otherwise the target delay value d is not updated; if (d - n) < A, then it is determined whether A is less than (max_t0 + x), and if so, the target delay value d is updated to (d - n); if A < (max_t0 + x), the target delay value d is updated to (max_t0 + x), otherwise, the target delay value d is updated to the minimum target delay value A.
[0027] Preferably, when the average value of the overall delay t is less than the target delay value d and |Δt| > tp, the sampling point number adjustment module increases the number of sampling points; when the average value of the overall delay t is greater than the target delay value d and |Δt| > tp, the sampling point number adjustment module decreases the number of sampling points; the number of sampling points is adjusted uniformly at a set step size.
[0028] Preferably, when Δt < tp, the sampling point number adjustment module does not adjust the number of sampling points; when Δt > tp, the sampling point number adjustment module adjusts the number of sampling points to a first sampling point number, where the first sampling point number is a certain sampling point number in the sampling point interval, and the sampling interval is the set of sampling point numbers for resampling the audio data in the audio buffer when |Δt| remains less than the delay difference tp.
[0029] Preferably, the first number of sampling points is the number of sampling points corresponding to the target delay value d.
[0030] The present invention also provides a chip, which includes the Bluetooth audio playback processing device as described above; or includes a storage medium storing a computer program, and when the computer program is executed by a processor, it can implement the Bluetooth audio playback processing method as described above.
[0031] The present invention also provides a Bluetooth device, which includes the Bluetooth audio playback processing device as described above; or includes a storage medium storing a computer program, and when the computer program is executed by a processor, it can implement the Bluetooth audio playback processing method as described above.
[0032] Preferably, the Bluetooth device is a Bluetooth headset.
[0033] The Bluetooth audio data processing method provided by the present invention can more accurately obtain the current actual delay situation by calculating the overall delay of the audio data in the Bluetooth buffer and the audio buffer. The target delay value d is adaptively adjusted according to the actual playback situation (frame interval time t0 and underrun situation of the audio buffer), and the playback speed of the audio data in the buffer is controlled according to the comparison result between the delay situation and the target delay value d. In a low-latency Bluetooth playback system, using this technical solution for delay control can meet the low-latency and stable playback of Bluetooth devices with higher transmission efficiency. When the Bluetooth device is connected to a host with unstable audio data transmission, the compatibility in the low-latency mode can be improved, meeting the smooth playback of users under the current minimum transmission delay, and enhancing the product competitiveness.
[0034] The Bluetooth audio data processing device, chip and Bluetooth device provided by the present invention also have the above advantages.
[0035] Other beneficial effects of the present invention will be described in the specific implementation manner through the introduction of specific technical features and technical solutions. Those skilled in the art should be able to understand the beneficial technical effects brought by the technical features and technical solutions through these introductions. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The following will describe the preferred embodiments of the Bluetooth audio playback processing method, device, chip and Bluetooth device according to the present invention with reference to the drawings. In the drawings:
[0037] Figure 1 is a schematic flowchart of the Bluetooth audio playback processing method according to an embodiment of the present invention.
[0038] Figure 2 is a detailed schematic diagram of step S100 in the Bluetooth audio playback processing method according to an embodiment of the present invention.
[0039] Figure 3It is a schematic diagram of mean value calculation in step S200 of the Bluetooth audio playback processing method according to an embodiment of the present invention.
[0040] Figure 4 and Figure 5 It is a schematic diagram of the detailed steps of step S300 of the Bluetooth audio playback processing method according to an embodiment of the present invention.
[0041] Figure 6 It is a schematic diagram of the module structure of the Bluetooth audio playback processing device according to an embodiment of the present invention. Detailed implementation manners
[0042] The following describes the present invention based on embodiments, but the present invention is not limited to these embodiments. In the following detailed description of the present invention, some specific details are described in detail. In order to avoid obscuring the essence of the present invention, well-known methods, processes, procedures, and components are not described in detail.
[0043] In addition, those of ordinary skill in the art should understand that the drawings provided here are all for illustrative purposes, and the drawings are not necessarily drawn to scale.
[0044] Unless the context clearly requires otherwise, the words such as "including", "comprising" and the like in the whole specification and claims should be interpreted as the meaning of including rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".
[0045] In the description of the present invention, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "a plurality of" is two or more.
[0046] The present invention provides a low-latency playback solution, and in particular provides a Bluetooth audio playback processing method. Through this method, the playback speed of audio data can be controlled to achieve low-latency playback while ensuring that the audio signal is played as smoothly as possible. The Bluetooth audio playback processing device, chip, and Bluetooth device provided by the present invention can also achieve low-latency playback.
[0047] As an existing technology, Bluetooth devices include but are not limited to Bluetooth headsets, Bluetooth speakers, etc. The Bluetooth device wirelessly receives audio data from a host. After the audio data is pre-decoded, decoded, and resampled at the Bluetooth device end, digital audio data (such as PCM audio data) is output to a digital-to-analog converter (DAC). The DAC converts the digital audio data into an analog signal for output, and finally the speaker converts the analog signal into a sound signal. It can be understood that after resampling, the audio data can also be processed such as for sound effects or mixing. The audio data transmitted from the host end is received by the Bluetooth device and cached in a Bluetooth buffer, and after decoding processing, it is cached in an audio buffer. The audio buffer caches the audio data, so that when the audio data sent from the host to the Bluetooth device is transmitted unstably for a short period, it can ensure that there is enough audio data cached at the playback end for playback, thus guaranteeing the playback effect of the Bluetooth device. The Bluetooth audio playback processing method, device, chip, and Bluetooth device provided by the present invention control the playback speed (consumption speed) of the audio data in the buffer to achieve low-latency playback while ensuring that the audio signal is played as smoothly as possible.
[0048] The present invention provides a Bluetooth audio playback processing method, including steps S100 to S500.
[0049] In step S100, calculate the overall delay t of the audio data from entering the Bluetooth buffer to being output from the audio buffer.
[0050] In step S200, calculate the average value of the overall delay t within a preset duration T.
[0051] In step S300, compare the average value of the overall delay t with a target delay value d to obtain a difference △t, and adaptively adjust the target delay value d according to the frame interval time t0 for the Bluetooth buffer to receive audio data and the underrun situation of the audio buffer; wherein, the target delay value d is not less than the frame interval time t0.
[0052] In step S400, compare the difference △t with a preset delay difference tp, and determine whether to adjust the number of sampling points for resampling the audio data in the audio buffer according to the comparison result.
[0053] In step S500, resample the audio data in the audio buffer according to the number of sampling points to control the playback speed of the audio data in the audio buffer.
[0054] In step S100, calculate the overall delay t of the audio data from entering the Bluetooth buffer to being output from the audio buffer.
[0055] Please refer to Figure 2 , as an embodiment, step S100 includes steps S101 to S103.
[0056] In step S101, obtain the audio data buffer delay t1 of the Bluetooth buffer. Obtain the encoding information and total data volume of the audio data in the Bluetooth buffer, calculate the number of sampling points of the audio data in the Bluetooth buffer, and obtain the audio data buffer delay t1 of the Bluetooth buffer through the number of sampling points and the sampling rate. For example, if the calculated data volume of the Bluetooth buffer is 4000 sampling points and the device sampling rate is set to 44.1k, (4000÷44100) = 90.7ms, that is, t1 is 90.7ms.
[0057] In step S102, obtain the input data volume a1 of the audio buffer and the output data volume a2 of the audio buffer, calculate the data volume difference a, a = a1 - a2, and calculate the corresponding audio output delay t2 for a. Obtain the input data volume a1 of the audio buffer and the output data volume a2 of the audio buffer, calculate the data volume difference a, a = a1 - a2, and calculate the corresponding audio output delay t2 for a. As an embodiment, calculate the number of sampling points corresponding to a according to the data volume included in each sampling point, and obtain the audio output delay t2 through the number of sampling points and the sampling rate. For example, at a certain moment, the input data volume a1 of the audio buffer is 40000, and the output data volume of the audio buffer is 8000, then a = 32000. Taking 8 (8 is the data volume of each sampling point) bits for 1 sampling point as an example, a corresponds to 4000 sampling points, calculate the audio output delay t2 corresponding to a, set the device sampling rate to 44.1k, (4000÷44100) = 90.7ms, that is, t2 is 90.7ms.
[0058] In step S103, calculate the overall delay t, t = t1 + t2.
[0059] By calculating the delay t2 of the audio buffer within the overall delay t in step S100, the actual delay of the audio data can be calculated more accurately, so as to more accurately control the playback speed of the audio data in the buffer. It can be understood that in step S100, the method of obtaining the overall delay t is not limited, and any other obtaining method is acceptable.
[0060] In step S200, calculate the average value of the overall delay t within the preset duration T.
[0061] Please refer to Figure 3 , because in actual playback, the audio data transmission between the host and the Bluetooth device is unstable, so the result after audio data buffer statistics is fluctuating. The overall delay t at a single moment cannot reflect the true delay situation of the Bluetooth device. After accumulating and averaging the overall delay t within the preset duration T, a more stable average value of the overall delay t can better reflect the true delay situation of the Bluetooth device. Figure 2 For example, the preset duration includes 10 time intervals, and there is a moment between each time interval.
[0062] In step S300, the mean value of the overall delay t is compared with the target delay value d to obtain a difference Δt, and the target delay value d is adaptively adjusted according to the frame interval time t0 of receiving audio data in the Bluetooth buffer and the underrun condition of the audio buffer; wherein, the target delay value d is not less than the frame interval time t0.
[0063] The minimum value of the target delay value d is A, and the maximum value is max_d. As an embodiment, 10ms ≤ A ≤ 100ms, 300ms ≤ max_d ≤ 700ms. As a specific embodiment, A = 60ms, max_d = 500ms. The maximum target delay value max_d is the upper limit of the overall system delay, that is, the upper limit of the buffer setting of the system. The maximum target delay value max_d can be set according to the RAM resources of the hardware system and the application scenario. The more RAM is allocated to the Bluetooth buffer, the larger the maximum target delay value max_d that can be set; when the RAM resources are sufficient, the main application scenario of the Bluetooth audio solution needs to be considered. Generally, when the maximum delay of a Bluetooth audio device exceeds 500ms, there will be an out-of-sync situation between audio and video during simultaneous audio and video playback. If the Bluetooth audio device needs to be compatible with more interference situations, a larger delay upper limit needs to be set to offset the instability of wireless transmission.
[0064] As an embodiment, in step S300, when it is detected that the frame interval time t0 increases or the audio buffer undergoes an underrun, the target delay value d is increased; when it is detected that the audio buffer has not undergone an underrun for a period of time, the target delay value d is decreased.
[0065] Please refer to Figure 4 , as an embodiment, step S300 adaptively adjusts the target delay value d according to the frame interval time t0 of receiving audio data in the Bluetooth buffer, which specifically includes steps S311 to S313.
[0066] In step S311, the frame interval time t0 is detected. The frame interval time t0 can directly reflect the stability of audio data transmission between the host and the Bluetooth device.
[0067] In step S312, the frame interval time t0 is compared with the maximum frame interval time max_t0; if t0 > max_t0, the maximum frame interval time max_t0 is updated to the frame interval time t0, and step S313 is entered; if t0 ≤ max_t0, there is no need to adjust the target delay value d, and step S311 is returned to continue detecting whether the frame interval time t0 increases.
[0068] In step S313, max_t0 is compared with the current target delay value d and the preset maximum target delay value max_d respectively, and the adjustment of the target delay value d is determined according to the comparison results as follows:
[0069] If condition 1 is satisfied: the target delay value d < max_t0 < max_d, then the target delay value d is updated to the maximum frame interval time max_t0.
[0070] If condition 2 is satisfied: max_t0 > max_d, then the target delay value d is updated to the maximum target delay value max_d.
[0071] If condition 3 is satisfied: max_t0 < d, return to step S311.
[0072] As an embodiment, step S300 adaptively adjusts the target delay value d according to the underrun situation of the audio buffer, specifically as steps S321 to S323.
[0073] In step S321, it is detected whether the audio buffer has an underrun; if an underrun occurs, enter step S322, if no underrun occurs, and after the duration of no underrun reaches the preset duration Ti, enter step S323. As an embodiment, Ti is 60s.
[0074] In one embodiment, when an underrun feedback (i.e., audio output underrun) occurs during the operation of the DAC, it indicates that the audio buffer has an underrun.
[0075] In step S322, the target delay value d is increased.
[0076] In step S323, the target delay value d is decreased.
[0077] As an embodiment, step S321 includes steps S321a to S321d.
[0078] In step S321a, it is detected whether the audio buffer has an underrun. If the audio data in the audio buffer is lower than the threshold (the threshold can be 0), it is determined that the audio buffer has an underrun.
[0079] In step S321b, if it is detected that the audio buffer has an underrun, the underrun flag is set to 1, otherwise, the underrun flag maintains its initial value of 0. As a variant embodiment, the underrun flag can also be 0, and its initial value is 1. It can be understood that if it is detected that the audio buffer has an underrun, the underrun flag is set to underrun, otherwise, the underrun flag maintains as non-underrun. In the embodiment, underrun is taken as "1" and non-underrun is taken as "0" for illustration.
[0080] In step S321c, check whether the underload flag is 1. If it is 1, initialize the underload flag to 0 and proceed to step S322. If the detected underload flag is 0, then execute step S321d.
[0081] In step S321d, check whether the time when the underload flag is 0 exceeds the duration Ti. If so, proceed to step S323; otherwise, return to step S321a.
[0082] As an embodiment, in step S322, compare the target delay value d with (max_t0 + m). Determine the adjustment of the target delay value d according to the comparison result as follows:
[0083] If d < (max_t0 + m) and (max_t0 + m) > max_d, then update the target delay value d to max_d;
[0084] If d < (max_t0 + m) and (max_t0 + m) < max_d, then update the target delay value d to (max_t0 + m);
[0085] If d > (max_t0 + m) and (d + m) > max_d, then update the target delay value d to max_d;
[0086] If the target delay value d > (max_t0 + m) and (d + m) < max_d, then increase the target delay value d by m.
[0087] m > 0. As an embodiment, 10 ≤ m ≤ 60. As a specific embodiment, m = 50.
[0088] As an embodiment, step S323 includes steps S323a to S323c.
[0089] In step S323a, compare the target delay value d with the minimum target delay value A and max_t0. If the target delay value d > A and max_t0 < d, then proceed to step S323b; otherwise, return to step S321 to continue checking whether the audio buffer is underloaded.
[0090] In step S323b, determine whether (d - n) is less than A. If (d - n) < A, then proceed to step S323c; otherwise, update the target delay value d to (d - n).
[0091] In step S323c, determine whether A is less than (max_t0 + x). If so, update the target delay value d to (max_t0 + x); otherwise, update the target delay value d to the minimum target delay value A;
[0092] n, x > 0. As an embodiment, 10 ≤ n ≤ 60, 1 ≤ x ≤ 10. As a specific embodiment, n = 50, x = 5.
[0093] In step S400, when |Δt| < tp, the number of sampling points in resampling is not adjusted; when |Δt| > tp, the number of sampling points is adjusted to the first number of sampling points, where the first number of sampling points is a certain number of sampling points in the sampling point interval, and the sampling interval is the set of the number of sampling points for resampling the audio data in the audio buffer when |Δt| remains less than the delay difference tp. That is, when |Δt| > tp, the number of sampling points is adjusted to converge to the number of sampling points corresponding to the target delay value d.
[0094] As an embodiment, the first number of sampling points is the number of sampling points corresponding to the target delay value d. For example, if the target delay value d is calculated as 150 ms, the device sampling rate is set to 44.1 k, and the number of sampling points corresponding to the target delay value d is 6615, the number of sampling points should be adjusted to 6615 or (6615 + z), where z is a positive integer or a negative integer.
[0095] In step S400, when the mean value of the overall delay t is less than the target delay value d and |Δt| > tp, the number of sampling points is increased; when the mean value of the overall delay t is greater than the target delay value d and |Δt| > tp, the number of sampling points is decreased. As an embodiment, the difference Δt is converted into the actual number of audio sampling points k that need to be adjusted, and then the current number of sampling points is adjusted (increased or decreased) by k sampling points.
[0096] As a preferred embodiment, the adjustment of the number of sampling points is uniformly adjusted to the number of sampling points corresponding to the target delay value d at a set step size. For example, the adjustment can be made at a set step size of 200 sampling points. Uniform adjustment at a set step size can reduce the phase difference between the master and slave Bluetooth devices. Taking Bluetooth earphones as an example, uniform adjustment at a set step size can reduce the phase difference between the master and slave Bluetooth earphones, enabling the master and slave Bluetooth earphones to play audio synchronously without affecting the user's experience such as listening to music.
[0097] As another embodiment, in step S400, the number of sampling points is adjusted to the first number of sampling points in the first mode; wherein in the first mode, the number of sampling points is adjusted by first uniform acceleration, uniform speed, and second uniform acceleration in sequence, the acceleration of the first uniform acceleration is positive, and the acceleration of the second uniform acceleration is negative. As a preferred embodiment, in the first mode, a maximum adjustment speed is set (such as setting the maximum adjustment speed to 5‰ of the sampling rate, i.e., V max ); when the number of sampling points is adjusted to the first number of sampling points, the adjustment speed tends to 0 (including 0).
[0098] Assume that the displacement of the adjusted sampling points for calculation is 6000. Assume that the audio input source is 44100 and the output sampling rate is 44100. Then, to consume these 6000 points to achieve the delay, resampling needs to be performed based on 44100. For example, if the uniform consumption is (44100 + 100):44100, then the resampling is actually performed at a relative speed of 100. After (6000 / 100) seconds, the target delay is achieved. However, in actual applications, when suddenly pulling the sampling rate of a Bluetooth device, such as the master device, from 44100 to 44200, due to the delay in master-slave communication, the slave device cannot respond immediately, and there will be a large phase difference in the audio of the Bluetooth device for a period of time. Therefore, first perform uniformly variable sampling, such as setting the acceleration to 2 or 5 every 100 ms. After accelerating to 100, then consume uniformly, and then decelerate by 2 or 5 every 100 ms to 0. Through the first uniformly variable, uniform, and second uniformly variable processes, finally, the displacement of the adjusted sampling points reaches 6000. When the sampling points are adjusted to the first sampling points, the adjustment speed tends to 0 (including 0), otherwise, the delay will be over-adjusted and a large deviation will occur.
[0099] In step S500, resample the audio data in the audio buffer according to the sampling points to control the playback speed of the audio data in the buffer. The present invention controls the playback speed of the audio data in the audio buffer according to the playback situation, that is, controls the consumption speed of the audio data in the audio buffer, so that the playback of the Bluetooth device is smooth, without stuttering, and the delay is also controlled at a low level.
[0100] It can be understood that the steps in the Bluetooth audio data processing method provided in this embodiment can be implemented by hardware and / or software. When implemented by software or software combined with hardware, the step content can be executed through different program logics.
[0101] An embodiment of the present invention further provides a Bluetooth audio playback processing device 20, which includes a delay calculation module 21, a delay average calculation module 22, a target delay value adjustment module 26, a comparison module 23, a sampling point number adjustment module 24, and a resampling module 25. The delay calculation module 21 is used to calculate the overall delay t of the audio data from entering the Bluetooth buffer 27 to being output from the audio buffer 28; the delay average calculation module 22 is used to calculate the average value of the overall delay t within a preset duration T; the target delay value adjustment module 26 is used to adaptively adjust the target delay value d according to the frame interval time t0 at which the Bluetooth buffer 27 receives audio data and the underrun condition of the audio buffer 28; wherein, the target delay value d is not less than the frame interval time t0; the comparison module 23 is used to compare the average value of the overall delay t with the target delay value d to obtain a difference △t; the sampling point number adjustment module 24 is used to determine whether to adjust the sampling point number of the audio data in the audio buffer 28 for resampling according to the comparison result; the resampling module 25 is used to resample the audio data in the audio buffer 28 according to the sampling point number to control the playback speed of the audio data in the audio buffer 28.
[0102] The minimum value of the target delay value d is A, and the maximum value is max_d. As an embodiment, 10ms ≤ A ≤ 100ms, 300ms ≤ max_d ≤ 700ms. As a specific embodiment, A = 60ms, max_d = 500ms.
[0103] As an embodiment, the delay calculation module 21 includes a first calculation module, a second calculation module, and an overall delay calculation module. The first calculation module is used to obtain the audio data buffer delay t1 of the Bluetooth buffer 27, and the second calculation module is used to calculate the data volume difference a and the audio output delay t2 corresponding to the data volume difference a, where a = a1 - a2, where a1 is the input data volume a1 of the audio buffer 28, and a2 is the output data volume of the audio buffer 28. The overall delay calculation module is used to calculate and obtain the overall delay t, t = t1 + t2.
[0104] As an embodiment, when the frame interval time t0 increases or the audio buffer 28 experiences an underrun, the target delay value adjustment module 26 increases the target delay value d; when the audio buffer 28 has not experienced an underrun for a period of time, the target delay value adjustment module 26 decreases the target delay value d.
[0105] As an embodiment, the target delay value adjustment module 26 includes a Bluetooth feedback module, and the Bluetooth feedback module is used to update the target delay value d according to the frame interval time t0. If t0 > max_t0, the maximum frame interval time max_t0 is updated to the frame interval time t0. If t0 ≤ max_t0, the target delay value d is not updated. After max_t0 is updated, if d < max_t0 < max_d, the target delay value d is updated to the maximum frame interval time max_t0. If max_t0 > max_d, the target delay value d is updated to the maximum frame interval time max_d. If max_t0 < d, the target delay value d is not updated.
[0106] The target delay value adjustment module 26 further includes an audio feedback module, which is used to update the target delay value d according to the underrun situation of the audio buffer 28. When the audio buffer 28 has an underrun, the target delay value d is increased. When the audio buffer 28 has not had an underrun for a preset duration Ti, the target delay value d is decreased. When the audio buffer 28 has an underrun, the rules for the audio feedback module to update the target delay value d are as follows:
[0107] If the target delay value d < (max_t0 + m) and (max_t0 + m) > max_d, the target delay value d is updated to max_d;
[0108] If the target delay value d < (max_t0 + m) and (max_t0 + m) < max_d, the target delay value d is updated to (max_t0 + m);
[0109] If the target delay value d > (max_t0 + m) and (d + m) > max_d, the target delay value d is updated to max_d;
[0110] If the target delay value d > (max_t0 + m) and (d + m) < max_d, the target delay value d is increased by m;
[0111] When the audio buffer 28 has not had an underrun for the duration Ti, the rules for the audio feedback module to update the target delay value d are as follows:
[0112] If d > A and max_t0 < d, then it is judged whether (d - n) is less than A, otherwise the target delay value d is not updated;
[0113] If (d - n) < A, then it is judged whether A is less than (max_t0 + x), otherwise the target delay value d is updated to (d - n);
[0114] If A < (max_t0 + x), the target delay value d is updated to (max_t0 + x); otherwise, the target delay value d is updated to the minimum target delay value A.
[0115] In this embodiment, the maximum frame interval time max_t0 has an initial value. m, n, x > 0. As an embodiment, 10 ≤ m ≤ 60, 10 ≤ n ≤ 60, 1 ≤ x ≤ 10. As a specific embodiment, m = 50, n = 50, x = 5.
[0116] As an embodiment, when △t < tp, the sampling point adjustment module 24 does not adjust the number of sampling points; when △t > tp, the sampling point adjustment module 24 adjusts the number of sampling points to the first number of sampling points, where the first number of sampling points is a certain number of sampling points in the sampling point interval, and the sampling interval is the set of the number of sampling points for resampling the audio data in the audio buffer 28 when |△t| is maintained at less than the delay difference tp. As an embodiment, the first number of sampling points is the number of sampling points corresponding to the target delay value d. The resampling module 25 is used to resample the audio data in the audio buffer 28 according to the adjusted number of sampling points to control the playback speed of the buffer audio data.
[0117] As an embodiment, when the mean value of the overall delay t is less than the target delay value d and |△t| > tp, the sampling point adjustment module 24 increases the number of sampling points; when the mean value of the overall delay t is greater than the target delay value d and |△t| > tp, the sampling point adjustment module 24 decreases the number of sampling points.
[0118] As an embodiment, the number of sampling points is adjusted uniformly at a set step size; or the number of sampling points is adjusted to the first number of sampling points in the first mode; wherein in the first mode, the number of sampling points is adjusted successively by the first uniform acceleration, uniform speed, and second uniform acceleration, the acceleration of the first uniform acceleration is positive, and the acceleration of the second uniform acceleration is negative. As an embodiment, in the first mode, a maximum adjustment speed is set; when the number of sampling points is adjusted to the first number of sampling points, the adjustment speed tends to 0.
[0119] It can be understood that the Bluetooth audio playback processing device 20 provided in this embodiment corresponds to the Bluetooth audio playback processing method provided in the embodiment, and the content in the Bluetooth audio playback processing method of the embodiment is applicable to this embodiment.
[0120] The present invention provides a chip, which includes the Bluetooth audio playback processing device as described above; or includes a storage medium storing a computer program, and the computer program is executed by a processor to perform the Bluetooth audio playback processing method provided in the foregoing embodiment.
[0121] The present invention also provides a Bluetooth device, which includes the Bluetooth audio playback processing device provided in the foregoing embodiment; or includes a storage medium storing a computer program, and the computer program is executed by a processor to perform the Bluetooth audio playback processing method provided in the foregoing embodiment. The Bluetooth device may be a Bluetooth headset, a Bluetooth speaker, or the like.
[0122] Those skilled in the art can understand that, on the premise of no conflict, the above preferred solutions can be freely combined and superimposed.
[0123] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of methods, devices, systems, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0124] It should be understood that the above embodiments are merely exemplary and not restrictive. Without departing from the basic principles of the present invention, various obvious or equivalent modifications or substitutions made by those skilled in the art to the above details will be included within the scope of the claims of the present invention.
Claims
1. A Bluetooth audio playback processing method, characterized in that, Including the steps: Step S100: Calculate the overall delay t of the audio data from entering the Bluetooth buffer to being output from the audio buffer; Step S200: Calculate the average value of the overall delay t within a preset duration T; Step S300: Compare the average value of the overall delay t with the target delay value d to obtain a difference Δt, and adaptively adjust the target delay value d according to the frame interval time t0 at which the Bluetooth buffer receives audio data and the underrun condition of the audio buffer; wherein, the target delay value d is not less than the frame interval time t0; Step S400: Compare the difference Δt with a preset delay difference tp, and determine whether to adjust the number of sampling points for resampling the audio data in the audio buffer according to the comparison result; and Step S500: Resample the audio data in the audio buffer according to the number of sampling points to control the playback speed of the audio data in the audio buffer; In step S300, when it is detected that the frame interval time t0 increases or the audio buffer experiences an underrun, increase the target delay value d; when it is detected that the audio buffer has not experienced an underrun for a period of time, decrease the target delay value d; Step S100 specifically includes the following steps: Step S101: Obtain the audio data buffer delay t1 of the Bluetooth buffer; Step S102: Obtain the input data volume a1 of the audio buffer and the output data volume a2 of the audio buffer, calculate the data volume difference a, and calculate the audio output delay t2 corresponding to the data volume difference a, where a = a1 - a2; and Step S103: Calculate and obtain the overall delay t, where t = t1 + t2; in step S101, obtain the coding information and total data volume of the audio data in the Bluetooth buffer to calculate the number of sampling points of the audio data in the Bluetooth buffer, and calculate the audio data buffer delay t1 of the Bluetooth buffer through the number of sampling points and the sampling rate; in step S102, calculate the number of sampling points corresponding to a according to the data volume included in each sampling point, and calculate the audio output delay t2 through the number of sampling points and the sampling rate; In step S400, when the average value of the overall delay t is less than the target delay value d and |Δt| > tp, increase the number of sampling points; when the average value of the overall delay t is greater than the target delay value d and |Δt| > tp, decrease the number of sampling points; when |Δt| < tp, do not adjust the number of sampling points.
2. The Bluetooth audio playback processing method according to claim 1, characterized in that, The maximum value of the target delay value d is max_d; in step S300, adaptively adjusting the target delay value d according to the frame interval time t0 at which the Bluetooth buffer receives audio data specifically includes: Step S311: Detect the frame interval time t0; Step S312: Compare the frame interval time t0 with the maximum frame interval time max_t0; if t0 > max_t0, update the maximum frame interval time max_t0 to the frame interval time t0 and enter step S313; if t0 ≤ max_t0, return to step S311; Step S313: Compare the maximum frame interval time max_t0 with the current target delay value d and the maximum target delay value max_d respectively. If d < max_t0 < max_d, update the target delay value d to the maximum frame interval time max_t0; if max_t0 > max_d, update the target delay value d to the maximum target delay value max_d; if max_t0 < d, return to step S311.
3. The Bluetooth audio playback processing method according to claim 1, characterized in that, In step S300, adaptively adjusting the target delay value d according to the underrun condition of the audio buffer specifically includes: Step S321: Detect whether the audio buffer is underrun; if it is underrun, enter step S322, if not, and after the duration of no underrun reaches the preset duration Ti, enter step S323; Step S322: Increase the target delay value d; Step S323: Decrease the target delay value d.
4. The Bluetooth audio playback processing method according to claim 3, characterized in that, Step S322 is: Compare the target delay value d with (max_t0 + m), where m > 0, and the maximum value of the target delay value d is max_d; If d < (max_t0 + m) and (max_t0 + m) > max_d, update the target delay value d to max_d; If d < (max_t0 + m) and (max_t0 + m) < max_d, update the target delay value d to (max_t0 + m); If d > (max_t0 + m) and (d + m) > max_d, update the target delay value d to max_d; If d > (max_t0 + m) and (d + m) < max_d, increase the target delay value d by m.
5. The Bluetooth audio playback processing method according to claim 4, characterized in that, 10 ≤ m ≤ 60, 300ms ≤ max_d ≤ 700ms.
6. The Bluetooth audio playback processing method according to claim 3, characterized in that, The minimum value of the target delay value d is A, and the maximum value is max_d; step S323 includes: Step S323a: Compare the target delay value d with the minimum target delay value A and max_t0 respectively. If d > A and max_t0 < d, then transfer to step S323b, otherwise return to step S321; Step S323b: Determine whether (d - n) is less than A. If (d - n) < A, then transfer to step S323c, otherwise, update the target delay value d to (d - n), where n > 0; Step S323c: Determine whether A is less than (max_t0 + x). If so, update the target delay value d to (max_t0 + x), otherwise update the target delay value d to the minimum target delay value A, where x > 0.
7. The Bluetooth audio playback processing method according to claim 6, characterized in that: 10 ≤ n ≤ 60, 1 ≤ x ≤ 10, 10ms ≤ A ≤ 100ms, 300ms ≤ max_d ≤ 700ms.
8. The Bluetooth audio playback processing method according to claim 3, characterized in that, Step S321 includes: Step S321a: Detect whether the audio buffer is underrun; Step S321b: If it is detected that the audio buffer is underrun, set the underrun flag to underrun, otherwise, maintain the underrun flag as non-underrun; Step S321c: Detect whether the underload flag indicates underload; if it indicates underload, initialize the underload flag to non-underload and proceed to Step S322. If it is detected that the underload flag indicates non-underload, then execute Step S321d; Step S321d: Detect whether the time when the underload flag indicates non-underload has exceeded a preset duration Ti. If so, proceed to Step S323; otherwise, return to Step S321a.
9. The Bluetooth audio playback processing method according to claim 1, wherein: In Step S400, when |Δt| > tp, adjust the number of sampling points to a first number of sampling points, where the first number of sampling points is a certain number of sampling points in the sampling point range, and the sampling point range is a set of the number of sampling points for resampling the audio data in the audio buffer when |Δt| remains less than the delay difference tp.
10. The Bluetooth audio playback processing method according to claim 9, wherein: The first number of sampling points is the number of sampling points corresponding to the target delay value d.
11. The Bluetooth audio playback processing method according to claim 1, wherein: In Step S400, adjust the number of sampling points to the first number of sampling points at a set step size; Or in Step S400, adjust the number of sampling points to the first number of sampling points in a first mode; where in the first mode, adjust the number of sampling points successively using a first uniform acceleration, uniform speed, and a second uniform acceleration. The acceleration of the first uniform acceleration is positive, and the acceleration of the second uniform acceleration is negative.
12. The Bluetooth audio playback processing method according to claim 1, wherein: In the first mode, there is a maximum adjustment speed; when the number of sampling points is adjusted to the first number of sampling points, the adjustment speed tends to 0.
13. A Bluetooth audio playback processing device, wherein, Comprising: A delay calculation module for calculating the overall delay t of the audio data from entering the Bluetooth buffer to being output from the audio buffer; A delay average calculation module for calculating the average value of the overall delay t within a preset duration T; A target delay value adjustment module for adaptively adjusting the target delay value d according to the frame interval time t0 at which the Bluetooth buffer receives audio data and the underload condition of the audio buffer; where the target delay value d is not less than the frame interval time t0; A comparison module for comparing the average value of the overall delay t with the target delay value d to obtain a difference Δt; A sampling point adjustment module for comparing the difference Δt with a preset delay difference tp and determining whether to adjust the number of sampling points for resampling the audio data in the audio buffer according to the comparison result; and A resampling module for resampling the audio data in the audio buffer according to the number of sampling points to control the playback speed of the audio data in the audio buffer; The target delay value adjustment module increases the target delay value d when the frame interval time t0 increases or when the audio buffer experiences underload; and decreases the target delay value d when the audio buffer has not experienced underload for a period of time; The delay calculation module includes: a first calculation module for obtaining the audio data buffer delay t1 of the Bluetooth buffer; a second calculation module for calculating the audio output delay t2 corresponding to the data volume difference a, where a = a1 - a2, a1 is the input data volume a1 of the audio buffer, and a2 is the output data volume of the audio buffer; and an overall delay calculation module for calculating the overall delay t, where t = t1 + t2; obtaining the encoding information and total data volume of the audio data in the Bluetooth buffer to calculate the number of sampling points of the audio data in the Bluetooth buffer, and calculating the audio data buffer delay t1 of the Bluetooth buffer through the number of sampling points and the sampling rate; calculating the number of sampling points corresponding to a according to the data volume included in each sampling point, and calculating the audio output delay t2 through the number of sampling points and the sampling rate; When the mean value of the overall delay t is less than the target delay value d and |Δt| > tp, the sampling point number adjustment module increases the number of sampling points; when the mean value of the overall delay t is greater than the target delay value d and |Δt| > tp, the sampling point number adjustment module decreases the number of sampling points; when |Δt| < tp, the sampling point number is not adjusted.
14. The Bluetooth audio playback processing device according to claim 13, wherein, The maximum value of the target delay value d is max_d, and the target delay value adjustment module includes: A Bluetooth feedback module for updating the target delay value d according to the frame interval time t0; If t0 > max_t0, the maximum frame interval time max_t0 is updated to the frame interval time t0. If t0 ≤ max_t0, the target delay value d is not updated; After max_t0 is updated, if d < max_t0 < max_d, the target delay value d is updated to the maximum frame interval time max_t0; if max_t0 > max_d, the target delay value d is updated to the maximum frame interval time max_d; if max_t0 < d, the target delay value d is not updated.
15. The Bluetooth audio playback processing device according to claim 13, wherein, The target delay value adjustment module includes: An audio feedback module for updating the target delay value d according to the underrun condition of the audio buffer; when the audio buffer has an underrun, the target delay value d is increased, and when the audio buffer has not had an underrun for a preset duration Ti, the target delay value d is decreased.
16. The Bluetooth audio playback processing device according to claim 15, wherein, The minimum value of the target delay value d is A, the maximum value is max_d, m > 0, n > 0; when the audio buffer has an underrun, the rule for the audio feedback module to update the target delay value d is as follows: If the target delay value d < (max_t0 + m) and (max_t0 + m) > max_d, the target delay value d is updated to max_d; If the target delay value d < (max_t0 + m) and (max_t0 + m) < max_d, the target delay value d is updated to (max_t0 + m); If the target delay value d > (max_t0 + m) and (d + m) > max_d, then the target delay value d is updated to max_d; If the target delay value d > (max_t0 + m) and (d + m) < max_d, then the target delay value d is increased by m; When the audio buffer has not underrun for a duration of Ti, the rules for the audio feedback module to update the target delay value d are as follows: If d > A and max_t0 < d, then determine whether (d - n) is less than A; otherwise, do not update the target delay value d; If (d - n) < A, then determine whether A is less than (max_t0 + x); otherwise, update the target delay value d to (d - n); If A < (max_t0 + x), the target delay value d is updated to (max_t0 + x); otherwise, the target delay value d is updated to the minimum target delay value A.
17. The Bluetooth audio playback processing device according to claim 13, wherein: The number of sampling points is adjusted uniformly at a set step size.
18. The Bluetooth audio playback processing device according to claim 13, wherein: When |Δt| > tp, the sampling point adjustment module adjusts the number of sampling points to the first number of sampling points, where the first number of sampling points is a certain number of sampling points in the sampling point interval, and the sampling point interval is the set of the number of sampling points for resampling the audio data in the audio buffer when |Δt| remains less than the delay difference tp.
19. The Bluetooth audio playback processing device according to claim 18, wherein: The first number of sampling points is the number of sampling points corresponding to the target delay value d.
20. A chip, wherein: It includes the Bluetooth audio playback processing device according to any one of claims 13 - 19; or includes a storage medium storing a computer program, and when the computer program is executed by a processor, it can implement the Bluetooth audio playback processing method according to any one of claims 1 - 12.
21. A Bluetooth device, wherein: It includes the Bluetooth audio playback processing device according to any one of claims 13 - 19; or includes a storage medium storing a computer program, and when the computer program is executed by a processor, it can implement the Bluetooth audio playback processing method according to any one of claims 1 - 12.
22. The Bluetooth device according to claim 21, wherein: The Bluetooth device is a Bluetooth headset.
Citation Information
Patent Citations
Adjustment method for audio data in different modes of Bluetooth headset
CN108551358A