技术领域technical field
本发明涉及同步播放技术领域,具体涉及一种时钟调节方法、装置、终端及多媒体同步播放系统。The present invention relates to the technical field of synchronous playback, in particular to a clock adjustment method, device, terminal and multimedia synchronous playback system.
背景技术Background technique
随着生活水平的提高,家庭影音设备在人们的生活中扮演着重要的角色。当前,将多个多媒体播放设备(例如,音箱、播放器等)以及控制设备通过有线或无线网络互相连接,组成一个多媒体播放系统,同步播放相同的多媒体如音乐,已经得到广泛的应用。With the improvement of living standards, home audio and video equipment plays an important role in people's lives. Currently, multiple multimedia playback devices (eg, speakers, players, etc.) and control devices are connected to each other through wired or wireless networks to form a multimedia playback system, which plays the same multimedia such as music synchronously, which has been widely used.
上述多媒体播放系统中,每个多媒体播放设备都具有独立的时钟系统。各个播放设备根据其自身的时钟系统来播放多媒体。然而,各个多媒体播放设备以及参考设备(一般为控制设备)的时钟系统并不总是同步的。各个播放设备以及参考设备彼此之间可能存在细微的时差。当多个多媒体播放设备播放相同的多媒体如音乐时,上述细微的时差导致各个多媒体播放设备的播放进度不一致,由此造成提高多媒体播放设备之间播放多媒体的同步性比较低。In the above multimedia playback system, each multimedia playback device has an independent clock system. Each playback device plays multimedia according to its own clock system. However, the clock systems of the various multimedia playback devices and the reference device (generally the control device) are not always synchronized. There may be slight time differences between individual playback devices and reference devices. When multiple multimedia playback devices play the same multimedia, such as music, the above-mentioned slight time difference causes inconsistent playback progress of each multimedia playback device, thereby improving the synchronization of multimedia playback among the multimedia playback devices is relatively low.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种时钟调节方法、装置、终端及多媒体同步播放系统,可以提高多媒体播放设备之间播放多媒体的同步性。Embodiments of the present invention provide a clock adjustment method, device, terminal and multimedia synchronous playing system, which can improve the synchronization of playing multimedia among multimedia playing devices.
本发明实施例提供一种时钟调节方法,包括:An embodiment of the present invention provides a clock adjustment method, including:
在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差;In the process of playing multimedia data, obtain the time error between the own system clock and the system clock of the synchronous reference playback device;
获取自身的设备性能信息以及所述同步参考播放设备的设备性能信息;Obtain its own device performance information and the device performance information of the synchronous reference playback device;
根据所述自身的设备性能信息、所述同步参考播放设备的设备性能信息以及所述时间误差获取误差调节信息;Obtain error adjustment information according to the device performance information of the self, the device performance information of the synchronous reference playback device, and the time error;
根据所述误差调节信息对自身系统时钟进行调节。Adjust its own system clock according to the error adjustment information.
相应的,本发明实施例还提供一种时钟调节装置,包括:Correspondingly, an embodiment of the present invention further provides a clock adjustment device, including:
误差获取单元,用于在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差;An error acquisition unit, used for acquiring the time error between the system clock of the own system clock and the system clock of the synchronous reference playback device in the process of playing the multimedia data;
性能信息获取单元,用于获取自身的设备性能信息以及所述同步参考播放设备的设备性能信息;a performance information acquisition unit, configured to acquire its own device performance information and the device performance information of the synchronous reference playback device;
调节信息获取单元,用于根据所述自身的设备性能信息、所述同步参考播放设备的设备性能信息以及所述时间误差获取误差调节信息;an adjustment information acquisition unit, configured to acquire error adjustment information according to the device performance information of the self, the device performance information of the synchronous reference playback device, and the time error;
调节单元,用于根据所述误差调节信息对自身系统时钟进行调节。An adjustment unit, configured to adjust its own system clock according to the error adjustment information.
相应的,本发明实施例还提供一种终端,包括:Correspondingly, an embodiment of the present invention further provides a terminal, including:
存储有可执行程序代码的存储器;a memory in which executable program code is stored;
与所述存储器耦合的处理器;a processor coupled to the memory;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行本发明实施例提供的任一时钟调节方法。The processor invokes the executable program code stored in the memory to execute any clock adjustment method provided by the embodiment of the present invention.
相应的,本发明实施例还提供了一种多媒体同步播放系统,包括:控制设备和至少一个播放设备;所述控制设备与所述播放设备连接;所述播放设备用于执行本发明实施例提供的任一时钟调节方法。Correspondingly, an embodiment of the present invention also provides a multimedia synchronous playback system, including: a control device and at least one playback device; the control device is connected to the playback device; the playback device is used to execute the playback device provided by the embodiment of the present invention. either of the clock adjustment methods.
本发明实施例采用在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,获取自身的设备性能信息以及该同步参考播放设备的设备性能信息,根据该自身的设备性能信息、该同步参考播放设备的设备性能信息以及该时间误差获取误差调节信息,根据该误差调节信息对自身系统时钟进行调节。该方案可以多媒体播放过程中对系统时钟进行调节,达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。In the embodiment of the present invention, in the process of playing multimedia data, the time error between the own system clock and the system clock of the synchronous reference playback device is obtained, and then the device performance information of the own device and the device performance information of the synchronous reference playback device are obtained, The error adjustment information is obtained according to the own device performance information, the device performance information of the synchronous reference playback device and the time error, and the own system clock is adjusted according to the error adjustment information. The solution can adjust the system clock during the multimedia playing process to achieve the effect of playing multimedia synchronously by multiple playing devices. Compared with the prior art, the synchronization of playing multimedia among the multimedia playing devices can be improved.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can also be obtained from these drawings without creative effort.
图1是本发明实施例一提供的时钟调节方法的流程示意图。FIG. 1 is a schematic flowchart of a clock adjustment method provided by Embodiment 1 of the present invention.
图2是本发明实施例二提供的时钟调节方法的流程示意图。FIG. 2 is a schematic flowchart of a clock adjustment method provided by Embodiment 2 of the present invention.
图3是本发明实施例三提供的第一种时钟调节装置的结构示意图。FIG. 3 is a schematic structural diagram of a first clock adjustment apparatus provided in Embodiment 3 of the present invention.
图4是本发明实施例三提供的第二种时钟调节装置的结构示意图。FIG. 4 is a schematic structural diagram of a second clock adjustment apparatus provided in Embodiment 3 of the present invention.
图5是本发明实施例四提供的多媒体同步播放系统的场景示意图。FIG. 5 is a schematic diagram of a scene of a multimedia synchronous playback system provided by Embodiment 4 of the present invention.
图6是本发明实施例五提供的终端的结构示意图。FIG. 6 is a schematic structural diagram of a terminal according to Embodiment 5 of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.
本发明的说明书和权利要求书以及上述附图中的术语“第一”、“第二”、“第三”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应当理解,这样描述的对象在适当情况下可以互换。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含。例如,包含了一系列步骤的过程、方法或包含了一系列模块或单元的装置、终端、系统不必限于清楚地列出的那些步骤或模块或单元,还可以包括没有清楚地列出的步骤或模块或单元,也可以包括对于这些过程、方法、装置、终端或系统固有的其它步骤或模块或单元。The terms "first", "second", "third", etc. (if present) in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It is to be understood that the objects so described are interchangeable under appropriate circumstances. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method comprising a series of steps or an apparatus, terminal or system comprising a series of modules or units is not necessarily limited to those steps or modules or units that are clearly listed, and may also include steps that are not clearly listed or Modules or units may also include other steps or modules or units inherent to these processes, methods, apparatuses, terminals or systems.
本发明实施例提供一种时钟调节方法、装置、终端及多媒体同步播放系统,以下将分别进行详细说明。Embodiments of the present invention provide a clock adjustment method, device, terminal, and multimedia synchronous playback system, which will be described in detail below.
实施例一Example 1
本实施例将从时钟调节装置的角度进行描述,该时钟调节装置具体可以集成播放设备中,该播放设备可以为终端(智能手机、平板电脑等)、音箱等播放设备。This embodiment will be described from the perspective of a clock adjustment device. The clock adjustment device may be integrated into a playback device, and the playback device may be a terminal (smart phone, tablet computer, etc.), a speaker, or other playback device.
一种时钟调节方法,包括:在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,获取自身的设备性能信息以及该同步参考播放设备的设备性能信息,根据该自身的设备性能信息、该同步参考播放设备的设备性能信息以及该时间误差获取误差调节信息,根据该误差调节信息对自身系统时钟进行调节。A clock adjustment method, comprising: in the process of playing multimedia data, obtaining the time error between its own system clock and the system clock of a synchronous reference playback device, and then obtaining its own device performance information and the equipment of the synchronous reference playback device For performance information, the error adjustment information is obtained according to the own device performance information, the device performance information of the synchronous reference playback device and the time error, and the own system clock is adjusted according to the error adjustment information.
如图1所示,该时钟调节方法,具体流程可以包括:As shown in Figure 1, the clock adjustment method, the specific process may include:
101、在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差。101. In the process of playing the multimedia data, obtain the time error between the own system clock and the system clock of the synchronous reference playback device.
其中,该多媒体数据可以为音频数据、音视频数据等等。该音频数据包括但不限于CD、WAV、MP3(Moving Picture Experts Group Audio Layer III)、WMA(Windows MediaAudio)等格式的音频数据。Wherein, the multimedia data may be audio data, audio and video data, and the like. The audio data includes, but is not limited to, audio data in formats such as CD, WAV, MP3 (Moving Picture Experts Group Audio Layer III), and WMA (Windows Media Audio).
本实施例中同步参考播放设备的系统时钟即为同步播放的参考时钟。该同步参考播放设备为同步播放的参考设备,其可以从播放设备中选定。在多媒体播放系统中控制设备也播放多媒体时,该控制设备也是播放设备,因此,该同步参考播放设备可以为播放设备,或者控制设备等。在实际应用中,可以根据实际需求从播放设备中选取一个设备作为参考设备。In this embodiment, the system clock of the synchronous reference playback device is the reference clock of synchronous playback. The synchronous reference playback device is a reference device for synchronous playback, which can be selected from the playback devices. In the multimedia playback system, when the control device also plays multimedia, the control device is also a playback device. Therefore, the synchronization reference playback device may be a playback device, a control device, or the like. In practical applications, a device may be selected from the playback devices as a reference device according to actual needs.
具体地,步骤“获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差”可以包括:Specifically, the step "obtaining the time error between the own system clock and the system clock of the synchronous reference playback device" may include:
获取同步参考播放设备当前的第一系统时间;Obtain the current first system time of the synchronous reference playback device;
获取自身当前的第二系统时间;Get own current second system time;
根据第二系统时间和第一系统时间,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差。According to the second system time and the first system time, the time error between the own system clock and the system clock of the synchronous reference playback device is obtained.
比如,可以计算第二系统时间与第一系统时间之间的时间差值,该时间差值即为系统时钟与参考时钟之间的时间误差;该第二系统时间与第一系统时间之间的时间差值指的是将第二系统时间减去第一系统时间得到的时间差值。For example, the time difference between the second system time and the first system time can be calculated, and the time difference is the time error between the system clock and the reference clock; the time difference between the second system time and the first system time The time difference value refers to a time difference value obtained by subtracting the first system time from the second system time.
在其他实施方式中,也可获取第一系统时间与第二系统时间的时间差值,即将第一系统时间减去第二系统时间得到的时间差值。In other embodiments, the time difference between the first system time and the second system time may also be obtained, that is, the time difference obtained by subtracting the second system time from the first system time.
其中,获取参考设备当前的系统时间的方式可以有多种,比如,可以请求参考设备发送其当前的系统时间,也可以是参考设备主动推送。There are various ways to obtain the current system time of the reference device, for example, the reference device may be requested to send its current system time, or the reference device may actively push it.
102、获取自身的设备性能信息以及该同步参考播放设备的设备性能信息。102. Acquire its own device performance information and the device performance information of the synchronous reference playback device.
本实施例中,设备性能信息可以包括:设备型号、媒体输出方案信息、设备功率信息、设备硬件性能信息、(如处理器信息、扬声器信息、主板信息、通讯模块信息等等)、设备的声音输出性能信息,(如与声音输出相关的性能信息、如音频解码信息、数模转换信息、扬声器信息、处理芯片参数信息、音频缓存信息等等)。In this embodiment, the device performance information may include: device model, media output scheme information, device power information, device hardware performance information, (such as processor information, speaker information, motherboard information, communication module information, etc.), device sound Output performance information, (such as performance information related to sound output, such as audio decoding information, digital-to-analog conversion information, speaker information, processing chip parameter information, audio buffer information, etc.).
本实施例中,可以向同步参考播放设备获取同步参考播放设备的设备性能信息,如可以采用请求的形式,也可以由同步参考播放设备主动推送。In this embodiment, the device performance information of the synchronous reference playback device may be obtained from the synchronous reference playback device, for example, in the form of a request, or may be actively pushed by the synchronous reference playback device.
103、根据该自身的设备性能信息、该同步参考播放设备的设备性能信息以及该时间误差获取误差调节信息。103. Acquire error adjustment information according to the own device performance information, the device performance information of the synchronous reference playback device, and the time error.
该调节信息可以为进行时钟调节的调节参数,其可以包括:调节方向以及调节量,等等。The adjustment information may be an adjustment parameter for clock adjustment, which may include an adjustment direction and an adjustment amount, and the like.
其中,调节方向可以包括正方向或者负方向,该正方向调节是加快系统时钟,负方向调节是减慢系统时钟。也可以是:负方向调节是加快系统时钟,正方向调节是减慢系统时钟;具体地可以根据实际需求设定。The adjustment direction may include a positive direction or a negative direction, the positive direction adjustment is to speed up the system clock, and the negative direction adjustment is to slow down the system clock. It can also be: the negative direction adjustment is to speed up the system clock, and the positive direction adjustment is to slow down the system clock; specifically, it can be set according to actual needs.
具体地,在时间误差是自身当前时间与参考设备当前时间的时间差值,正方向调节是加快系统时钟,负方向调节是减慢系统时钟的情况下,若时间误差大于零,确定同步调节的调节方向为负方向,即需要减慢自身的系统时钟;若时间误差小于零,确定调节方向为正方向,即需要加快自身的系统时钟。Specifically, when the time error is the time difference between the current time of the self and the current time of the reference device, the positive direction adjustment is to speed up the system clock, and the negative direction adjustment is to slow down the system clock, if the time error is greater than zero, determine the synchronous adjustment. The adjustment direction is the negative direction, that is, the system clock needs to be slowed down; if the time error is less than zero, the adjustment direction is determined to be the positive direction, that is, the system clock needs to be accelerated.
其中,该调节量可为系统时钟需要调节的时长,比如20ms,等等。Wherein, the adjustment amount may be the time period for which the system clock needs to be adjusted, such as 20ms, and so on.
考虑到,由于播放设备的设备性能不同会导致实际系统时钟不相同,如果单纯地根据调节前的系统时钟之间的时间误差来调节系统时钟,可能再调节后,系统时钟并不能与同步参考播放设备的系统时钟同步。比如,时钟调节前自身系统时间为45s,同步参考播放设备的系统时间为46s,此时获取二者系统时钟之间的时间误差为1s,如果根据该时间误差1s来调节自身系统时钟的话,理论在调节完之后自身系统时钟与同步参考播放设备的系统时钟同步,如当前系统时间均为47s。然而在实际情况下中,由于设备的设备性能差异,将会导致在调节完时二者系统时钟不同步,如调节完之后,当前自身系统时间为47s,而同步参考播放设备此时的系统时间可能为48s。Considering that the actual system clock will be different due to the different device performance of the playback device, if the system clock is simply adjusted based on the time error between the system clocks before adjustment, it may be that after adjustment, the system clock cannot be synchronized with the reference playback. The device's system clock is synchronized. For example, the system time before the clock adjustment is 45s, and the system time of the synchronous reference playback device is 46s. At this time, the time error between the two system clocks is 1s. If the system clock is adjusted according to the time error of 1s, theoretically After the adjustment, its own system clock is synchronized with the system clock of the synchronization reference playback device, for example, the current system time is 47s. However, in practice, due to the difference in device performance of the devices, the system clocks of the two will be out of sync after the adjustment. For example, after the adjustment, the current system time is 47s, and the synchronization refers to the system time of the playback device at this time Probably 48s.
为了克服上述问题,提高系统时钟调节的准确性,进而提高播放设备播放媒体的同步性;本实施例可以结合播放设备以及同步参考播放设备的设备性能信息来获取误差调节信息,然后,基于该误差调节信息对系统时钟调节,从而使得调节完后播放设备与同步参考播放设备之间的系统时钟达到同步。如获取系统时钟之间的时间误差为1s,此时,在结合设备性能信息之后,可以确定误差调节量为2s,在调节完成之后播放设备和同步参考播放设备此时的系统时间均为48s,达到时钟同步。In order to overcome the above problems, improve the accuracy of the system clock adjustment, and then improve the synchronization of the media played by the playback device; in this embodiment, the error adjustment information can be obtained in combination with the playback device and the device performance information of the synchronous reference playback device, and then based on the error The adjustment information adjusts the system clock, so that the system clock between the playback device and the synchronization reference playback device is synchronized after the adjustment. For example, the time error between the system clocks obtained is 1s. At this time, after combining the device performance information, it can be determined that the error adjustment amount is 2s. After the adjustment is completed, the system time of the playback device and the synchronous reference playback device are both 48s. achieve clock synchronization.
104、根据该误差调节信息对自身系统时钟进行调节。104. Adjust the own system clock according to the error adjustment information.
具体地,可以根据调节方向和调节量对自身系统时钟进行调节。比如,按照调节方向将系统时钟调节一个调节量;如使自身系统时钟加快一个预设调节量,如加快10ms等。Specifically, the own system clock can be adjusted according to the adjustment direction and adjustment amount. For example, adjust the system clock by an adjustment amount according to the adjustment direction; for example, speed up the own system clock by a preset adjustment amount, such as speeding up by 10ms, etc.
例如,调节量可以为10ms,调节方向为负方向时,那么可以按照负方向将自身系统时钟调节10ms,即使系统时钟减慢10ms。For example, the adjustment amount can be 10ms, and when the adjustment direction is in the negative direction, the system clock can be adjusted in the negative direction by 10ms, even if the system clock is slowed down by 10ms.
可选地,为了避免一次性调节系统时钟降低多媒体输出品质,本实施例可以根据调节方向和调节量对自身系统时钟进行多次调节。Optionally, in order to avoid reducing the multimedia output quality by adjusting the system clock at one time, this embodiment may adjust the own system clock multiple times according to the adjustment direction and adjustment amount.
比如,可以根据调节量(此时为总调节量)、调节方向和预设调节量对系统时钟进行多次调节。预设调节量可以根据实际需求设定,比如,可以为10ms、20ms、1s等等。For example, the system clock can be adjusted multiple times according to the adjustment amount (in this case, the total adjustment amount), the adjustment direction and the preset adjustment amount. The preset adjustment amount can be set according to actual needs, for example, it can be 10ms, 20ms, 1s, and so on.
比如,总调节量为15ms,预设调节量为5ms时,可以先按照调节方向调节一个预设调节量5ms,然后间隔预设时间段之后再次按照调节方向调节一个预设调节量5ms,如此再经过三次调节即可完成调节。For example, when the total adjustment amount is 15ms and the preset adjustment amount is 5ms, you can first adjust a preset adjustment amount for 5ms according to the adjustment direction, and then adjust a preset adjustment amount for 5ms according to the adjustment direction after a preset time interval, and so on. The adjustment can be completed after three adjustments.
可选地,在实际情况中,播放设备之间的设备性能差异,会导致输出相同声音时的音量不相同,如以相同设定音量输出同一声音时声音的音量不相同,即存在音频差异;进而导致用户听感不佳,降低了媒体输出的品质。例如,播放设备a与播放设备b以相同设定音量输出同一声音时,播放设备a输出的声音可能会比播放设备b输出的声音大。Optionally, in actual situations, differences in device performance between playback devices may result in different volumes when outputting the same sound. For example, when the same sound is output with the same set volume, the volume of the sound is different, that is, there are audio differences; As a result, the user has a poor sense of hearing, which reduces the quality of the media output. For example, when playback device a and playback device b output the same sound at the same set volume, the sound output by playback device a may be louder than the sound output by playback device b.
由于在声音传播技术领域中,两个音源发出同样的声音,如果二者存在先后差异,则先进入人耳的声音人耳会感觉该声音更大(即声音的音量更大),后进入人耳会感觉声音比先入耳的声音低(即音量比之前先入耳的声音的音量小)。Since in the field of sound propagation technology, two sound sources emit the same sound, if there is a difference in the sequence between the two, the sound that enters the human ear first will be felt by the human ear to be louder (that is, the volume of the sound is larger), and then enter the human ear. The ear perceives the sound as lower than the sound that entered the ear first (ie, the volume is lower than that of the sound that entered the ear first).
反过来,如果原本两个声音是相同且同步的,但由于该声音的大小(即音量)有区别,此时将较大声(即音量较高)的声音稍微滞后,那么人耳将会感觉两个声音平衡或者大小一致。Conversely, if the original two sounds are the same and synchronized, but due to the difference in the size (ie volume) of the sound, the louder (ie higher volume) sound is slightly delayed, then the human ear will feel the two The sound is balanced or the same size.
因此,为了提高媒体输出的品质以及用户体验,本实施例可以通过时钟之间的时间误差或者同步误差来补偿或者平衡由于设备性能不同导致输出相同声音的音量差异。也即步骤“根据该自身的设备性能信息、该同步参考设备的设备性能信息以及该时间误差获取误差调节信息”可以包括:Therefore, in order to improve the quality of media output and user experience, this embodiment can compensate or balance the difference in volume of the same sound output due to different device performances through the time error or synchronization error between clocks. That is, the step "acquiring error adjustment information according to the device performance information of the own device, the device performance information of the synchronization reference device, and the time error" may include:
根据该自身的设备性能信息以及该同步参考播放设备的设备性能信息,获取自身与同步参考播放设备输出相同声音的音量差异信息;According to the device performance information of the self and the device performance information of the synchronization reference playback device, obtain volume difference information of the same sound output by the self and the synchronization reference playback device;
根据该音量差异信息获取平衡音量差异的补偿时间误差;Obtain the compensation time error for balancing the volume difference according to the volume difference information;
根据该补偿时间误差和该时间误差获取误差调节信息。Error adjustment information is obtained according to the compensation time error and the time error.
以时钟调节装置集成在播放设备为例,播放设备可以根据自身的设备性能信息以及该同步参考播放设备的设备性能信息获取自身与同步参考播放设备输出相同声音的音量差异信息,然后,根据该音量差异信息获取平衡音量差异的补偿时间误差,根据该补偿时间误差和该时间误差获取误差调节信息。Taking the clock adjustment device integrated in the playback device as an example, the playback device can obtain the volume difference information of the same sound output by itself and the synchronous reference playback device according to its own device performance information and the device performance information of the synchronous reference playback device, and then, according to the volume The difference information obtains the compensation time error for balancing the volume difference, and obtains error adjustment information according to the compensation time error and the time error.
其中,音量差异信息,可以为播放设备自身和同步参考播放设备以相同设定音量输出相同声音的声音音量(即声音大小)的区别信息。该设备性能信息可以包括:设备的声音输出性能信息,即与声音输出相关的性能信息;如音频解码信息、数模转换信息、扬声器信息、处理芯片参数信息、音频缓存信息等等。The volume difference information may be the difference information of the sound volume (that is, the sound volume) of the playback device itself and the synchronization reference playback device outputting the same sound at the same set volume. The device performance information may include: device sound output performance information, that is, performance information related to sound output; such as audio decoding information, digital-to-analog conversion information, speaker information, processing chip parameter information, audio buffer information, and the like.
本实施例中,播放设备自身和同步参考播放设备以相同设定音量输出相同声音的声音音量可以为声音的实际音量。此时,步骤“根据该自身的设备性能信息以及该同步参考播放设备的设备性能信息,获取自身与同步参考播放设备输出相同声音的音量差异信息”可以包括:In this embodiment, the sound volume at which the playback device itself and the synchronization reference playback device output the same sound at the same set volume may be the actual volume of the sound. At this time, the step "acquiring the volume difference information of the same sound output by the self and the synchronous reference playback device according to the device performance information of the self and the device performance information of the synchronous reference playback device" may include:
根据自身的设备性能信息获取输出声音的第一实际音量;Obtain the first actual volume of the output sound according to its own device performance information;
根据该同步参考播放设备的设备性能信息,获取该同步参考播放设备输出声音的第二实际音量;According to the device performance information of the synchronous reference playback device, obtain the second actual volume of the output sound of the synchronous reference playback device;
根据该第一实际音量和第二实际音量,获取自身与同步参考播放设备输出相同声音的音量差异信息。According to the first actual volume and the second actual volume, the volume difference information of the same sound output by itself and the synchronous reference playback device is obtained.
其中,实际音量为设备输出的声音的实际大小。The actual volume is the actual volume of the sound output by the device.
比如,可以将第一实际音量与第二实际音量进行比较,得到比较结果,根据该比较结果获取自身与同步参考播放设备输出相同声音的音量差异信息。For example, the first actual volume can be compared with the second actual volume to obtain a comparison result, and according to the comparison result, the volume difference information of the same sound output by the self and the synchronous reference playback device can be obtained.
该音频差异信息可以包括:第一实际音量比第二实际音量小或者大的指示信息等。The audio difference information may include: indication information that the first actual volume is smaller or larger than the second actual volume, and the like.
本实施例中,根据音量差异信息获取补偿时间误差的方式可以有多种,比如,可以根据该音量差异信息获取自身系统时钟与同步参考播放设备的系统时钟之间平衡音量差异所需的同步误差;根据该同步误差获取平衡音量差异的补偿时间误差。In this embodiment, there may be various ways to obtain the compensation time error according to the volume difference information. For example, the synchronization error required to balance the volume difference between the own system clock and the system clock of the synchronization reference playback device may be obtained according to the volume difference information. ; Obtain the compensation time error of the balance volume difference according to the synchronization error.
具体地,以时钟调节装置集成在播放设备中为例,若播放设备输出声音的音量比同步参考播放设备输出该声音的音量大时,为能够平衡人耳的听感,需要对播放设备的系统时钟进行延迟,使得该播放设备相对于同步参考播放设备的声音输出滞后,此时,系统时钟之间所需的同步误差可以为-Pms,该P值可以根据实际需求设定,如,1ms、2ms、3ms等等。Specifically, taking the integration of the clock adjustment device into the playback device as an example, if the volume of the output sound of the playback device is larger than the volume of the sound output by the synchronous reference playback device, in order to balance the sense of hearing of the human ear, the system of the playback device needs to be adjusted The clock is delayed, so that the sound output of the playback device lags behind the synchronization reference playback device. At this time, the required synchronization error between the system clocks can be -Pms, and the P value can be set according to actual needs, such as 1ms, 2ms, 3ms, etc.
若播放设备输出声音的音量比同步参考播放设备输出该声音的音量小时,为能够平衡人耳的听感,需要对播放设备的系统时钟进行加快或者超前,使得该播放设备先于同步参考播放设备输出声音,即间距地使同步参考播放设备相对于该播放设备延迟或滞后输出声音;此时,系统时钟之间所需的同步误差可以为Qms,该Q值可以根据实际需求设定,如,1ms、2ms、3ms等等,其Q值与上述P值可以相同。If the volume of the sound output by the playback device is smaller than the volume of the sound output by the synchronous reference playback device, in order to balance the human ear’s sense of hearing, it is necessary to speed up or advance the system clock of the playback device, so that the playback device is ahead of the synchronization reference playback device. Output sound, that is, to make the synchronous reference playback device delay or lag the output sound relative to the playback device at a distance; at this time, the required synchronization error between system clocks can be Qms, and the Q value can be set according to actual needs, such as, 1ms, 2ms, 3ms, etc., the Q value can be the same as the above P value.
在获取系统之间平衡音量差异所需的同步误差之后,可以将该同步误差直接作为平衡音量差异的补偿时间误差,即-P或者Q为补偿时间误差。After obtaining the synchronization error required to balance the volume difference between systems, the synchronization error can be directly used as the compensation time error for balancing the volume difference, that is, -P or Q is the compensation time error.
本实施例中,获取误差调节信息的方式有多种,如步骤“根据该补偿时间误差和该时间误差获取误差调节信息”可以包括:In this embodiment, there are many ways to obtain error adjustment information. For example, the step "acquiring error adjustment information according to the compensation time error and the time error" may include:
将该补偿时间误差确定为需要最终调节到的目标时间误差;Determine the compensation time error as the target time error that needs to be finally adjusted;
根据该目标时间误差和该时间误差获取误差调节信息。Error adjustment information is obtained according to the target time error and the time error.
以时钟调节装置集成在播放设备为例:Take the clock adjustment device integrated in the playback device as an example:
(1)、补偿时间误差的绝对值小于时间误差的绝对值:(1) The absolute value of the compensation time error is less than the absolute value of the time error:
当播放设备输出声音比同步参考播放设备输出声音的音量大时,此时,可以获取平衡音量差异的补偿时间误差为-1ms(即使得播放设备的声音输出滞后1ms),若获取系统时钟之间的时间误差为5ms(即播放设备的系统时钟比同步参考播放设备的系统时钟快5ms),此时,可以确定进行调节的调节方向为负方向、调节量为6。When the output sound of the playback device is larger than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error for obtaining the balance volume difference is -1ms (that is, the sound output of the playback device is delayed by 1ms). The time error is 5ms (that is, the system clock of the playback device is 5ms faster than the system clock of the synchronous reference playback device).
当播放设备输出声音比同步参考播放设备输出声音的音量大时,此时,可以获取平衡音量差异的补偿时间误差为-1ms(即使得播放设备的声音输出滞后1ms),若获取系统时钟之间的时间误差为-5ms(即播放设备的系统时钟比同步参考播放设备的系统时钟慢5ms),此时,可以确定进行调节的调节方向为负方向、调节量为4。When the output sound of the playback device is larger than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error for obtaining the balance volume difference is -1ms (that is, the sound output of the playback device is delayed by 1ms). The time error is -5ms (that is, the system clock of the playback device is 5ms slower than the system clock of the synchronous reference playback device). At this time, it can be determined that the adjustment direction for adjustment is the negative direction and the adjustment amount is 4.
当播放设备输出声音比同步参考播放设备输出声音的音量小时,此时,可以获取平衡音量差异的补偿时间误差为1ms(即使得同步参考播放设备的声音输出滞后1ms),若获取系统时钟之间的时间误差为5ms(即播放设备的系统时钟比同步参考播放设备的系统时钟快5ms),此时,可以确定进行调节的调节方向为负方向、调节量为4。When the output sound of the playback device is smaller than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error for obtaining the balance volume difference is 1ms (that is, the sound output of the synchronous reference playback device is delayed by 1ms). The time error is 5ms (that is, the system clock of the playback device is 5ms faster than the system clock of the synchronous reference playback device). At this time, it can be determined that the adjustment direction for adjustment is the negative direction and the adjustment amount is 4.
当播放设备输出声音比同步参考播放设备输出声音的音量小时,此时,可以获取平衡音量差异的补偿时间误差为1ms(即使得同步参考播放设备的声音输出滞后1ms),若获取系统时钟之间的时间误差为-5ms(即播放设备的系统时钟比同步参考播放设备的系统时钟慢5ms),此时,可以确定进行调节的调节方向为正方向、调节量为4。When the output sound of the playback device is smaller than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error for obtaining the balance volume difference is 1ms (that is, the sound output of the synchronous reference playback device is delayed by 1ms). The time error is -5ms (that is, the system clock of the playback device is 5ms slower than the system clock of the synchronous reference playback device). At this time, it can be determined that the adjustment direction for adjustment is the positive direction and the adjustment amount is 4.
(2)、补偿时间误差的绝对值大于时间误差的绝对值:(2) The absolute value of the compensation time error is greater than the absolute value of the time error:
当播放设备输出声音比同步参考播放设备输出声音的音量大时,此时,可以获取平衡音量差异的补偿时间误差为-5ms(即使得播放设备的声音输出滞后5ms),若获取系统时钟之间的时间误差为3ms(即播放设备的系统时钟比同步参考播放设备的系统时钟快3ms),此时,可以确定进行调节的调节方向为负方向、调节量为8。When the output sound of the playback device is larger than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error for obtaining the balance volume difference is -5ms (that is, the sound output of the playback device is delayed by 5ms). The time error is 3ms (that is, the system clock of the playback device is 3ms faster than the system clock of the synchronous reference playback device).
当播放设备输出声音比同步参考播放设备输出声音的音量大时,此时,可以获取平衡音量差异的补偿时间误差为-5ms(即使得播放设备的声音输出滞后5ms),若获取系统时钟之间的时间误差为-3ms(即播放设备的系统时钟比同步参考播放设备的系统时钟慢3ms),此时,可以确定进行调节的调节方向为负方向、调节量为2。When the output sound of the playback device is larger than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error for obtaining the balance volume difference is -5ms (that is, the sound output of the playback device is delayed by 5ms). The time error is -3ms (that is, the system clock of the playback device is 3ms slower than the system clock of the synchronous reference playback device). At this time, it can be determined that the adjustment direction for adjustment is the negative direction and the adjustment amount is 2.
当播放设备输出声音比同步参考播放设备输出声音的音量小时,此时,可以获取平衡音量差异的补偿时间误差为5ms(即使得同步参考播放设备的声音输出滞后5ms),若获取系统时钟之间的时间误差为3ms(即播放设备的系统时钟比同步参考播放设备的系统时钟快3ms),此时,可以确定进行调节的调节方向为正方向、调节量为2。When the output sound of the playback device is smaller than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error for obtaining the balance volume difference is 5ms (that is, the sound output of the synchronous reference playback device is delayed by 5ms). The time error is 3ms (that is, the system clock of the playback device is 3ms faster than the system clock of the synchronous reference playback device).
当播放设备输出声音比同步参考播放设备输出声音的音量小时,此时,可以获取平衡音量差异的补偿时间误差为5ms(即使得同步参考播放设备的声音输出滞后5ms),若获取系统时钟之间的时间误差为-3ms(即播放设备的系统时钟比同步参考播放设备的系统时钟慢3ms),此时,可以确定进行调节的调节方向为正方向、调节量为8。When the output sound of the playback device is smaller than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error for obtaining the balance volume difference is 5ms (that is, the sound output of the synchronous reference playback device is delayed by 5ms). The time error is -3ms (that is, the system clock of the playback device is 3ms slower than the system clock of the synchronous reference playback device).
本实施例中补偿时间误差在实际情况中是比较小的,对于媒体同步播放来说,这个补偿时间误差几乎可以忽略不计,因此,该补偿时间误差并不会影响到媒体的同步播放;因此,本实施例可以在使播放设备同步播放媒体的同时,消除由设备性能不同带来的音量差异,提升了媒体输出品质,提高了用户体验。In this embodiment, the compensation time error is relatively small in practice. For the synchronous playback of media, the compensation time error is almost negligible. Therefore, the compensation time error will not affect the synchronous playback of the media; therefore, This embodiment can eliminate the volume difference caused by different device performances while enabling the playback devices to play media synchronously, improve the media output quality, and improve the user experience.
由上可知,本发明实施例采用在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,获取自身的设备性能信息以及该同步参考播放设备的设备性能信息,根据该自身的设备性能信息、该同步参考播放设备的设备性能信息以及该时间误差获取误差调节信息,根据该误差调节信息对自身系统时钟进行调节。该方案可以多媒体播放过程中结合设备性能信息对系统时钟进行调节,达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。It can be seen from the above that in the process of playing multimedia data, the embodiment of the present invention obtains the time error between its own system clock and the system clock of the synchronous reference playback device, and then obtains its own device performance information and the synchronous reference playback device. For the device performance information, the error adjustment information is obtained according to the own device performance information, the device performance information of the synchronous reference playback device and the time error, and the own system clock is adjusted according to the error adjustment information. The solution can adjust the system clock in combination with the device performance information during the multimedia playing process, so as to achieve the effect of playing multimedia synchronously by multiple playing devices. Compared with the prior art, the synchronization of playing multimedia among the multimedia playing devices can be improved.
此外,本发明实施例可以通过同步误差对播放设备由于设备性能不同导致的音量差异进行平衡或者补偿,消除了用户的听感差异,提高媒体(如音频)输出的品质,大大提升了用户体验。In addition, the embodiments of the present invention can balance or compensate for volume differences of playback devices due to different device performances through synchronization errors, eliminate differences in user's sense of hearing, improve the quality of media (such as audio) output, and greatly improve user experience.
实施例二Embodiment 2
根据实施例一所描述的时钟调节方法,以下将举例作进一步详细说明。According to the clock adjustment method described in the first embodiment, the following examples will be used for further detailed description.
在本实施例中,将以实施例一所描述的时钟调节装置集成在播放设备为例进行详细描述。In this embodiment, a detailed description will be given by taking the clock adjustment apparatus described in Embodiment 1 integrated into a playback device as an example.
如图2所示,一种时钟调节方法,具体流程如下:As shown in Figure 2, a clock adjustment method, the specific process is as follows:
201、播放设备在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差。201. During the process of playing multimedia data, the playback device acquires a time error between its own system clock and the system clock of the synchronous reference playback device.
其中,该多媒体数据可以为音频数据、音视频数据等等。该音频数据的格式有多种,比如,MP3格式、WMA格式等等。Wherein, the multimedia data may be audio data, audio and video data, and the like. There are various formats of the audio data, such as MP3 format, WMA format, and so on.
本实施例中该同步参考播放设备可以播放设备,或者控制设备。In this embodiment, the synchronization reference playback device may be a playback device or a control device.
具体地,播放设备获取同步参考设备当前的第一系统时间以及自身当前的第二系统时间,然后,根据第二系统时间和第一系统时间,获取系统时钟与参考时钟之间的时间误差。比如,第一系统时间为1:06,第二系统时间为1:00,此时可以获取时间误差为-6s。Specifically, the playback device obtains the current first system time of the synchronization reference device and its own current second system time, and then obtains the time error between the system clock and the reference clock according to the second system time and the first system time. For example, the time of the first system is 1:06, and the time of the second system is 1:00. At this time, the time error can be obtained as -6s.
202、播放设备获取自身的设备性能信息以及该同步参考播放设备的设备性能信息。202. The playback device acquires its own device performance information and the device performance information of the synchronous reference playback device.
本实施例中,设备性能信息可以包括:设备型号、媒体输出方案信息、设备功率信息、设备硬件性能信息、(如处理器信息、扬声器信息、主板信息、通讯模块信息等等)、设备的声音输出性能信息,(如与声音输出相关的性能信息、如音频解码信息、数模转换信息、扬声器信息、处理芯片参数信息、音频缓存信息等等)。In this embodiment, the device performance information may include: device model, media output scheme information, device power information, device hardware performance information, (such as processor information, speaker information, motherboard information, communication module information, etc.), device sound Output performance information, (such as performance information related to sound output, such as audio decoding information, digital-to-analog conversion information, speaker information, processing chip parameter information, audio buffer information, etc.).
203、播放设备根据自身的设备性能信息以及该同步参考播放设备的设备性能信息,获取自身与同步参考播放设备输出相同声音的音量差异信息。203. The playback device acquires volume difference information of the same sound output by itself and the synchronous reference playback device according to its own device performance information and the device performance information of the synchronous reference playback device.
其中,音量差异信息,可以为播放设备自身和同步参考播放设备以相同设定音量输出相同声音的声音音量(即声音大小)的区别信息。该设备性能信息可以包括:设备的声音输出性能信息,即与声音输出相关的性能信息;如音频解码信息、数模转换信息、扬声器信息、处理芯片参数信息、音频缓存信息等等。The volume difference information may be the difference information of the sound volume (that is, the sound volume) of the playback device itself and the synchronization reference playback device outputting the same sound at the same set volume. The device performance information may include: device sound output performance information, that is, performance information related to sound output; such as audio decoding information, digital-to-analog conversion information, speaker information, processing chip parameter information, audio buffer information, and the like.
具体地,播放设备可以根据自身的设备性能信息获取输出声音的第一实际音量;根据该同步参考播放设备的设备性能信息,获取该同步参考播放设备输出声音的第二实际音量;将第一实际音量与第二实际音量进行比较,得到比较结果,根据该比较结果获取自身与同步参考播放设备输出相同声音的音量差异信息。Specifically, the playback device can obtain the first actual volume of the output sound according to its own device performance information; according to the device performance information of the synchronous reference playback device, obtain the second actual volume of the output sound of the synchronous reference playback device; The volume is compared with the second actual volume to obtain a comparison result, and according to the comparison result, the volume difference information of the same sound output by itself and the synchronous reference playback device is obtained.
该音频差异信息可以包括:第一实际音量比第二实际音量小或者大的指示信息等。The audio difference information may include: indication information that the first actual volume is smaller or larger than the second actual volume, and the like.
204、播放设备根据该音量差异信息获取自身系统时钟与同步参考播放设备的系统时钟之间平衡音量差异所需的同步误差,以得到平衡音量差异的补偿时间误差。204. The playback device obtains, according to the volume difference information, a synchronization error required to balance the volume difference between its own system clock and the system clock of the synchronization reference playback device, so as to obtain a compensation time error for balancing the volume difference.
若播放设备输出声音的音量比同步参考播放设备输出该声音的音量大时,为能够平衡人耳的听感,需要对播放设备的系统时钟进行延迟,使得该播放设备相对于同步参考播放设备的声音输出滞后,此时,系统时钟之间所需的同步误差可以为-Pms,该P值可以根据实际需求设定,如,1ms、2ms、3ms等等。If the volume of the sound output by the playback device is larger than the volume of the sound output by the synchronous reference playback device, in order to balance the sense of hearing of the human ear, it is necessary to delay the system clock of the playback device so that the playback device is relative to the synchronization reference playback device. The sound output lags. At this time, the required synchronization error between the system clocks can be -Pms, and the P value can be set according to actual needs, such as 1ms, 2ms, 3ms and so on.
若播放设备输出声音的音量比同步参考播放设备输出该声音的音量小时,为能够平衡人耳的听感,需要对播放设备的系统时钟进行加快或者超前,使得该播放设备先于同步参考播放设备输出声音,即间距地使同步参考播放设备相对于该播放设备延迟或滞后输出声音;此时,系统时钟之间所需的同步误差可以为Qms,该Q值可以根据实际需求设定,如,1ms、2ms、3ms等等,其Q值与上述P值可以相同。If the volume of the sound output by the playback device is smaller than the volume of the sound output by the synchronous reference playback device, in order to balance the human ear’s sense of hearing, it is necessary to speed up or advance the system clock of the playback device, so that the playback device is ahead of the synchronization reference playback device. Output sound, that is, to make the synchronous reference playback device delay or lag the output sound relative to the playback device at a distance; at this time, the required synchronization error between system clocks can be Qms, and the Q value can be set according to actual needs, such as, 1ms, 2ms, 3ms, etc., the Q value can be the same as the above P value.
本实施例中,播放设备将同步误差作为平衡音量差异的补偿时间误差In this embodiment, the playback device uses the synchronization error as the compensation time error for balancing the volume difference
205、播放设备根据该补偿时间误差和该时间误差获取调节方向和调节量。205. The playback device acquires the adjustment direction and the adjustment amount according to the compensation time error and the time error.
其中,调节方向可以包括正方向或者负方向,该正方向调节是加快系统时钟,负方向调节是减慢系统时钟。其中,该调节量为进行调节的时长,如总时长。The adjustment direction may include a positive direction or a negative direction, the positive direction adjustment is to speed up the system clock, and the negative direction adjustment is to slow down the system clock. The adjustment amount is the duration of the adjustment, such as the total duration.
具体地,播放设备将该补偿时间误差确定为需要最终调节到的目标时间误差;根据该目标时间误差和该时间误差获取误差调节信息。Specifically, the playback device determines the compensated time error as the target time error that needs to be finally adjusted; and obtains error adjustment information according to the target time error and the time error.
比如,当播放设备输出声音比同步参考播放设备输出声音的音量大时,此时,可以获取平衡音量差异的补偿时间误差为-1ms(即使得播放设备的声音输出滞后1ms),若获取系统时钟之间的时间误差为5ms(即播放设备的系统时钟比同步参考播放设备的系统时钟快5ms),此时,可以确定进行调节的调节方向为负方向、调节量为6。For example, when the output sound of the playback device is larger than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error of the balance volume difference can be obtained as -1ms (that is, the sound output of the playback device is delayed by 1ms). If the system clock is obtained The time error between them is 5ms (that is, the system clock of the playback device is 5ms faster than the system clock of the synchronous reference playback device).
又比如,当播放设备输出声音比同步参考播放设备输出声音的音量小时,此时,可以获取平衡音量差异的补偿时间误差为5ms(即使得同步参考播放设备的声音输出滞后5ms),若获取系统时钟之间的时间误差为3ms(即播放设备的系统时钟比同步参考播放设备的系统时钟快3ms),此时,可以确定进行调节的调节方向为正方向、调节量为2。For another example, when the volume of the output sound of the playback device is smaller than the volume of the output sound of the synchronous reference playback device, at this time, the compensation time error for obtaining the balance volume difference is 5ms (that is, the sound output of the synchronous reference playback device is delayed by 5ms). The time error between the clocks is 3ms (that is, the system clock of the playback device is 3ms faster than the system clock of the synchronous reference playback device).
206、播放设备根据调节方向和调节量对自身系统时钟进行调节。206. The playback device adjusts its own system clock according to the adjustment direction and adjustment amount.
具体地,按照调节方向将系统时钟调节一个调节量;如使自身系统时钟加快一个预设调节量,如加快8ms等。Specifically, adjust the system clock by an adjustment amount according to the adjustment direction; for example, speed up the own system clock by a preset adjustment amount, such as speeding up by 8ms.
比如,以补偿时间误差为-1ms、时间误差为5ms为例,播放设备可以确定进行调节的调节方向为负方向、调节量为6;播放设备可以按照负方向调节6ms,使得系统时钟减慢6ms,进而使得系统时钟与同步参考播放设备的系统时钟之间的时间误差为-1ms。For example, taking the compensation time error of -1ms and the time error of 5ms as an example, the playback device can determine that the adjustment direction to be adjusted is the negative direction and the adjustment amount is 6; the playback device can adjust the negative direction by 6ms to slow down the system clock by 6ms , so that the time error between the system clock and the system clock of the synchronous reference playback device is -1ms.
由上可知,本发明实施例通过同步误差对播放设备由于设备性能不同导致的音量差异进行平衡或者补偿,消除了用户的听感差异,提高媒体(如音频)输出的品质,大大提升了用户体验。并且,由于补偿时间误差在实际情况中是比较小的,对于媒体同步播放来说,这个补偿时间误差几乎可以忽略不计,因此,该补偿时间误差并不会影响到媒体的同步播放;因此,本实施例可以在使播放设备同步播放媒体的同时,消除由设备性能不同带来的音量差异,提升了媒体输出品质,提高了用户体验。As can be seen from the above, the embodiment of the present invention balances or compensates the volume difference of the playback device due to the different device performance through the synchronization error, eliminates the difference in the user's sense of hearing, improves the quality of media (such as audio) output, and greatly improves the user experience. . In addition, since the compensation time error is relatively small in actual situations, for the synchronous playback of media, the compensation time error can be almost ignored. Therefore, the compensation time error will not affect the synchronous playback of the media; therefore, this The embodiment can eliminate the volume difference caused by different device performances while synchronously playing the media on the playback device, improve the media output quality, and improve the user experience.
实施例三Embodiment 3
为了更好地实施以上方法,本发明实施例还提供一种时钟调节装置,该时钟调节装置可以集成在播放设备中,该播放设备可以是智能手机、平板电脑、音箱等设备。In order to better implement the above method, an embodiment of the present invention further provides a clock adjustment device, which can be integrated in a playback device, and the playback device can be a smart phone, a tablet computer, a speaker, or other devices.
如图3所示,时钟调节装置300可以包括:误差获取单元301、性能信息获取单元302、性能信息获取单元303以及调节单元304,如下:As shown in FIG. 3 , the clock adjustment apparatus 300 may include: an error acquisition unit 301, a performance information acquisition unit 302, a performance information acquisition unit 303, and an adjustment unit 304, as follows:
误差获取单元301,用于在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差;The error obtaining unit 301 is used to obtain the time error between the own system clock and the system clock of the synchronous reference playback device in the process of playing the multimedia data;
性能信息获取单元302,用于获取自身的设备性能信息以及该同步参考播放设备的设备性能信息;A performance information acquisition unit 302, configured to acquire its own device performance information and the device performance information of the synchronous reference playback device;
调节信息获取单元303,用于根据该自身的设备性能信息、该同步参考播放设备的设备性能信息以及该时间误差获取误差调节信息;an adjustment information obtaining unit 303, configured to obtain error adjustment information according to the device performance information of the self, the device performance information of the synchronous reference playback device, and the time error;
调节单元304,用于根据该误差调节信息对自身系统时钟进行调节。The adjustment unit 304 is configured to adjust its own system clock according to the error adjustment information.
参考图4,本实施例中该调节信息获取单元303,可以包括:Referring to FIG. 4 , in this embodiment, the adjustment information obtaining unit 303 may include:
差异获取子单元3031,用于根据该自身的设备性能信息以及该同步参考播放设备的设备性能信息,获取自身与同步参考播放设备输出相同声音的音量差异信息;The difference acquisition subunit 3031 is used to obtain the volume difference information of the same sound output by the self and the synchronous reference playback device according to the device performance information of the self and the device performance information of the synchronous reference playback device;
补偿获取子单元3032,用于根据该音量差异信息获取平衡音量差异的补偿时间误差;Compensation acquisition subunit 3032, for acquiring the compensation time error of the balance volume difference according to the volume difference information;
调节信息获取子单元3033,用于根据该补偿时间误差和该时间误差获取误差调节信息。The adjustment information obtaining subunit 3033 is configured to obtain error adjustment information according to the compensation time error and the time error.
比如,该差异获取子单元3031,具体可以用于:For example, the difference obtaining subunit 3031 can be specifically used for:
根据自身的设备性能信息获取输出声音的第一实际音量;Obtain the first actual volume of the output sound according to its own device performance information;
根据该同步参考播放设备的设备性能信息,获取该同步参考播放设备输出声音的第二实际音量;According to the device performance information of the synchronous reference playback device, obtain the second actual volume of the output sound of the synchronous reference playback device;
根据该第一实际音量和第二实际音量,获取自身与同步参考播放设备输出相同声音的音量差异信息。According to the first actual volume and the second actual volume, the volume difference information of the same sound output by itself and the synchronous reference playback device is obtained.
比如,该补偿获取子单元3032,可以具体用于:For example, the compensation acquisition subunit 3032 can be specifically used for:
根据该音量差异信息,获取自身系统时钟与同步参考播放设备的系统时钟之间平衡音量差异所需的同步误差;According to the volume difference information, obtain the synchronization error required to balance the volume difference between the own system clock and the system clock of the synchronization reference playback device;
根据该同步误差获取平衡音量差异的补偿时间误差。The compensation time error for balancing the volume difference is obtained according to the synchronization error.
比如,调节信息获取子单元3033,可以具体用于:For example, the adjustment information acquisition subunit 3033 can be specifically used for:
将该补偿时间误差确定为需要最终调节到的目标时间误差;Determine the compensation time error as the target time error that needs to be finally adjusted;
根据该目标时间误差和该时间误差获取误差调节信息。Error adjustment information is obtained according to the target time error and the time error.
具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
由上可知,本发明实施例采用误差获取单元301在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,由性能信息获取单元302获取自身的设备性能信息以及该同步参考播放设备的设备性能信息,由调节信息获取单元303根据该自身的设备性能信息、该同步参考播放设备的设备性能信息以及该时间误差获取误差调节信息,调节单元304根据该误差调节信息对自身系统时钟进行调节。该方案可以多媒体播放过程中结合设备性能信息对系统时钟进行调节,达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。It can be seen from the above that the embodiment of the present invention adopts the error acquisition unit 301 to acquire the time error between its own system clock and the system clock of the synchronous reference playback device in the process of playing multimedia data, and then the performance information acquisition unit 302 acquires its own system clock. The device performance information and the device performance information of the synchronous reference playback device are obtained by the adjustment information acquisition unit 303 according to the own device performance information, the device performance information of the synchronous reference playback device and the time error to obtain error adjustment information, and the adjustment unit 304 obtains the error adjustment information according to the The error adjustment information adjusts the own system clock. The solution can adjust the system clock in combination with the device performance information during the multimedia playing process, so as to achieve the effect of playing multimedia synchronously by multiple playing devices. Compared with the prior art, the synchronization of playing multimedia among the multimedia playing devices can be improved.
此外,本发明实施例可以通过同步误差对播放设备由于设备性能不同导致的音量差异进行平衡或者补偿,消除了用户的听感差异,提高媒体(如音频)输出的品质,大大提升了用户体验。In addition, the embodiments of the present invention can balance or compensate for volume differences of playback devices due to different device performances through synchronization errors, eliminate differences in user's sense of hearing, improve the quality of media (such as audio) output, and greatly improve user experience.
实施例四Embodiment 4
根据实施例一和二所描述的时钟调节方法,以下将举例作进一步详细说明。According to the clock adjustment methods described in Embodiments 1 and 2, the following examples will be used for further detailed description.
在本实施例中,将以实施例一、二和三所描述时钟调节装置集成在从属设备中为例进行详细描述。In this embodiment, the clock adjustment apparatuses described in Embodiments 1, 2 and 3 are integrated in the slave device as an example for detailed description.
本发明实施例提供了一种多媒体同步播放系统,可以包括:控制设备和至少一个播放设备;所述控制设备与所述播放设备连接(如通过网络连接);所述播放设备用于执行上述实施例提供的任一时钟调节方法。An embodiment of the present invention provides a multimedia synchronous playback system, which may include: a control device and at least one playback device; the control device is connected to the playback device (eg, connected through a network); the playback device is configured to perform the above implementation any of the clock adjustment methods provided in the example.
其中,控制设备可以为主控设备,播放设备可以为从属设备。The control device may be a master device, and the playback device may be a slave device.
参考图5,本实施例提供了一种多媒体同步播放系统,包括:源设备10、主控设备20、至少一个从属设备30;该源设备10、主控设备20、从属设备30之间可以通过网络相互连接。Referring to FIG. 5, this embodiment provides a multimedia synchronous playback system, including: a source device 10, a master device 20, and at least one slave device 30; the source device 10, the master device 20, and the slave device 30 can pass Networks are connected to each other.
其中,主控设备20用于控制从属设备,其可以为终端,如手机、平板电脑等,该主控设备也可以为播放设备,比如,音箱等播放设备;本实施例将以主控设备20为终端为例进行说明。Among them, the master control device 20 is used to control the slave device, which can be a terminal, such as a mobile phone, a tablet computer, etc., and the master control device can also be a playback device, such as a playback device such as a speaker; in this embodiment, the master control device 20 will be used. Take the terminal as an example to illustrate.
该从属设备30可以为受控于主控设备20的播放设备,该从属设备可以为音箱、具有播放功能的终端等播放设备。The slave device 30 may be a playback device controlled by the master control device 20, and the slave device may be a playback device such as a speaker, a terminal with a playback function, or the like.
其中,源设备10用于提供待播放的多媒体数据,其可以服务器等网络设备。The source device 10 is used for providing multimedia data to be played, which may be a network device such as a server.
在同步播放多媒体之前,本实施例可以从多个从属设备30中选取一个设备作为同步播放的参考设备,在同步播放过程中,所有从属设备的时钟均将与该参考设备的系统时钟保存同步。比如,可以由主控设备20从多个从属设备30中选取一个从属设备作为同步播放的参考设备,然后,将参考设备的标识发送给各个从属设备。Before synchronously playing multimedia, this embodiment can select one device from multiple slave devices 30 as a reference device for synchronous playback. During synchronous playback, the clocks of all slave devices are kept synchronized with the system clock of the reference device. For example, the master device 20 may select a slave device from the plurality of slave devices 30 as a reference device for synchronous playback, and then send the identifier of the reference device to each slave device.
应当注意的是:当主控设备20若除分发媒体数据之外也接收自身分发的媒体数据播放时,该主控设备20也为从属设备。此时,可以选取主控设备20为参考播设备。It should be noted that: when the master control device 20 also receives and plays the media data distributed by itself in addition to distributing the media data, the master control device 20 is also a slave device. At this time, the master control device 20 may be selected as the reference broadcasting device.
多媒体播放的流程如下:The process of multimedia playback is as follows:
源设备10向主控设备20发送多媒体数据;主控设备20对多媒体数据进行打包,得到多个媒体数据包;主控设备20向各个从属设备30发送媒体数据包;从属设备30缓存媒体数据包并播放缓存的媒体数据包。之后从属设备30执行实施例一和二所描述的时钟调节的步骤。此处不再赘述。The source device 10 sends multimedia data to the master device 20; the master device 20 packages the multimedia data to obtain multiple media data packets; the master device 20 sends media data packets to each slave device 30; the slave device 30 caches the media data packets and play cached media packets. Afterwards, the slave device 30 performs the steps of clock adjustment described in the first and second embodiments. It will not be repeated here.
由上可知,本发明实施例采用从属设备30在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,获取自身的设备性能信息以及该同步参考播放设备的设备性能信息,根据该自身的设备性能信息、该同步参考播放设备的设备性能信息以及该时间误差获取误差调节信息,根据该误差调节信息对自身系统时钟进行调节。该方案可以多媒体播放过程中结合设备性能信息对系统时钟进行调节,达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。As can be seen from the above, the embodiment of the present invention adopts the slave device 30 to obtain the time error between its own system clock and the system clock of the synchronous reference playback device in the process of playing multimedia data, and then obtain its own device performance information and the synchronization reference. The device performance information of the playback device obtains error adjustment information according to the own device performance information, the device performance information of the synchronous reference playback device and the time error, and adjusts its own system clock according to the error adjustment information. The solution can adjust the system clock in combination with the device performance information during the multimedia playing process, so as to achieve the effect of playing multimedia synchronously by multiple playing devices. Compared with the prior art, the synchronization of playing multimedia among the multimedia playing devices can be improved.
此外,本发明实施例从属设备30可以通过同步误差对播放设备由于设备性能不同导致的音量差异进行平衡或者补偿,消除了用户的听感差异,提高媒体(如音频)输出的品质,大大提升了用户体验。In addition, the slave device 30 in the embodiment of the present invention can balance or compensate the volume difference of the playback device due to the different device performance through the synchronization error, so as to eliminate the difference in the user's sense of hearing, improve the quality of media (such as audio) output, and greatly improve the user experience.
实施例五Embodiment 5
本发明实施例还提供一种终端,如图6所示,该终端400可以包括射频(RF,RadioFrequency)电路401、包括有一个或一个以上计算机可读存储介质的存储器402、输入单元403、显示单元404、传感器405、音频电路406、无线保真(WiFi,Wireless Fidelity)模块407、包括有一个或者一个以上处理核心的处理器408、以及电源409等部件。本领域技术人员可以理解,图6中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。An embodiment of the present invention further provides a terminal. As shown in FIG. 6 , the terminal 400 may include a radio frequency (RF, Radio Frequency) circuit 401, a memory 402 including one or more computer-readable storage media, an input unit 403, a display A unit 404, a sensor 405, an audio circuit 406, a Wireless Fidelity (WiFi, Wireless Fidelity) module 407, a processor 408 including one or more processing cores, a power supply 409 and other components. Those skilled in the art can understand that the terminal structure shown in FIG. 6 does not constitute a limitation on the terminal, and may include more or less components than the one shown, or combine some components, or arrange different components.
射频电路401可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器408处理;另外,将涉及上行的数据发送给基站。通常,射频电路401包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,射频电路401还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long TermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The radio frequency circuit 401 can be used to send and receive information, or to receive and send signals during a call. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 408 for processing; in addition, it sends the uplink data to the base station. . Generally, the radio frequency circuit 401 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, the radio frequency circuit 401 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division Multiple Access), Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long TermEvolution), email, Short Messaging Service (SMS, Short Messaging Service), etc.
存储器402可用于存储应用程序和数据。存储器402存储的应用程序中包含有可执行程序代码。应用程序可以组成各种功能模块。处理器408通过运行存储在存储器402的应用程序,从而执行各种功能应用以及数据处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器408和输入单元403对存储器402的访问。Memory 402 may be used to store applications and data. The application programs stored in the memory 402 include executable program codes. Applications can be composed of various functional modules. The processor 408 executes various functional applications and data processing by executing application programs stored in the memory 402 . The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data (such as audio data, phone book, etc.) created by the use of the terminal, etc. Additionally, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide access to the memory 402 by the processor 408 and the input unit 403 .
输入单元403可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元403可以包括指纹识别模组。在一些实施例中,输入单元403还可以包括触敏表面。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器408,并能接收处理器408发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元403还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 403 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 403 may include a fingerprint identification module. In some embodiments, the input unit 403 may also include a touch-sensitive surface. A touch-sensitive surface, also known as a touch display or trackpad, collects the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable operation near the surface), and drive the corresponding connection device according to the preset program. Alternatively, the touch-sensitive surface may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 408, and can receive the command sent by the processor 408 and execute it. Additionally, touch-sensitive surfaces can be implemented using resistive, capacitive, infrared, and surface acoustic wave types. In addition to touch-sensitive surfaces, input unit 403 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.
显示单元404可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元404可包括显示面板。可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器408以确定触摸事件的类型,随后处理器408根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图6中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display unit 404 may be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal, which may be composed of graphics, text, icons, videos and any combination thereof. The display unit 404 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode), and the like. Further, the touch-sensitive surface may cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 408 to determine the type of the touch event, and then the processor 408 displays the touch event according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 6 the touch-sensitive surface and the display panel are implemented as two separate components to implement the input and input functions, in some embodiments, the touch-sensitive surface and the display panel may be integrated to implement the input and output functions.
终端还可包括至少一种传感器405,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The terminal may also include at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or the backlight when the terminal is moved to the ear . As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. Repeat.
音频电路406可通过扬声器、传声器提供用户与终端之间的音频接口。音频电路406可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路406接收后转换为音频数据,再将音频数据输出处理器408处理后,经射频电路401以发送给比如另一终端,或者将音频数据输出至存储器402以便进一步处理。音频电路406还可能包括耳塞插孔,以提供外设耳机与终端的通信。The audio circuit 406 can provide an audio interface between the user and the terminal through speakers and microphones. The audio circuit 406 can convert the received audio data into an electrical signal, transmit it to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted into an electrical signal after being received by the audio circuit 406. After the audio data is processed by the output processor 408, the audio data is sent to, for example, another terminal through the radio frequency circuit 401, or the audio data is output to the memory 402 for further processing. The audio circuit 406 may also include an earphone jack to provide communication between peripheral headphones and the terminal.
无线保真(WiFi)属于短距离无线传输技术,终端通过无线保真模块407可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了无线保真模块407,但是可以理解的是,其并不属于终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wireless Fidelity (WiFi) is a short-distance wireless transmission technology. The terminal can help users to send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 407, which provides users with wireless broadband Internet access. Although FIG. 6 shows the wireless fidelity module 407, it can be understood that it does not belong to the necessary configuration of the terminal, and can be completely omitted within the scope of not changing the essence of the invention as required.
处理器408是终端的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或执行存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行终端的各种功能和处理数据,从而对终端进行整体监控。可选的,处理器408可包括一个或多个处理核心;优选的,处理器408可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器408中。The processor 408 is the control center of the terminal, uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the terminal by running or executing the application program stored in the memory 402 and calling the data stored in the memory 402. function and process data for overall monitoring of the terminal. Optionally, the processor 408 may include one or more processing cores; preferably, the processor 408 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc. , the modem processor mainly deals with wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 408 .
终端还包括给各个部件供电的电源409(比如电池)。优选的,电源可以通过电源管理系统与处理器408逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源409还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal also includes a power source 409 (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the processor 408 through a power management system, so that functions such as managing charging, discharging, and power consumption are implemented through the power management system. The power source 409 may also include one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
尽管图6中未示出,终端还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 6 , the terminal may further include a camera, a Bluetooth module, and the like, which will not be repeated here.
具体在本实施例中,终端中的处理器408会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行程序代码加载到存储器402中,并由处理器408来运行存储在存储器402中的应用程序,从而实现各种功能:Specifically, in this embodiment, the processor 408 in the terminal loads the executable program codes corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 408 executes them and stores them in the memory 402. The application program in the memory 402, thereby realizing various functions:
在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,获取自身的设备性能信息以及所述同步参考播放设备的设备性能信息,根据所述自身的设备性能信息、所述同步参考播放设备的设备性能信息以及所述时间误差获取误差调节信息,根据所述误差调节信息对自身系统时钟进行调节。In the process of playing multimedia data, the time error between the system clock of the own system and the system clock of the synchronous reference playback device is obtained, and then the device performance information of the own device and the device performance information of the synchronous reference playback device are obtained. The device performance information, the device performance information of the synchronous reference playback device, and the time error acquire error adjustment information, and adjust its own system clock according to the error adjustment information.
优选地,根据所述自身的设备性能信息、所述同步参考设备的设备性能信息以及所述时间误差获取误差调节信息,包括:Preferably, the error adjustment information is obtained according to the device performance information of the own device, the device performance information of the synchronization reference device, and the time error, including:
根据所述自身的设备性能信息以及所述同步参考播放设备的设备性能信息,获取自身与同步参考播放设备输出相同声音的音量差异信息;According to the device performance information of the self and the device performance information of the synchronous reference playback device, obtain the volume difference information of the same sound output by the self and the synchronous reference playback device;
根据所述音量差异信息获取平衡音量差异的补偿时间误差;Obtain the compensation time error for balancing the volume difference according to the volume difference information;
根据所述补偿时间误差和所述时间误差获取误差调节信息。Error adjustment information is obtained according to the compensation time error and the time error.
优选地,根据所述自身的设备性能信息以及所述同步参考播放设备的设备性能信息,获取自身与同步参考播放设备输出相同声音的音量差异信息,包括:Preferably, according to the device performance information of the self and the device performance information of the synchronization reference playback device, obtain volume difference information of the same sound output by the self and the synchronization reference playback device, including:
根据自身的设备性能信息获取输出声音的第一实际音量;Obtain the first actual volume of the output sound according to its own device performance information;
根据所述同步参考播放设备的设备性能信息,获取所述同步参考播放设备输出声音的第二实际音量;According to the device performance information of the synchronous reference playback device, obtain the second actual volume of the output sound of the synchronous reference playback device;
根据所述第一实际音量和第二实际音量,获取自身与同步参考播放设备输出相同声音的音量差异信息。According to the first actual volume and the second actual volume, the volume difference information of the same sound output by itself and the synchronous reference playback device is obtained.
优选地,所述根据所述音量差异信息获取平衡音量差异的补偿时间误差,包括:Preferably, obtaining the compensation time error for balancing the volume difference according to the volume difference information includes:
根据所述音量差异信息,获取自身系统时钟与同步参考播放设备的系统时钟之间平衡音量差异所需的同步误差;According to the volume difference information, obtain the synchronization error required to balance the volume difference between the own system clock and the system clock of the synchronization reference playback device;
根据所述同步误差获取平衡音量差异的补偿时间误差。A compensation time error for balancing the volume difference is obtained according to the synchronization error.
优选地,根据所述补偿时间误差和所述时间误差获取误差调节信息,包括:Preferably, obtaining error adjustment information according to the compensation time error and the time error, including:
将所述补偿时间误差确定为需要最终调节到的目标时间误差;determining the compensation time error as the target time error that needs to be finally adjusted;
根据所述目标时间误差和所述时间误差获取误差调节信息。Error adjustment information is obtained according to the target time error and the time error.
上述操作具体可参见前面的方法实施例,在此不再赘述。For details of the foregoing operations, reference may be made to the foregoing method embodiments, and details are not described herein again.
由上可知,本发明实施例提供了一种终端,该终端在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,获取自身的设备性能信息以及所述同步参考播放设备的设备性能信息,根据所述自身的设备性能信息、所述同步参考播放设备的设备性能信息以及所述时间误差获取误差调节信息,根据所述误差调节信息对自身系统时钟进行调节。该方案可以多媒体播放过程中结合设备性能信息对系统时钟进行调节,达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。As can be seen from the above, an embodiment of the present invention provides a terminal. During the process of playing multimedia data, the terminal obtains the time error between its own system clock and the system clock of the synchronous reference playback device, and then obtains its own device performance information. And the device performance information of the synchronous reference playback device, obtain error adjustment information according to the device performance information of the self, the device performance information of the synchronous reference playback device, and the time error, and according to the error adjustment information to the own system Adjust the clock. The solution can adjust the system clock in combination with the device performance information during the multimedia playing process, so as to achieve the effect of playing multimedia synchronously by multiple playing devices. Compared with the prior art, the synchronization of playing multimedia among the multimedia playing devices can be improved.
此外,本发明实施例终端可以通过同步误差对播放设备由于设备性能不同导致的音量差异进行平衡或者补偿,消除了用户的听感差异,提高媒体(如音频)输出的品质,大大提升了用户体验。In addition, the terminal in this embodiment of the present invention can balance or compensate the volume difference of the playback device due to different device performance through synchronization errors, which eliminates the user's difference in hearing, improves the quality of media (such as audio) output, and greatly improves the user experience. .
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The medium may include: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk, and the like.
以上对本发明实施例所提供的一种时钟调节方法、装置、终端及多媒体同步播放系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A clock adjustment method, device, terminal, and multimedia synchronous playback system provided by the embodiments of the present invention have been described above in detail. Specific examples are used in this paper to illustrate the principles and implementations of the present invention. The description of the above embodiments It is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific embodiments and application scope. The contents of the description should not be construed as limiting the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610882907.4ACN106454421B (en) | 2016-10-08 | 2016-10-08 | A clock adjustment method, device, terminal and multimedia synchronous playback system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610882907.4ACN106454421B (en) | 2016-10-08 | 2016-10-08 | A clock adjustment method, device, terminal and multimedia synchronous playback system |
| Publication Number | Publication Date |
|---|---|
| CN106454421A CN106454421A (en) | 2017-02-22 |
| CN106454421Btrue CN106454421B (en) | 2019-07-16 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610882907.4AExpired - Fee RelatedCN106454421B (en) | 2016-10-08 | 2016-10-08 | A clock adjustment method, device, terminal and multimedia synchronous playback system |
| Country | Link |
|---|---|
| CN (1) | CN106454421B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109752642A (en)* | 2018-12-20 | 2019-05-14 | 深圳市科陆电子科技股份有限公司 | A clock module calibration method and system, device and storage medium thereof |
| CN111726793B (en)* | 2020-06-17 | 2021-07-30 | 翱捷科技股份有限公司 | Timing deviation compensation method and device and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101026769A (en)* | 2007-01-12 | 2007-08-29 | 西安交通大学 | Multi-path media synchronous display control method |
| CN102905148A (en)* | 2012-09-18 | 2013-01-30 | 北京三星通信技术研究有限公司 | Mobile terminal and method for playing 3D video |
| EP2713281A1 (en)* | 2003-07-28 | 2014-04-02 | Sonos, Inc. | System and method for synchronizing operations among a plurality of independently clocked digital data processing devices |
| CN104079957A (en)* | 2014-06-25 | 2014-10-01 | 广东欧珀移动通信有限公司 | Multimedia device synchronous operation method and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103634621B (en)* | 2012-08-27 | 2019-04-16 | 中兴通讯股份有限公司 | Synchronisation control means and device, system are played in a kind of video recommendations business |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2713281A1 (en)* | 2003-07-28 | 2014-04-02 | Sonos, Inc. | System and method for synchronizing operations among a plurality of independently clocked digital data processing devices |
| CN101026769A (en)* | 2007-01-12 | 2007-08-29 | 西安交通大学 | Multi-path media synchronous display control method |
| CN102905148A (en)* | 2012-09-18 | 2013-01-30 | 北京三星通信技术研究有限公司 | Mobile terminal and method for playing 3D video |
| CN104079957A (en)* | 2014-06-25 | 2014-10-01 | 广东欧珀移动通信有限公司 | Multimedia device synchronous operation method and system |
| Publication number | Publication date |
|---|---|
| CN106454421A (en) | 2017-02-22 |
| Publication | Publication Date | Title |
|---|---|---|
| CN106373600B (en) | Audio synchronous playing method, device, system and terminal | |
| CN103905879B (en) | The method, apparatus and equipment that a kind of video data and audio data are played simultaneously | |
| CN106411447B (en) | playing control method, device and terminal | |
| CN106452643B (en) | playing control method, device, terminal and playing system | |
| CN103905876A (en) | Video data and audio data synchronized playing method and device and equipment | |
| CN103905881B (en) | The method, apparatus and equipment that a kind of video data and audio data are played simultaneously | |
| CN106254903B (en) | synchronous playing method, device and system of multimedia data | |
| CN106341713B (en) | Multimedia synchronous playing method, device, system and terminal | |
| CN106411448A (en) | Play control method, device and terminal | |
| CN103905878A (en) | Video data and audio data synchronized playing method and device and equipment | |
| US10675541B2 (en) | Control method of scene sound effect and related products | |
| CN106448714A (en) | A method, device and system for synchronous playback of playback equipment | |
| EP3429176A1 (en) | Scenario-based sound effect control method and electronic device | |
| CN106412625B (en) | multimedia synchronous playing method, device, terminal and system | |
| CN106653068A (en) | A method, device and terminal for playing audio data | |
| CN106452644A (en) | Play control method, device and terminal | |
| CN106254924A (en) | A method, system and related equipment for playing multimedia data | |
| CN106454421B (en) | A clock adjustment method, device, terminal and multimedia synchronous playback system | |
| US10853412B2 (en) | Scenario-based sound effect control method and electronic device | |
| CN106454420B (en) | Clock synchronization method and device | |
| CN106375823B (en) | Clock adjusting method, device, terminal and multimedia synchronous playing system | |
| CN106445458B (en) | Playing control method, device and terminal | |
| CN103345930B (en) | data synthesis method, device and terminal | |
| CN106385597A (en) | Clock adjustment method, device, terminal and multimedia synchronous playback system | |
| CN106375824B (en) | Clock adjusting method, device, terminal and multimedia synchronous playing system |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information | Address after:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. | |
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20190716 |