0

Play Song in 2 Audio Sink Cannot Synchronous

asked 2014-07-16 18:46:50 -0800

Yossi Setiawan gravatar image

updated 2014-07-16 18:56:11 -0800

Dear All,

I tried play song the audio sink in 2 device. but sometimes they play the song out of sync, one device to play songs faster than others. any suggestion to solve this problem?

Thanks, -Yossi Setiawan-

edit retag flag offensive close merge delete

Comments

What platform is this?

msanu ( 2014-07-17 08:55:44 -0800 )edit

i use android platform. i use 3 device : 1device for android source and 2device for AudioSink. sometimes one device to play songs faster than others. Thanks

Yossi Setiawan ( 2014-07-18 02:54:47 -0800 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-19 17:53:21 -0800

bspencer gravatar image

The issue is in the Audio library for AndroidDevice.cc in the GetDelay method. It is set to 120000 right now and it would need to be enhanced to be aware of the actual time difference on the handset that it takes from when the write command is made to OpenSL audio engine.

The AllJoyn Audio Service is intended to be an alright form of synchronization. One thing you will find is when you use the Service for long term audio playback there will be drift and cause the devices to become out of sync.

edit flag offensive delete publish link more

Comments

hi, bspencer, i try change value of GetDelay method. From 120000 to 10000 and the result 2 device audio sink can synchronization. i still confused about GetDelay method, what the function of this method? Thanks :) Regards, Yossi Setiawan

Yossi Setiawan ( 2014-07-22 02:00:19 -0800 )edit

@yossi-setiawan The nature of the GetDelay method is to ask the Audio Driver how long it takes to play the audio once it receives the bytes. The OpenSL audio engine does not have the ability to get this value, so it was set to a value based on a few devices. For Linux alsa has an API that is used for to get the delay. Different platforms may have different delay values.

bspencer ( 2014-07-24 13:56:50 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-07-16 18:46:50 -0800

Seen: 117 times

Last updated: Jul 22 '14