Commit a1436d15 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Adding sound receiver mute method implementations and removing active listener methods

parent 60dd79c4
......@@ -8,7 +8,7 @@ if( NOT DEFINED ITA_VAPYTHON_VERSION_MAJOR )
endif( NOT DEFINED ITA_VAPYTHON_VERSION_MAJOR )
if( NOT DEFINED ITA_VAPYTHON_VERSION_MINOR )
set( ITA_VAPYTHON_VERSION_MINOR "a" CACHE STRING "VAPython version minor (usually a,b,c ...)" )
set( ITA_VAPYTHON_VERSION_MINOR "b" CACHE STRING "VAPython version minor (usually a,b,c ...)" )
endif( NOT DEFINED ITA_VAPYTHON_VERSION_MINOR )
include( VistaCommon )
......
......@@ -110,6 +110,8 @@ static struct PyMethodDef va_methods[] =
{ "get_sound_receiver_parameters", ( PyCFunction ) get_sound_receiver_parameters, METH_FASTCALL, no_doc },
{ "get_sound_receiver_directivity", ( PyCFunction ) get_sound_receiver_directivity, METH_FASTCALL, no_doc },
{ "set_sound_receiver_directivity", ( PyCFunction ) set_sound_receiver_directivity, METH_FASTCALL, no_doc },
{ "get_sound_receiver_muted", ( PyCFunction ) get_sound_receiver_muted, METH_FASTCALL, no_doc },
{ "set_sound_receiver_muted", ( PyCFunction ) set_sound_receiver_muted, METH_FASTCALL, no_doc },
{ "get_sound_receiver_position", ( PyCFunction ) get_sound_receiver_position, METH_FASTCALL, no_doc },
{ "set_sound_receiver_position", ( PyCFunction ) set_sound_receiver_position, METH_FASTCALL, no_doc },
{ "get_sound_receiver_orientation_vu", ( PyCFunction ) get_sound_receiver_orientation_vu, METH_FASTCALL, no_doc },
......@@ -182,10 +184,6 @@ static struct PyMethodDef va_methods[] =
{ "set_output_muted", ( PyCFunction ) set_output_muted, METH_FASTCALL, no_doc },
{ "get_global_auralization_mode", ( PyCFunction ) get_global_auralization_mode, METH_FASTCALL, no_doc },
{ "set_global_auralization_mode", ( PyCFunction ) set_global_auralization_mode, METH_FASTCALL, no_doc },
{ "get_active_sound_receiver", ( PyCFunction ) get_active_sound_receiver, METH_FASTCALL, no_doc },
{ "set_active_sound_receiver", ( PyCFunction ) set_active_sound_receiver, METH_FASTCALL, no_doc },
{ "get_active_sound_receiver_explicit_renderer", ( PyCFunction ) get_active_sound_receiver_explicit_renderer, METH_FASTCALL, no_doc },
{ "set_active_sound_receiver_explicit_renderer", ( PyCFunction ) set_active_sound_receiver_explicit_renderer, METH_FASTCALL, no_doc },
{ "get_core_clock", ( PyCFunction ) get_core_clock, METH_FASTCALL, no_doc },
{ "set_core_clock", ( PyCFunction ) set_core_clock, METH_FASTCALL, no_doc },
......
......@@ -1092,6 +1092,38 @@ static PyObject* set_sound_receiver_directivity( PyObject*, PyObject** ppArgs, P
VAPY_CATCH_RETURN;
};
static PyObject* set_sound_receiver_muted( PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames )
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "id", "muted", NULL };
static _PyArg_Parser _parser = { "i|b:set_sound_receiver_muted", _keywords, 0 };
long iID = -1;
bool bMuted = true;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &iID, &bMuted ) )
return NULL;
g_pVANetClient->GetCoreInstance()->SetSoundReceiverMuted( iID, bMuted );
return Py_None;
VAPY_CATCH_RETURN;
};
static PyObject* get_sound_receiver_muted( PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames )
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "id", NULL };
static _PyArg_Parser _parser = { "i:get_sound_receiver_muted", _keywords, 0 };
long iID = -1;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &iID ) )
return NULL;
return PyBool_FromLong( g_pVANetClient->GetCoreInstance()->GetSoundReceiverMuted( iID ) );
VAPY_CATCH_RETURN;
};
static PyObject* get_sound_receiver_position( PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames )
{
......@@ -2525,61 +2557,6 @@ static PyObject* set_global_auralization_mode( PyObject*, PyObject** ppArgs, Py_
VAPY_CATCH_RETURN;
};
static PyObject* get_active_sound_receiver( PyObject*, PyObject* )
{
VAPY_REQUIRE_CONN_TRY;
return PyLong_FromLong( g_pVANetClient->GetCoreInstance()->GetActiveSoundReceiver() );
VAPY_CATCH_RETURN;
};
static PyObject* set_active_sound_receiver( PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames )
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "id", NULL };
static _PyArg_Parser _parser = { "i:set_active_sound_receiver", _keywords, 0 };
long iID = -1;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &iID ) )
return NULL;
g_pVANetClient->GetCoreInstance()->SetActiveSoundReceiver( iID );
return Py_None;
VAPY_CATCH_RETURN;
};
static PyObject* get_active_sound_receiver_explicit_renderer( PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames )
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "id", NULL };
static _PyArg_Parser _parser = { "s:set_active_sound_receiver_explicit_renderer", _keywords, 0 };
char* pcID = nullptr;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcID ) )
return NULL;
std::string sID = pcID ? std::string( pcID ) : "";
return PyLong_FromLong( g_pVANetClient->GetCoreInstance()->GetActiveSoundReceiverExplicitRenderer( sID ) );
VAPY_CATCH_RETURN;
};
static PyObject* set_active_sound_receiver_explicit_renderer( PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames )
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "id", "renderer", NULL };
static _PyArg_Parser _parser = { "is:set_active_sound_receiver_explicit_renderer", _keywords, 0 };
long iID = -1;
char* pcID = nullptr;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &iID, &pcID ) )
return NULL;
std::string sID = pcID ? std::string( pcID ) : "";
g_pVANetClient->GetCoreInstance()->SetActiveSoundReceiverExplicitRenderer( iID, sID );
return Py_None;
VAPY_CATCH_RETURN;
};
static PyObject* get_core_clock( PyObject*, PyObject* )
{
VAPY_REQUIRE_CONN_TRY;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment