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::SetFormat() ]
[ next: SetFrequency() ]
[ prev: SetCurrentPosition() ]
public:
virtual bool __fastcall SetFormat( const WAVEFORMATEX* pFormat );
TDX_SOUNDBUFFER::SETFORMAT()
[ component method ]
- Description
The
TDx_SoundBuffer::SetFormat
method
will
set
the
primary
sound
buffer
format
for
the
application.
The
application
must
hold
at
least
the
DSSCL_PRIORITY
cooperative
level
for
this
method
to
succeed.
Whenever
the
application
has
the
input
focus,
the
primary
buffer
will
be
set
to
the
specified
format.
When
the
DSSCL_WRITEPRIMARY
cooperative
level
is
being
used,
the
buffer
must
be
explicitly
stopped
and
started
for
the
SetFormat
call.
The
buffer
will
be
automatically
stopped
and
started
for
the
other
cooperative
levels.
Setting
an
unsupported
format
will
still
succeed.
The
closest
supported
format
will
be
used
and
conversion
from
the
requested
format
will
be
performed
during
mixing.
This
may
cause
some
performance
loss.
Compare
the
specified
format
with
that
retrieved
using
TDx_SoundBuffer::GetFormat()
to
determine
if
this
is
being
done.
To
change
the
data
format
for
a
secondary
sound
buffer,
recreate
the
buffer
with
the
new
format.
Compressed
audio
formats
are
not
currently
supported
and
must
be
converted
to
pulse-code
modulation
(PCM)
before
writing
to
a
sound
buffer.
If
the
method
call
fails,
the
OnError
event
will
be
triggered
with
one
of
the
following
values:
TDX_BADPARAMS
DSERR_BADFORMAT
DSERR_INVALIDCALL
DSERR_INVALIDPARAM
DSERR_OUTOFMEMORY
DSERR_PRIOLEVELNEEDED
DSERR_UNSUPPORTED
- Parameters
- See Also
- Top
If you would like to submit additions or improvements to this page, click: darren_john_dwyer@hotmail.com.
|
|