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