--- libgig/trunk/src/gig.h 2005/05/07 20:19:10 515 +++ libgig/trunk/src/gig.h 2005/06/06 16:50:58 613 @@ -314,13 +314,19 @@ * * The function pointer argument has to be supplied with a valid * function of the given signature which will then be called on - * progress changes. The float argument of the callback function will - * then reflect the current progress as a value between 0.0 and 1.0. + * progress changes. An equivalent progress_t structure will be passed + * back as argument to the callback function on each progress change. + * The factor field of the supplied progress_t structure will then + * reflect the current progress as value between 0.0 and 1.0. You might + * want to use the custom field for data needed in your callback + * function. */ struct progress_t { - void (*callback)(float); ///< Callback function pointer which has to be assigned to a function for progress notification. - float __range_min; - float __range_max; + void (*callback)(progress_t*); ///< Callback function pointer which has to be assigned to a function for progress notification. + float factor; ///< Reflects current progress as value between 0.0 and 1.0. + void* custom; ///< This pointer can be used for arbitrary data. + float __range_min; ///< Only for internal usage, do not modify! + float __range_max; ///< Only for internal usage, do not modify! progress_t(); }; @@ -437,6 +443,8 @@ // Methods double GetVelocityAttenuation(uint8_t MIDIKeyVelocity); + double GetVelocityRelease(uint8_t MIDIKeyVelocity); + protected: DimensionRegion(RIFF::List* _3ewl); ~DimensionRegion(); @@ -475,8 +483,10 @@ static uint Instances; ///< Number of DimensionRegion instances. static VelocityTableMap* pVelocityTables; ///< Contains the tables corresponding to the various velocity parameters (VelocityResponseCurve and VelocityResponseDepth). double* pVelocityAttenuationTable; ///< Points to the velocity table corresponding to the velocity parameters of this DimensionRegion. + double* pVelocityReleaseTable; ///< Points to the velocity table corresponding to the release velocity parameters of this DimensionRegion leverage_ctrl_t DecodeLeverageController(_lev_ctrl_t EncodedController); + double* GetVelocityTable(curve_type_t curveType, uint8_t depth, uint8_t scaling); double* CreateVelocityTable(curve_type_t curveType, uint8_t depth, uint8_t scaling); }; @@ -723,6 +733,9 @@ void PrintMessage(); }; + String libraryName(); + String libraryVersion(); + } // namespace gig #endif // __GIG_H__