public class WOWZAudioDevice extends java.lang.Object implements WOWZBroadcastAPI.AudioBroadcaster
Modifier and Type | Class and Description |
---|---|
static interface |
WOWZAudioDevice.AudioSampleListener |
Constructor and Description |
---|
WOWZAudioDevice() |
Modifier and Type | Method and Description |
---|---|
int |
getAudioSource()
Gets the actively configured input device for capturing audio.
|
WOWZBroadcastConfig |
getBroadcastConfig()
Gets the configuration settings for an active broadcast session.
|
WOWZStatus |
getBroadcasterStatus()
Gets the status for a broadcast component.
|
WOWZBroadcastConfig |
getSamplingConfig()
Gets the configuration of the audio sampler.
|
WOWZStatus |
getStatus() |
boolean |
isAudioEnabled()
Checks whether an audio broadcast component is enabled.
|
boolean |
isAudioPaused()
Checks whether an audio broadcast component is paused.
|
boolean |
isMuted()
deprecated Use
isAudioPaused() instead. |
boolean |
isSamplingAudio()
Checks whether audio samples are currently being read from the audio input device and passed along to sample listeners.
|
WOWZStatus |
prepareForBroadcast(WOWZBroadcastConfig broadcastConfig)
Initializes each component of a broadcast.
|
void |
registerAudioSampleListener(WOWZAudioDevice.AudioSampleListener sampleListener)
Registers an audio sample listener to receive raw PCM audio samples.
|
void |
setAudioEnabled(boolean enabled)
Sets the flag indicating that an audio broadcast component is enabled.
|
void |
setAudioPaused(boolean paused)
Sets the flag indicating that an audio broadcast component is paused.
|
void |
setAudioSource(int audioSource)
Sets the actively configured input device for capturing audio.
|
void |
setMuted(boolean muted)
deprecated Use
setAudioPaused(boolean) instead. |
void |
setSamplingConfig(WOWZBroadcastConfig samplingConfig)
Sets the configuration used by the audio sampler.
|
void |
startAudioSampler()
Starts the audio sampler to read sample from the audio input device to pass along to the registered sample listeners.
|
void |
startAudioSampler(WOWZBroadcastConfig samplingConfig)
Starts the audio sampler with the specified audio configuration.
|
WOWZStatus |
startBroadcasting()
Called on each broadcast component to begin a live streaming broadcast.
|
void |
stopAudioSampler()
Stops the audio sampler
|
WOWZStatus |
stopBroadcasting()
Called on each broadcast component to end a live streaming broadcast.
|
void |
unregisterAudioSampleListener(WOWZAudioDevice.AudioSampleListener sampleListener)
Unregisters an audio sample listener.
|
public int getAudioSource()
public void setAudioSource(int audioSource)
audioSource
- An identifier for the active audio source. Possible values are listed at android.media.MediaRecorder.AudioSource.
The default is MediaRecorder.AudioSource.CAMCORDER. This setting doesn't affect audio that's actively being captured.
It has no effect until a new capture session starts. Setting this to an invalid value will cause an error to occur at the beginning of the session.public WOWZBroadcastConfig getSamplingConfig()
public void setSamplingConfig(WOWZBroadcastConfig samplingConfig)
samplingConfig
- The configuration used by the audio sampler.public boolean isMuted()
isAudioPaused()
instead.public void setMuted(boolean muted)
setAudioPaused(boolean)
instead.public void registerAudioSampleListener(WOWZAudioDevice.AudioSampleListener sampleListener)
sampleListener
- An instance implementing the WOWZAudioDevice.AudioSampleListener
interface.public void unregisterAudioSampleListener(WOWZAudioDevice.AudioSampleListener sampleListener)
sampleListener
- An instance implementing the WOWZAudioDevice.AudioSampleListener
interface.public boolean isSamplingAudio()
public void startAudioSampler(WOWZBroadcastConfig samplingConfig)
samplingConfig
- A configuration specification whose audio properties will be used.public void startAudioSampler()
public void stopAudioSampler()
public WOWZBroadcastConfig getBroadcastConfig()
WOWZBroadcastAPI.Broadcaster
getBroadcastConfig
in interface WOWZBroadcastAPI.Broadcaster
public WOWZStatus getBroadcasterStatus()
WOWZBroadcastAPI.Broadcaster
getBroadcasterStatus
in interface WOWZBroadcastAPI.Broadcaster
public WOWZStatus getStatus()
getStatus
in interface WOWZBroadcastAPI.Broadcaster
public boolean isAudioEnabled()
WOWZBroadcastAPI.AudioBroadcaster
isAudioEnabled
in interface WOWZBroadcastAPI.AudioBroadcaster
public void setAudioEnabled(boolean enabled)
WOWZBroadcastAPI.AudioBroadcaster
setAudioEnabled
in interface WOWZBroadcastAPI.AudioBroadcaster
enabled
- True if the component should be enabled; false otherwise.public boolean isAudioPaused()
WOWZBroadcastAPI.AudioBroadcaster
isAudioPaused
in interface WOWZBroadcastAPI.AudioBroadcaster
public void setAudioPaused(boolean paused)
WOWZBroadcastAPI.AudioBroadcaster
setAudioPaused
in interface WOWZBroadcastAPI.AudioBroadcaster
paused
- True if the component should be paused; false otherwise.public WOWZStatus prepareForBroadcast(WOWZBroadcastConfig broadcastConfig)
WOWZBroadcastAPI.Broadcaster
WOWZState.READY
or WOWZState.IDLE
and also indicate the error in the status.prepareForBroadcast
in interface WOWZBroadcastAPI.Broadcaster
broadcastConfig
- The broadcast configuration.WOWZState.READY
.public WOWZStatus startBroadcasting()
WOWZBroadcastAPI.Broadcaster
WOWZState.RUNNING
or WOWZState.IDLE
and also indicate the error in the status.startBroadcasting
in interface WOWZBroadcastAPI.Broadcaster
WOWZState.RUNNING
.public WOWZStatus stopBroadcasting()
WOWZBroadcastAPI.Broadcaster
WOWZState.IDLE
.stopBroadcasting
in interface WOWZBroadcastAPI.Broadcaster
WOWZState.IDLE
.© 2016 - 2018 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal