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::CreateFromFile() ]     [ next: CreateStream() ]     [ prev: Create() ]

    public:

         virtual bool __fastcall CreateFromFile( AnsiString pFileName, TDSBufferDesc* pBufferDesc, TDx_Sound* pSound );





    -= Go to the TDx_SoundBuffer description =-    TDX_SOUNDBUFFER::CREATEFROMFILE()   [ component method ]

    • Description

        The CreateFromFile method will create a sound buffer of the same format as a specified .wav file.
        If there is an existing buffer for this component, it will be destroyed before the new one is created.
        The size of the new buffer will equal that of the file's sound data, which is automatically loaded into the buffer.

        The internal WAVEFORMATEX structure referenced by the TDx_SoundBuffer::StreamFormat property will automatically be filled with the format data of the specified .wav file.

        Note:
        This method does not support the loading of .wav files where the format of the .wav file being loaded is not the raw, uncompressed, WAVE_FORMAT_PCM .wav file standard that DirectSound supports. It currently supports only WAVE_FORMAT_PCM files, and may have undetermined results if used with non-WAVE_FORMAT_PCM files.

        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 which will be used to create the sound buffer.

        BufferDesc
        The BufferDesc parameter references a TDSBufferDesc component for holding the properties of the new buffer.

        The TDSBufferDesc component will mostly be filled automatically from data contained in the .wav file.

        If control options in addition to the DSBCAPS_GETCURRENTPOSITION2 are required, it is neccessary to set the desired flags in the TDSBufferDesc component manually before calling this method.

        Sound
        The Sound parameter references the existing TDx_Sound component for which the sound buffer is to be created.


    • 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.