DCDUtils is an helper module writen for DigitalCD but can be useful for other sound players and for sound visualization tools.
The module offers SWIs for extracting sound wave buffers, performing frequency analysis and interfaces between players and plug-ins/visualization tools.
Included in DigitalCD (!DIgitalCD.RMStore,DCDUtils).
Version 0.31, 2009-01-20
- FFT,slight reordering of instructions.
- Added description of DigitalCD_Misc WIMP message in Doc.
- Added description of DCDLib BASIC library.
- Possibility to switch between desktop and full screen plugin by using PlugInInfo swi.
- SWI FillBuffer output is much to high since 0.29.
Version 0.29, 2004-05-02
- New ListPlayers SWI, FFT code uses less memory.
DCDUtils is able to extract sound data from the following sources:
- SoundDMA buffers
SoundDMA is the module responsible for managing the hardware used by the Sound system. Two physical buffers in main memory are used in turn, one being decoded by the hardware while the other is being filled by applications.
DCDUtils will try to keep an internal copy of enough of these buffers in order to permit a good frequency analysis. As the module is not informed when each buffer is filled it keeps an eye on the buffers every centisecond to see if their contents changed, so it will only be accurate if the buffers are only exchanged less than 100 times per second.
SoundDriver is a module intended to provide a single common interface to the sampling of external sound sources like microphones, CDs or MIDI. As far as I know drivers are mainly available for the DMI card.
When starting, DCDUtils will get a list of drivers registered to SoundDriver and reserve an internal sound buffer for each of them. The configuration of each driver is leaved to external applications but note that the module can only cope with drivers configured to output 16-bit signed stereo.
Interfacing players and visualization tools
The module defines interfaces and protocols to follow by players and visualisation tools with these purposes in mind:
- Ability for the tools to refer to the player's parameters while sampling sound for a correct selection of the sound source and wave buffers amplitude independant from the player's volume.
- Saving and restoration of the Desktop state for full screen visualisation tools as well as deactivation of known screen savers.
- Ability for the tools to attach themselves to the player's window and follow its movements.
- Ability to check the presence of full screen plug-ins or to stop existing plug-ins.