public class YAudioIn extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YAudioIn.TimedReportCallback
TimedReportCallback for AudioIn
|
static interface |
YAudioIn.UpdateCallback
Deprecated UpdateCallback for AudioIn
|
Modifier and Type | Field and Description |
---|---|
protected int |
_mute |
protected int |
_noSignalFor |
protected int |
_signal |
protected YAudioIn.UpdateCallback |
_valueCallbackAudioIn |
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 |
YAudioIn(String func) |
protected |
YAudioIn(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YAudioIn |
FindAudioIn(String func)
Retrieves an audio input for a given identifier.
|
static YAudioIn |
FindAudioInInContext(YAPIContext yctx,
String func)
Retrieves an audio input for a given identifier in a YAPI context.
|
static YAudioIn |
FirstAudioIn()
Starts the enumeration of audio inputs currently accessible.
|
static YAudioIn |
FirstAudioInInContext(YAPIContext yctx)
Starts the enumeration of audio inputs 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 input signal level.
|
int |
get_volume()
Returns audio input gain, 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 input signal level.
|
int |
getVolume()
Returns audio input gain, in per cents.
|
String |
getVolumeRange()
Returns the supported volume range.
|
YAudioIn |
nextAudioIn()
Continues the enumeration of audio inputs started using yFirstAudioIn().
|
int |
registerValueCallback(YAudioIn.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 input gain, in per cents.
|
int |
setMute(int newval)
Changes the state of the mute function.
|
int |
setVolume(int newval)
Changes audio input gain, in per cents.
|
_AddToCache, _clearDataStreamCache, _devRequest, _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, 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_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, 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 YAudioIn.UpdateCallback _valueCallbackAudioIn
protected YAudioIn(YAPIContext ctx, String func)
func
- : functionidprotected YAudioIn(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 input gain, in per centsYAPI_Exception
- on errorpublic int setVolume(int newval) throws YAPI_Exception
newval
- : an integer corresponding to audio input gain, 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 YAudioIn.MUTE_FALSE or YAudioIn.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 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 YAudioIn FindAudioIn(String func)
func
- : a string that uniquely characterizes the audio inputpublic static YAudioIn FindAudioInInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the audio inputpublic int registerValueCallback(YAudioIn.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 YAudioIn nextAudioIn()
public static YAudioIn FirstAudioIn()
public static YAudioIn FirstAudioInInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2017. All rights reserved.