public class YAudioOut extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YAudioOut.TimedReportCallback
TimedReportCallback for AudioOut
|
static interface |
YAudioOut.UpdateCallback
Deprecated UpdateCallback for AudioOut
|
Modifier and Type | Field and Description |
---|---|
protected int |
_mute |
protected int |
_noSignalFor |
protected int |
_signal |
protected YAudioOut.UpdateCallback |
_valueCallbackAudioOut |
protected int |
_volume |
static int |
MUTE_FALSE
invalid mute value
|
static int |
MUTE_INVALID |
static int |
MUTE_TRUE |
static int |
NOSIGNALFOR_INVALID
invalid noSignalFor value
|
static int |
SIGNAL_INVALID
invalid signal value
|
static int |
VOLUME_INVALID
invalid volume value
|
_advertisedValue, _cacheExpiration, _className, _dataStreams, _func, _funId, _hwId, _lastErrorMsg, _lastErrorType, _logicalName, _serial, _userData, _valueCallbackFunction, ADVERTISEDVALUE_INVALID, FUNCTIONDESCRIPTOR_INVALID, LOGICALNAME_INVALID
Modifier | Constructor and Description |
---|---|
protected |
YAudioOut(String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(org.json.JSONObject json_val) |
static YAudioOut |
FindAudioOut(String func)
Retrieves an audio output for a given identifier.
|
static YAudioOut |
FirstAudioOut()
Starts the enumeration of audio outputs currently accessible.
|
int |
get_mute()
Returns the state of the mute function.
|
int |
get_noSignalFor()
Returns the number of seconds elapsed without detecting a signal
|
int |
get_signal()
Returns the detected output current level.
|
int |
get_volume()
Returns audio output volume, in per cents.
|
int |
getMute()
Returns the state of the mute function.
|
int |
getNoSignalFor()
Returns the number of seconds elapsed without detecting a signal
|
int |
getSignal()
Returns the detected output current level.
|
int |
getVolume()
Returns audio output volume, in per cents.
|
YAudioOut |
nextAudioOut()
Continues the enumeration of audio outputs started using yFirstAudioOut().
|
int |
registerValueCallback(YAudioOut.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_mute(int newval)
Changes the state of the mute function.
|
int |
set_volume(int newval)
Changes audio output volume, in per cents.
|
int |
setMute(int newval)
Changes the state of the mute function.
|
int |
setVolume(int newval)
Changes audio output volume, in per cents.
|
_AddToCache, _devRequest, _download, _escapeAttr, _FindFromCache, _json_get_array, _json_get_key, _json_get_string, _parse, _parserHelper, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, describe, errMessage, errorMessage, errorType, errType, FindFunction, FirstFunction, functionDescriptor, get_advertisedValue, get_errorMessage, get_errorType, get_friendlyName, get_functionDescriptor, get_functionId, get_hardwareId, get_logicalName, get_module, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, load, module, nextFunction, registerValueCallback, set_logicalName, set_userData, setLogicalName, setUserData, toString, userData
public static final int VOLUME_INVALID
public static final int MUTE_FALSE
public static final int MUTE_TRUE
public static final int MUTE_INVALID
public static final int SIGNAL_INVALID
public static final int NOSIGNALFOR_INVALID
protected int _volume
protected int _mute
protected int _signal
protected int _noSignalFor
protected YAudioOut.UpdateCallback _valueCallbackAudioOut
protected YAudioOut(String func)
func
- : functionidprotected void _parseAttr(org.json.JSONObject json_val) throws org.json.JSONException
_parseAttr
in class YFunction
org.json.JSONException
public int get_volume() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getVolume() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_volume(int newval) throws YAPI_Exception
newval
- : an integer corresponding to audio output volume, in per centsYAPI_Exception
- on errorpublic int setVolume(int newval) throws YAPI_Exception
newval
- : an integer corresponding to audio output volume, in per centsYAPI_Exception
- on errorpublic int get_mute() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getMute() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_mute(int newval) throws YAPI_Exception
newval
- : either YAudioOut.MUTE_FALSE or YAudioOut.MUTE_TRUE, according to the state of the mute functionYAPI_Exception
- on errorpublic int setMute(int newval) throws YAPI_Exception
newval
- : either Y_MUTE_FALSE or Y_MUTE_TRUE, according to the state of the mute functionYAPI_Exception
- on errorpublic int get_signal() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getSignal() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_noSignalFor() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getNoSignalFor() throws YAPI_Exception
YAPI_Exception
- on errorpublic static YAudioOut FindAudioOut(String func)
func
- : a string that uniquely characterizes the audio outputpublic int registerValueCallback(YAudioOut.UpdateCallback callback)
callback
- : the callback function to call, or a null pointer. The callback function should take two
arguments: the function object of which the value has changed, and the character string describing
the new advertised value.public int _invokeValueCallback(String value)
_invokeValueCallback
in class YFunction
public YAudioOut nextAudioOut()
public static YAudioOut FirstAudioOut()
Copyright © 2015. All rights reserved.