[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31004] branches/soc-2010-nexyon/intern/ audaspace/Python/AUD_PyAPI.cpp: Audaspace Py API: Getting rid of unnecessary forward declarations.
Joerg Mueller
nexyon at gmail.com
Tue Aug 3 10:30:49 CEST 2010
Revision: 31004
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31004
Author: nexyon
Date: 2010-08-03 10:30:49 +0200 (Tue, 03 Aug 2010)
Log Message:
-----------
Audaspace Py API: Getting rid of unnecessary forward declarations.
Modified Paths:
--------------
branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp
Modified: branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp
===================================================================
--- branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp 2010-08-03 08:12:55 UTC (rev 31003)
+++ branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp 2010-08-03 08:30:49 UTC (rev 31004)
@@ -136,322 +136,7 @@
":rtype: aud.Sound");
static PyObject *
-Sound_sine(PyObject* nothing, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_file_doc,
- "file(filename)\n\n"
- "Creates a sound object of a sound file.\n\n"
- ":arg filename: Path of the file.\n"
- ":type filename: string\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound");
-
-static PyObject *
-Sound_file(PyObject* nothing, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_lowpass_doc,
- "lowpass(frequency[, Q])\n\n"
- "Creates a second order lowpass filter.\n\n"
- ":arg frequency: The cut off trequency of the lowpass.\n"
- ":type frequency: float\n"
- ":arg Q: Q factor of the lowpass.\n"
- ":type Q: float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound");
-
-static PyObject *
-Sound_lowpass(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_delay_doc,
- "delay(time)\n\n"
- "Delays a sound by playing silence before the sound starts.\n\n"
- ":arg time: How many seconds of silence should be added before the sound.\n"
- ":type time: float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound");
-
-static PyObject *
-Sound_delay(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_join_doc,
- "join(sound)\n\n"
- "Plays two sounds in sequence.\n\n"
- ":arg sound: The sound to play second.\n"
- ":type sound: aud.Sound\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound\n\n"
- ".. note:: The two sounds have to have the same specifications "
- "(channels and samplerate).");
-
-static PyObject *
-Sound_join(Sound* self, PyObject* object);
-
-PyDoc_STRVAR(M_aud_Sound_highpass_doc,
- "highpass(frequency[, Q])\n\n"
- "Creates a second order highpass filter.\n\n"
- ":arg frequency: The cut off trequency of the highpass.\n"
- ":type frequency: float\n"
- ":arg Q: Q factor of the lowpass.\n"
- ":type Q: float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound");
-
-static PyObject *
-Sound_highpass(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_limit_doc,
- "limit(start, end)\n\n"
- "Limits a sound within a specific start and end time.\n\n"
- ":arg start: Start time in seconds.\n"
- ":type start: float\n"
- ":arg end: End time in seconds.\n"
- ":type end: float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound");
-
-static PyObject *
-Sound_limit(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_pitch_doc,
- "pitch(factor)\n\n"
- "Changes the pitch of a sound with a specific factor.\n\n"
- ":arg factor: The factor to change the pitch with.\n"
- ":type factor: float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound\n\n"
- ".. note:: This is done by changing the sample rate of the "
- "underlying sound, which has to be an integer, so the factor "
- "value rounded and the factor may not be 100 % accurate.");
-
-static PyObject *
-Sound_pitch(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_volume_doc,
- "volume(volume)\n\n"
- "Changes the volume of a sound.\n\n"
- ":arg volume: The new volume..\n"
- ":type volume: float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound\n\n"
- ".. note:: Should be in the range [0, 1] to avoid clipping.\n\n"
- ".. note:: This is a filter function, you might consider using "
- "aud.Handle.pitch instead.");
-
-static PyObject *
-Sound_volume(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_fadein_doc,
- "fadein(start, length)\n\n"
- "Fades a sound in.\n\n"
- ":arg start: Time in seconds when the fading should start.\n"
- ":type start: float\n"
- ":arg length: Time in seconds how long the fading should last.\n"
- ":type length: float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound\n\n"
- ".. note:: This is a filter function, you might consider using "
- "aud.Handle.volume instead.");
-
-static PyObject *
-Sound_fadein(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_fadeout_doc,
- "fadeout(start, length)\n\n"
- "Fades a sound out.\n\n"
- ":arg start: Time in seconds when the fading should start.\n"
- ":type start: float\n"
- ":arg length: Time in seconds how long the fading should last.\n"
- ":type length: float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound");
-
-static PyObject *
-Sound_fadeout(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_loop_doc,
- "loop(count)\n\n"
- "Loops a sound.\n\n"
- ":arg count: How often the sound should be looped. "
- "Negative values mean endlessly.\n"
- ":type count: integer\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound");
-
-static PyObject *
-Sound_loop(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_mix_doc,
- "mix(sound)\n\n"
- "Mixes two sounds.\n\n"
- ":arg sound: The sound to mix over the other.\n"
- ":type sound: aud.Sound\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound\n\n"
- ".. note:: The two sounds have to have the same specifications "
- "(channels and samplerate).");
-
-static PyObject *
-Sound_mix(Sound* self, PyObject* object);
-
-PyDoc_STRVAR(M_aud_Sound_pingpong_doc,
- "pingpong()\n\n"
- "Plays a sound forward and then backward.\n\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound\n\n"
- ".. note:: The sound has to be buffered to be played reverse.");
-
-static PyObject *
-Sound_pingpong(Sound* self);
-
-PyDoc_STRVAR(M_aud_Sound_reverse_doc,
- "reverse()\n\n"
- "Plays a sound reversed.\n\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound\n\n"
- ".. note:: The sound has to be buffered to be played reverse.");
-
-static PyObject *
-Sound_reverse(Sound* self);
-
-PyDoc_STRVAR(M_aud_Sound_buffer_doc,
- "buffer()\n\n"
- "Buffers a sound into RAM.\n\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound\n\n"
- ".. note:: Raw PCM data needs a lot of space, only buffer short sounds.");
-
-static PyObject *
-Sound_buffer(Sound* self);
-
-PyDoc_STRVAR(M_aud_Sound_square_doc,
- "squre([threshold = 0])\n\n"
- "Makes a square wave out of an audio wave.\n\n"
- ":arg threshold: Threshold value over which an amplitude counts non-zero.\n"
- ":type threshold: float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound");
-
-static PyObject *
-Sound_square(Sound* self, PyObject* args);
-
-PyDoc_STRVAR(M_aud_Sound_filter_doc,
- "filter(b[, a = (1)])\n\n"
- "Filters a sound with the supplied IIR filter coefficients.\n\n"
- ":arg b: The nominator filter coefficients.\n"
- ":type b: sequence of float\n"
- ":arg a: The denominator filter coefficients.\n"
- ":type a: sequence of float\n"
- ":return: The created aud.Sound object.\n"
- ":rtype: aud.Sound");
-
-static PyObject *
-Sound_filter(Sound* self, PyObject* args);
-
-static PyMethodDef Sound_methods[] = {
- {"sine", (PyCFunction)Sound_sine, METH_VARARGS | METH_STATIC,
- M_aud_Sound_sine_doc
- },
- {"file", (PyCFunction)Sound_file, METH_VARARGS | METH_STATIC,
- M_aud_Sound_file_doc
- },
- {"lowpass", (PyCFunction)Sound_lowpass, METH_VARARGS,
- M_aud_Sound_lowpass_doc
- },
- {"delay", (PyCFunction)Sound_delay, METH_VARARGS,
- M_aud_Sound_delay_doc
- },
- {"join", (PyCFunction)Sound_join, METH_O,
- M_aud_Sound_join_doc
- },
- {"highpass", (PyCFunction)Sound_highpass, METH_VARARGS,
- M_aud_Sound_highpass_doc
- },
- {"limit", (PyCFunction)Sound_limit, METH_VARARGS,
- M_aud_Sound_limit_doc
- },
- {"pitch", (PyCFunction)Sound_pitch, METH_VARARGS,
- M_aud_Sound_pitch_doc
- },
- {"volume", (PyCFunction)Sound_volume, METH_VARARGS,
- M_aud_Sound_volume_doc
- },
- {"fadein", (PyCFunction)Sound_fadein, METH_VARARGS,
- M_aud_Sound_fadein_doc
- },
- {"fadeout", (PyCFunction)Sound_fadeout, METH_VARARGS,
- M_aud_Sound_fadeout_doc
- },
- {"loop", (PyCFunction)Sound_loop, METH_VARARGS,
- M_aud_Sound_loop_doc
- },
- {"mix", (PyCFunction)Sound_mix, METH_O,
- M_aud_Sound_mix_doc
- },
- {"pingpong", (PyCFunction)Sound_pingpong, METH_NOARGS,
- M_aud_Sound_pingpong_doc
- },
- {"reverse", (PyCFunction)Sound_reverse, METH_NOARGS,
- M_aud_Sound_reverse_doc
- },
- {"buffer", (PyCFunction)Sound_buffer, METH_NOARGS,
- M_aud_Sound_buffer_doc
- },
- {"square", (PyCFunction)Sound_square, METH_VARARGS,
- M_aud_Sound_square_doc
- },
- {"filter", (PyCFunction)Sound_filter, METH_VARARGS,
- M_aud_Sound_filter_doc
- },
- {NULL} /* Sentinel */
-};
-
-PyDoc_STRVAR(M_aud_Sound_doc,
- "Sound objects are immutable and represent a sound that can be "
- "played simultaneously multiple times.");
-
-static PyTypeObject SoundType = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "aud.Sound", /* tp_name */
- sizeof(Sound), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Sound_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- M_aud_Sound_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- Sound_methods, /* tp_methods */
- 0, /* tp_members */
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list