Adding missing methods

parent 86ac8909
......@@ -29,7 +29,7 @@ static struct PyMethodDef va_methods[] =
{ "get_hrir_info", ( PyCFunction )va_get_hrir_info, METH_FASTCALL, va_no_doc },
{ "get_hrir_infos", ( PyCFunction )va_get_hrir_infos, METH_FASTCALL, va_no_doc },
{ "create_audio_file_signal_source", ( PyCFunction ) va_create_audio_file_signal_source, METH_FASTCALL, va_no_doc },
{ "create_audio_file_signal_source", (PyCFunction)va_create_audio_file_signal_source, METH_FASTCALL, va_no_doc },
{ "create_text_to_speech_signal_source", ( PyCFunction ) va_create_text_to_speech_signal_source, METH_FASTCALL, va_no_doc },
{ "create_sequencer_signal_source", ( PyCFunction ) va_create_sequencer_signal_source, METH_FASTCALL, va_no_doc },
{ "create_network_stream_signal_source", ( PyCFunction ) va_create_network_stream_signal_source, METH_FASTCALL, va_no_doc },
......@@ -37,7 +37,16 @@ static struct PyMethodDef va_methods[] =
{ "create_machine_signal_source", ( PyCFunction ) va_create_machine_signal_source, METH_FASTCALL, va_no_doc },
{ "delete_signal_source", ( PyCFunction ) va_delete_signal_source, METH_FASTCALL, va_no_doc },
{ "get_signal_source_info", ( PyCFunction ) va_get_signal_source_info, METH_FASTCALL, va_no_doc },
{ "get_signal_source_infos", ( PyCFunction ) va_get_signal_source_infos, METH_FASTCALL, va_no_doc },
{ "get_signal_source_infos", (PyCFunction)va_get_signal_source_infos, METH_FASTCALL, va_no_doc },
{ "get_audio_file_signal_source_playback_state", (PyCFunction)va_get_audio_file_signal_source_playback_state, METH_FASTCALL, va_no_doc },
{ "set_audio_file_signal_source_playback_action", (PyCFunction)va_set_audio_file_signal_source_playback_action, METH_FASTCALL, va_no_doc },
{ "get_audio_file_signal_source_playback_state_str", (PyCFunction)va_get_audio_file_signal_source_playback_state_str, METH_FASTCALL, va_no_doc },
{ "set_audio_file_signal_source_playback_action_str", (PyCFunction)va_set_audio_file_signal_source_playback_action_str, METH_FASTCALL, va_no_doc },
{ "set_audio_file_signal_source_playback_position", (PyCFunction)va_set_audio_file_signal_source_playback_position, METH_FASTCALL, va_no_doc },
{ "get_audio_file_signal_source_playback_is_looping", (PyCFunction)va_get_audio_file_signal_source_playback_is_looping, METH_FASTCALL, va_no_doc },
{ "set_audio_file_signal_source_playback_is_looping", (PyCFunction)va_set_audio_file_signal_source_playback_is_looping, METH_FASTCALL, va_no_doc },
{ "start_machine_signal_source", (PyCFunction)va_start_machine_signal_source, METH_FASTCALL, va_no_doc },
{ "halt_machine_signal_source", (PyCFunction)va_halt_machine_signal_source, METH_FASTCALL, va_no_doc },
{ "get_machine_signal_source_state_str", ( PyCFunction ) va_get_machine_signal_source_state_str, METH_FASTCALL, va_no_doc },
{ "set_machine_signal_source_speed", ( PyCFunction ) va_set_machine_signal_source_speed, METH_FASTCALL, va_no_doc },
{ "get_machine_signal_source_speed", ( PyCFunction ) va_get_machine_signal_source_speed, METH_FASTCALL, va_no_doc },
......
......@@ -1497,6 +1497,166 @@ static PyObject* va_get_signal_source_infos( PyObject*, PyObject* )
VAPY_CATCH_RETURN;
};
static PyObject* va_get_audio_file_signal_source_playback_state(PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames)
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "signalsource", NULL };
static _PyArg_Parser _parser = { "s:get_audio_file_signal_source_play_state", _keywords, 0 };
char* pcSignalSource = nullptr;
if (!_PyArg_ParseStack(ppArgs, nArgs, pKeywordNames, &_parser, &pcSignalSource))
return NULL;
std::string sSignalSource = pcSignalSource ? std::string(pcSignalSource) : "";
int iState = g_pVANetClient->GetCoreInstance()->GetAudiofileSignalSourcePlaybackState(sSignalSource);
return PyLong_FromLong(iState);
VAPY_CATCH_RETURN;
};
static PyObject* va_get_audio_file_signal_source_playback_state_str(PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames)
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "signalsource", NULL };
static _PyArg_Parser _parser = { "s:get_audio_file_signal_source_play_state", _keywords, 0 };
char* pcSignalSource = nullptr;
if (!_PyArg_ParseStack(ppArgs, nArgs, pKeywordNames, &_parser, &pcSignalSource))
return NULL;
std::string sSignalSource = pcSignalSource ? std::string(pcSignalSource) : "";
int iState = g_pVANetClient->GetCoreInstance()->GetAudiofileSignalSourcePlaybackState(sSignalSource);
std::string sState = g_pVANetClient->GetCoreInstance()->GetPlaybackStateStr(iState);
return PyUnicode_FromString( SaveStringToUnicodeConversion( sState ).c_str());
VAPY_CATCH_RETURN;
};
static PyObject* va_set_audio_file_signal_source_playback_action(PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames)
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "signalsource", "action", NULL };
static _PyArg_Parser _parser = { "si:set_audio_file_signal_source_playback_action", _keywords, 0 };
char* pcSignalSource = nullptr;
int iAction = -1;
if (!_PyArg_ParseStack(ppArgs, nArgs, pKeywordNames, &_parser, &pcSignalSource, &iAction))
return NULL;
std::string sSignalSource = pcSignalSource ? std::string(pcSignalSource) : "";
g_pVANetClient->GetCoreInstance()->SetAudiofileSignalSourcePlaybackAction(sSignalSource, iAction);
return Py_None;
VAPY_CATCH_RETURN;
};
static PyObject* va_set_audio_file_signal_source_playback_action_str(PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames)
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "signalsource", "action_string", NULL };
static _PyArg_Parser _parser = { "ss:set_audio_file_signal_source_playback_action_str", _keywords, 0 };
char* pcSignalSource = nullptr;
char* pcAction = nullptr;
if (!_PyArg_ParseStack(ppArgs, nArgs, pKeywordNames, &_parser, &pcSignalSource, &pcAction))
return NULL;
std::string sAction = pcAction ? std::string(pcAction) : "";
int iAction = g_pVANetClient->GetCoreInstance()->ParsePlaybackAction(sAction);
std::string sSignalSource = pcSignalSource ? std::string(pcSignalSource) : "";
g_pVANetClient->GetCoreInstance()->SetAudiofileSignalSourcePlaybackAction(sSignalSource, iAction);
return Py_None;
VAPY_CATCH_RETURN;
};
static PyObject* va_set_audio_file_signal_source_playback_position(PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames)
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "signalsource", "playback_position", NULL };
static _PyArg_Parser _parser = { "si:set_audio_file_signal_source_playback_position", _keywords, 0 };
char* pcSignalSource = nullptr;
int iPosition = -1;
if (!_PyArg_ParseStack(ppArgs, nArgs, pKeywordNames, &_parser, &pcSignalSource, &iPosition))
return NULL;
std::string sSignalSource = pcSignalSource ? std::string(pcSignalSource) : "";
g_pVANetClient->GetCoreInstance()->SetAudiofileSignalSourcePlaybackPosition(sSignalSource, iPosition);
return Py_None;
VAPY_CATCH_RETURN;
};
static PyObject* va_get_audio_file_signal_source_playback_is_looping(PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames)
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "signalsource", NULL };
static _PyArg_Parser _parser = { "s:get_audio_file_signal_source_playback_is_looping", _keywords, 0 };
char* pcSignalSource = nullptr;
if (!_PyArg_ParseStack(ppArgs, nArgs, pKeywordNames, &_parser, &pcSignalSource))
return NULL;
std::string sSignalSource = pcSignalSource ? std::string(pcSignalSource) : "";
return PyBool_FromLong(g_pVANetClient->GetCoreInstance()->GetAudiofileSignalSourceIsLooping(sSignalSource));
VAPY_CATCH_RETURN;
};
static PyObject* va_set_audio_file_signal_source_playback_is_looping(PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames)
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "signalsource", "enabled", NULL };
static _PyArg_Parser _parser = { "s|b:set_audio_file_signal_source_playback_is_looping", _keywords, 0 };
char* pcSignalSource = nullptr;
bool bEnabled = true;
if (!_PyArg_ParseStack(ppArgs, nArgs, pKeywordNames, &_parser, &pcSignalSource, &bEnabled))
return NULL;
std::string sSignalSource = pcSignalSource ? std::string(pcSignalSource) : "";
g_pVANetClient->GetCoreInstance()->SetAudiofileSignalSourceIsLooping(sSignalSource, bEnabled);
return Py_None;
VAPY_CATCH_RETURN;
};
static PyObject* va_start_machine_signal_source(PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames)
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "signalsource", NULL };
static _PyArg_Parser _parser = { "s:start_machine_signal_source", _keywords, 0 };
char* pcSignalSource = nullptr;
if (!_PyArg_ParseStack(ppArgs, nArgs, pKeywordNames, &_parser, &pcSignalSource))
return NULL;
std::string sSignalSource = pcSignalSource ? std::string(pcSignalSource) : "";
g_pVANetClient->GetCoreInstance()->StartMachineSignalSource(sSignalSource);
return Py_None;
VAPY_CATCH_RETURN;
};
static PyObject* va_halt_machine_signal_source(PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames)
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "signalsource", NULL };
static _PyArg_Parser _parser = { "s:halt_machine_signal_source", _keywords, 0 };
char* pcSignalSource = nullptr;
if (!_PyArg_ParseStack(ppArgs, nArgs, pKeywordNames, &_parser, &pcSignalSource))
return NULL;
std::string sSignalSource = pcSignalSource ? std::string(pcSignalSource) : "";
g_pVANetClient->GetCoreInstance()->HaltMachineSignalSource(sSignalSource);
return Py_None;
VAPY_CATCH_RETURN;
};
static PyObject* va_get_machine_signal_source_state_str( PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, PyObject* pKeywordNames )
{
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