public class WZAudioDevice extends Object implements WZBroadcastAPI.AudioBroadcaster
| Modifier and Type | Class and Description |
|---|---|
static interface |
WZAudioDevice.AudioSampleListener |
| Constructor and Description |
|---|
WZAudioDevice() |
| Modifier and Type | Method and Description |
|---|---|
int |
getAudioSource()
Returns the actively configured input device for capturing audio
|
WZBroadcastConfig |
getBroadcastConfig()
Returns the configuration settings for an active broadcast session.
|
WZStatus |
getBroadcasterStatus()
Returns the status for a broadcast component
|
WZBroadcastConfig |
getSamplingConfig()
Get the configuration used for the audio sampler
|
WZStatus |
getStatus() |
boolean |
isAudioEnabled()
Indicates if a broadcast component is enabled or not
|
boolean |
isAudioPaused()
Indicates if a broadcast component is paused or not
|
boolean |
isMuted()
deprecated Use
isAudioPaused() |
boolean |
isSamplingAudio()
Indicates if audio samples are currently being read from the audio input device and passed along to sample listeners or not
|
WZStatus |
prepareForBroadcast(WZBroadcastConfig broadcastConfig)
This method is called to initialize each component of a broadcast.
|
void |
registerAudioSampleListener(WZAudioDevice.AudioSampleListener sampleListener)
Registers an audio sample listener to receive raw PCM audio samples
|
void |
setAudioEnabled(boolean enabled)
Set or unset the flag indicating that a broadcast component is enabled
|
void |
setAudioPaused(boolean paused)
Set or unset the flag indicating that a broadcast component is in a paused state
|
void |
setAudioSource(int audioSource)
Sets the actively configured input device for capturing audio.
|
void |
setMuted(boolean muted)
deprecated Use
setAudioPaused(boolean) |
void |
setSamplingConfig(WZBroadcastConfig samplingConfig)
Set 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(WZBroadcastConfig samplingConfig)
Starts the audio sampler with the specified audio configuration
|
WZStatus |
startBroadcasting()
This method is called on each broadcast component to begin a live streaming broadcast.
|
void |
stopAudioSampler()
Stops the audio sampler
|
WZStatus |
stopBroadcasting()
This method is called on each broadcast component to end a live streaming broadcast.
|
void |
unregisterAudioSampleListener(WZAudioDevice.AudioSampleListener sampleListener)
Unregisters a previously registered audio sample listener
|
public int getAudioSource()
android.media.MediaRecorder.AudioSourcepublic void setAudioSource(int audioSource)
audioSource - An identifier for the active audio source. Possible values are those listed at android.media.MediaRecorder.AudioSource.
The default value is MediaRecorder.AudioSource.CAMCORDER. Note that setting this while audio is actively being captured
will have no effect until a new capture session is started. Setting this to an invalid value will cause an error to occur at session begin.public WZBroadcastConfig getSamplingConfig()
public void setSamplingConfig(WZBroadcastConfig samplingConfig)
samplingConfig - the configuration used by the audio samplerpublic boolean isMuted()
isAudioPaused()public void setMuted(boolean muted)
setAudioPaused(boolean)public void registerAudioSampleListener(WZAudioDevice.AudioSampleListener sampleListener)
sampleListener - an instance implementing the WZAudioDevice.AudioSampleListener interfacepublic void unregisterAudioSampleListener(WZAudioDevice.AudioSampleListener sampleListener)
sampleListener - an instance implementing the WZAudioDevice.AudioSampleListener interfacepublic boolean isSamplingAudio()
public void startAudioSampler(WZBroadcastConfig samplingConfig)
samplingConfig - a configuration specification whose audio properties will be usedpublic void startAudioSampler()
public void stopAudioSampler()
public WZBroadcastConfig getBroadcastConfig()
WZBroadcastAPI.BroadcastergetBroadcastConfig in interface WZBroadcastAPI.Broadcasterpublic WZStatus getBroadcasterStatus()
WZBroadcastAPI.BroadcastergetBroadcasterStatus in interface WZBroadcastAPI.Broadcasterpublic WZStatus getStatus()
getStatus in interface WZBroadcastAPI.Broadcasterpublic boolean isAudioEnabled()
WZBroadcastAPI.AudioBroadcasterisAudioEnabled in interface WZBroadcastAPI.AudioBroadcasterpublic void setAudioEnabled(boolean enabled)
WZBroadcastAPI.AudioBroadcastersetAudioEnabled in interface WZBroadcastAPI.AudioBroadcasterenabled - true if the audio broadcast component should be enabled, false otherwisepublic boolean isAudioPaused()
WZBroadcastAPI.AudioBroadcasterisAudioPaused in interface WZBroadcastAPI.AudioBroadcasterpublic void setAudioPaused(boolean paused)
WZBroadcastAPI.AudioBroadcastersetAudioPaused in interface WZBroadcastAPI.AudioBroadcasterpaused - true if the audio broadcast component should be placed in a paused state, false otherwisepublic WZStatus prepareForBroadcast(WZBroadcastConfig broadcastConfig)
WZBroadcastAPI.BroadcasterWZState.READY or WZState.IDLE
and indicate the error in the status as well.prepareForBroadcast in interface WZBroadcastAPI.BroadcasterbroadcastConfig - The broadcast configurationWZState.READYpublic WZStatus startBroadcasting()
WZBroadcastAPI.BroadcasterWZState.RUNNING or WZState.IDLE
and indicate the error in the status as wellstartBroadcasting in interface WZBroadcastAPI.BroadcasterWZState.RUNNINGpublic WZStatus stopBroadcasting()
WZBroadcastAPI.BroadcasterWZState.IDLEstopBroadcasting in interface WZBroadcastAPI.BroadcasterWZState.IDLE© 2016 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal