mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-21 12:49:10 +00:00
Convert custom HeadSpin integer types to standard types from stdint.h
This commit is contained in:
@ -273,18 +273,18 @@ HRESULT CWaveFile::OpenFromMemory( BYTE* pbData, ULONG ulDataSize,
|
||||
(Actually, in the latter case, dwChunkStart is also set to 0, and only dwBlockStart is used). Again, I want to emphasize that you can avoid
|
||||
all of this unnecessary crap if you avoid hassling with compressed files, or Wave Lists, and instead stick to the sensible basics.
|
||||
|
||||
The dwChunkStart field specifies the byte offset of the start of the 'data' or 'slnt' chunk which actually contains the waveform data to
|
||||
which this CuePoint refers. This offset is relative to the start of the first chunk within the Wave List. (ie, It's the byte offset, within
|
||||
The dwChunkStart field specifies the uint8_t offset of the start of the 'data' or 'slnt' chunk which actually contains the waveform data to
|
||||
which this CuePoint refers. This offset is relative to the start of the first chunk within the Wave List. (ie, It's the uint8_t offset, within
|
||||
the Wave List, of where the 'data' or 'slnt' chunk of interest appears. The first chunk within the List would be at an offset of 0).
|
||||
|
||||
The dwBlockStart field specifies the byte offset of the start of the block containing the position. This offset is relative to the start of
|
||||
The dwBlockStart field specifies the uint8_t offset of the start of the block containing the position. This offset is relative to the start of
|
||||
the waveform data within the 'data' or 'slnt' chunk.
|
||||
|
||||
The dwSampleOffset field specifies the sample offset of the cue point relative to the start of the block. In an uncompressed file, this
|
||||
equates to simply being the offset within the waveformData array. Unfortunately, the WAVE documentation is much too ambiguous, and doesn't
|
||||
define what it means by the term "sample offset". This could mean a byte offset, or it could mean counting the sample points (for example,
|
||||
define what it means by the term "sample offset". This could mean a uint8_t offset, or it could mean counting the sample points (for example,
|
||||
in a 16-bit wave, every 2 bytes would be 1 sample point), or it could even mean sample frames (as the loop offsets in AIFF are specified).
|
||||
Who knows? The guy who conjured up the Cue chunk certainly isn't saying. I'm assuming that it's a byte offset, like the above 2 fields.
|
||||
Who knows? The guy who conjured up the Cue chunk certainly isn't saying. I'm assuming that it's a uint8_t offset, like the above 2 fields.
|
||||
*/
|
||||
|
||||
class CuePoint
|
||||
@ -356,7 +356,7 @@ HRESULT CWaveFile::ReadMMIO()
|
||||
return DXTRACE_ERR( TEXT("mmioRead"), E_FAIL );
|
||||
|
||||
// Allocate the waveformatex, but if its not pcm format, read the next
|
||||
// word, and thats how many extra bytes to allocate.
|
||||
// uint16_t, and thats how many extra bytes to allocate.
|
||||
if( pcmWaveFormat.wf.wFormatTag == WAVE_FORMAT_PCM )
|
||||
{
|
||||
m_pwfx = (WAVEFORMATEX*)( TRACKED_NEW CHAR[ sizeof( WAVEFORMATEX ) ] );
|
||||
@ -483,7 +483,7 @@ HRESULT CWaveFile::ReadMMIO()
|
||||
newMarker->fOffset = myCueList[i].fOffset * fSecsPerSample;
|
||||
}
|
||||
}
|
||||
int stringSize = size - sizeof(DWORD); // text string is size of chunck - size of the size word
|
||||
int stringSize = size - sizeof(DWORD); // text string is size of chunck - size of the size uint16_t
|
||||
newMarker->fName = TRACKED_NEW char[ stringSize];
|
||||
|
||||
strcpy(newMarker->fName, (char*)(bp + 12));
|
||||
@ -979,7 +979,7 @@ void CWaveFile::Close( void )
|
||||
IClose();
|
||||
}
|
||||
|
||||
UInt32 CWaveFile::GetDataSize( void )
|
||||
uint32_t CWaveFile::GetDataSize( void )
|
||||
{
|
||||
hsAssert( false, "Unsupported" );
|
||||
return 0;
|
||||
@ -991,29 +991,29 @@ float CWaveFile::GetLengthInSecs( void )
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
hsBool CWaveFile::SetPosition( UInt32 numBytes )
|
||||
hsBool CWaveFile::SetPosition( uint32_t numBytes )
|
||||
{
|
||||
hsAssert( false, "Unsupported" );
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool CWaveFile::Read( UInt32 numBytes, void *buffer )
|
||||
hsBool CWaveFile::Read( uint32_t numBytes, void *buffer )
|
||||
{
|
||||
hsAssert( false, "Unsupported" );
|
||||
return false;
|
||||
}
|
||||
|
||||
UInt32 CWaveFile::NumBytesLeft( void )
|
||||
uint32_t CWaveFile::NumBytesLeft( void )
|
||||
{
|
||||
hsAssert( false, "Unsupported" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
UInt32 CWaveFile::Write( UInt32 bytes, void *buffer )
|
||||
uint32_t CWaveFile::Write( uint32_t bytes, void *buffer )
|
||||
{
|
||||
UINT written;
|
||||
Write( (DWORD)bytes, (BYTE *)buffer, &written );
|
||||
return (UInt32)written;
|
||||
return (uint32_t)written;
|
||||
}
|
||||
|
||||
hsBool CWaveFile::IsValid( void )
|
||||
@ -1066,14 +1066,14 @@ public:
|
||||
LabelChunk--
|
||||
|
||||
The ID is always 'labl'. chunkSize is the number of bytes in the chunk, not counting the 8 bytes used by ID and Size fields nor any possible
|
||||
pad byte needed to make the chunk an even size (ie, chunkSize is the number of remaining bytes in the chunk after the chunkSize field, not
|
||||
pad uint8_t needed to make the chunk an even size (ie, chunkSize is the number of remaining bytes in the chunk after the chunkSize field, not
|
||||
counting any trailing pad byte).
|
||||
The dwIdentifier field contains a unique number (ie, different than the ID number of any other Label chunk). This field should correspond
|
||||
with the dwIndentifier field of some CuePoint stored in the Cue chunk. In other words, this Label chunk contains the text label associated
|
||||
with that CuePoint structure with the same ID number.
|
||||
|
||||
The dwText array contains the text label. It should be a null-terminated string. (The null byte is included in the chunkSize, therefore the
|
||||
length of the string, including the null byte, is chunkSize - 4).
|
||||
The dwText array contains the text label. It should be a null-terminated string. (The null uint8_t is included in the chunkSize, therefore the
|
||||
length of the string, including the null uint8_t, is chunkSize - 4).
|
||||
*/
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user