Welcome to
www.tdxlibrary.org
Home of the
the TDx_Library...
"RAD DirectX"
for
C++ Builder
...
|
TDx_Sound_Library v2.00 Component Reference
|
|
[ TDx_SoundBuffer::CreateStream() ]
[ next: Destroy() ]
[ prev: CreateFromFile() ]
public:
virtual bool __fastcall CreateStream( AnsiString pFileName, WAVEFORMATEX* pFormat, int pFormatSize );
TDX_SOUNDBUFFER::CREATESTREAM()
[ component method ]
- Description
The
CreateStream
method
will
create
and
open
a
new
.wav
file.
Once
created,
sound
data
may
be
written
to
the
file
with
TDx_SoundBuffer::WriteToStream().
Once
all
data
has
been
written
to
the
stream,
close
the
stream
using
TDx_SoundBuffer::CloseStream()
When
the
stream
is
open,
the
TDx_SoundBuffer::StreamIsOpen
property
will
be
true.
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 .wav file 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.
You can retrieve the WAVEFORMATEX of the current buffer using the TDx_SoundBuffer::GetFormat() method.
You can also pass in a non-WAVE_FORMAT_PCM structure typecast as a WAVEFORMATEX, and supply the byte-size of the non-WAVE_FORMAT_PCM using the FormatSize parameter.
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.
|
|