Lines Matching defs:sound
22 # Play sound from control panel settings
43 "PlaySound(sound, flags) - play a sound\n"
44 "SND_FILENAME - sound is a wav file name\n"
45 "SND_ALIAS - sound is a registry sound association name\n"
46 "SND_LOOP - Play the sound repeatedly; must also specify SND_ASYNC\n"
47 "SND_MEMORY - sound is a memory image of a wav file\n"
48 "SND_PURGE - stop all instances of the specified sound\n"
50 "SND_NODEFAULT - Do not play a default beep if the sound can not be found\n"
52 "SND_NOWAIT - Return immediately if the sound driver is busy\n" // Without any errors
67 sound: object
68 The sound to play; a filename, data, or None.
76 winsound_PlaySound_impl(PyObject *module, PyObject *sound, int flags)
83 if (sound == Py_None) {
93 if (PyObject_GetBuffer(sound, &view, PyBUF_SIMPLE) < 0) {
98 if (!PyUnicode_Check(sound)) {
100 "'sound' must be str or None, not '%s'",
101 Py_TYPE(sound)->tp_name);
104 wsound = PyUnicode_AsWideCharString(sound, NULL);
116 } else if (sound != Py_None) {
120 PyErr_SetString(PyExc_RuntimeError, "Failed to play sound");
130 Frequency of the sound in hertz.
133 How long the sound should play, in milliseconds.