HOME

TheInfoList



OR:

DirectSound is a deprecated software component of the
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
DirectX Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct", ...
library for the
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
, superseded by
XAudio2 XAudio2 is a lower-level audio Application programming interface, API for Microsoft Windows, Xbox 360 and Windows Phone 8, the successor to DirectSound on Windows and a supplement to the original XAudio on the Xbox 360. XAudio2 operates through t ...
. It provides a low-latency interface to
sound card A sound card (also known as an audio card) is an internal expansion card that provides input and output of audio signals to and from a computer under the control of computer programs. The term ''sound card'' is also applied to external audio i ...
drivers written for Windows 95 through Windows XP and can handle the mixing and recording of multiple audio streams. DirectSound was originally written for Microsoft by John Miles. Besides providing the essential service of passing audio data to the sound card, DirectSound provides other essential capabilities such as recording and mixing sound, adding effects to sound (e.g.,
reverb Reverberation (also known as reverb), in acoustics, is a persistence of sound, after a sound is produced. Reverberation is created when a sound or signal is reflected causing numerous reflections to build up and then decay as the sound is abso ...
,
echo In audio signal processing and acoustics, an echo is a reflection of sound that arrives at the listener with a delay after the direct sound. The delay is directly proportional to the distance of the reflecting surface from the source and the list ...
, or
flange A flange is a protruded ridge, lip or rim (wheel), rim, either external or internal, that serves to increase shear strength, strength (as the flange of an iron beam (structure), beam such as an I-beam or a T-beam); for easy attachment/transfer of ...
), using hardware accelerated buffers in Windows 95 through XP, and positioning sounds in 3D space. DirectSound also provides a means to capture sounds from a microphone or other input and controlling capture effects during audio capture. After many years of development, today DirectSound is a mature
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
, and supplies many other useful capabilities, such as the ability to play multichannel sounds at high resolution. While DirectSound was designed to be used by games, today it is used to play audio in many audio applications.
DirectShow DirectShow (sometimes abbreviated as DS or DShow), codename Quartz, is a multimedia framework and API produced by Microsoft for software developers to perform various operations with media files or streams. It is the replacement for Microsoft's ear ...
uses DirectSound's hardware audio acceleration capabilities if the sound card's hardware audio acceleration capabilities exist and are exposed by the audio driver.


Features

DirectSound is a
user mode A modern computer operating system usually segregates virtual memory into user space and kernel space. Primarily, this separation serves to provide memory protection and hardware protection from malicious or errant software behaviour. Kernel ...
API that provides an interface between
applications Application may refer to: Mathematics and computing * Application software, computer software designed to help the user to perform specific tasks ** Application layer, an abstraction layer that specifies protocols and interface methods used in a c ...
and the
sound card A sound card (also known as an audio card) is an internal expansion card that provides input and output of audio signals to and from a computer under the control of computer programs. The term ''sound card'' is also applied to external audio i ...
driver, enabling applications to produce sounds and play back music. DirectSound was considered revolutionary when it was introduced in 1995, as it featured multiple simultaneous audio streams and allowed several applications to access the sound card simultaneously. Before that, the game developers were required to implement their own audio rendering engine in software. DirectSound provides
sample rate conversion Sample-rate conversion, sampling-frequency conversion or resampling is the process of changing the sampling rate or sampling frequency of a discrete signal to obtain a new discrete representation of the underlying continuous signal. Application ar ...
and
sound mixing Audio mixing is the process by which multiple sounds are combined into one or more channels. In the process, a source's volume level, frequency content, dynamics, and panoramic position are manipulated or enhanced. This practical, aesthetic, ...
(
volume Volume is a measure of occupied three-dimensional space. It is often quantified numerically using SI derived units (such as the cubic metre and litre) or by various imperial or US customary units (such as the gallon, quart, cubic inch). The de ...
and pan) for an unlimited number of audio sources; however, the practical limits are the number of hardware audio sources and the performance of software mixers. The DirectSound architecture features a concept of the "ring buffer" which would be continuously played in a cycle. The application programmer creates the sound buffer then continuously queries its state through the "read cursor" and updates it with the "write cursor". There are two types of buffers - a "streaming" buffer, which holds continuous sounds such as background music, and a "static" buffer which holds short sounds. On supported sound cards, DirectSound would try to use "hardware accelerated" buffers, i.e. the ones which either can be placed in local sound card memory, or can be accessed by the sound card from the system memory. If hardware acceleration is not available, DirectSound would create audio buffers in the system memory and use purely software mixing. Some late DOS-era " wavetable" sound cards such as
Sound Blaster AWE32 The Sound Blaster AWE32 is an ISA sound card from Creative Technology. It is an expansion board for PCs and is part of the Sound Blaster family of products. The Sound Blaster AWE32, introduced in March 1994, was a near full-length ISA sound c ...
and Gravis Ultrasound featured dedicated DSPs, which were borrowed from the digital music instruments. These cards featured local memory which could be used for buffering multiple audio streams and mixing them on board, thus offloading the CPU and greatly improving the sound quality. However, this was only possible in DOS by directly programming the hardware, and full-featured "hardware acceleration" from the local memory was never implemented on these cards, due to complexities of
double buffering In computer science, multiple buffering is the use of more than one buffer to hold a block of data, so that a "reader" will see a complete (though perhaps old) version of the data, rather than a partially updated version of the data being create ...
. Later cards such as
Sound Blaster Live! Sound Blaster Live! is a PCI add-on sound card from Creative Technology Limited for PCs. Moving from ISA to PCI allowed the card to dispense with onboard memory, storing digital samples in the computer's main memory and then accessing them in r ...
, Audigy and X-Fi are capable of accessing the system memory buffers directly.


