nvwave module
Provides a simple Python interface to playing audio using the Windows multimedia waveOut functions, as well as other useful utilities.
- nvwave.WavePlayer
alias of
WinmmWavePlayer
- nvwave.getOutputDeviceNames()
Obtain the names of all audio output devices on the system. @return: The names of all output devices on the system. @rtype: [str, …] @note: Depending on number of devices being fetched, this may take some time (~3ms)
- nvwave.outputDeviceIDToName(ID)
Obtain the name of an output device given its device ID. @param ID: The device ID. @type ID: int @return: The device name. @rtype: str
- nvwave.outputDeviceNameToID(name: str, useDefaultIfInvalid=False) int
Obtain the device ID of an output device given its name. @param name: The device name. @param useDefaultIfInvalid: C{True} to use the default device (wave mapper) if there is no such device,
C{False} to raise an exception.
@return: The device ID. @raise LookupError: If there is no such device and C{useDefaultIfInvalid} is C{False}. @note: Depending on number of devices, and the position of the device in the list, this may take some time (~3ms)
- nvwave.decide_playWaveFile = <extensionPoints.Decider object>
Notifies when a wave file is about to be played, and allows components or add-ons to decide whether the wave file should be played. For example, when controlling a remote system, the remote system must be notified of sounds played on the local system. Also, registrars should be able to suppress playing sounds if desired. Handlers are called with the same arguments as L{playWaveFile} as keyword arguments.