IP Library Granted Patent US 10,992,451
Granted Patent B2
US 10,992,451 · App. 16/180,073 · Granted Apr 27, 2021

Audio and video playback system and method for playing audio data applied thereto

Inventor: Fu Jun Zhu (Shenzhen, CN)
Assignee: MEDIATEK INC.
H04L7/041G06F3/165H04L29/06027H04L65/604H04N21/24H04N21/4307H04N21/4392H04N21/43637H04L2007/045
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,992,451
App. No.
16/180,073
Granted
Apr 27, 2021
Kind
B2
Abstract

An audio and video playback system includes an audio and video playback device having a local audio device, and a secondary audio device. A method for playing audio data includes: allocating a local audio buffer space and a secondary audio buffer space to the local audio device and the secondary audio device, respectively; processing obtained multimedia data to generate local audio data and secondary audio data; writing the local audio data and the secondary audio data to the local audio buffer space and the secondary audio buffer space, respectively; reading the local audio data and the secondary audio data buffered in the local audio buffer space and the secondary audio buffer space to the local audio device and the secondary audio device, to have the local audio device and the secondary audio device play the local audio data and the secondary audio data, respectively.

Claims (84)

1. A method for playing audio data, the method applied to an audio and video playback system, the audio and video playback system comprising a secondary audio device and an audio and video playback device having a local audio device, wherein the audio and video playback device plays both audio and video, the method comprising:

allocating a local audio buffer space and a secondary audio buffer space to the local audio device and the secondary audio device, respectively;

processing obtained multimedia data to generate local audio data and secondary audio data;

writing the local audio data and the secondary audio data to the local audio buffer space and the secondary audio buffer space, respectively, wherein the local audio data and the secondary audio data are not the same;

reading the local audio data and the secondary audio data buffered in the local audio buffer space and the secondary audio buffer space to the local audio device and the secondary audio device, respectively, to have the local audio device and the secondary audio device simultaneously play the local audio data and the secondary audio data, respectively,

wherein the local audio buffer space and the secondary audio buffer space are each a ring buffer space, such that while the local audio data and the secondary audio data buffered in the local audio buffer space and the secondary audio buffer space are read to the local audio device and the secondary audio device, the local audio data and the secondary audio data are continuously further written to the local audio buffer space and the secondary audio buffer space, respectively; and

determining whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

when it is determined that the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are asynchronous, executing a synchronization mechanism to synchronize the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

wherein the step of determining whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous further comprises:

acquiring delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device, respectively; and

determining, according to the respective delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device, whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

wherein the step of executing the synchronization mechanism to synchronize the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device further comprises:

determining a difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device;

generating a null packet having a corresponding size according to the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device; and

writing the null packet to the local audio buffer space or the secondary audio buffer space corresponding to the local audio device or the secondary audio device having the smaller delay period, to cause the local audio device or the secondary audio device to output the null packet when outputting the local audio data or the secondary audio data, thereby synchronizing the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device.

2. The method according to claim 1 , wherein the step of generating the null packet having the corresponding size according to the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device comprises:

determining whether the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device is greater than a predetermined value; and

when the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device is greater than the predetermined value, generating the null packet having the corresponding size according to the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device.

3. A method for playing audio data, the method applied to an audio and video playback system, the audio and video playback system comprising a secondary audio device and an audio and video playback device having a local audio device, wherein the audio and video playback device plays both audio and video, the method comprising:

allocating a local audio buffer space and a secondary audio buffer space to the local audio device and the secondary audio device, respectively;

processing obtained multimedia data to generate local audio data and secondary audio data;

writing the local audio data and the secondary audio data to the local audio buffer space and the secondary audio buffer space, respectively, wherein the local audio data and the secondary audio data are not the same;

reading the local audio data and the secondary audio data buffered in the local audio buffer space and the secondary audio buffer space to the local audio device and the secondary audio device, respectively, to have the local audio device and the secondary audio device simultaneously play the local audio data and the secondary audio data, respectively;

wherein the local audio buffer space and the secondary audio buffer space are each a ring buffer space, such that while the local audio data and the secondary audio data buffered in the local audio buffer space and the secondary audio buffer space are read to the local audio device and the secondary audio device, the local audio data and the secondary audio data are continuously further written to the local audio buffer space and the secondary audio buffer space, respectively; and

determining whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

when it is determined that the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are asynchronous, executing a synchronization mechanism to synchronize the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

wherein the step of determining whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous further comprises:

acquiring delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device, respectively; and

determining, according to the respective delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device, whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous,

wherein the step of executing the synchronization mechanism to synchronize the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device further comprises:

determining a difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device;

obtaining a corresponding data size according to the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device; and

discarding data having the corresponding data size from the local audio buffer space or the secondary audio buffer space corresponding to the local audio device or the secondary audio device having the greater delay period, thereby synchronizing the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device.

4. The method according to claim 3 , wherein the step of obtaining the corresponding data size according to the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device further comprises:

determining whether the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device is greater than a predetermined value; and

when the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device is greater than the predetermined value, obtaining the corresponding data size according to the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device.

5. The method according to claim 1 , wherein the audio and video playback device is a television or a television system consisting of a set-top box (STB) and a television, the local audio device is a local speaker built in the television, and the secondary audio device is an external acoustic enclosure connected to the television.

6. The method according to claim 5 , wherein the secondary audio device and the television are connected by means of USB wireless connection.

7. An audio and video playback system, comprising:

an audio and video playback device, for playing multimedia data, the audio and video playback device comprising a local audio device, a processor, a memory and a buffer unit, wherein the audio and video playback device plays both audio and video; and