DirectSound3D

DirectSound3D (DS3D) is an extension to DirectSound introduced with DirectX 3 in 1996 with the intention to standardize
3D audio 3D audio effects are a group of sound effects that manipulate the sound produced by stereo speakers, surround-sound speakers, speaker-arrays, or headphones. This frequently involves the virtual placement of sound sources anywhere in three-dimensio ...
in Windows. DirectSound3D allows software developers to utilize audio by writing once for a single audio
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
instead of rewriting code numerous times to work for each audio card vendor. In DirectX 5, DirectSound3D gained the support for sound cards that use third party 3D audio algorithms in order to
accelerate In mechanics, acceleration is the rate of change of the velocity of an object with respect to time. Accelerations are vector quantities (in that they have magnitude and direction). The orientation of an object's acceleration is given by the ...
DirectSound3D properly, through methods approved by Microsoft. In DirectX 8, DirectSound and DirectSound3D (DS3D) were officially merged and given the name DirectX Audio, however the API is still commonly referred to as DirectSound.


EAX

EAX is an extension to DirectSound and DirectSound3D which provides sound effects processing to the hardware-accelerated buffers.


OS Support


Windows 95

In Windows 95, 98 and Me, the DirectSound mixer component and the sound card drivers were both implemented as a
kernel-mode In computer science, hierarchical protection domains, often called protection rings, are mechanisms to protect data and functionality from faults (by improving fault tolerance) and malicious behavior (by providing computer security). Computer ...
VxD VxD is the device driver model used in Microsoft Windows/386 2.x, the 386 enhanced mode of Windows 3.x, Windows 9x, and to some extent also by the Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 (and higher) multitasker (TASKMGR). VxDs have acc ...
driver (Dsound.vxd), allowing direct access to the primary buffer used by the audio hardware and thus, providing the lowest possible latency between the user-mode API and the underlying hardware, but in some cases causing instability and blue screen errors. Windows 98 introduced WDM Audio and the ''Kernel Audio Mixer'' driver (
KMixer This article describes audio APIs and components in Microsoft Windows which are now obsolete or deprecated. Multimedia Extensions (MME) The MME API or the Windows Multimedia API (also known as ''WinMM'') was the first universal and standardized ...
), which enabled digital mixing, routing and processing of simultaneous audio streams with a higher quality sample rate conversion as well as kernel streaming. Under WDM, DirectSound sends data to the software-based KMixer. Windows 98 Second Edition improved WDM audio support by adding DirectSound hardware buffering, DirectSound3D hardware abstraction, KMixer sample-rate conversion (SRC) for capture streams, multichannel audio support and introduction of
DirectMusic DirectMusic is a deprecated component of the Microsoft DirectX API that allows music and sound effects to be composed and played and provides flexible interactive control over the way they are played. Architecturally, DirectMusic is a high-level se ...
. If the audio hardware supports
hardware mixing Hardware acceleration is the use of computer hardware designed to perform specific functions more efficiently when compared to software running on a general-purpose central processing unit (CPU). Any transformation of data that can be calculat ...
(also known as hardware buffering or DirectSound hardware acceleration), DirectSound buffers directly to the rendering device. If DirectSound streams use hardware mixing, KMixer and its latency delay are bypassed. On Windows 98 and Windows Me, WDM audio drivers were preferred but compatibility with VxD driver model was preserved. Although
Windows Driver Model In computing, the Windows Driver Model (WDM) also known at one point as the Win32 Driver Model is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows such a ...
(WDM) was available starting with Windows 98, few audio card manufacturers used it. Due to internal buffering, KMixer introduced significant processing latency (30 ms on then-current systems). Windows 98 also includes a WDM streaming class driver (Stream.sys) to address these real time multimedia data stream processing requirements. When the sound card uses a custom driver for use with the system supplied port class driver ''PortCls.sys'' or implements a mini-driver for use with the streaming class driver, applications can bypass the KMixer completely and use the kernel streaming interfaces instead to reduce latency.


