#ifndef TDSCapsH #define TDSCapsH // ========================================================================== // File: TDSCaps.H // Authors: BCB_Code_Generator v2.00, // Darren Dwyer (source code, documentation, demos, website), // Hugh Edwards (documentation, icons) // Description: This file defines the TDSCaps Component // // "TDx9_Sound_Library v1.00" // (c) 2005 BCB-Tools.com Pty. Ltd., Sydney, Australia. // All Rights Reserved. // // Refer to the 'Licence.Txt' file for licencing & copyright information. // ========================================================================== // -------------------------------------------------------------------------- #include "TDx_Library_Defns.H" #include "TDx_Library_Functions.H" // -------------------------------------------------------------------------- #include "TDx9_Sound_Library_Defns.H" #include "TDx9_Sound_Library_Functions.H" // -------------------------------------------------------------------------- // ========================================================================== // Class: TDSCaps // Description: The TDSCaps object is used to ... // ========================================================================== #if (__BORLANDC__ >= 0x0530) // BCB Version 3 + class PACKAGE TDSCaps : public TComponent { // -------------------------------------------------------------------------- #else // BCB Version 1 class TDSCaps : public TComponent { #endif // ========================================================================== __published: // ========================================================================== // ---------------------------------------------------------------------- // Property: Flags // Description: ... // ---------------------------------------------------------------------- __property dword Flags = { read=FGetFlags, write=FSetFlags, default=0 }; // ---------------------------------------------------------------------- // Property: FreeHw3DAllBuffers // Description: ... // ---------------------------------------------------------------------- __property dword FreeHw3DAllBuffers = { read=FGetFreeHw3DAllBuffers, write=FSetFreeHw3DAllBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: FreeHw3DStaticBuffers // Description: ... // ---------------------------------------------------------------------- __property dword FreeHw3DStaticBuffers = { read=FGetFreeHw3DStaticBuffers, write=FSetFreeHw3DStaticBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: FreeHw3DStreamingBuffers // Description: ... // ---------------------------------------------------------------------- __property dword FreeHw3DStreamingBuffers = { read=FGetFreeHw3DStreamingBuffers, write=FSetFreeHw3DStreamingBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: FreeHwMemBytes // Description: ... // ---------------------------------------------------------------------- __property dword FreeHwMemBytes = { read=FGetFreeHwMemBytes, write=FSetFreeHwMemBytes, default=0 }; // ---------------------------------------------------------------------- // Property: FreeHwMixingAllBuffers // Description: ... // ---------------------------------------------------------------------- __property dword FreeHwMixingAllBuffers = { read=FGetFreeHwMixingAllBuffers, write=FSetFreeHwMixingAllBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: FreeHwMixingStaticBuffers // Description: ... // ---------------------------------------------------------------------- __property dword FreeHwMixingStaticBuffers = { read=FGetFreeHwMixingStaticBuffers, write=FSetFreeHwMixingStaticBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: FreeHwMixingStreamingBuffers // Description: ... // ---------------------------------------------------------------------- __property dword FreeHwMixingStreamingBuffers = { read=FGetFreeHwMixingStreamingBuffers, write=FSetFreeHwMixingStreamingBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: MaxContigFreeHwMemBytes // Description: ... // ---------------------------------------------------------------------- __property dword MaxContigFreeHwMemBytes = { read=FGetMaxContigFreeHwMemBytes, write=FSetMaxContigFreeHwMemBytes, default=0 }; // ---------------------------------------------------------------------- // Property: MaxHw3DAllBuffers // Description: ... // ---------------------------------------------------------------------- __property dword MaxHw3DAllBuffers = { read=FGetMaxHw3DAllBuffers, write=FSetMaxHw3DAllBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: MaxHw3DStaticBuffers // Description: ... // ---------------------------------------------------------------------- __property dword MaxHw3DStaticBuffers = { read=FGetMaxHw3DStaticBuffers, write=FSetMaxHw3DStaticBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: MaxHw3DStreamingBuffers // Description: ... // ---------------------------------------------------------------------- __property dword MaxHw3DStreamingBuffers = { read=FGetMaxHw3DStreamingBuffers, write=FSetMaxHw3DStreamingBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: MaxHwMixingAllBuffers // Description: ... // ---------------------------------------------------------------------- __property dword MaxHwMixingAllBuffers = { read=FGetMaxHwMixingAllBuffers, write=FSetMaxHwMixingAllBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: MaxHwMixingStaticBuffers // Description: ... // ---------------------------------------------------------------------- __property dword MaxHwMixingStaticBuffers = { read=FGetMaxHwMixingStaticBuffers, write=FSetMaxHwMixingStaticBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: MaxHwMixingStreamingBuffers // Description: ... // ---------------------------------------------------------------------- __property dword MaxHwMixingStreamingBuffers = { read=FGetMaxHwMixingStreamingBuffers, write=FSetMaxHwMixingStreamingBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: MaxSecondarySampleRate // Description: ... // ---------------------------------------------------------------------- __property dword MaxSecondarySampleRate = { read=FGetMaxSecondarySampleRate, write=FSetMaxSecondarySampleRate, default=0 }; // ---------------------------------------------------------------------- // Property: MinSecondarySampleRate // Description: ... // ---------------------------------------------------------------------- __property dword MinSecondarySampleRate = { read=FGetMinSecondarySampleRate, write=FSetMinSecondarySampleRate, default=0 }; // ---------------------------------------------------------------------- // Property: PlayCpuOverheadSwBuffers // Description: ... // ---------------------------------------------------------------------- __property dword PlayCpuOverheadSwBuffers = { read=FGetPlayCpuOverheadSwBuffers, write=FSetPlayCpuOverheadSwBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: PrimaryBuffers // Description: ... // ---------------------------------------------------------------------- __property dword PrimaryBuffers = { read=FGetPrimaryBuffers, write=FSetPrimaryBuffers, default=0 }; // ---------------------------------------------------------------------- // Property: TotalHwMemBytes // Description: ... // ---------------------------------------------------------------------- __property dword TotalHwMemBytes = { read=FGetTotalHwMemBytes, write=FSetTotalHwMemBytes, default=0 }; // ---------------------------------------------------------------------- // Property: UnlockTransferRateHwBuffers // Description: ... // ---------------------------------------------------------------------- __property dword UnlockTransferRateHwBuffers = { read=FGetUnlockTransferRateHwBuffers, write=FSetUnlockTransferRateHwBuffers, default=0 }; // ---------------------------------------------------------------------- // Event: OnError() // Description: The OnError event is called when an error occurs in the // TDSCaps component. // ---------------------------------------------------------------------- __property TDx_Error OnError = {read=FOnError, write=FOnError, nodefault}; // ========================================================================== public: // ========================================================================== // ---------------------------------------------------------------------- // Property: ErrorValue // Description: The ErrorValue property contains the last error value // returned from a call to a TDSCaps method or fget/fset. // eg. DS_OK or DDERR_SURFACELOST or TDX_ERROR // ---------------------------------------------------------------------- __property HRESULT ErrorValue = { read=FGetErrorValue, write=FSetErrorValue, default=DS_OK }; // ---------------------------------------------------------------------- // Property: Size // Description: The Size property contains the size in bytes of the // internal DSCAPS structure. // ---------------------------------------------------------------------- __property dword Size = { read=FGetSize, write=FSetSize, nodefault }; // ---------------------------------------------------------------------- // Method: Clear() // Description: The Clear() method can be used to clear the contents of // the TDSCaps's internal DSCAPS structure. // Note: if you have manually linked a structure member to a // chunk of memory, make sure you release this memory before // calling Clear(). // ---------------------------------------------------------------------- virtual void __fastcall Clear(); // ---------------------------------------------------------------------- // Constructor() and Destructor() // ---------------------------------------------------------------------- __fastcall TDSCaps(TComponent* Owner); virtual __fastcall ~TDSCaps(); // ---------------------------------------------------------------------- // Internal Structure Access // ---------------------------------------------------------------------- __property DSCAPS* Internal_DSCAPS_Ptr = { read=FGetInternal_DSCAPS_Ptr, nodefault }; void __fastcall Internal_DSCAPS_Update(); // ========================================================================== protected: // ========================================================================== // ---------------------------------------------------------------------- // Property Access Methods // ---------------------------------------------------------------------- HRESULT __fastcall FGetErrorValue(); void __fastcall FSetErrorValue( HRESULT pErrorValue ); dword __fastcall FGetFlags(); void __fastcall FSetFlags( dword pFlags ); dword __fastcall FGetFreeHw3DAllBuffers(); void __fastcall FSetFreeHw3DAllBuffers( dword pFreeHw3DAllBuffers ); dword __fastcall FGetFreeHw3DStaticBuffers(); void __fastcall FSetFreeHw3DStaticBuffers( dword pFreeHw3DStaticBuffers ); dword __fastcall FGetFreeHw3DStreamingBuffers(); void __fastcall FSetFreeHw3DStreamingBuffers( dword pFreeHw3DStreamingBuffers ); dword __fastcall FGetFreeHwMemBytes(); void __fastcall FSetFreeHwMemBytes( dword pFreeHwMemBytes ); dword __fastcall FGetFreeHwMixingAllBuffers(); void __fastcall FSetFreeHwMixingAllBuffers( dword pFreeHwMixingAllBuffers ); dword __fastcall FGetFreeHwMixingStaticBuffers(); void __fastcall FSetFreeHwMixingStaticBuffers( dword pFreeHwMixingStaticBuffers ); dword __fastcall FGetFreeHwMixingStreamingBuffers(); void __fastcall FSetFreeHwMixingStreamingBuffers( dword pFreeHwMixingStreamingBuffers ); dword __fastcall FGetMaxContigFreeHwMemBytes(); void __fastcall FSetMaxContigFreeHwMemBytes( dword pMaxContigFreeHwMemBytes ); dword __fastcall FGetMaxHw3DAllBuffers(); void __fastcall FSetMaxHw3DAllBuffers( dword pMaxHw3DAllBuffers ); dword __fastcall FGetMaxHw3DStaticBuffers(); void __fastcall FSetMaxHw3DStaticBuffers( dword pMaxHw3DStaticBuffers ); dword __fastcall FGetMaxHw3DStreamingBuffers(); void __fastcall FSetMaxHw3DStreamingBuffers( dword pMaxHw3DStreamingBuffers ); dword __fastcall FGetMaxHwMixingAllBuffers(); void __fastcall FSetMaxHwMixingAllBuffers( dword pMaxHwMixingAllBuffers ); dword __fastcall FGetMaxHwMixingStaticBuffers(); void __fastcall FSetMaxHwMixingStaticBuffers( dword pMaxHwMixingStaticBuffers ); dword __fastcall FGetMaxHwMixingStreamingBuffers(); void __fastcall FSetMaxHwMixingStreamingBuffers( dword pMaxHwMixingStreamingBuffers ); dword __fastcall FGetMaxSecondarySampleRate(); void __fastcall FSetMaxSecondarySampleRate( dword pMaxSecondarySampleRate ); dword __fastcall FGetMinSecondarySampleRate(); void __fastcall FSetMinSecondarySampleRate( dword pMinSecondarySampleRate ); dword __fastcall FGetPlayCpuOverheadSwBuffers(); void __fastcall FSetPlayCpuOverheadSwBuffers( dword pPlayCpuOverheadSwBuffers ); dword __fastcall FGetPrimaryBuffers(); void __fastcall FSetPrimaryBuffers( dword pPrimaryBuffers ); dword __fastcall FGetSize(); void __fastcall FSetSize( dword pSize ); dword __fastcall FGetTotalHwMemBytes(); void __fastcall FSetTotalHwMemBytes( dword pTotalHwMemBytes ); dword __fastcall FGetUnlockTransferRateHwBuffers(); void __fastcall FSetUnlockTransferRateHwBuffers( dword pUnlockTransferRateHwBuffers ); // ========================================================================== private: // ========================================================================== // ---------------------------------------------------------------------- // Internal Structure Access // ---------------------------------------------------------------------- DSCAPS* __fastcall FGetInternal_DSCAPS_Ptr(); void __fastcall FSetInternal_DSCAPS( DSCAPS* pDSCAPS ); // ---------------------------------------------------------------------- // Property Variables // ---------------------------------------------------------------------- HRESULT fErrorValue; dword fSize; // ---------------------------------------------------------------------- // Structure Variables // ---------------------------------------------------------------------- DSCAPS fDSCAPS; // ---------------------------------------------------------------------- // Event Variables // ---------------------------------------------------------------------- TDx_Error FOnError; }; // -------------------------------------------------------------------------- #endif // --------------------------------------------------------------------------