Make a void * pointer const.

This commit is contained in:
Marcus Overhagen
2012-09-13 09:58:43 +02:00
parent 8e77147bfc
commit 517a59c9a1
2 changed files with 12 additions and 12 deletions
@@ -405,15 +405,15 @@ aiffReader::GetNextChunk(void *cookie,
} }
uint32 uint32
aiffReader::DecodeFrameRate(void *_80bit_float) aiffReader::DecodeFrameRate(const void *_80bit_float)
{ {
// algorithm from http://www.borg.com/~jglatt/tech/aiff.htm // algorithm from http://www.borg.com/~jglatt/tech/aiff.htm
uint32 mantissa; uint32 mantissa;
uint32 last; uint32 last;
uint32 exp; uint32 exp;
mantissa = (uint32)B_BENDIAN_TO_HOST_INT32(*(uint32 *)((char *)_80bit_float + 2)); mantissa = (uint32)B_BENDIAN_TO_HOST_INT32(*(const uint32 *)((const char *)_80bit_float + 2));
exp = 30 - *(uint8 *)((char *)_80bit_float + 1); exp = 30 - *(const uint8 *)((const char *)_80bit_float + 1);
if (exp > 32) if (exp > 32)
return 0; return 0;
last = 0; last = 0;
@@ -33,16 +33,16 @@ class aiffReader : public Reader
public: public:
aiffReader(); aiffReader();
~aiffReader(); ~aiffReader();
const char *Copyright(); const char *Copyright();
status_t Sniff(int32 *streamCount); status_t Sniff(int32 *streamCount);
void GetFileFormatInfo(media_file_format *mff); void GetFileFormatInfo(media_file_format *mff);
status_t AllocateCookie(int32 streamNumber, void **cookie); status_t AllocateCookie(int32 streamNumber, void **cookie);
status_t FreeCookie(void *cookie); status_t FreeCookie(void *cookie);
status_t GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration, status_t GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration,
media_format *format, const void **infoBuffer, size_t *infoSize); media_format *format, const void **infoBuffer, size_t *infoSize);
@@ -54,20 +54,20 @@ public:
const void **chunkBuffer, size_t *chunkSize, const void **chunkBuffer, size_t *chunkSize,
media_header *mediaHeader); media_header *mediaHeader);
private: private:
uint32 DecodeFrameRate(void *_80bit_float); uint32 DecodeFrameRate(const void *_80bit_float);
BPositionIO *Source() { return fSource; } BPositionIO *Source() { return fSource; }
private: private:
BPositionIO * fSource; BPositionIO * fSource;
media_format fFormat; media_format fFormat;
int64 fDataStart; int64 fDataStart;
int64 fDataSize; int64 fDataSize;
int64 fFrameCount; int64 fFrameCount;
bigtime_t fDuration; bigtime_t fDuration;
bool fRaw; bool fRaw;
int64 fPosition; int64 fPosition;