Re: saving capture to disk
- From: v-terryf@xxxxxxxxxxxxxxxxxxxx ("TerryFei")
- Date: Tue, 14 Mar 2006 06:37:08 GMT
Hi Darren,
Welcome to MSDN Newsgroup!
Based on my knowledge, The DirectSound API does not include methods for
writing to WAV files. We should do it by ourselves, just like Opening a
file and writes the header chunks, Writing from a buffer to the data chunk
and advancing the write cursor, Writing the size of the data chunk in the
header and closing the file. It's so tedious and prone to error. However,
we can use CWaveFile class to achieve this goal. This class encapsulates
the "mmio" API to operate WAV file. It will make things easier. We can get
this class source code from the Dsutil.cpp file shipped with DirectXSDK.
I hope the above information is helpful for you. If there is anything I
can do for you, please feel free to let me know. Thanks and have a nice day!
Best Regards,
Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
Date: Mon, 13 Mar 2006 15:19:19 -0800<10nig0u0r93ph.718s0uiu21gc.dlg@xxxxxxxxxx>
From: Darren <Darren@xxxxxxxxxxxxx>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
Subject: Re: saving capture to disk
References: <Oi4m5JuRGHA.4920@xxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <10nig0u0r93ph.718s0uiu21gc.dlg@xxxxxxxxxx>microsoft.public.win32.programmer.directx.audio:8355
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <OtzGtTvRGHA.1844@xxxxxxxxxxxxxxxxxxxx>
Newsgroups: microsoft.public.win32.programmer.directx.audio
NNTP-Posting-Host: h70-66-128-230.sbm.shawcable.net 70.66.128.230
Lines: 1
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl
X-Tomcat-NG: microsoft.public.win32.programmer.directx.audiogo through
I am using MDX.
I saw the CaptureSound sample that created a wav file but didn't want to
all that work if I didn't have to. I'm capturing and also dynamicallygenerating
the samples and allowing the user to preview or save to a file.managed version.
I've looked at DirectShow but I don't like the API;
I don't want to deals with graphs, pins, filters etc & AFAIK there is no
file.
Chris P. [MVP] wrote:
On Mon, 13 Mar 2006 13:07:15 -0800, Darren wrote:
I cannot located the method that will save a capture buffer to a wav
constructor being able to read wav files directly.Perhaps I'm just making a bad assumption based on the buffer
to
I presume your talking about managed code here (it is always good to
specify so we don't have to guess).
Correct, there is no method to save a capture buffer to file. You have
thedo this through standard file I/O methods. The buffer constructor has
streamed.method out of convenience and that output is much more common than input.
It would be difficult for a capture buffer as the data is usually
the
If you simply want to record a file DirectShow might be easier. The only
catch is that you have to first compile the WaveDest sample as well as
baseclasses which are all C++.
.
- References:
- saving capture to disk
- From: Darren
- Re: saving capture to disk
- From: Chris P. [MVP]
- Re: saving capture to disk
- From: Darren
- saving capture to disk
- Prev by Date: Re: Multimedia streaming float formats
- Next by Date: Re: saving capture to disk
- Previous by thread: Re: saving capture to disk
- Next by thread: Re: saving capture to disk
- Index(es):
Relevant Pages
|