.. _alsounddetection-api: ALSoundDetection API ==================== :ref:`Overview ` | API Namespace : **AL** .. code-block:: cpp #include Method list ----------- .. cpp:class:: ALSoundDetectionProxy * Methods: * :cpp:func:`ALSoundDetection::getDescription` * :cpp:func:`ALSoundDetection::getEvents` * :cpp:func:`ALSoundDetection::setParameter` * :cpp:func:`ALSoundDetection::subscribe` * :cpp:func:`ALSoundDetection::unsubscribe` .. seealso:: * :ref:`Methods inherited from ALModule ` Methods ------- .. cpp:function:: AL::ALValue ALSoundDetection::getDescription(const std::string& type, const std::string& nameDesc) .. deprecated:: 1.12 use the *ALMemory* key *"SoundDetected"* instead to collect the result of the detection. :param type: Name of detector :param nameDesc: Name of the description :return: Description .. cpp:function:: AL::ALValue ALSoundDetection::getEvents(const std::string& type) .. deprecated:: 1.12 use the *ALMemory* key *"SoundDetected"* instead to collect the result of the detection. :param type: Name of detector :return: Event .. cpp:function:: void ALSoundDetection::setParameter(const std::string& parameter, const float& value) The sensitivity of the detection can be set by calling this function as follows: :param parameter: Name of the parameter :param value: Value of the parameter .. literalinclude:: /samples/python/alsounddetection/alsounddetection_setparameter.py :language: py .. cpp:function:: void ALSoundDetection::setParameter( const std::string& type, const std::string& parameter, const float& value) .. deprecated:: 1.12 use :cpp:func:`ALSoundDetection::setParameter` instead. :param type: Name of detector :param parameter: Name of the parameter :param value: Value of the parameter .. cpp:function:: void ALSoundDetection::subscribe(const std::string& name) Subscribes to *ALSoundDetection*. This causes the module to start writing information to *ALMemory* in *"SoundDetected"*. This can be accessed in *ALMemory* using :cpp:func:`ALMemoryProxy::getData`. :param name: Name to identify the subscriber .. cpp:function:: void ALSoundDetection::unsubscribe(const std::string& name) Unsubscribes to *ALSoundDetection*. This causes the module to stop writing information to *ALMemory* in *"SoundDetected"*. :param name: Name to identify the subscriber (as used in :cpp:func:`ALSoundDetection::subscribe`).