Interface AudioNotifierService

  • All Known Implementing Classes:
    AudioNotifierServiceImpl

    public interface AudioNotifierService
    The AudioNotifierService is meant to be used to control all sounds in the application. An audio could be created by calling the createAudio method. In order to stop all sounds in the application one could call the setMute method. To check whether the sound is currently enabled the isMute method could be used.
    Author:
    Yana Stamcheva, Lyubomir Marinov
    • Method Detail

      • audioOutAndNotificationsShareSameDevice

        boolean audioOutAndNotificationsShareSameDevice()
        Checks whether the playback and notification configuration share the same device.
        Returns:
        are audio out and notifications using the same device.
      • createAudio

        SCAudioClip createAudio​(String uri)
        Creates an SCAudioClip and returns it. By default using notification device.
        Parameters:
        uri - the uri, which will be the source of the audio
        Returns:
        the created SCAudioClip, that could be played.
      • createAudio

        SCAudioClip createAudio​(String uri,
                                boolean playback)
        Creates an SCAudioClip and returns it.
        Parameters:
        uri - the uri, which will be the source of the audio
        playback - use or not the playback device.
        Returns:
        the created SCAudioClip, that could be played.
      • isMute

        boolean isMute()
        Specifies if currently the sound is off.
        Returns:
        TRUE if currently the sound is off, FALSE otherwise
      • setMute

        void setMute​(boolean isMute)
        Stops/Restores all currently playing sounds.
        Parameters:
        isMute - mute or not currently playing sounds