SoundPlayingService

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Link copied to clipboard

RAW player

Link copied to clipboard

TTS player

Link copied to clipboard

Tells if TTS player is initialized

Functions

Link copied to clipboard
external fun cancel(listener: ISoundPlayingListener): Int

Cancels the play operation associated with the provided listener.

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard

Gets the sound player for specific MIME type.

Link copied to clipboard
fun getPlayerAsInt(mimeType: Int): SoundPlayer?

Gets the sound player for specific MIME type.

Link copied to clipboard

Gets the default playing preferences.

Link copied to clipboard

Gets the default sound session request preferences.

Link copied to clipboard

Provides a list of supported TTS languages

Link copied to clipboard

Initialize a default Sound playing service.

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard

TTS player initialization failed

Link copied to clipboard
open override fun onTTSPlayerInitialized()

TTS player was successfully initialized

Link copied to clipboard
external fun play(sound: ISound, listener: ISoundPlayingListener, preferences: SoundPlayingPreferences?): Int

Play the requested sound. The provided progress listener will be used also for canceling the play. A progress listener can be attached to only one play operation at a time. If preferences is NULL than playing sound will use the default playing preferences.

Link copied to clipboard
external fun playAlert(filePath: String, listener: ISoundPlayingListener, preferences: SoundPlayingPreferences?): Int

Play alert. The provided progress listener will be used also for canceling the play. A progress listener can be attached to only one play operation at a time. If preferences is NULL than playing sound will use the default playing preferences.

Link copied to clipboard
fun playFile(filePath: String, mimeType: EMimeType, listener: ISoundPlayingListener, preferences: SoundPlayingPreferences?): Int

Play the requested sound. The provided progress listener will be used also for canceling the play. A progress listener can be attached to only one play operation at a time. If preferences is NULL than playing sound will use the default playing preferences.

Link copied to clipboard
fun playFileAsInt(filePath: String, mimeType: Int, listener: ISoundPlayingListener, preferences: SoundPlayingPreferences?): Int

Play the requested sound. The provided progress listener will be used also for canceling the play. A progress listener can be attached to only one play operation at a time. If preferences is NULL than playing sound will use the default playing preferences.

Link copied to clipboard
external fun playingSoundsCount(): Int

Returns the number of sounds currently playing.

Link copied to clipboard
external fun playText(text: String, listener: ISoundPlayingListener, preferences: SoundPlayingPreferences?): Int

Play the requested text. The provided progress listener will be used also for canceling the play. A progress listener can be attached to only one play operation at a time. If preferences is NULL than playing sound will use the default playing preferences.

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard

Set default human voice

Link copied to clipboard
fun setPlayer(player: SoundPlayer, mimeType: EMimeType): Int

Sets a sound player for specific MIME type. By default there is no player registered. So, in order to be able to play a sound the API user should set first a player for the specific EMimeType

Link copied to clipboard
fun setPlayerAsInt(player: SoundPlayer, mimeType: Int): Int

Sets a sound player for specific MIME type. By default there is no player registered. So, in order to be able to play a sound the API user should set first a player for the specific EMimeType

Link copied to clipboard
fun setTTSLanguage(ttsLanguage: String)

Set TTS language

Link copied to clipboard

Update the default playing preferences.

Link copied to clipboard

Update the default sound session request preferences.