Registriert seit: 15. Mär 2007
4.094 Beiträge
Delphi 12 Athens
|
AW: Aktuelles Vorgehen für Vibration auf IOS
14. Dez 2018, 17:23
Delphi-Quellcode:
Uses
Macapi.CoreFoundation
;
Const
libAudioToolbox = '/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox';
type
SystemSoundID = UInt32;
const
CSnd_kSystemSoundID_vibrate = $FFF;
CSnd_peek = SystemSoundID(1519);
CSnd_pop = SystemSoundID(1520);
CSnd_cancelled = SystemSoundID(1521);
CSnd_tryAgain = SystemSoundID(1102);
CSnd_failed = SystemSoundID(1107);
procedure AudioServicesPlaySystemSound( inSystemSoundID: integer ); Cdecl; External libAudioToolbox Name _PU + 'AudioServicesPlaySystemSound';
procedure DoVibrate(const ATimeMS: Integer);
begin
AudioServicesPlaySystemSound( CSnd_peek );
end;
Geändert von Rollo62 (14. Dez 2018 um 17:25 Uhr)
|