C++/VB - DirectSound and grabbing samples

Asked By ziddiri4
01-Jun-08 05:00 PM
Hi,
I'm trying to implement a spectrum of the capturing audio with
DirectSound. I could capture data to a buffer with CaptureBuffer
class. I know fft algorithms and other things to implement a spectrum.
But there is a little problem. How can I grap samples from captured
data in the memory buffer stream? I need an array of the samples from
captured buffer. if I get the array of samples, I can apply my fft
algorithm and generate the spectrum.

I use Managed DirectSound, but an unmanaged code fits me, too. Any
help appreciated.

Regards..
DirectSoundCapture
(1)
RecordCapturedData
(1)
CaptureBuffer
(1)
DirectSound
(1)
InstallDir
(1)
DirectX
(1)
Spectrum
(1)
Audio
(1)
  Shugo_Ishida replied...
02-Jun-08 02:08 AM
Did you check the DirectSoundCapture of the DirectX SDK sample?

(InstallDir)\Samples\C++\DirectSound\CaptureSound

ESP, RecordCapturedData() function in capturesound.cpp:930
Create New Account
help
understanding is wrong. Regards, Elza Win32 DirectX Video Discussions Vista (1) AecSDKDemo (1) DirectShow (1) DirectSound (1) Boekelheide (1) Providenza (1) Windows (1) Elza (1) You cannot. The AEC DMO cannot be used in a DirectShow graph. It can only be used by itself, or with DirectSound. - - Tim Roberts, timr@probo.com Providenza & Boekelheide, Inc. oh ! I am so sorry, my first I wish to capture echo free audio for my VOIP application. Currently I have a directSound architecture VOIP application. After I read about the 'Voice Capture DMO' and its ability of AEC, I thought I shall move from DirectSound audio capture to DirectShow Audio capture for my VOIP. So as per what Tim has the benefit of AEC DMO? Can you please suggest how complex it will be with directsound? Also is it the Source or Filter mode that I need to start with. Thanks so, as I wrote before, use it directly on its own, outside of DirectShow or DirectSound, or write a custom DirectShow wrapper for it. No idea. It depends on what you riseoftheants dot com / / http: / / www.riseoftheants.com / mmx / faq.htm DMOs can be used with DirectSound. I have never done it, but the documentation mention that use case specifically. - - Tim Roberts, timr@probo.com Providenza & Boekelheide, Inc. From: "Tim Roberts" I believe DirectSound only supports DSP-like DMOs, that is 1 input + 1 output. - - / / Alessandro Angeli / / MVP :: DirectShow
DirectSound cursor accuracy / full duplex sync C++ / VB I’m developing an app that uses DirectSound for full-duplex recording. A user sings along with some music, and for simplicity, letâ doing now and how well it is and isn’t working: I’m using the DirectSound “play” and “capture” cursors to sync up the playback and captured audio… basically http: / / research.microsoft.com / ~dan - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Win32 DirectX Audio Discussions Vista (1) XP (1) Report (1) DirectSound (1) DirectShow (1) DirectX (1) XP… (1) I’ve (1) . . . The timing can be made running XP. However it does vary greatly depending on the sound card hardware and whether DirectSound is being emulated or supported directly by the hardware. Under Vista DirectSound is always emulated AFAIK which could make DirectSound rather inaccurate. You're kidding right? I'm trying to remember back if there was any in the original DirectX 8.0 release samples but I'm not sure. DirectSound samples aren't present at all in the current DirectX SDK releases. . . . Yes you should
DirectSound default device changes C++ / VB I'm using DirectSound for capture and playback in an application, and I always open the default capture and devices (through the Windows control panel) while my app is running and re-create my DirectSound handle, the device I'm playing through _doesn't_ change. It's maintaining some state DirectX Audio Discussions WPF (1) WaveOutGetDevCaps (1) DirectSoundEnumerator (1) DefaultPlayback (1) DefaultCapture (1) FreeLibrary (1) DirectSound (1) LoadLibrary (1) Hi Dan, Your application should be seeing the changes with the exception inappropriately. It's a WPF app with a large managed layer on top of unmanaged DirectSound. . . I will take a look at whether I'm preventing messages from getting to DSound matter whether you receive messages or not AFAICT. However something appears to be funky with DirectSound. As a test I ran my DirectSoundEnumerator app, which allows you to re-enumerate at will with the click of a button. The DirectSound enumeration information is getting cached and is the same for each iteration. On the other on the reload. - - http: / / www.chrisnet.net / code.htm [MS MVP for DirectShow / MediaFoundation] keywords: DirectSound, default, device, changes description: I'm using DirectSound for capture and playback in an application
know which Windows API suits best for this rather simple task. I have read about DirectSound, XACT and XAudio2 so far. The target platform is Windows XP and above. Can someone memory buffer: - waveOut (since Win3.x) http: / / msdn.microsoft.com / en-us / library / dd743678.aspx - DirectSound (since Win95) http: / / msdn.microsoft.com / en-us / library / ee416960.aspx - WASAPI (since Vista) http managing PCM buffer is quite easy). If I were you, I would use waveOut or DirectSound or, if you want a player-like API, DirectShow (but DirectShow can not play PCM Alessandro Angeli" <nob. . .@nowhere.in.the.net> Thanks a lot. I think I will use DirectSound. . . Markus Note that DirectSound is the better API choice for Windows XP, but for Windows Vista and Windows 7 but this is really intended for more sophisticated playback and requires a REDIST using DirectSetup. DirectSound and WSAPI are built into the OS, so there is no REDIST requirement. - - - - -Chuck Walbourn rights. On 23 Mrz., 19:17, "Chuck Walbourn [MSFT]" Ok, so far I have tried DirectSound and XAudio2 and both failed which is not really my fault. I have tried a that they just cannot work and you barely get any information from the crappy MSDN. - DirectSound needs a Window / Form handle for the initialization. If you do not have got such
Making a managed wrapper around DirectSound. C++ / VB Hy there, I use .NET 2.0(C#) in my applcations and now XP. I understand that that is an deprecated tehnology, so I want to switch to DirectSound. My problem is that I can ask the clients who use the application to install DirectX. My old app(written in native C++), uses DirectSound (3, I think) and it works good. Can anyone gime me some tips how to XNA Game Studio (1) Windows XP (1) XP (1) MDirectX (1) DirectSound8 (1) DirectInput (1) DirectSound (1) DirectMusic (1) waveOut is actually not 'deprecated', it just generally limited in what it can do. DirectSound is actually deprecated for game audio in favor of XACT or XAUDIO2, but it is versions of Windows. Therefore, you don't really have to worry about redisting the native DirectSound component unless you are supporting Windows XP RTM or Windows XP SP1. Managed DirectX (MDX 1.1) is a simple wrapper for DirectDraw, Direct3D9, DirectSound, DirectInput, DirectMusic, and a greatly simplified usage of DirectShow via the AVP interface. MDX 1 AS IS" with no warrenties, and confers no rights. keywords: Making, a, managed, wrapper, around, DirectSound. description: Hy there, I use .NET 2.0(C#) in my applcations and now I