Add bit format testing to sample formats.
This commit is contained in:
parent
6d5a748f1c
commit
c70d98ef59
1 changed files with 10 additions and 0 deletions
|
@ -39,6 +39,16 @@ typedef enum ArrayDataFormat_e {
|
|||
ARRAY_DATA_16BITUNSIGNED = 16, ARRAY_DATA_16BITSIGNED = 17,
|
||||
} ArrayDataFormat;
|
||||
|
||||
/**
|
||||
* @brief Is the sample data format a "signed" data format?
|
||||
*/
|
||||
#define gfxSampleFormatIsSigned(fmt) ((fmt) & 1)
|
||||
|
||||
/**
|
||||
* @brief How many bits are in the sample data format
|
||||
*/
|
||||
#define gfxSampleFormatBits(fmt) ((fmt) & ~1)
|
||||
|
||||
/**
|
||||
* @brief The type for a fixed point type.
|
||||
* @details The top 16 bits are the integer component, the bottom 16 bits are the real component.
|
||||
|
|
Loading…
Add table
Reference in a new issue