VCL RAD DirectX for C++ Builder

Welcome to

www.tdxlibrary.org

Home of the
the TDx_Library...

=- RAD DirectX =-

"RAD DirectX"
for
C++ Builder

...

Welcome to tdxlibrary.org Latest News

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

Register our Tools Available Downloads

Frequently Asked Questions Links to other sites Information about the tdxlibrary.org website


    TDx_Sound_Library v2.00 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: darren_john_dwyer@hotmail.com.



























Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Links |  Site Information

This page is Copyright © 2019 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.