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
aiffReader::DecodeFrameRate(void *_80bit_float)
aiffReader::DecodeFrameRate(const void *_80bit_float)
{
// algorithm from http://www.borg.com/~jglatt/tech/aiff.htm
uint32 mantissa;
uint32 last;
uint32 exp;
mantissa = (uint32)B_BENDIAN_TO_HOST_INT32(*(uint32 *)((char *)_80bit_float + 2));
exp = 30 - *(uint8 *)((char *)_80bit_float + 1);
mantissa = (uint32)B_BENDIAN_TO_HOST_INT32(*(const uint32 *)((const char *)_80bit_float + 2));
exp = 30 - *(const uint8 *)((const char *)_80bit_float + 1);
if (exp > 32)
return 0;
last = 0;
@@ -33,16 +33,16 @@ class aiffReader : public Reader
public:
aiffReader();
~aiffReader();
const char *Copyright();
status_t Sniff(int32 *streamCount);
void GetFileFormatInfo(media_file_format *mff);
status_t AllocateCookie(int32 streamNumber, void **cookie);
status_t FreeCookie(void *cookie);
status_t GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration,
media_format *format, const void **infoBuffer, size_t *infoSize);
@@ -54,20 +54,20 @@ public:
const void **chunkBuffer, size_t *chunkSize,
media_header *mediaHeader);
private:
uint32 DecodeFrameRate(void *_80bit_float);
uint32 DecodeFrameRate(const void *_80bit_float);
BPositionIO *Source() { return fSource; }
private:
BPositionIO * fSource;
media_format fFormat;
int64 fDataStart;
int64 fDataSize;
int64 fFrameCount;
bigtime_t fDuration;
bool fRaw;
int64 fPosition;