Discussion:
Race condition in some iOS devices.
Daniel Varela
2013-03-01 16:28:50 UTC
Permalink
Hello.

As described in this link, there is a race condition in some iOS devices in which subsequent callings to pause resume over an OpenAL source voice does not works.
Before we just fixed it by calling alSourcePlay twice when resuming the sound, but it causes the buffer to restart and we need to have several tracks synchronized for interactive music purposes and this solution is no longer valid.

I was wondering if someone has experienced the same issue.

Thanks.

Daniel Varela | Audio Programmer
Tech Team | Blitz Games Studios Ltd.



***********
Blitz Games Studios Limited is registered in England (company no: 2482913) with registered office at Regent Square House, The Parade, Leamington Spa, Warwickshire, CV32 4NL, UK. This message is intended solely for the addressee and may contain confidential information. If you have received this message in error please send it back to us and immediately and permanently delete it from your system. Do not use, copy or disclose the information contained in this message or in any attachment. Please also note that transmission cannot be guaranteed to be secure or error-free.
***********
Eric Wing
2013-03-03 00:20:44 UTC
Permalink
Post by Daniel Varela
Hello.
As described in this link, there is a race condition in some iOS devices in
which subsequent callings to pause resume over an OpenAL source voice does
not works.
Before we just fixed it by calling alSourcePlay twice when resuming the
sound, but it causes the buffer to restart and we need to have several
tracks synchronized for interactive music purposes and this solution is no
longer valid.
I was wondering if someone has experienced the same issue.
Thanks.
Daniel Varela | Audio Programmer
Tech Team | Blitz Games Studios Ltd.
I filed that bug. I don't think it has been fixed. Please file a
duplicate bug with Apple to raise the priority.

Thanks,
Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
Daniel Varela
2013-03-04 11:08:39 UTC
Permalink
Thanks Eric, I'll do that since this bug is quite annoying.

I have found a workaround to make pause and resume work as intended in this situation:

1) Store AL_SAMPLE_OFFSET value of the source at the moment of pausing it.
2) Calling alSourcePlay twice on resuming. This will cause the buffer to replay.
3) Set the AL_SAMPLE_OFFSET on the voice, using the same offset stored at the moment of pausing it.

This steps worked for me.
Hope this helps to other people that find the same issue.[

Daniel Varela | Audio Programmer
Tech Team | Blitz Games Studios Ltd.


-----Original Message-----
From: Eric Wing [mailto:***@gmail.com]
Sent: 03 March 2013 00:21
To: Daniel Varela
Cc: ***@opensource.creative.com
Subject: Re: [Openal] Race condition in some iOS devices.
Post by Daniel Varela
Hello.
As described in this link, there is a race condition in some iOS
devices in which subsequent callings to pause resume over an OpenAL
source voice does not works.
Before we just fixed it by calling alSourcePlay twice when resuming
the sound, but it causes the buffer to restart and we need to have
several tracks synchronized for interactive music purposes and this
solution is no longer valid.
I was wondering if someone has experienced the same issue.
Thanks.
Daniel Varela | Audio Programmer
Tech Team | Blitz Games Studios Ltd.
I filed that bug. I don't think it has been fixed. Please file a duplicate bug with Apple to raise the priority.

Thanks,
Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/



***********
Blitz Games Studios Limited is registered in England (company no: 2482913) with registered office at Regent Square House, The Parade, Leamington Spa, Warwickshire, CV32 4NL, UK. This message is intended solely for the addressee and may contain confidential information. If you have received this message in error please send it back to us and immediately and permanently delete it from your system. Do not use, copy or disclose the information contained in this message or in any attachment. Please also note that transmission cannot be guaranteed to be secure or error-free.
***********

Loading...