Skip to main content

Aila_DisableSpeaker

Disable audio playback through speaker and re-enable modem communications.

Signature

void Aila_DisableSpeaker(void);

Description

Disables audio output through the Apple device's built-in speaker and re-enables communications with the kiosk. This should be called after Aila_EnableSpeaker() when audio playback is complete.

This function may block for up to 1 second, depending on hardware and iOS version.

Lightning Devices Only

This feature only applies to Lightning-based iPads when connected to a kiosk over the audio jack.

Usage

// Enable speaker for audio
Aila_EnableSpeaker();

// Play audio...
[self.audioPlayer play];

// Wait for audio to finish, then restore communications
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC),
dispatch_get_main_queue(), ^{
Aila_DisableSpeaker();
});

See Also