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_SoundCaptureBuffer::Lock() ]     [ next: SaveToFile() ]     [ prev: GetStatus() ]

    public:

         virtual bool __fastcall Lock( dword pReadCursor, dword pReadBytes, void** pAudioPtr1, dword* pAudioBytes1, void** pAudioPtr2, dword* pAudioBytes2, dword pFlags );





    -= Go to the TDx_SoundCaptureBuffer description =-    TDX_SOUNDCAPTUREBUFFER::LOCK()   [ component method ]

    • Description

        The TDx_SoundCaptureBuffer::Lock method will return pointers into the capture buffer, allowing the reading or writing of audio data.

        The capture buffer should not be locked for long periods as the capture cursor will reach the locked bytes cause configuration dependent audio problems.

        If the method call fails, the OnError event will be triggered with one of the following values:
        DSERR_INVALIDPARAM
        DSERR_INVALIDCALL

    • Parameters

        ReadCursor
        The ReadCursor parameter defines the offset, in bytes, to where the lock is to begin in the buffer.

        ReadBytes
        The ReadBytes parameter defines the amount, in bytes, of the buffer that is to be locked.

        The space that is locked may wrap around to the start of the buffer, which is conceptually circular, in which case the AudioPtr2 parameter of this method will reference the start of the buffer.

        Setting DSCBLOCK_ENTIREBUFFER in the Flags parameter of this method will cause this parameter to be ignored.

        AudioPtr1
        The AudioPtr1 parameter will reference the first block of locked capture buffer if this method returns successfully.

        AudioBytes1
        The AudioBytes1 parameter references the number of bytes referenced by the AudioPtr1 parameter of this method.

        When this value is less than the value in the ReadBytes parameter of this method, it means AudioPtr2 will reference a second block of sound data.

        AudioPtr2
        The AudioPtr2 parameter will reference the second block of locked capture buffer if this method returns successfully.

        When this parameter is NULL it means AudioPtr1 references the entire locked region of the sound buffer and any portion of the area that wraps around will not be locked.

        AudioBytes2
        The AudioBytes2 parameter references the number of bytes referenced by the AudioPtr2 parameter of this method.

        When the AudioPtr2 parameter of this method is set to NULL, this parameter will be 0.

        Flags
        The Flags parameter defines a flag modifying the lock event.
        The described effect applies when the flag is set.

          DSBLOCK_ENTIREBUFFER
          Lock the whole capture buffer.
          Setting this flag causes the ReadBytes parameter of this method to be ignored.


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