[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31070] branches/soc-2010-nexyon/intern/ audaspace: Audaspace Py API: Improving Docs (Crosslinks, etc).

Joerg Mueller nexyon at gmail.com
Thu Aug 5 17:50:36 CEST 2010


Revision: 31070
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31070
Author:   nexyon
Date:     2010-08-05 17:50:36 +0200 (Thu, 05 Aug 2010)

Log Message:
-----------
Audaspace Py API: Improving Docs (Crosslinks, etc).

Modified Paths:
--------------
    branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp
    branches/soc-2010-nexyon/intern/audaspace/Python/doc/createdocs.py
    branches/soc-2010-nexyon/intern/audaspace/Python/doc/doctree.py
    branches/soc-2010-nexyon/intern/audaspace/Python/doc/examples/aud.Device.lock.py
    branches/soc-2010-nexyon/intern/audaspace/Python/doc/examples/aud.Factory.filter.py
    branches/soc-2010-nexyon/intern/audaspace/Python/doc/examples/tetris.py
    branches/soc-2010-nexyon/intern/audaspace/Python/doc/templates/Layout.rst
    branches/soc-2010-nexyon/intern/audaspace/intern/AUD_C-API.cpp

Modified: branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp
===================================================================
--- branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp	2010-08-05 15:25:24 UTC (rev 31069)
+++ branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp	2010-08-05 15:50:36 UTC (rev 31070)
@@ -132,8 +132,8 @@
 			 ":type frequency: float\n"
 			 ":arg rate: The sampling rate in Hz.\n"
 			 ":type rate: int\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_sine(PyTypeObject* type, PyObject* args)
@@ -169,8 +169,8 @@
 			 "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.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_file(PyTypeObject* type, PyObject* args)
@@ -207,8 +207,8 @@
 			 ":type frequency: float\n"
 			 ":arg Q: Q factor of the lowpass.\n"
 			 ":type Q: float\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_lowpass(Factory* self, PyObject* args)
@@ -247,8 +247,8 @@
 			 "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.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_delay(Factory* self, PyObject* args)
@@ -285,9 +285,9 @@
 			 "join(sound)\n\n"
 			 "Plays two sounds in sequence.\n\n"
 			 ":arg sound: The sound to play second.\n"
-			 ":type sound: aud.Factory\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory\n\n"
+			 ":type sound: :class:`Factory`\n"
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`\n\n"
 			 ".. note:: The two sounds have to have the same specifications "
 			 "(channels and samplerate).");
 
@@ -298,7 +298,7 @@
 
 	if(!PyObject_TypeCheck(object, type))
 	{
-		PyErr_SetString(PyExc_TypeError, "Object has to be of type aud.Factory!");
+		PyErr_SetString(PyExc_TypeError, "Object has to be of type Factory!");
 		return NULL;
 	}
 
@@ -332,8 +332,8 @@
 			 ":type frequency: float\n"
 			 ":arg Q: Q factor of the lowpass.\n"
 			 ":type Q: float\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_highpass(Factory* self, PyObject* args)
@@ -374,8 +374,8 @@
 			 ":type start: float\n"
 			 ":arg end: End time in seconds.\n"
 			 ":type end: float\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_limit(Factory* self, PyObject* args)
@@ -413,13 +413,13 @@
 			 "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.Factory object.\n"
-			 ":rtype: aud.Factory\n\n"
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`\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.\n\n"
 			 ".. note:: This is a filter function, you might consider using "
-			 "aud.Handle.pitch instead.");
+			 "Handle.pitch instead.");
 
 static PyObject *
 Factory_pitch(Factory* self, PyObject* args)
@@ -457,11 +457,11 @@
 			 "Changes the volume of a sound.\n\n"
 			 ":arg volume: The new volume..\n"
 			 ":type volume: float\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory\n\n"
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`\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.volume instead.");
+			 "Handle.volume instead.");
 
 static PyObject *
 Factory_volume(Factory* self, PyObject* args)
@@ -501,8 +501,8 @@
 			 ":type start: float\n"
 			 ":arg length: Time in seconds how long the fading should last.\n"
 			 ":type length: float\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_fadein(Factory* self, PyObject* args)
@@ -542,8 +542,8 @@
 			 ":type start: float\n"
 			 ":arg length: Time in seconds how long the fading should last.\n"
 			 ":type length: float\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_fadeout(Factory* self, PyObject* args)
@@ -582,8 +582,8 @@
 			 ":arg count: How often the sound should be looped. "
 			 "Negative values mean endlessly.\n"
 			 ":type count: integer\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_loop(Factory* self, PyObject* args)
@@ -620,9 +620,9 @@
 			 "mix(sound)\n\n"
 			 "Mixes two sounds.\n\n"
 			 ":arg sound: The sound to mix over the other.\n"
-			 ":type sound: aud.Factory\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory\n\n"
+			 ":type sound: :class:`Factory`\n"
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`\n\n"
 			 ".. note:: The two sounds have to have the same specifications "
 			 "(channels and samplerate).");
 
