Package org.openhab.core.audio
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 SummaryModifier and TypeMethodDescriptiongetId()Returns a simple string that uniquely identifies this servicegetInputStream(AudioFormat format) Gets an AudioStream for reading audio data in supported audio formatReturns a localized human readable label that can be used within UIs.Obtain the audio formats supported by this AudioSource
- 
Method Details- 
getIdString getId()Returns a simple string that uniquely identifies this service- Returns:
- an id that identifies this service
 
- 
getLabelReturns 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
 
- 
getSupportedFormatsSet<AudioFormat> getSupportedFormats()Obtain the audio formats supported by this AudioSource- Returns:
- The audio formats supported by this service
 
- 
getInputStreamGets 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
 
 
-