473,890 Members | 1,350 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Possible problems capturing data with DirectX.DirectS ound


I want to capture a signal from the sound card (via microphone or line
input) using the DirectX.Sound.C aptureBuffer class. One of the
properties that can be setup prior to capturing is specifying that the
buffer is continous. This means that once the buffer is filled with
data, it wraps around and continues filling the buffer.

Where I see a potential problem has to do with the sampling speed of
the sound card against the speed of the computer.

After being informed that the buffer has now been filled, I only have
so much time to perform the Read method before the buffer begins to
fillup from the start again. If I fail to read in all the bytes from
the buffer before the new samples are read in, I can only assume that
the data being read using the Read method will eventually be overrun by
the process that fills the buffer and will eventually corrupt the older
data I need to read.

It isn't clear to me that this is how the DirectX buffer system really
works. What isn't clear is that when the Read method executes, does it
execute in parallel to the process that DirectX uses to fill the
buffer? If so and suppose the computer is fast enough, would it be safe
to say that the Read process can stay ahead of the DirectX process used
to fill the buffer?

Is there any safe way to prevent the DirectX buffer from being

Ideally I would have thought that internally, DirectX would manage
multiple buffers that are transparent to my calling application. Once
it fills a buffer, it would create a new buffer. My application could
then be running on a slower PC but that would not matter since no
buffer would be overwritten and eventually my application will get all
the data. As far as my application is concerned, it would only see one
buffer while in fact there could be multiple internal buffers.

Thanks for any info,
Johann Blake

Nov 17 '05 #1
0 1683

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Meena | last post by:
Hi, My application should have a audio recording control, which will record the audio input from a user, save the audio input as a Base64string and play it back. What objects should I be using ? Is there any sample application similar to my requirement ? Meena
by: Michael | last post by:
I've installed the Directx 9.0 SDK. Can anybody tell me please what assembly should I import so that all its namespaces will be available in the VS.net.. Thanks for your help.
by: sirusdv | last post by:
Has anyone been able to record microphone data via C# in any way? I know there is a way with winmm.dll but I have not been able to manage the whole process yet. Any code would be GREATLY appreciated!
by: jj | last post by:
I want to use Microsoft.DirectX Microsoft.DirectX.Directplay Microsoft.DirectX.DirectSound references in my project. But I could not find them in the assemblies? I have downloaded DirectX 9.0c and even downloaded the redistributeable form the following microsoft site. http://www.microsoft.com/downloads/search.aspx?displaylang=en&categoryid=2
by: Ian | last post by:
Does anyone know of a way where you can bind one of the Audio objects from DirectX.AudioVidoPlayback to a DirectX.DirectSound object? I need to do this because I need to be able to play several video clips at a time *and* send the audio of each video clip to differeing sound devices that have been enumerated previously. So far I've only found DirectSound to be effective at enumerating sound devices and so if I could create a DirectSound object...
by: Friskusen | last post by:
I'm trying to play/capture sound with objects in the Microsoft.DirectX.DirectSound namespace.. Trying to create a new Buffer object generates the following exception: Anybody know whats going on ?
by: Harvey Cohen | last post by:
Hello all, I have some C# code that implements calls to DirectX.DirectSound. It compiles under both VS .NET 2003 and VS 2005 and runs under VS .NET 2003 and VS 2005 on a Compaq laptop (Windows XP Home), a Dell Xeon workstation (Windows XP Pro) and a Gateway GM 825 (Windows XP Media Center). It also runs on the Dell and the Compaq under VS 2005, but when I attempt to run the code under VS 2005 on the Gateway (Windows XP MCE), I get...
by: Pramod | last post by:
How do i capture voice and playback that again? I am working in C# VS.2005 Thanks & Regards, Pramod
by: Jovo Mirkovic | last post by:
Hi, We are working on some application in DirectX, and we are using DirectSound, like this Public Sub playSound(ByVal isloop As Boolean, ByVal fileName As String) Try stopSound() sound = New
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.