Interface AudioSource


@NonNullByDefault public interface AudioSource
This is an audio source, which can provide a continuous live stream of audio. Its main use is for microphones and other "line-in" sources and it can be registered as a service in order to make it available throughout the system.
Author:
Kai Kreuzer - Initial contribution
  • Method Details

    • getId

      String getId()
      Returns a simple string that uniquely identifies this service
      Returns:
      an id that identifies this service
    • getLabel

      String getLabel(@Nullable Locale locale)
      Returns a localized human readable label that can be used within UIs.
      Parameters:
      locale - the locale to provide the label for
      Returns:
      a localized string to be used in UIs
    • getSupportedFormats

      Set<AudioFormat> getSupportedFormats()
      Obtain the audio formats supported by this AudioSource
      Returns:
      The audio formats supported by this service
    • getInputStream

      AudioStream getInputStream(AudioFormat format) throws AudioException
      Gets an AudioStream for reading audio data in supported audio format
      Parameters:
      format - the expected audio format of the stream
      Returns:
      AudioStream for reading audio data
      Throws:
      AudioException - If problem occurs obtaining the stream