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 |
protected String |
_volumeRange |
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
|
static String |
VOLUMERANGE_INVALID
invalid volumeRange value
|
_advertisedValue, _cacheExpiration, _className, _dataStreams, _func, _funId, _hwId, _lastErrorMsg, _lastErrorType, _logicalName, _serial, _userData, _valueCallbackFunction, _yapi, ADVERTISEDVALUE_INVALID, FUNCTIONDESCRIPTOR_INVALID, LOGICALNAME_INVALID
Modifier | Constructor and Description |
---|---|
protected |
YAudioOut(String func) |
protected |
YAudioOut(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YAudioOut |
FindAudioOut(String func)
Retrieves an audio output for a given identifier.
|
static YAudioOut |
FindAudioOutInContext(YAPIContext yctx,
String func)
Retrieves an audio output for a given identifier in a YAPI context.
|
static YAudioOut |
FirstAudioOut()
Starts the enumeration of audio outputs currently accessible.
|
static YAudioOut |
FirstAudioOutInContext(YAPIContext yctx)
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.
|
String |
get_volumeRange()
Returns the supported volume range.
|
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.
|
String |
getVolumeRange()
Returns the supported volume range.
|
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, _clearDataStreamCache, _download, _escapeAttr, _FindFromCache, _FindFromCacheInContext, _get_json_path_struct, _get_json_path, _json_get_array, _json_get_key, _json_get_string, _parse, _parserHelper, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, _uploadEx, clearCache, describe, errMessage, errorMessage, errorType, errType, FindFunction, FindFunctionInContext, FirstFunction, FirstFunctionInContext, functionDescriptor, get_advertisedValue, get_errorMessage, get_errorType, get_friendlyName, get_functionDescriptor, get_functionId, get_hardwareId, get_logicalName, get_module, get_serialNumber, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, isReadOnly, load, loadAttribute, module, muteValueCallbacks, nextFunction, registerValueCallback, set_advertisedValue, set_logicalName, set_userData, setLogicalName, setUserData, toString, unmuteValueCallbacks, 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 String VOLUMERANGE_INVALID
public static final int SIGNAL_INVALID
public static final int NOSIGNALFOR_INVALID
protected int _volume
protected int _mute
protected String _volumeRange
protected int _signal
protected int _noSignalFor
protected YAudioOut.UpdateCallback _valueCallbackAudioOut
protected YAudioOut(YAPIContext ctx, String func)
func
- : functionidprotected YAudioOut(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
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 YAudioOut.MUTE_FALSE or YAudioOut.MUTE_TRUE, according to the state of the mute functionYAPI_Exception
- on errorpublic String get_volumeRange() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getVolumeRange() throws YAPI_Exception
YAPI_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 output, for instance
MyDevice.audioOut1.public static YAudioOut FindAudioOutInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the audio output, for instance
MyDevice.audioOut1.public 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()
public static YAudioOut FirstAudioOutInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2022. All rights reserved.