a secondary audio device, connected to the audio and video playback device; wherein the processor in the audio and video playback device performs steps of:

allocating a local audio buffer space and a secondary audio buffer space to the local audio device and the secondary audio device, respectively;

processing the obtained multimedia data to generate local audio data and secondary audio data;

writing the local audio data and the secondary audio data to the local audio buffer space and the secondary audio buffer space, respectively; and

reading the local audio data and the secondary audio data buffered in the local audio buffer space and the secondary audio buffer space to the local audio device and the secondary audio device, respectively, to have the local audio device and the secondary audio device simultaneously play the local audio data and the secondary audio data, respectively;

wherein, an audio device management program is stored in the memory of the audio and video playback device;

when the audio device management program is executed, the audio and video playback device controls the local audio device and the secondary audio device according to the audio device management program to perform a collaborated playback task to play audio data in the multimedia data;

wherein when the audio and video playback device controls the local audio device and the secondary audio device according to the audio device management program to perform the collaborated playback task to play audio data in the multimedia data;

wherein the local audio buffer space and the secondary audio buffer space are each a ring buffer space, such that while the local audio data and the secondary audio data buffered in the local audio buffer space and the secondary audio buffer space are read to the local audio device and the secondary audio device, the local audio data and the secondary audio data are continuously further written to the local audio buffer space and the secondary audio buffer space, respectively;

wherein when the audio and video playback controls the local audio device and the secondary audio device to collaboratively play the audio data in the multimedia data, the processor further performs steps of:

determining whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

when it is determined that the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are asynchronous, executing a synchronization mechanism to synchronize the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

wherein the step of determining whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous further comprises:

acquiring delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device, respectively; and

determining, according to the respective delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device, whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

wherein the step of the step of executing the synchronization mechanism to synchronize the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device further comprises:

determining a difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device;

generating a null packet having a corresponding size according to the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device; and

writing the null packet to the local audio buffer space or the secondary audio buffer space corresponding to the local audio device or the secondary audio device having the smaller delay period, to cause the local audio device or the secondary audio device to output the null packet when outputting the local audio data or the secondary audio data, thereby synchronizing the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device.

8. An audio and video playback system, comprising:

an audio and video playback device, for playing multimedia data, the audio and video playback device comprising a local audio device, a processor, a memory and a buffer unit, wherein the audio and video playback device plays both audio and video; and

a secondary audio device, connected to the audio and video playback device; wherein the processor in the audio and video playback device performs steps of:

allocating a local audio buffer space and a secondary audio buffer space to the local audio device and the secondary audio device, respectively;

processing the obtained multimedia data to generate local audio data and secondary audio data;

writing the local audio data and the secondary audio data to the local audio buffer space and the secondary audio buffer space, respectively; and

reading the local audio data and the secondary audio data buffered in the local audio buffer space and the secondary audio buffer space to the local audio device and the secondary audio device, respectively, to have the local audio device and the secondary audio device simultaneously play the local audio data and the secondary audio data, respectively;

wherein, an audio device management program is stored in the memory of the audio and video playback device;

when the audio device management program is executed, the audio and video playback device controls the local audio device and the secondary audio device according to the audio device management program to perform a collaborated playback task to play audio data in the multimedia data;

wherein when the audio and video playback device controls the local audio device and the secondary audio device according to the audio device management program to perform the collaborated playback task to play audio data in the multimedia data;

wherein the local audio buffer space and the secondary audio buffer space are each a ring buffer space, such that while the local audio data and the secondary audio data buffered in the local audio buffer space and the secondary audio buffer space are read to the local audio device and the secondary audio device, the local audio data and the secondary audio data are continuously further written to the local audio buffer space and the secondary audio buffer space, respectively;

wherein when the audio and video playback controls the local audio device and the secondary audio device to collaboratively play the audio data in the multimedia data, the processor further performs steps of:

determining whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

when it is determined that the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are asynchronous, executing a synchronization mechanism to synchronize the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

wherein the step of determining whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous further comprises:

acquiring delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device, respectively; and

determining, according to the respective delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device, whether the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device are synchronous;

wherein the step of executing the synchronization mechanism to synchronize the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device further comprises:

determining a difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device;

obtaining the corresponding data size according to the difference between the delay periods of the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device; and

discarding data having the corresponding data size from the local audio buffer space or the secondary audio buffer space corresponding to the local audio device or the secondary audio device having the greater delay period, thereby synchronizing the local audio data and the secondary audio data outputted from the local audio device and the secondary audio device.

9. The audio and video playback system according to claim 7 , wherein the audio device management program further comprises an audio device playback mode selection function;

when the audio device playback mode selection function is executed, the audio and video playback device drives the local audio device and/or the secondary audio device according to the selected audio device playback mode to play the audio data in the multimedia data.

10. The audio and video playback system according to claim 7 , wherein the audio and video playback device is a television or a television system consisting of a set-top box (STB) and a television, the local audio device is a local speaker built in the television, and the secondary audio device is an external acoustic enclosure connected to the television.

11. The audio and video playback system according to claim 7 , wherein the secondary audio device and the television are connected by means of USB wireless connection.

Assignments (2)
MERGER Recorded Oct 8, 2019
From: MSTAR SEMICONDUCTOR, INC.
To: MEDIATEK INC.
Reel/Frame 050665/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 5, 2018
From: ZHU, FU JUN
To: MSTAR SEMICONDUCTOR, INC.
Reel/Frame 047407/0632 →
Priority Claims (1)
CN 201711255348.5 · Dec 1, 2017 · national
Continuity (1)
Related Publication 20190173663A1 · Jun 6, 2019