Windows 2000/XP

In Windows 2000, Microsoft also implemented the same WDM-based audio stack on
Windows NT Windows NT is a proprietary graphical operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems sc ...
by introducing the WDM audio drivers and the kernel mixer component (
KMixer This article describes audio APIs and components in Microsoft Windows which are now obsolete or deprecated. Multimedia Extensions (MME) The MME API or the Windows Multimedia API (also known as ''WinMM'') was the first universal and standardized ...
).CakeWalk - Windows Pro Audio Roundtable
/ref> In Windows XP, Microsoft introduced another improved kernel streaming class driver, ''AVStream''. Beginning with Windows XP, hardware acceleration was also added for DirectSound capture effects processing such as
Acoustic Echo Cancellation Echo suppression and echo cancellation are methods used in telephony to improve voice quality by preventing echo from being created or removing it after it is already present. In addition to improving subjective audio quality, echo suppression i ...
for USB microphones, noise suppression and array microphone support.


Windows Vista/Windows 7

Windows Vista features a completely re-written audio stack based on the ''
Universal Audio Architecture Universal Audio Architecture (UAA) is an initiative unveiled in 2002 by Microsoft to standardize the hardware and class driver architecture for audio devices in modern Microsoft Windows operating systems. Three classes of audio devices are support ...
''. Because of the architectural changes in the redesigned audio stack, a direct path from DirectSound to the audio drivers does not exist. DirectSound,
DirectMusic DirectMusic is a deprecated component of the Microsoft DirectX API that allows music and sound effects to be composed and played and provides flexible interactive control over the way they are played. Architecturally, DirectMusic is a high-level se ...
and other APIs such as MME are emulated as
WASAPI Windows Vista (formerly codenamed Windows "Longhorn") has many significant new features compared with previous Microsoft Windows versions, covering most aspects of the operating system. In addition to the new user interface, security capabilities ...
Session instances. DirectSound runs in emulation mode on the Microsoft software mixer. The emulator does not have hardware abstraction, so there is no hardware DirectSound acceleration, meaning hardware and software relying on DirectSound acceleration may have degraded performance. It's likely a supposed performance hit might not be noticeable, depending on the application and actual system hardware. In the case of hardware
3D audio effect 3D audio effects are a group of sound effects that manipulate the sound produced by stereo speakers, surround-sound speakers, speaker-arrays, or headphones. This frequently involves the virtual placement of sound sources anywhere in three-dimensio ...
s played using DirectSound3D, they will not be playable; this also breaks compatibility with EAX extensions.Creative Technology - Support - Audio in Windows Vista
/ref> Third-party APIs such as
ASIO ''Asio'' is a genus of typical owls, or true owls, in the family Strigidae. This group has representatives over most of the planet, and the short-eared owl is one of the most widespread of all bird species, breeding in Europe, Asia, North and S ...
and
OpenAL OpenAL (Open Audio Library) is a cross-platform audio application programming interface (API). It is designed for efficient rendering of multichannel three-dimensional positional audio. Its API style and conventions deliberately resemble those ...
are not affected by these architectural changes in Windows Vista, as they use
IOCtl In computing, ioctl (an abbreviation of input/output control) is a system call for device-specific input/output operations and other operations which cannot be expressed by regular system calls. It takes a parameter specifying a request code; th ...
to interface directly with the audio driver. A solution for applications that wish to take advantage of hardware accelerated high-quality 3D positional audio is to use OpenAL. However, this only works if the manufacturer provides an OpenAL driver for their hardware.


Windows 8

