Is there possibility to reduce/prolongate the duration of vibration using AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)? - objective-c

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
it vibrates in its own duration. How to reduce the duration?
AudioServicesPlaySystemSound(1520), I tried it. But it delivers very short vibration.

Related

Getting HLS livestream in sync across devices

We are currently using ExoPlayer for one of our applications, which is very similar to the HQ Trivia app, and we use HLS as the streaming protocol.
Due to the nature of the game, we are trying to keep all the viewers of this stream to have the same latency, basically to keep them in sync.
We noticed that with the current backend configuration the latency is somewhere between 6 and 10 seconds. Based on this fact, we assumed that it would be safe to “force” the player to play at a bigger delay (15 seconds, further off the live edge), this way achieving the same (constant) delay across all the devices.
We’re using EXT-X-PROGRAM-DATE-TIME tag to get the server time of the currently playing content and we also have a master clock with the current time (NTP). We’re constantly comparing the 2 clocks to check the current latency. We’re pausing the player until it reaches the desired delay, then we’re resuming the playback.
The problem with this solution is that the latency might get worse (accumulating delay) over time and we don’t have other choice than restarting the playback and redo the steps described above if the delay gets too big (steps over a specified threshold). Before restarting the player we’re also trying to slightly increase the playback speed until it reaches the specified delay.
The exoPlayer instance is setup with a DefaultLoadControl, DefaultRenderersFactory, DefaultTrackSelector and the media source uses a DefaultDataSourceFactory.
The server-side configuration is as follows:
cupertinoChunkDurationTarget: 2000 (default: 10000)
cupertinoMaxChunkCount: 31 (default: 10)
cupertinoPlaylistChunkCount: 15 (default: 3)
My first question would be if this is even achievable with a protocol like HLS? Why is the player drifting away accumulating more and more delay?
Is there a better setup for the exoPlayer instance considering our specific use case?
Is there a better way to achieve a constant playback delay across all the playing devices? How important are the parameters on the server side in trying to achieve such a behaviour?
I would really appreciate any kind of help because I have reached a dead-end. :)
Thanks!
The only sollution for this is provided by:
https://netinsight.net/product/sye/
Their sollution includes frame accurate sync with no drift and stateful ABR. This probably can’t be done with http based protocols hence their sollution is built upon UDP transport.

How to limit the frame rate in Vulkan

I know that the present mode of the swap chain can be used to sync the frame rate to the refresh rate of the screen (with VK_PRESENT_MODE_FIFO_KHR for example).
But is there a way of limiting the frame rate to a fraction of the monitor refresh rate? (eg. I want my application to run at 30 FPS instead of 60.)
In other words, is there a way of emulating what wglSwapIntervalEXT(2) does for OpenGL?
Vulkan is a low-level API. It tries to give you the tools you need to build the functionality you want.
As such, when you present an image, the API assumes that you want the image presented as soon as possible (within the restrictions of the swapchain). If you want to delay presentation, then you delay presentation. That is, you don't present the image until it's near the time to present a new image, based on your own CPU timings.

Ranging an iBeacon latency

I have been playing around with the new iBeacons in iOS 7. I have one device setup as a beacon, and the other device ranging to detect when I am near, far, immediate, etc. I'd like to know very quickly when I cross between these ranges. Is there any way to adjust the latency? I find that I have to move my device around very slowly or I will not know when I cross these thresholds.
No, you would not be able to adjust the beacon latency. As Apple says in Region Monitoring Guide:
To prevent spurious notifications, iOS does not deliver region
notifications until certain threshold conditions are met.
Specifically, the user’s location must cross the region boundary and
move away from that boundary by a minimum distance and remain at that
minimum distance for at least 20 seconds before the notifications are
reported.
Apple does not define what the latency is, it seems it's not fast enough for your application.
You can have a tradeoff - to implement beacon ranging yourself using Core Bluetooth and listen to the CBPeripheral advertisement events while scanning and range using RSSI:
centralManager:didDiscoverPeripheral:advertisementData:RSSI:
If you are using a custom beacon, such as the RadiusNetworks VirtualiBeacon VM image you can adjust the frequency of the advertisements. The flip side your app must run in the foreground opposed to CoreLocation delivering beacon events even when your app is not running.

Win8 periodic tile notifications - shorter than half hour?

The PeriodicUpdateRecurrence enumeration has 5 values, from half an hour to daily. Does this mean you can't set any other (shorter) values?
Due to battery life concerns, intervals shorter than 30 minutes are not possible for periodic tile notifications. If your app tile needs to be updated in real-time, consider using push notifications.
The following Windows blog post provides details about battery life with respect to push notifications (which apply to periodic updates as well):
http://blogs.msdn.com/b/b8/archive/2011/11/02/updating-live-tiles-without-draining-your-battery.aspx
MSDN article on the different notification delivery methods:
http://msdn.microsoft.com/en-us/library/windows/apps/hh779721.aspx

What is a reasonable timeout for acquiring a GPS fix?

I am creating a BREW app that requests the user's position.
If the phone cannot acquire the position, I would like to display an error.
How long should I wait for my callback to be called before I determine that the phone is not likely to get a GPS fix?
When a cold start is required, the receiver has to download a full set of Ephemeris data, which is broadcast from the GPS satellite over a 30 second cycle and re-transmitted every 30 seconds.
So I would say that 60-90 seconds (two or three Ephemeris cycles) would be a suitable time to wait before declaring failure.
http://www.navigadget.com/index.php/gps-knowledge/ttff-time-to-first-fix
Note that if a device requires an almanac download, the startup time can be much longer (on the order of 12.5 to 15 minutes). This is referred to as a Factory TTFF (Time to First Fix).
I might go with an increment (say 20 or 30 seconds) between notifying the user that you have failed to establish a link, and give them the option to stop trying. Keep at it until they stop you, or a set number of iterations have passes (say 5 - 10 iterations).
45-90 seconds.
For more information, see the GPS Time To First Fix article at Wikipedia.
But you can never know when the user actually has view to the satellites or not, maybe they are still inside when they start your program, so the approach suggested by Matthew Vines is much better than a constant delay.
Cellphone-specifically, I've had a Motorola phone that had a GPS receiver, but was horrendously bad at it - it could take it around 5 minutes to get a fix where my standalone Bluetooth receiver would manage in less than a minute.
Why are you declaring failure after a fixed timeout anyway? Why not, after a reasonable time has passed (say, a minute), display a message to the tune of "GPS fix still not available; but I'm still trying" with a possibility to cancel at any time if the user is fed up? What do you expect the user to do with the failure message you're proposing to give him?