vasingleton.cpp 13.3 KB
Newer Older
1 2 3
#include <Python.h>

#include "vasingletondoc.hpp"
4 5

// All Python 2 VA methods. Also pulls in g_pVAError (Python error trace instance)
6 7 8 9 10 11 12 13 14
#include "vasingletonmethods.hpp"

// VA methods that will appear in Python if they are added to the following table
// It's corresponding C++ functions are implemented here: vasingletonmethods.hpp

static struct PyMethodDef va_methods[] =
{
	{ "connect", ( PyCFunction ) va_connect, METH_FASTCALL, va_connect_doc },
	{ "disconnect", ( PyCFunction ) va_disconnect, METH_FASTCALL, va_no_doc },
15
	{ "is_connected", ( PyCFunction ) va_is_connected, METH_FASTCALL, va_no_doc },
16
	{ "reset", ( PyCFunction ) va_reset, METH_FASTCALL, va_no_doc },
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161

	{ "enumerate_modules", ( PyCFunction ) va_enumerate_modules, METH_FASTCALL, va_no_doc },
	{ "call_module", ( PyCFunction ) va_call_module, METH_FASTCALL, va_no_doc },
	{ "add_search_path", ( PyCFunction ) va_add_search_path, METH_FASTCALL, va_no_doc },

	{ "load_directivity", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "free_directivity", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_directivity_info", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_directivity_infos", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },

	{ "load_hrir", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "free_hrir", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_hrir_info", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_hrir_infos", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },

	{ "create_audio_file_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "create_text_to_speech_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "create_sequencer_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "create_network_stream_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "create_engine_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "create_machine_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "delete_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_signal_source_info", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_signal_source_infos", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_machine_signal_source_state_str", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_machine_signal_source_speed", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_machine_signal_source_speed", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_machine_signal_source_start_file", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_machine_signal_idle_start_file", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_machine_signal_stop_start_file", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "add_sound_playback", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "remove_sound_playback", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_signal_source_parameters", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_signal_source_parameters", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },

	{ "is_scene_locked", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "lock_scene", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "unlock_scene", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },

	{ "get_sound_source_ids", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "create_sound_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "create_sound_source_explicit_renderer", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "delete_sound_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_enabled", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_enabled", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_name", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_enabled", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "remove_sound_source_signal_source", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_auralization_mode", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_auralization_mode", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_parameters", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_parameters", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_directivity", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_directivity", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_volume", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_volume", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "is_sound_source_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_position", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_position", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_orientation_vu", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_orientation_vu", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_sound_source_orientation_q", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_sound_source_orientation_q", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },

	{ "get_listener_ids", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "create_listener", ( PyCFunction ) va_create_listener, METH_FASTCALL, va_no_doc },
	{ "create_listener_explicit_renderer", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "delete_listener", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_enabled", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_enabled", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_name", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_enabled", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_auralization_mode", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_auralization_mode", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_parameters", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_parameters", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_hrir", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_hrir", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_volume", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_volume", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "is_listener_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_position", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_position", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_orientation_vu", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_orientation_vu", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_orientation_q", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_orientation_q", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_real_world_position", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_real_world_position", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_real_world_orientation_vu", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_real_world_orientation_vu", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_listener_real_world_orientation_q", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_real_world_orientation_q", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },

	{ "load_scene", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "is_scene_loaded", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_scene_info", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_listener_real_world_orientation_q", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_portal_ids", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_portal_name", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_portal_name", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_portal_state", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_portal_state", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },

	{ "get_rendering_modules", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_rendering_module_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "is_rendering_module_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_rendering_module_gain", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_rendering_module_gain", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },

	{ "get_reproduction_modules", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_reproduction_module_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "is_reproduction_module_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_reproduction_module_gain", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_reproduction_module_gain", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	
	{ "get_input_gain", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_input_gain", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "is_input_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_input_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_output_gain", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_output_gain", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "is_output_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_output_muted", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_global_auralization_mode", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_global_auralization_mode", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_active_listener", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_active_listener", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_active_listener_explicit_renderer", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_active_listener_explicit_renderer", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_core_clock", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "set_core_clock", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "substitute_macro", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "find_file_path", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_log_level_str", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "parse_auralization_mode_str", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_auralization_mode_str", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_volume_str_decibel", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "parse_playback_state_str", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_playback_state_str", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "parse_playback_action_str", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },
	{ "get_playback_action_str", ( PyCFunction ) va_not_implemented, METH_FASTCALL, va_no_doc },

162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
	{ NULL,  NULL }
};

static struct PyModuleDef vamoduledef =
{
	PyModuleDef_HEAD_INIT,
	"va",
	va_module_doc,
	-1,
	va_methods,
	NULL,
	NULL,
	NULL,
	NULL
};

PyMODINIT_FUNC PyInit_va( void )
{
180 181 182 183 184 185
	PyObject* pModule = PyModule_Create( &vamoduledef );
	g_pVAError = PyErr_NewException( "va.error", NULL, NULL );
	Py_INCREF( g_pVAError );
	
	//PyAdd
	return pModule;
186
}