, you set the volume to 50%, youThen you can get a 50% volume and use directsound to play the video. If you set the volume to 50%, you only get the most25% of the total volume. Solution: Do not use waveout and set the volume to the maximum value in the Windows volume control..Q is the quality of sound output between directsound and waveout different?A1 in win2kxp (or using a WDM
-bit Windows operating system. Directsound supports mixing of multiple audio streams, independent volume control, hardware acceleration layer, and hardware simulation layer (if some functional hardware cannot be supported, you can use software for simulation, so programmers don't have to worry that their new l33t code won't work on the old voice card 16 ). In general, as long as your operating system has installed the appropriate sound card
Directsound capturing microphone PCM Data encapsulation class
There are many ways to read PCM data from a microphone on the Internet. I just released a directsound microphone PCM Data Collection class I wrote here. Through this class, we can easily use directsound technology to collect microphone data, developers do no
This document records the techniques used by directsound to play audio. Directsound is the most common Audio Playback Technology in windows. Currently, most audio playback applications use directsound. This article records an example of using directsound to play PCM.
Note: A dear friend has reminded me that
also allows voice from other applications (such as IP Phones) to be heard together with the voice in the game.
Write master buffer collaboration level
The highest level of collaboration is the write master buffer (DSSCL_WRITEPRIMARY ). When using this cooperative level DirectSound device, your application can directly access the primary buffer of a non-WDM driver. In this mode, the application must direc
Use WAV data
In a Windows Driver Model (WDM), The directsound hardware buffer can play any uncompressed or compressed sound formats which can be described by a waveformatex or waveformatextensible structure and supported by hardware. The software buffer and non-WDM hardware buffer only support 8-bit and 16-bit uncompressed formats.
Waveform (WAV) data is usually stored in files or resources in the Resou
Example 8: DirectSound PCM and directsoundpcmThis document records the techniques used by DirectSound to play audio. DirectSound is the most common Audio Playback Technology in Windows. Currently, most audio playback applications use DirectSound. This article records an example of using
Document directory
The structure of the Wrapper class
Directsound object in the Wrapper class
Primary Buffer
Second Buffer
Timer event
Download source files and test program-376 KB
Introduction
This article focuses on giving an example of using the DirectX API in PC game software development by using a directsound Wrapper class.The directsound Wrapper clas
Tags: des Io ar OS use the for SP file Div
Assume that you only use the playsound () API function to express the sound effect, so the sound mixing effect cannot be displayed. Since playsound has a sound during playback, it will definitely cause the current sound to stop. Therefore
Playsound () is unrealistic to build a game world that includes rich music and sound effects.While directsound can perfectly solve the sound mixing problem, and it direc
C # Inside the socket has asynchronous and synchronous points, can refer to: Https://docs.microsoft.com/en-us/dotnet/framework/network-programming/socket-code-examples to learn. Many examples of DirectSound socket sound collection on the network, but are a separate tool class (such as: Directsoundcapture), took a bit of time to implement the socket call, by the way sum up share. The following illustration is a test example:
Socket Client
Using System
Directsound Device
The directsound device object represents a playback device, which is used to manage devices and create sound buffers.
Multiple applicationsProgramAllows you to create objects for the same sound device. When the input is concentrated on changes between applications, the audio output is automatically transferred from one application to another. Therefore, when the input is concentrat
Assuming that only the PlaySound () API function is used to represent sound effects, it is not possible to show the sound mixing effect, as playsound will inevitably cause the existing sound to stop as it plays a sound. Therefore, usingPlaySound () It is unrealistic to build a game world that includes a rich music and sound effect.DirectSound is able to solve the mixing problem perfectly, and it directly aims at hardware programming, minimizing the effect of game process logic on sound playback.
effect of this mixing method is as follows:AlgorithmThere is a lot of relationship, but if we use directsound for sound mixing, it will be much simpler. We only need to pass the content we want to mix to it, and directsound will automatically mix internally. Next we will go to directsound sound mixing programming.
Before learning about how
DirectSound Method for WAVE file operationsAlthough the call is simple and the function is powerful, it can meet the basic needs of audio file processing, however, it also has its disadvantages, that is, it can only play one WAVE file at a time, sometimes in practical applications, when two or more WAVE files need to be played at the same time to achieve sound mixing effect, you need to use the DirectSound
Using WAV data
In Windows drive Model (WDM), the DirectSound hardware buffer can play any uncompressed or compressed sound format that can be described by a waveformatex or waveformatextensible structure and supported by hardware. Software buffers and non-WDM hardware buffers support only 8-bit and 16-bit uncompressed formats.
Waveform (WAV) data is typically stored in a file or resource in a resource Interchange File format (RIFF). The data include
Directsound Buffer
The directsound buffer object controls the propagation of waveform data from the source to the destination. The source may be a synthesizer, another synthesizer, a WAV file, or a resource. For most synthesizer, the destination is a hybrid device called the main buffer zone. Data is transmitted from the primary buffer to the hardware, which converts sampling to acoustic waves.
Buffer b
Adding music is the simplest of all methods to enhance application functionality. Music can make users happy, and playing the right music on the right occasions can make the programmer and his VC program glow.
----The Microsoft Windows Multimedia API provides three ways to play WAV files:
PlaySound () function. It can be encoded in a single line to play the sound of the wave format. This function has two limitations: the sound data must be fully loaded into physical memory, and the data format
Today, we will use C # To develop the directsound application (under vs2010). According to the online description:
But I cannot find it in the system. I am sure that the directx9.0sdk is installed, because the development in C ++ is good.
Finally, we can see that the example of dircetsdk contains C #. Check the reference location and add the reference through browsing:
DirectX in:
C:/Windows/ASSEMBLY/GAC/Microsoft. DirectX/1.0.900.0 _ 31bf385
Many friends on the Internet have introduced how to use DirectSound to play sound in C. I tried it myself today and found that it is really easy for beginners. You only need a few short lines of code. The key is only four sentences or so, and the code is OK.
As follows:
Platform: VS. NET 2005, DirectX SDK (June 2008)
External DLL to be referenced: Microsoft. DirectX. dll and Microsoft. DirectX. DirectSound
Currently, Delphi (2010, Xe) has built-in DirectX-related units (... \ source \ RTL \ win \).
// Enumeration function directsoundenumerate (lpdsenumcallback: tdsenumcallback; // callback function lpcontext: pointer // user pointer): hresult; stdcall; // return an errorCodeIf the call is successful, the original form of the callback function required by ds_ OK (0) // directsoundenumerate is returned: tdsenumcallback = function (lpguid: pguid; // The GUID of the device, lpcstrdescription
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.