Press on the image to return to the main documentation page.
Virtualizer
Written by GTR
List of types:
Virtualizer
Virtualizer
Permissions:
android.permission.MODIFY_AUDIO_SETTINGS
Events:
None
Members:
Enable
(
enable
As
Boolean
)
As
Int
GetEnabled
As
Boolean
GetProperties
As
String
HasControl
As
Boolean
Initialize
As
Boolean
IsAvailable
As
Boolean
IsInitialized
As
Boolean
Release
SetProperties
(
settingsStr
As
String
)
SetStrength
(
strength
As
Short
)
Members description:
Enable
(
enable
As
Boolean
)
As
Int
Enables or disables the Audio effect engine.
GetEnabled
As
Boolean
Gets the Enabled status of the Audio effect engine.
GetProperties
As
String
Gets the Virtualizer properties.
Dim
VR
As
Virtualizer
VR
.
Initialize
VR
.
Enable
(
True
)
VRSett
=
VR
.
GetProperties
VR
.
SetProperties
(
VRSett
)
HasControl
As
Boolean
Checks if this AudioEffect object is controlling the effect engine
Initialize
As
Boolean
Checks whether the Virtualizer is available and Initializes the object,
only for all output and not for specific media players.
For backwards compatibility, the library will not throw an exception
on failure to initialize the Virtualizer, but will return true or false
and set the IsInitialized flag appropriately if it fails for any reason.
check either of these before running the other methods as if the Virtualizer
is not initialized, you will get a runtime error.
Dim
VR
As
Virtualizer
VR
.
Initialize
IsAvailable
As
Boolean
Returns the availability of the Virtualizer object, it must be available for
the devices API level (9 or later)
IsInitialized
As
Boolean
Returns the status of the Virtualizer object, it must be available for
the devices API level and initialized
Dim
VR
As
Virtualizer
VR
.
Initialize
If
VR
.
IsInitialized
Then
VR
.
Enable
(
True
)
*
End
if
Release
Releases the native AudioEffect resources.
It is a good practice to release the effect engine when not
in use as control can be returned to other
applications or the native resources released.
SetProperties
(
settingsStr
As
String
)
Sets the Virtualizer properties.
Dim
VR
As
Virtualizer
VR
.
Initialize
VR
.
Enable
(
True
)
VRSett
=
VR
.
GetProperties
VR
.
SetProperties
(
VRSett
)
SetStrength
(
strength
As
Short
)
Sets the strength of the virtualizer effect. If the implementation does not support per mille
accuracy for setting the strength, it is allowed to round the given strength to the nearest
supported value. You can use the {@link #getRoundedStrength()} method to query the
(possibly rounded) value that was actually set.
strength: strength of the effect. The valid range for strength strength is [0, 1000],
where 0 per mille designates the mildest effect and 1000 per mille designates the strongest.
Top