Welcome to
www.tdxlibrary.org
Home of the
the TDx_Library...
"RAD DirectX"
for
C++ Builder
...
|
TDx_Sound_Library v2.00 Component Reference
|
|
[ TDx_SoundCaptureBuffer::SaveToFile() ]
[ next: Start() ]
[ prev: Lock() ]
public:
virtual bool __fastcall SaveToFile( AnsiString pFileName, WAVEFORMATEX* pFormat, int pFormatSize );
TDX_SOUNDCAPTUREBUFFER::SAVETOFILE()
[ component method ]
- Description
The
SaveToFile
()method
will
save
the
entire
sound
buffer
to
a
specified
.WAV
file.
Calling
this
method
is
equivalent
to
calling
the
following
methods
in
the
order
shown
here
:-
TDx_SoundCaptureBuffer::CreateStream()
TDx_SoundCaptureBuffer::Lock()
TDx_SoundCaptureBuffer::WriteToStream()
TDx_SoundCaptureBuffer::Unlock()
TDx_SoundCaptureBuffer::CloseStream()
If
the
file
already
exists,
it
is
replaced.
If
the
file
does
not
exist,
it
will
be
created
if
possible.
If
the
file
cannot
be
created,
the
file
remnants
will
remain.
If
you
wish
to
save
multiple
chunks
of
sound
data,
do
this
:-
TDx_SoundCaptureBuffer::CreateStream()
TDx_SoundCaptureBuffer::Lock()
TDx_SoundCaptureBuffer::WriteToStream()
TDx_SoundCaptureBuffer::WriteToStream()
TDx_SoundCaptureBuffer::WriteToStream()
TDx_SoundCaptureBuffer::WriteToStream()
TDx_SoundCaptureBuffer::Unlock()
TDx_SoundCaptureBuffer::CloseStream()
Before
calling
this
method,
you
must
setup
the
TDx_SoundCaptureBuffer::StreamFormat
property,
and
also
the
TDx_SoundCaptureBuffer::StreamSize
property.
After
this
method
returns,
the
TDx_SoundCaptureBuffer::StreamSize
property
contains
the
total
number
of
bytes
streamed.
If
the
method
call
fails,
the
OnError
event
will
be
triggered
with
one
of
the
following
values:
TDX_BADPARAMS
TDX_ERROR
- Parameters
FileName
The FileName parameter defines the path and filename of the new .wav file which is to be created.
Format
The Format method parameter describes the format of the sound file to be created.
This parameter must point to a user-supplied WAVEFORMATEX structure that has been filled with appropriate values.
FormatSize
The FormatSize parameter must contain the size of the WAVEFORMATEX structure passed into this method via the Format parameter.
Generally this will be sizeof(WAVEFORMATEX) but it may differ depending on the definition of the WAVEFORMATEX.
- See Also
- Top
If you would like to submit additions or improvements to this page, click: darren_john_dwyer@hotmail.com.
|
|