WASAPI Windows Vista (formerly codenamed Windows "Longhorn") has many significant new features compared with previous Microsoft Windows versions, covering most aspects of the operating system. In addition to the new user interface, security capabilities ...
audio stack in
Windows 8 Windows 8 is a major release of the Windows NT operating system developed by Microsoft. It was Software release life cycle#Release to manufacturing (RTM), released to manufacturing on August 1, 2012; it was subsequently made available for downl ...
introduces support for "hardware offloading" of multiple audio streams to the audio card for mixing and effect processing, in addition to the software processing introduced in Vista,Audio Offloading: Exposing Hardware-Offloaded Audio Processing in Windows
/ref>Windows Driver Kit - Windows Developer Preview - New for Audio Drivers
/ref> however the functionality is only exposed for
Windows Runtime Windows Runtime (WinRT) is a platform-agnostic component and application architecture first introduced in Windows 8 and Windows Server 2012 in 2012. It is implemented in C++ and officially supports development in C++ (via C++/WinRT, C++/CX or WR ...
apps. DirectSound's and
DirectMusic DirectMusic is a deprecated component of the Microsoft DirectX API that allows music and sound effects to be composed and played and provides flexible interactive control over the way they are played. Architecturally, DirectMusic is a high-level se ...
's hardware interfaces to sound card drivers are not implemented.


Windows CE

Although DirectSound support was available in
Windows CE Windows Embedded Compact, formerly Windows Embedded CE, Windows Powered and Windows CE, is an operating system subfamily developed by Microsoft as part of its Windows Embedded family of products. Unlike Windows Embedded Standard, which is base ...
versions up to 4.2, it was removed starting 5.0. Windows CE 6.0 also does not support DirectSound, instead favoring that applications be rewritten to use the Waveform Audio API.


Replacement implementations

After the removal of DirectSound in Windows Vista, a few replacement implementations have appeared. Sound Blaster's ''Creative ALchemy'' (2007) provides hardware acceleration of DirectSound3D and Audio Effects, such as EAX. Creative ALchemy intercepts calls to DirectSound3D and translates them into OpenAL calls to be processed by supported hardware such as
Sound Blaster X-Fi Sound Blaster X-Fi is a lineup of sound cards in Creative Technology's Sound Blaster series. History The series was launched in August 2005 as a lineup of PCI sound cards, which served as the introduction for their X-Fi audio processing chip ...
and
Sound Blaster Audigy Sound Blaster Audigy is a product line of sound cards from Creative Technology. The flagship model of the Audigy family used the EMU10K2 audio DSP, an improved version of the SB-Live's EMU10K1, while the value/SE editions were built with a less ...
. For software-based Creative audio solutions, ALchemy utilizes its built-in 3D audio engine without using OpenAL at all.
Realtek Realtek Semiconductor Corp () is a fabless semiconductor company situated in the Hsinchu Science Park, Hsinchu, Taiwan. Realtek was founded in October 1987 and subsequently listed on the Taiwan Stock Exchange in 1998. Realtek currently manufactu ...
, a manufacturer of integrated HD audio codecs, has a product similar to ALchemy called 3D SoundBack.
C-Media C-Media Electronics, Inc. () is a Taiwan computer hardware company that manufactures processors for PC audio and USB storage, and wireless audio devices. Products ISA audio * CMI8328 * CMI8330 PCI audio * CMI8338 * CMI8738-SX * CMI873 ...
, a manufacturer of PC
sound card A sound card (also known as an audio card) is an internal expansion card that provides input and output of audio signals to and from a computer under the control of computer programs. The term ''sound card'' is also applied to external audio i ...
chipsets, also has a solution called Xear3D EX, although it works instead by intercepting DirectSound3D calls transparently in the background without any user intervention. IndirectSound is a freeware library that emulates DirectSound 3D using XAudio2, without using hardware acceleration.IndirectSound
/ref>


See also

*
DirectMusic DirectMusic is a deprecated component of the Microsoft DirectX API that allows music and sound effects to be composed and played and provides flexible interactive control over the way they are played. Architecturally, DirectMusic is a high-level se ...
*
OpenAL OpenAL (Open Audio Library) is a cross-platform audio application programming interface (API). It is designed for efficient rendering of multichannel three-dimensional positional audio. Its API style and conventions deliberately resemble those ...
*
Windows Vista audio architecture Windows Vista (formerly codenamed Windows "Longhorn") has many significant new features compared with previous Microsoft Windows versions, covering most aspects of the operating system. In addition to the new user interface, security capabilities, ...
*
Windows legacy audio components This article describes audio APIs and components in Microsoft Windows which are now obsolete or deprecated. Multimedia Extensions (MME) The MME API or the Windows Multimedia API (also known as ''WinMM'') was the first universal and standardized W ...
*
DirectX plugin In computer music and professional audio creation, a DirectX plugin is a software processing component that can be loaded as a plugin into ''host applications'' to allow real-time processing, audio effects, mixing audio or act as virtual synthesize ...
*
Cross-platform Audio Creation Tool Cross-platform Audio Creation Tool (XACT) is an audio programming library and engine released by Microsoft as part of the DirectX Software development kit, SDK. It is a high-level audio library for authoring/playing audio that is written to use ''X ...
*
XAudio2 XAudio2 is a lower-level audio Application programming interface, API for Microsoft Windows, Xbox 360 and Windows Phone 8, the successor to DirectSound on Windows and a supplement to the original XAudio on the Xbox 360. XAudio2 operates through t ...


References


External links


MSDN DirectSoundWhat's the deal with 3D sound under DirectXAudio in Windows VistaCreative ALchemy

Glossary:Sound card
on PC Gaming Wiki, with notes on DirectSound replacements {{DEFAULTSORT:Directsound Application programming interfaces Audio libraries Sound DirectSound Music software plugin architectures Windows audio