www.BCB-Tools.com

Home of
RAD DirectX
for
C++ Builder

...

C++ Builder wrapping DirectX

...

Please Register

So we can
create more

the TDx_Library
the TDx9_Library



Welcome to BCB-Tools.com Latest News

Development Tools Demo Applications Step-by-Step Tutorials Component Reference

Register Here! Available Downloads

Frequently Asked Questions Discussion Forums Receive emails from BCB-Tools.com Send us some Feedback

Links to other sites Information about the BCB-Tools.com website


    TDx_Sound_Library v1.90 Component Reference

    -= Click to navigate the reference =-
    Go to the Welcome Page

    [ TDx_SoundBuffer::SetFormat() ]     [ next: SetFrequency() ]     [ prev: SetCurrentPosition() ]

    public:

         virtual bool __fastcall SetFormat( const WAVEFORMATEX* pFormat );





    -= Go to the TDx_SoundBuffer description =-    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: admin@bcb-tools.com.



























Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Forums |  Feedback |  Mailing List |  Links |  Site Information

This page is Copyright © 2008 Darren John Dwyer, Australia. All Rights Reserved.
Borland C++ Builder, CBuilder, etc are Trademarks of Borland Corporation.
DirectX, DirectDraw, Windows, etc are Trademarks of Microsoft Corporation.