SinchAudioDevice
public enum SinchAudioDevice
The SinchAudioController provides methods for controlling audio related functionality, e.g. enabling the speaker, muting the microphone, and playing sound files.
Playing Sound Files
The audio controller provides a convenience method (startPlayingSoundFile:looping:) for playing sounds that are related to a call, such as ring tones and busy tones.
Example
let audio = client.audioController
let soundPath = Bundle.main.path(forResource: "ringtone", ofType: "wav")
do {
try audio.startPlayingSoundFile(withPath:soundPath, looping:true)
} catch {
...
}
Applications that prefer to use their own code for playing sounds are free to do so, but they should follow a few guidelines related to audio session categories and audio session activation/deactivation (see Sinch SDK User Guide for details).
Sound File Format
The sound file must be a mono (1 channel), 16-bit, uncompressed (PCM) .wav file with a sample rate of 8kHz, 16kHz, or 32kHz.
Preferred audio device (input and output route together).