This application generally relates to synchronizing multiple electronic devices. In particular, the application relates to platforms and techniques for determining latency time values associated with multiple electronic devices to synchronize playback of audio from the multiple electronic devices.
Various known electronic devices support audio playback through audio components such as external speakers. For example, a user may use speakers for audio playback in situations in which the user does not have or does not wish to use headphones or earbuds. In some cases, respective users of multiple electronic devices may wish to collectively listen to a song via the respective speakers of their multiple electronic devices. The resulting combined audio from the multiple speakers may be louder than audio output from a single speaker and therefore may provide a better listening experience for the users.
Existing techniques for syncing and playing audio from multiple speakers result in inaccurate setup and, accordingly, out-of-sync audio playback. In particular, the existing techniques do not account for various timing offsets, latency buffering, and re-connecting attempts. Additionally, the existing techniques do not adequately handle packets of audio data to facilitate the audio playback from the multiple devices. Accordingly, there is an opportunity to implement embodiments for syncing multiple electronic devices such that audio playback from the multiple electronic devices is synchronized. Additionally, there is an opportunity to implement embodiments for exchanging data parameters among multiple electronic devices to initiate audio playback and accurately synchronize the audio playback based on the data parameters.
The accompanying figures, where like reference numerals refer to identical or functionally similar elements throughout the separate views, together with the detailed description below, are incorporated in and form part of the specification, and serve to further illustrate embodiments of concepts that include the claimed embodiments, and explain various principles and advantages of those embodiments.
Embodiments as detailed herein enable multiple electronic devices to play or output audio via their speakers with reduced or eliminated synchronization issues. In this way, one or more users of the electronic devices can listen to the audio without experiencing delays or offsets in the audio output timing of the respective electronic devices. At a given time, one of the electronic devices is deemed a master device and the remaining one or more electronic devices are deemed slave devices.
According to some embodiments, the master device can detect one or more slave devices via near field communication (NFC) and connect to the slave devices via a wireless connection, such as Wi-Fi Direct or another wireless connection. The master device can query the slave devices and calculate a network latency time value for each slave device based on a time when the master device receives a response from that slave device. The master device can send the calculated network latency time value to each slave device for storage on each slave device. The master device can establish an audio playback session with the slave devices and send portions of an audio file as well as a playback timing instruction to each slave device, where the playback timing instruction can include a current system time of the master device. Each slave device can calculate a system clock offset value according to the current system time of the master device, the respective system time of each slave device, and the calculated network latency time value. According to embodiments, the master device can initiate playback of the audio file and the slave devices can initiate playback of the audio file according to their playback timing instructions as well as their calculated system clock offset values such that the audio playback can occur on both the master and slave devices with little or no delay issues.
In some embodiments, the master device and the slave devices can refine any sync discrepancies via manual input from a user or via automatic calculations based on hardware latency, elapsed time discrepancies, and/or playback of various audio sync data. Further, a master device or a slave device can modify the audio playback according to pause, fast forward, rewind, skip, and other playback commands received via a user interface and, in some cases, the slave device can switch roles with the master device according to various commands initiated from the slave device. In further embodiments, an additional slave device can join an existing audio session between a master device and one or more slave devices.
The embodiments as discussed herein offer a benefit to users by effectively and efficiently reducing or eliminating sync issues that can be experienced during “group audio” sessions. Instead of users having to manually sync audio playback from multiple devices, the embodiments offer techniques to sync electronic devices based on hardware and software latencies and network latencies and to issue playback instructions based on the syncing, thus improving playback timing. The embodiments further offer the benefit of manually and automatically adjusting timing parameters to improve synchronization accuracy. The users can therefore leverage the speakers from multiple device speakers to produce a more desirable listening experience, as the speakers of a single electronic device may not be capable of producing a preferred level of sound. Delays among the group of devices of less than 100 milliseconds, compared to another device, are acceptable under some circumstances, depending on the frequency (frequency response), amplitude (dynamic range), tempo, and other acoustic features of the audio recording. The manual and/or automatic adjustment of timing parameters may either reduce delays to improve absolute timing synchronization or increase delays to improve psychoacoustic perception of sound localization (e.g., left and right channel separation or auditory scene creation) or other desired effects (e.g., reverb and delay).
It should be noted that the disclosures in this specification are made and intended to be interpreted to their broadest extent under the patent laws, and that while the systems and methods described herein may be employed broadly in numerous applications and embodiments consistent with their capabilities, nothing in this disclosure is intended to teach, suggest, condone, or imply noncompliance with any other law or regulation that may be applicable to certain usages or implementations of the systems and methods. For example, while the systems and methods disclosed herein are technologically capable of copying, transmitting, and playback of media files and associated artwork or other metadata, such capabilities and functionalities should not be construed as a teaching, recommending, or suggesting use of such capabilities and functionalities in a manner that does not comply with all applicable existing laws and regulations, including without limitation, applicable national, state, and common law privacy or copyright laws. Again, such broad disclosure is intended for compliance with and interpretation under the patent laws and regulations.
The electronic devices as described herein utilize system clocks that facilitate the functionalities according to a “relative timing” approach, whereby timing commands are programmed and latencies are calculated based on the relative differences in clock readings and delays calculated therefrom. For example, a master electronic device can command a slave device to start playing an audio file 1.15 seconds after receipt. However, it should be appreciated that the electronic devices can similarly facilitate the functionalities according to an “absolute timing” approach, whereby timing commands are programmed and latencies are calculated based on readings from a common clock. For example, a master device and a slave device can access the same clock, and the master device can command the slave device to start playing an audio file at 12:59:59.55 pm.
According to embodiments, the electronic devices 104, 105, 106 can connect to and communicate with each other via various wireless connections. For example, the electronic devices 104, 105, 106 can initially detect each other via near field communication (NFC). In particular, respective NFC components of the electronic devices 104, 105, 106 such as NFC tags and/or NFC chips can detect proximity with other NFC components and establish NFC connections using unique identifications. The electronic devices 104, 105, 106 can also include communication modules that enable the electronic devices 104, 105, 106 to wirelessly connect to each other, such as via a Wi-Fi Direct connection or a Wi-Fi connection.
In operation, the users 101, 102, 103 may wish to establish a “group play” of audio whereby external speakers of their respective electronic devices 104, 105, 106 are leveraged to simultaneously output audio. According to embodiments, the electronic devices 104, 105, 106 are configured to sync with each other based on network and/or hardware and software latencies, whereby one of the electronic devices 104, 105, 106 is deemed the master device and the remaining electronic devices are deemed slave devices. For purposes of explanation, assume that the electronic device 104 is the master device and the electronic devices 105, 106 are the slave devices. The master electronic device 104 can facilitate a syncing technique with the slave electronic devices 105, 106 to determining timing for audio playback. Further, the master electronic device 104 can select an audio file and send portions of the audio file to the slave electronic devices 105, 106 via the wireless connections. The master electronic device 104 can initiate playback of the audio file based on the syncing information and can send playback instructions for the audio file to the slave electronic devices 105, 106, where the playback instructions are also based on the syncing information.
In some embodiments, the electronic devices 104, 105, 106 can switch roles whereby a slave device can become a master device and vice-versa. For example, a slave device can select a new audio playlist which triggers a request to a master device for a role change. In other embodiments, an additional user 108 may wish to join his or her electronic device 109 to the audio playback session among the other electronic devices 104, 105, 106. When the additional electronic device 109 is within the proximity 107, the master device of the audio playback session can connect to the electronic device 109, facilitate the syncing technique to establish proper timing with the electronic device 109, and send appropriate audio file portions and playback timing instructions such that the electronic device 109 can output the audio file in sync with the other electronic devices 104, 105, 106. In some embodiments the additional electronic device 109 is invited to the group audio session through an NFC communication with one of the devices 104, 105, 106 already in the group audio session.
Referring to
The master device 204 can initiate 216 a wireless connection broadcast with the slave device 205 and the slave device 205 can connect 218 to the master device 204 via the wireless connection. In some embodiments, the master device 204 can broadcast a Wi-Fi Direct service containing the unique ID of the master device 204 as well as service types unique to the audio initiation so as not to collide with other Wi-Fi Direct services. Further, in some embodiments, the slave device 205 can broadcast its service as well as attempt to discover services and, when the slave device 205 finds a service that matches the unique ID of the master device 204, the slave device 205 can stop broadcasting its service and attempt to connect to the service of the master device 204. The master device 204 and the slave device 205 can further receive information about the connection (e.g., the IP address of the master device 204) so that the roles (i.e., which device is the master and which device is the slave) can be established. Further, the master device 204 and the slave device 205 can initiate or open any threads through one or more sockets and/or via TCP connections to facilitate data transfer. It should be appreciated that other wireless connections between the master device 204 and the slave device 205 are envisioned, such as a Wi-Fi connection.
Referring to
Additionally, the master device 204 can estimate the one-way network latency value as half the difference between the first system time and the second system time, or according to other calculations. In some further embodiments, the master device 204 can calculate the one-way network latency value based on averaging multiple network latency pings. According to embodiments, the master device 204 can send 225 the estimated one-way network latency value to the slave device 205.
The slave device 205 can calculate 226 a system clock offset value based on subtracting the estimated one-way network latency value received from the master device 204 from the difference in master and slave clock times previous saved by the slave device 205. According to some embodiments, the slave device 205 can optionally open 227 a command pipe with the master device 204 over which the slave device 205 can send various commands, for example commands to control playback of an audio file.
The master device 204 can select an audio file for playback and send 228 an “audio file selected” command to the slave device 205. In some embodiments, a user can select the audio file via a user interface of the master device 204. Further, the master device 204 can initiate a corresponding audio playback application to facilitate the audio playback and playback commands associated therewith. It should be appreciated that the audio file can be saved locally on the master device 204 or can be retrieved from a remote server via a network connection (see
The master device 204 can initiate 234 playback of the audio file and the slave device 205 can initiate 236 playback of the audio file according to the timing instruction as well as the system clock offset value calculated in 226. Accordingly, the respective audio output from the master device 204 and the slave device 205 can be synced based on the amount of time it takes for the master device 204 to send the audio file to the slave device 205 (i.e., the network latency or a modification thereof). The master device 204 can send 238 additional portion(s) of the audio file to the slave device 205 using the audio playback session, whereby the master device 204 and the slave device 205 can play the additional portion(s) as previously described with reference to 234, 236. The previously-sent timing instruction 232 may be applied to the additional portions of the audio file. Consequently, the playback of the audio file on the master device 204 and the slave device 205 can be continuous and uninterrupted.
In some embodiments, the master device 204 can optionally confirm 240 playback synchronization of the audio file at the slave device 205. In particular, the master device 204 can send an elapsed playback time of the audio file to the slave device 205 and the slave device 205 can compare the master elapsed playback time to its own elapsed playback time. If the difference in elapsed playback times exceeds a threshold amount (whereby the threshold amount is based on a predetermined threshold amount as well as the network latency value and/or timing instruction), any slave device 205 that is out of sync can send an indication 241 to the master device 204 that the playback is out of sync. If the playback is out of sync, this may trigger a re-performance of network latency estimations 220, 222, 224, 225, 226 with the out-of-sync slave device 205. The master device 204 and/or the out-of-sync slave device 205 can adjust the playback of the audio file to account for the discrepancy. For example, the master device 204 can delay its playback or can instruct the slave device 205 to increase its playback rate or skip to another portion of the audio file.
In some embodiments, the master device 204 can optionally send 242 a playback command as well as an optional timing instruction to the slave device. For example, a user of the master device 204 can select to pause, to fast forward or rewind the audio file (e.g., by dragging along a time line corresponding to the audio file playback and then releasing), or to skip to another audio file or another playlist. For further example, a user of the slave device 205 can make similar playback selections and the slave device 205 can send the selections as requests to the master device 204 to have the master device 204 modify the playback accordingly. The master device 204 can perform 243 the playback command. The slave device 205 can perform the playback command in compliance with the timing instruction and the system clock offset value, if applicable.
In some embodiments, the playback commands (e.g., fast forward, rewind, etc. as implemented by moving an indicator along a time line) can be a variant of confirming the playback synchronization per step 240. For example, assume that one second ago, 1:37 of the audio playback of a certain song had elapsed on the master device 204, and the user has adjusted a slider bar so that the audio playback is now at 2:00. Then, the master device 204 can send a confirmation 240 sync request to the slave device 205 indicating that the audio playback is at 2:00. The slave device 205 can receive the confirmation sync request and indicate 241 that the slave device 205 is “out of sync.” Further, the slave device 205 can jump to the 2:00 mark of audio playback (plus any compensation for network delay and optionally acoustic delay), and the master device 204 and the slave device 205 can re-perform their network latency calculations 220, 222, 224, 225, 226.
As shown in
The slave device 305 can detect 344 a selection of an additional audio file, where the selection triggers a role change wherein the slave device 305 can become the new master device and the master device 304 can become the new slave device. For example, the selection of the additional audio file can be an audio file or playlist of audio files stored on the slave device 305 or otherwise accessible by the slave device 305. The slave device 305 can send 346 a request to switch roles to the master device 304 and the master device 304 can send 348 a notification of the role switch to the slave device 305. Upon receipt of the notification, the slave device 305 (now the new master device) can calculate 350 a new network latency value and a new system clock offset value with the master device 304 (now the new slave device) via a series of network latency pings and calculations, similar to 220, 222, 224, 225, 226 as discussed with respect to
The new master device 305 can establish 330 an additional audio playback session with the new slave device 304, similar to 230 as discussed with respect to
When within the proximity 107, the new slave device 409 can send 452 a request to the master device 404 to join the audio playback session between the master device 404 and the slave device 405. The master device 404 can calculate 454 a new network latency value and a new system clock offset value with the slave device 406 via a series of network latency pings and calculations, similar to 220, 222, 224, 225, 226 as discussed with respect to
As shown in
The embodiments as discussed herein can account for an audio latency for in-device hardware and software computing delays (a computing audio latency) plus an acoustic “through air” delay, which excludes estimated network latency delay. This audio latency can be determined using audio sync data playback and at least one microphone of one of the devices. In some embodiments, when two devices initially form a group audio session, the NFC pairing can trigger a wireless connection and an initial network delay measurement as well as trigger an audio sync measurement process to determine an audio latency delay between the two devices. The audio sync measurement process, which can initiate while the devices are close to each other (e.g., within a short NFC range), can utilize the initial network delay ping results to instruct playback of orthogonal audio sync data at the same time (based on network delay compensation) by both devices. The orthogonal audio sync data waveforms may be designed to include a wide frequency response and create a pleasant audio-feedback sound so that users recognize that a new device has joined the group audio session (e.g., an up-chirp played by one device and a down-chirp played by another device). Alternately, the audio sync data may sound like different types of noise (e.g., white noise played by one device and brown noise played by another device). Other types of orthogonal audio sync data may also be used.
The master device can cross-correlate the audio from both devices as received at its microphone and can determine the differences between the audio latency delay for the master device and the slave device. The master device can give the slave device a compensation value for the audio latency delay so that the slave device can make its own adjustments during playback, or the master device can use the network delay and the audio latency delay difference values to calculate updated timing instructions for audio playback. Alternately or additionally, the slave device may independently cross-correlate the audio from both devices as received at its microphone and determine the audio latency delay for itself. The slave could then report its determined audio latency delay difference to the master device as well as report its device model (e.g., Motorola DROID RAZR MAXX).
It should be appreciated that additional devices may join the group audio session via the NFC connection. The NFC touch can be with any device currently in the group audio session (e.g., either the master device or a slave device). The NFC detection can trigger a wireless connection and initial network delay measurement and can trigger an audio sync measurement process between the additional device and the “inviting” device that is already in the group audio session as described previously. In case additional devices join via a series of slave devices (e.g., a daisy chain of additional devices), a table of device models may be created by the master device and used to normalize the hardware and software delay plus the acoustic “through air” delay difference values on the assumption that devices of the same model would have similar hardware and software delays plus similar acoustic “through air” delays.
The master device 504 can initiate 560 playback of the audio sync data at the specified time after the master device 504 wirelessly connects (e.g., via an NFC pairing) to the slave device 505, and the slave device 505 can initiate 562 playback of the audio sync data at the specified time after the master device 504 connects to the slave device 505. The master device 504 can leverage an audio input component (e.g., a microphone) to detect 564 audio from playback of the audio sync data on the master device 504 and the slave device 505. Further, the master device 504 can calculate 566 an audio latency time value from the detected audio using, for example, a cross-correlation function. In particular, the audio latency time value can reflect any computing audio latency plus acoustic “through the air” delay in the respective audio sync data playbacks on the master device 504 and the slave device 505. In some embodiments, such as if the audio sync data is a chirp, the master device 504 can calculate new frequency values based on respective frequency response measurements of the master device 504 and/or the slave device 505.
Although not depicted in
In some embodiments, audio playback the group of devices can be modified based on the detected audio frequency response and the dynamic range of each device. For example, one device may have a good bass frequency response and another device may have a good treble frequency response. The comparative “good/better” frequency response of each device's audio speakers may be detected during the audio sync measurement process. As a result, the master device may provide the audio data and timing instructions as well as frequency playback instructions arid/or volume instructions.
Referring to
Referring to
Referring to
In some cases as shown in
The master device can select 1221 an audio file. In some cases, a user of the master device can select the audio file via a user interface. The master device can establish 1223 an audio playback session with the slave device(s) using the wireless connection. The master device can send 1225, using the audio playback session, at least a portion of the audio file to the slave device(s) for playback on the slave device(s) according to a timing instruction that can include a current system time of the master device. According to embodiments, the slave device(s) can use the current system time of the master device along with the previously-calculated system clock offset value to schedule or initiate playback of the portion of the audio file. According to embodiments, the timing instruction can be the same for each slave device and can include a specified time to play, a playback position to seek, a current playback position playing, or the like. For example, the timing instruction can instruct the slave device to start playback of the portion of the audio file in 1.43 seconds, or 0.21 seconds after receipt, or at a playback position of 00:01.35 seconds, or according to other relative times. The master device can initiate or continue 1227 playback of the audio file. The slave device can also initiate or continue playback of the audio file according to the timing instruction as well as a calculated difference in system times of the master device and the slave device.
The master device can determine 1229 if a playback selection is detected. If a playback selection is not detected (“NO”), the master device determines 1231 if the synchronization should be confirmed. In embodiments, either the master device or the slave device(s) (or users thereof) can initiate the confirmation request. If the sync confirmation has not been initiated (“NO”), the master device determines 1233 whether to add an additional slave device, such as if an additional slave device has requested to join the audio playback session. If the master device determines that there are no additional slave devices to add (“NO”), the master device can determine 1235 whether the audio file or a playlist that includes the audio file is complete. If the audio file or the playlist is not complete (“NO”), processing can return to 1225 in which the master device can send an additional portion of the audio file to the slave device(s) or can send a portion of an additional audio file (such as an additional audio file of the playlist) to the slave device(s). If the audio file or the playlist is complete in 1235 (“YES”), processing can end, repeat, or return or proceed to any other functionality.
If the master device detects a playback selection in 1229 (“YES”), processing can proceed to “C” as detailed in
If the master device detects a request to confirm synchronization in 1231 (“YES”), processing can proceed to “D” as detailed in
If the master device determines to add an additional slave device in 1233 (“YES”), such as if the additional slave device requests to join the audio session, processing can proceed to “E” as detailed in
The master device can add 1361 the additional slave device to the audio playback session, such as via a socket of the additional slave device. The master device sends 1363, using the audio playback session, at least the portion of the audio file to the additional slave device for playback on the additional slave device according to an additional timing instruction that can include a current system time of the master device. The additional slave device can use this current system time of the master device along with the previously-calculated system clock offset value to schedule or initiate playback of the portion of the audio file. According to embodiments, the additional timing instruction can include a specified time to play, a playback position to seek, a current playback position playing, or the like. In embodiments, processing can proceed to “B” (i.e., 1225 of
The electronic device 1670 can further include a communication module 1675 configured to interface with the one or more external ports 1673 to communicate data via one or more networks 1610. For example, the communication 1675 can leverage the external ports 1673 to establish TCP connections for connecting the electronic device 1670 to other electronic devices via a Wi-Fi Direct connection. According to some embodiments, the communication module 1675 can include one or more transceivers functioning in accordance with IEEE standards, 3GPP standards, or other standards, and configured to receive and transmit data via the one or more external ports 1673. More particularly, the communication module 1675 can include one or more WWAN transceivers configured to communicate with a wide area network including one or more cell sites or base stations to communicatively connect the electronic device 1670 to additional devices or components. For example, the transceiver can receive remotely-stored audio data via the network 1610. Further, the communication module 1670 can include one or more WLAN and/or WPAN transceivers configured to connect the electronic device 1670 to local area networks and/or personal area networks, such as a Bluetooth® network. The electronic device 1670 further includes one or more data sockets 1676 through which audio playback sessions with other devices can be established, as discussed herein.
The electronic device 1670 can further include one or more sensors 1682 such as, for example, imaging sensors, accelerometers, touch sensors, and other sensors, as well as NFC components 1684 such as an NFC chip and/or an NFC tag for pairing the electronic device 1670 with one or more other electronic devices. The electronic device 1670 can include an audio module 1677 including hardware components such as a speaker 1685 for outputting audio and a microphone 1686 for detecting or receiving audio. The electronic device 1670 may further include a user interface 1674 to present information to the user and/or receive inputs from the user. As shown in
In general, a computer program product in accordance with an embodiment includes a computer usable storage medium (e.g., standard random access memory (RAM), an optical disc, a universal serial bus (USB) drive, or the like) having computer-readable program code embodied therein, wherein the computer-readable program code is adapted to be executed by the processor 1681 (e.g., working in connection with the operating system 1679) to facilitate the functions as described herein. In this regard, the program code may be implemented in any desired language, and may be implemented as machine code, assembly code, byte code, interpretable source code or the like (e.g., via C, C++, Java, Actionscript, Objective-C, Javascript, CSS, XML, and/or others).
Thus, it should be clear from the preceding disclosure that the systems and methods offer improved audio playback techniques. The embodiments advantageously enable multiple electronic devices to simultaneously play audio tracks while accounting for network and acoustic latencies. The embodiments improve the user experience by improving the setup of a collective audio playback session as well as reducing the amount of playback delay between or among electronic devices.
This disclosure is intended to explain how to fashion and use various embodiments in accordance with the technology rather than to limit the true, intended, and fair scope and spirit thereof. The foregoing description is not intended to be exhaustive or to be limited to the precise forms disclosed. Modifications or variations are possible in light of the above teachings. The embodiment(s) were chosen and described to provide the best illustration of the principle of the described technology and its practical application, and to enable one of ordinary skill in the art to utilize the technology in various embodiments and with various modifications as are suited to the particular use contemplated. All such modifications and variations are within the scope of the embodiments as determined by the appended claims, as may be amended during the pendency of this application for patent, and all equivalents thereof, when interpreted in accordance with the breadth to which they are fairly, legally and equitably entitled.
This application is a continuation of U.S. patent application Ser. No. 15/681,193, filed Aug. 18, 2017, which is a continuation of U.S. patent application Ser. No. 15/052,503, filed Feb. 24, 2016, now U.S. Pat. No. 9,769,778, which is a continuation of U.S. patent application Ser. No. 13/945,493, now U.S. Pat. No. 9,307,508, filed Jul. 18, 2013, which claims priority benefit of U.S. Provisional Application No. 61/816,972, filed Apr. 29, 2013. All of the above-identified patent applications are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
61816972 | Apr 2013 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 15681193 | Aug 2017 | US |
Child | 15794739 | US | |
Parent | 15052503 | Feb 2016 | US |
Child | 15681193 | US | |
Parent | 13945493 | Jul 2013 | US |
Child | 15052503 | US |