Class AudioResource

    • Constructor Detail

      • AudioResource

        public AudioResource​(String audioResource)
        Creates an AudioResource.
        Parameters:
        audioResource - the resource name.
      • AudioResource

        public AudioResource​(String audioResource,
                             String description)
        Creates an AudioResource.
        Parameters:
        audioResource - the resource name.
        description - the description of the audio clip.
    • Method Detail

      • getDuration

        public int getDuration()
        Retrieves the duration of the audio clip. A value of <= 0 indicates that the duration is unknown.
        Specified by:
        getDuration in interface Audio
        Returns:
        the duration of the audio clip.
      • setDuration

        public void setDuration​(int duration)
        Sets the duration of the audio clip, A value of <= 0 indicates that the duration is unknown.
        Parameters:
        duration - The duration to set.