Interface AudioFilePlayer

  • All Superinterfaces:
    Destroyable

    public interface AudioFilePlayer
    extends Destroyable
    Audio file player control interface
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getDuration()
      Gets Audio tone/file duration.
      java.lang.String getFile()
      Gets Audio file to play.
      int getGain()
      Gets Audio tone/file gain.
      AudioTone getTone()
      Gets Audio tone to play.
      boolean isLoop()
      Gets Audio tone/file looping flag.
      boolean isPlaying()
      Query the player status..
      boolean isUsingSpeaker()
      Gets destintion to play tone/file.
      boolean isUsingStream()
      Gets destintion to play tone/file.
      boolean setDuration​(int duration)
      Sets Audio tone/file duration.
      boolean setFile​(java.lang.String file)
      Sets Audio file to play.
      boolean setGain​(int gain)
      Sets Audio tone/file gain.
      boolean setLoop​(boolean loop)
      Sets Audio tone/file looping flag.
      boolean setTone​(AudioTone tone)
      Sets Audio tone to play.
      boolean setUseSpeaker​(boolean local)
      Sets destintion to play tone/file.
      boolean setUseStream​(boolean local)
      Sets destintion to play tone/file.
      boolean startPlaying()
      Signal the player to start the tone/file.
      boolean stopPlaying()
      Signal the player to stop the tone/file.
    • Method Detail

      • setTone

        boolean setTone​(AudioTone tone)
        Sets Audio tone to play.
        Parameters:
        tone - AudioTone enum. Resources for these tones must be available at VoIPConfigurationAudio toneFilePath.
        Returns:
        True if value is successfully set; otherwise false.
      • getTone

        AudioTone getTone()
        Gets Audio tone to play.
        Returns:
        AudioTone enum.
      • setFile

        boolean setFile​(java.lang.String file)
        Sets Audio file to play.
        Parameters:
        file - Audio file name.
        Returns:
        True if value is successfully set; otherwise false.
      • getFile

        java.lang.String getFile()
        Gets Audio file to play.
        Returns:
        Audio file name.
      • setLoop

        boolean setLoop​(boolean loop)
        Sets Audio tone/file looping flag.
        Parameters:
        loop - True to loop forever, false to play once.
        Returns:
        True if value is successfully set; otherwise false.
      • isLoop

        boolean isLoop()
        Gets Audio tone/file looping flag.
        Returns:
        True to loop forever, false to play once.
      • setDuration

        boolean setDuration​(int duration)
        Sets Audio tone/file duration.
        Parameters:
        duration - Number of milliseconds to play tone/file; zero to play the entire tone/file.
        Returns:
        True if value is successfully set; otherwise false.
      • getDuration

        int getDuration()
        Gets Audio tone/file duration.
        Returns:
        Number of milliseconds to play tone/file; zero to play the entire tone/file.
      • setGain

        boolean setGain​(int gain)
        Sets Audio tone/file gain.
        Parameters:
        gain - Gain [0, 255]
        Returns:
        True if value is successfully set; otherwise false.
      • getGain

        int getGain()
        Gets Audio tone/file gain.
        Returns:
        Gain [0, 255]
      • setUseSpeaker

        boolean setUseSpeaker​(boolean local)
        Sets destintion to play tone/file.
        Parameters:
        local - True to play on speakers, false to mix with microphone.
        Returns:
        True if value is successfully set; otherwise false.
      • isUsingSpeaker

        boolean isUsingSpeaker()
        Gets destintion to play tone/file.
        Returns:
        True to play on speakers, false to mix with microphone.
      • setUseStream

        boolean setUseStream​(boolean local)
        Sets destintion to play tone/file.
        Parameters:
        local - True to play on output stream.
        Returns:
        True if value is successfully set; otherwise false.
      • isUsingStream

        boolean isUsingStream()
        Gets destintion to play tone/file.
        Returns:
        True to play on stream.
      • startPlaying

        boolean startPlaying()
        Signal the player to start the tone/file.
        Returns:
        True if player starts successfully; otherwise false.
      • stopPlaying

        boolean stopPlaying()
        Signal the player to stop the tone/file.
        Returns:
        True if player stops successfully; otherwise false.
      • isPlaying

        boolean isPlaying()
        Query the player status..
        Returns:
        True if playing; otherwise false.