Stay organized with collections
Save and categorize content based on your preferences.
OnSpatializerStateChangedListener
interface OnSpatializerStateChangedListener
An interface to be notified of changes to the state of the spatializer effect.
Summary
Public methods |
abstract Unit |
Called when the availability of the spatializer effect changes
|
abstract Unit |
Called when the enabled state of the spatializer effect changes
|
Public methods
onSpatializerAvailableChanged
abstract fun onSpatializerAvailableChanged(
spat: Spatializer,
available: Boolean
): Unit
Called when the availability of the spatializer effect changes
Parameters |
spat |
Spatializer: the Spatializer instance whose state changed This value cannot be null . |
available |
Boolean: true if the spatializer effect is available and capable of processing the audio for the current configuration of the device, false otherwise. |
onSpatializerEnabledChanged
abstract fun onSpatializerEnabledChanged(
spat: Spatializer,
enabled: Boolean
): Unit
Called when the enabled state of the spatializer effect changes
Parameters |
spat |
Spatializer: the Spatializer instance whose state changed This value cannot be null . |
enabled |
Boolean: true if the spatializer effect is enabled on the device, false otherwise |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Spatializer.OnSpatializerStateChangedListener\n\nAdded in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnSpatializerStateChangedListener\n=================================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/Spatializer.OnSpatializerStateChangedListener \"View this page in Java\") \n\n```\ninterface OnSpatializerStateChangedListener\n```\n\n|------------------------------------------------------------------|\n| [android.media.Spatializer.OnSpatializerStateChangedListener](#) |\n\nAn interface to be notified of changes to the state of the spatializer effect.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSpatializerAvailableChanged](#onSpatializerAvailableChanged(android.media.Spatializer,%20kotlin.Boolean))`(`spat:` `[Spatializer](/reference/kotlin/android/media/Spatializer)`, `available:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the availability of the spatializer effect changes |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSpatializerEnabledChanged](#onSpatializerEnabledChanged(android.media.Spatializer,%20kotlin.Boolean))`(`spat:` `[Spatializer](/reference/kotlin/android/media/Spatializer)`, `enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the enabled state of the spatializer effect changes |\n\nPublic methods\n--------------\n\n### onSpatializerAvailableChanged\n\nAdded in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onSpatializerAvailableChanged(\n spat: Spatializer, \n available: Boolean\n): Unit\n```\n\nCalled when the availability of the spatializer effect changes\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `spat` | [Spatializer](/reference/kotlin/android/media/Spatializer): the `Spatializer` instance whose state changed This value cannot be `null`. |\n| `available` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): `true` if the spatializer effect is available and capable of processing the audio for the current configuration of the device, `false` otherwise. |\n\n**See Also**\n\n- [#isAvailable()](/reference/kotlin/android/media/Spatializer#isAvailable()) \n\n### onSpatializerEnabledChanged\n\nAdded in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onSpatializerEnabledChanged(\n spat: Spatializer, \n enabled: Boolean\n): Unit\n```\n\nCalled when the enabled state of the spatializer effect changes\n\n| Parameters ||\n|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `spat` | [Spatializer](/reference/kotlin/android/media/Spatializer): the `Spatializer` instance whose state changed This value cannot be `null`. |\n| `enabled` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): `true` if the spatializer effect is enabled on the device, `false` otherwise |\n\n**See Also**\n\n- [#isEnabled()](/reference/kotlin/android/media/Spatializer#isEnabled())"]]