@@ -633,7 +633,7 @@
 
 	if(!PyObject_TypeCheck(object, type))
 	{
-		PyErr_SetString(PyExc_TypeError, "Object is not of type aud.Factory!");
+		PyErr_SetString(PyExc_TypeError, "Object is not of type Factory!");
 		return NULL;
 	}
 
@@ -662,8 +662,8 @@
 PyDoc_STRVAR(M_aud_Factory_pingpong_doc,
 			 "pingpong()\n\n"
 			 "Plays a sound forward and then backward.\n\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_pingpong(Factory* self)
@@ -694,8 +694,8 @@
 PyDoc_STRVAR(M_aud_Factory_reverse_doc,
 			 "reverse()\n\n"
 			 "Plays a sound reversed.\n\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory\n\n"
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`\n\n"
 			 ".. note:: The sound has have a finite length and be seekable. "
 			 "It's recommended to buffer sounds that should be played reversed.");
 
@@ -728,8 +728,8 @@
 PyDoc_STRVAR(M_aud_Factory_buffer_doc,
 			 "buffer()\n\n"
 			 "Buffers a sound into RAM.\n\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory\n\n"
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`\n\n"
 			 ".. note:: Raw PCM data needs a lot of space, only buffer short sounds.");
 
 static PyObject *
@@ -760,8 +760,8 @@
 			 "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.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_square(Factory* self, PyObject* args)
@@ -801,8 +801,8 @@
 			 ":type b: sequence of float\n"
 			 ":arg a: The denominator filter coefficients.\n"
 			 ":type a: sequence of float\n"
-			 ":return: The created aud.Factory object.\n"
-			 ":rtype: aud.Factory");
+			 ":return: The created :class:`Factory` object.\n"
+			 ":rtype: :class:`Factory`");
 
 static PyObject *
 Factory_filter(Factory* self, PyObject* args)
@@ -1001,7 +1001,7 @@
 			 "pause()\n\n"
 			 "Pauses playback.\n\n"
 			 ":return: Whether the action succeeded.\n"
-			 ":rtype: boolean");
+			 ":rtype: bool");
 
 static PyObject *
 Handle_pause(Handle *self)
@@ -1028,7 +1028,7 @@
 			 "resume()\n\n"
 			 "Resumes playback.\n\n"
 			 ":return: Whether the action succeeded.\n"
-			 ":rtype: boolean");
+			 ":rtype: bool");
 
 static PyObject *
 Handle_resume(Handle *self)
@@ -1055,7 +1055,7 @@
 			 "stop()\n\n"
 			 "Stops playback.\n\n"
 			 ":return: Whether the action succeeded.\n"
-			 ":rtype: boolean");
+			 ":rtype: bool");
 
 static PyObject *
 Handle_stop(Handle *self)
@@ -2223,11 +2223,11 @@
 			 "play(sound[, keep])\n\n"
 			 "Plays a sound.\n\n"
 			 ":arg sound: The sound to play.\n"
-			 ":type sound: aud.Factory\n"
+			 ":type sound: :class:`Factory`\n"
 			 ":arg keep: Whether the sound should be kept paused in the device when its end is reached.\n"
-			 ":type keep: boolean\n"
+			 ":type keep: bool\n"
 			 ":return: The playback handle.\n"
-			 ":rtype: aud.Handle");
+			 ":rtype: :class:`Handle`");
 
 static PyObject *
 Device_play(Device *self, PyObject *args, PyObject *kwds)
@@ -2244,7 +2244,7 @@
 
 	if(!PyObject_TypeCheck(object, &FactoryType))
 	{
-		PyErr_SetString(PyExc_TypeError, "Object is not of type aud.Factory!");
+		PyErr_SetString(PyExc_TypeError, "Object is not of type Factory!");
 		return NULL;
 	}
 

Modified: branches/soc-2010-nexyon/intern/audaspace/Python/doc/createdocs.py
===================================================================
--- branches/soc-2010-nexyon/intern/audaspace/Python/doc/createdocs.py	2010-08-05 15:25:24 UTC (rev 31069)
+++ branches/soc-2010-nexyon/intern/audaspace/Python/doc/createdocs.py	2010-08-05 15:50:36 UTC (rev 31070)
@@ -22,19 +22,12 @@
 
 sys.path.append('.')
 
-import aud
+import aud, mathutils, blf, bgl, geometry, bpy
 import doctree
 
 from mako.template import Template
 from mako.lookup import TemplateLookup
 
-module = doctree.Module('aud', aud)
-

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list