1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

SAMPLE_SIZE macro returns size_t

This commit is contained in:
Paul Licameli
2016-09-06 07:40:49 -04:00
parent c9bff2f0f4
commit b093a8e406
6 changed files with 15 additions and 15 deletions

View File

@@ -29,7 +29,7 @@ typedef enum {
} sampleFormat;
/** \brief Return the size (in memory) of one sample (bytes) */
#define SAMPLE_SIZE(SampleFormat) (SampleFormat >> 16)
#define SAMPLE_SIZE(SampleFormat) ( size_t{ (SampleFormat) >> 16 } )
#endif
// Used to determine how to fill in empty areas of audio.
@@ -39,8 +39,8 @@ typedef enum {
}fillFormat;
/** \brief Return the size on disk of one uncompressed sample (bytes) */
#define SAMPLE_SIZE_DISK(SampleFormat) ((SampleFormat == int24Sample) ? \
3 : SAMPLE_SIZE(SampleFormat) )
#define SAMPLE_SIZE_DISK(SampleFormat) (((SampleFormat) == int24Sample) ? \
size_t{ 3 } : SAMPLE_SIZE(SampleFormat) )
const wxChar *GetSampleFormatStr(sampleFormat format);