Class AudioNotifierServiceImpl

    • Constructor Detail

      • AudioNotifierServiceImpl

        public AudioNotifierServiceImpl()
        Initializes a new AudioNotifierServiceImpl instance.
    • Method Detail

      • audioOutAndNotificationsShareSameDevice

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

        public SCAudioClip createAudio​(String uri)
        Creates an SCAudioClip from the given URI and adds it to the list of available audio-s. Uses notification device if any.
        Specified by:
        createAudio in interface AudioNotifierService
        Parameters:
        uri - the path where the audio file could be found
        Returns:
        a newly created SCAudioClip from uri
      • createAudio

        public SCAudioClip createAudio​(String uri,
                                       boolean playback)
        Creates an SCAudioClip from the given URI and adds it to the list of available audio-s.
        Specified by:
        createAudio in interface AudioNotifierService
        Parameters:
        uri - the path where the audio file could be found
        playback - use or not the playback device.
        Returns:
        a newly created SCAudioClip from uri
      • getDeviceConfiguration

        public DeviceConfiguration getDeviceConfiguration()
        The device configuration.
        Returns:
        the deviceConfiguration
      • isMute

        public boolean isMute()
        Returns true if the sound is currently disabled; false, otherwise.
        Specified by:
        isMute in interface AudioNotifierService
        Returns:
        true if the sound is currently disabled; false, otherwise
      • setMute

        public void setMute​(boolean mute)
        Enables or disables the sound in the application. If false, we try to restore all looping sounds if any.
        Specified by:
        setMute in interface AudioNotifierService
        Parameters:
        mute - when true disables the sound; otherwise, enables the sound.