Class AVAudioEnvironmentNode

  • All Implemented Interfaces:
    AVAudio3DMixing, AVAudioMixing, AVAudioStereoMixing, NSObject

    public class AVAudioEnvironmentNode
    extends AVAudioNode
    implements AVAudioMixing
    AVAudioEnvironmentNode Mixer node that simulates a 3D environment AVAudioEnvironmentNode is a mixer node that simulates a 3D audio environment. Any node that conforms to the AVAudioMixing protocol (e.g. AVAudioPlayerNode) can act as a source in this environment. The environment has an implicit "listener". By controlling the listener's position and orientation, the application controls the way the user experiences the virtual world. In addition, this node also defines properties for distance attenuation and reverberation that help characterize the environment. It is important to note that AVAudio3DMixingSourceMode affects how inputs with different channel configurations are rendered. By default, only inputs with a mono channel are spatialized. In order to set the environment node’s output to a multichannel format, use an AVAudioFormat with a desired AudioChannelLayout.
    • Constructor Detail

      • AVAudioEnvironmentNode

        protected AVAudioEnvironmentNode​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • applicableRenderingAlgorithms

        public NSArray<? extends NSNumber> applicableRenderingAlgorithms()
        [@property] applicableRenderingAlgorithms Returns an array of AVAudio3DMixingRenderingAlgorithm values based on the current output format AVAudioEnvironmentNode supports several rendering algorithms per input bus which are defined in . Depending on the current output format of the environment node, this method returns an immutable array of the applicable rendering algorithms. This is important when the environment node has been configured to a multichannel output format because only a subset of the available rendering algorithms are designed to render to all of the channels. This information should be retrieved after a successful connection to the destination node via the engine's connect method.
      • destinationForMixerBus

        public AVAudioMixingDestination destinationForMixerBus​(AVAudioNode mixer,
                                                               long bus)
        Description copied from interface: AVAudioMixing
        Returns the AVAudioMixingDestination object corresponding to specified mixer node and its input bus When a source node is connected to multiple mixers downstream, setting AVAudioMixing properties directly on the source node will apply the change to all the mixers downstream. If you want to set/get properties on a specific mixer, use this method to get the corresponding AVAudioMixingDestination and set/get properties on it. Note: - Properties set on individual AVAudioMixingDestination instances will not reflect at the source node level. - AVAudioMixingDestination reference returned by this method could become invalid when there is any disconnection between the source and the mixer node. Hence this reference should not be retained and should be fetched every time you want to set/get properties on a specific mixer. If the source node is not connected to the specified mixer/input bus, this method returns nil. Calling this on an AVAudioMixingDestination instance returns self if the specified mixer/input bus matches its connection point, otherwise, it returns nil.
        Specified by:
        destinationForMixerBus in interface AVAudioMixing
      • listenerAngularOrientation

        public AVAudio3DAngularOrientation listenerAngularOrientation()
        [@property] listenerAngularOrientation The listener's orientation in the environment Changing listenerAngularOrientation will result in a corresponding change in listenerVectorOrientation. All angles are specified in degrees. Default: The default orientation is with the listener looking directly along the negative Z axis. yaw: 0.0 pitch: 0.0 roll: 0.0
      • listenerPosition

        public AVAudio3DPoint listenerPosition()
        [@property] listenerPosition Sets the listener's position in the 3D environment The coordinates are specified in meters. Default: The default position of the listener is at the origin. x: 0.0 y: 0.0 z: 0.0
      • listenerVectorOrientation

        public AVAudio3DVectorOrientation listenerVectorOrientation()
        [@property] listenerVectorOrientation The listener's orientation in the environment Changing listenerVectorOrientation will result in a corresponding change in listenerAngularOrientation. Default: The default orientation is with the listener looking directly along the negative Z axis. forward: (0, 0, -1) up: (0, 1, 0)
      • nextAvailableInputBus

        public long nextAvailableInputBus()
        [@property] nextAvailableInputBus Find an unused input bus This will find and return the first input bus to which no other node is connected.
      • obstruction

        public float obstruction()
        Description copied from interface: AVAudio3DMixing
        [@property] obstruction Simulates filtering of the direct path of sound due to an obstacle Only the direct path of sound between the source and listener is blocked. Range: -100.0 -> 0.0 dB Default: 0.0 Mixer: AVAudioEnvironmentNode
        Specified by:
        obstruction in interface AVAudio3DMixing
      • occlusion

        public float occlusion()
        Description copied from interface: AVAudio3DMixing
        [@property] occlusion Simulates filtering of the direct and reverb paths of sound due to an obstacle Both the direct and reverb paths of sound between the source and listener are blocked. Range: -100.0 -> 0.0 dB Default: 0.0 Mixer: AVAudioEnvironmentNode
        Specified by:
        occlusion in interface AVAudio3DMixing
      • outputVolume

        public float outputVolume()
        [@property] outputVolume The mixer's output volume. This accesses the mixer's output volume (0.0-1.0, inclusive).
      • pan

        public float pan()
        Description copied from interface: AVAudioStereoMixing
        [@property] pan Set a bus's stereo pan Range: -1.0 -> 1.0 Default: 0.0 Mixer: AVAudioMixerNode
        Specified by:
        pan in interface AVAudioStereoMixing
      • position

        public AVAudio3DPoint position()
        Description copied from interface: AVAudio3DMixing
        [@property] position The location of the source in the 3D environment The coordinates are specified in meters. Mixer: AVAudioEnvironmentNode
        Specified by:
        position in interface AVAudio3DMixing
      • rate

        public float rate()
        Description copied from interface: AVAudio3DMixing
        [@property] rate Changes the playback rate of the input signal A value of 2.0 results in the output audio playing one octave higher. A value of 0.5, results in the output audio playing one octave lower. Range: 0.5 -> 2.0 Default: 1.0 Mixer: AVAudioEnvironmentNode
        Specified by:
        rate in interface AVAudio3DMixing
      • renderingAlgorithm

        public long renderingAlgorithm()
        Description copied from interface: AVAudio3DMixing
        [@property] renderingAlgorithm Type of rendering algorithm used Depending on the current output format of the AVAudioEnvironmentNode, only a subset of the rendering algorithms may be supported. An array of valid rendering algorithms can be retrieved by calling applicableRenderingAlgorithms on AVAudioEnvironmentNode. Default: AVAudio3DMixingRenderingAlgorithmEqualPowerPanning Mixer: AVAudioEnvironmentNode
        Specified by:
        renderingAlgorithm in interface AVAudio3DMixing
      • reverbBlend

        public float reverbBlend()
        Description copied from interface: AVAudio3DMixing
        [@property] reverbBlend Controls the blend of dry and reverb processed audio This property controls the amount of the source's audio that will be processed by the reverb in AVAudioEnvironmentNode. A value of 0.5 will result in an equal blend of dry and processed (wet) audio. Range: 0.0 (completely dry) -> 1.0 (completely wet) Default: 0.0 Mixer: AVAudioEnvironmentNode
        Specified by:
        reverbBlend in interface AVAudio3DMixing
      • setListenerAngularOrientation

        public void setListenerAngularOrientation​(AVAudio3DAngularOrientation value)
        [@property] listenerAngularOrientation The listener's orientation in the environment Changing listenerAngularOrientation will result in a corresponding change in listenerVectorOrientation. All angles are specified in degrees. Default: The default orientation is with the listener looking directly along the negative Z axis. yaw: 0.0 pitch: 0.0 roll: 0.0
      • setListenerPosition

        public void setListenerPosition​(AVAudio3DPoint value)
        [@property] listenerPosition Sets the listener's position in the 3D environment The coordinates are specified in meters. Default: The default position of the listener is at the origin. x: 0.0 y: 0.0 z: 0.0
      • setListenerVectorOrientation

        public void setListenerVectorOrientation​(AVAudio3DVectorOrientation value)
        [@property] listenerVectorOrientation The listener's orientation in the environment Changing listenerVectorOrientation will result in a corresponding change in listenerAngularOrientation. Default: The default orientation is with the listener looking directly along the negative Z axis. forward: (0, 0, -1) up: (0, 1, 0)
      • setObstruction

        public void setObstruction​(float value)
        Description copied from interface: AVAudio3DMixing
        [@property] obstruction Simulates filtering of the direct path of sound due to an obstacle Only the direct path of sound between the source and listener is blocked. Range: -100.0 -> 0.0 dB Default: 0.0 Mixer: AVAudioEnvironmentNode
        Specified by:
        setObstruction in interface AVAudio3DMixing
      • setOcclusion

        public void setOcclusion​(float value)
        Description copied from interface: AVAudio3DMixing
        [@property] occlusion Simulates filtering of the direct and reverb paths of sound due to an obstacle Both the direct and reverb paths of sound between the source and listener are blocked. Range: -100.0 -> 0.0 dB Default: 0.0 Mixer: AVAudioEnvironmentNode
        Specified by:
        setOcclusion in interface AVAudio3DMixing
      • setOutputVolume

        public void setOutputVolume​(float value)
        [@property] outputVolume The mixer's output volume. This accesses the mixer's output volume (0.0-1.0, inclusive).
      • setPan

        public void setPan​(float value)
        Description copied from interface: AVAudioStereoMixing
        [@property] pan Set a bus's stereo pan Range: -1.0 -> 1.0 Default: 0.0 Mixer: AVAudioMixerNode
        Specified by:
        setPan in interface AVAudioStereoMixing
      • setPosition

        public void setPosition​(AVAudio3DPoint value)
        Description copied from interface: AVAudio3DMixing
        [@property] position The location of the source in the 3D environment The coordinates are specified in meters. Mixer: AVAudioEnvironmentNode
        Specified by:
        setPosition in interface AVAudio3DMixing
      • setRate

        public void setRate​(float value)
        Description copied from interface: AVAudio3DMixing
        [@property] rate Changes the playback rate of the input signal A value of 2.0 results in the output audio playing one octave higher. A value of 0.5, results in the output audio playing one octave lower. Range: 0.5 -> 2.0 Default: 1.0 Mixer: AVAudioEnvironmentNode
        Specified by:
        setRate in interface AVAudio3DMixing
      • setRenderingAlgorithm

        public void setRenderingAlgorithm​(long value)
        Description copied from interface: AVAudio3DMixing
        [@property] renderingAlgorithm Type of rendering algorithm used Depending on the current output format of the AVAudioEnvironmentNode, only a subset of the rendering algorithms may be supported. An array of valid rendering algorithms can be retrieved by calling applicableRenderingAlgorithms on AVAudioEnvironmentNode. Default: AVAudio3DMixingRenderingAlgorithmEqualPowerPanning Mixer: AVAudioEnvironmentNode
        Specified by:
        setRenderingAlgorithm in interface AVAudio3DMixing
      • setReverbBlend

        public void setReverbBlend​(float value)
        Description copied from interface: AVAudio3DMixing
        [@property] reverbBlend Controls the blend of dry and reverb processed audio This property controls the amount of the source's audio that will be processed by the reverb in AVAudioEnvironmentNode. A value of 0.5 will result in an equal blend of dry and processed (wet) audio. Range: 0.0 (completely dry) -> 1.0 (completely wet) Default: 0.0 Mixer: AVAudioEnvironmentNode
        Specified by:
        setReverbBlend in interface AVAudio3DMixing
      • setVolume

        public void setVolume​(float value)
        Description copied from interface: AVAudioMixing
        [@property] volume Set a bus's input volume Range: 0.0 -> 1.0 Default: 1.0 Mixers: AVAudioMixerNode, AVAudioEnvironmentNode
        Specified by:
        setVolume in interface AVAudioMixing
      • volume

        public float volume()
        Description copied from interface: AVAudioMixing
        [@property] volume Set a bus's input volume Range: 0.0 -> 1.0 Default: 1.0 Mixers: AVAudioMixerNode, AVAudioEnvironmentNode
        Specified by:
        volume in interface AVAudioMixing
      • outputType

        public long outputType()
        [@property] outputType Type of output hardware to be used with AVAudio3DMixingRenderingAlgorithmAuto Output hardware cannot be automatically determined in Manual Rendering modes or for wired output. This property can be used to override the output type if the correct type is known. Selecting an output type that does not match the actual hardware can produce unexpected results, especially with AVAudioEnvironmentOutputTypeBuiltInSpeakers. An app choosing a value other than AVAudio3DMixingOutputTypeAuto should listen to route change notifications and update the output type accordingly. Default: AVAudio3DMixingOutputTypeAuto
      • pointSourceInHeadMode

        public long pointSourceInHeadMode()
        Description copied from interface: AVAudio3DMixing
        [@property] pointSourceInHeadMode In-head rendering choice for AVAudio3DMixingSourceModePointSource in AVAudio3DMixingRenderingAlgorithmAuto Default: AVAudio3DMixingPointSourceInHeadModeMono Mixer: AVAudioEnvironmentNode
        Specified by:
        pointSourceInHeadMode in interface AVAudio3DMixing
      • setOutputType

        public void setOutputType​(long value)
        [@property] outputType Type of output hardware to be used with AVAudio3DMixingRenderingAlgorithmAuto Output hardware cannot be automatically determined in Manual Rendering modes or for wired output. This property can be used to override the output type if the correct type is known. Selecting an output type that does not match the actual hardware can produce unexpected results, especially with AVAudioEnvironmentOutputTypeBuiltInSpeakers. An app choosing a value other than AVAudio3DMixingOutputTypeAuto should listen to route change notifications and update the output type accordingly. Default: AVAudio3DMixingOutputTypeAuto
      • setPointSourceInHeadMode

        public void setPointSourceInHeadMode​(long value)
        Description copied from interface: AVAudio3DMixing
        [@property] pointSourceInHeadMode In-head rendering choice for AVAudio3DMixingSourceModePointSource in AVAudio3DMixingRenderingAlgorithmAuto Default: AVAudio3DMixingPointSourceInHeadModeMono Mixer: AVAudioEnvironmentNode
        Specified by:
        setPointSourceInHeadMode in interface AVAudio3DMixing
      • setSourceMode

        public void setSourceMode​(long value)
        Description copied from interface: AVAudio3DMixing
        [@property] sourceMode Controls how individual channels of an input bus are rendered Default: AVAudio3DMixingSourceModeSpatializeIfMono Mixer: AVAudioEnvironmentNode
        Specified by:
        setSourceMode in interface AVAudio3DMixing
      • sourceMode

        public long sourceMode()
        Description copied from interface: AVAudio3DMixing
        [@property] sourceMode Controls how individual channels of an input bus are rendered Default: AVAudio3DMixingSourceModeSpatializeIfMono Mixer: AVAudioEnvironmentNode
        Specified by:
        sourceMode in interface AVAudio3DMixing