":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)
"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)
":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)
"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)
"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).");
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;
}
":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)
":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)
"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)
"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)
":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)
":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)
":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)
"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).");
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;
}
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)
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.");
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 *
"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)
":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)
"pause()\n\n"
"Pauses playback.\n\n"
":return: Whether the action succeeded.\n"
- ":rtype: boolean");
+ ":rtype: bool");
static PyObject *
Handle_pause(Handle *self)
"resume()\n\n"
"Resumes playback.\n\n"
":return: Whether the action succeeded.\n"
- ":rtype: boolean");
+ ":rtype: bool");
static PyObject *
Handle_resume(Handle *self)
"stop()\n\n"
"Stops playback.\n\n"
":return: Whether the action succeeded.\n"
- ":rtype: boolean");
+ ":rtype: bool");
static PyObject *
Handle_stop(Handle *self)
"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)
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;
}