ScummVM API documentation
Mohawk::DataChunk Struct Reference

#include <sound.h>

Public Attributes

uint16 sampleRate
 
uint32 sampleCount
 
byte bitsPerSample
 
byte channels
 
uint16 encoding
 
uint16 loopCount
 
uint32 loopStart
 
uint32 loopEnd
 
Common::SeekableReadStream * audioData
 

Detailed Description

Parsed state for the 20-byte MHWK/WAVE Data header and its payload.

The loop positions are source sample-frame positions, not byte offsets. Mohawk::DataChunk::loopStart is inclusive. Mohawk::DataChunk::loopEnd is exclusive and must not exceed Mohawk::DataChunk::sampleCount.

A loop count of zero disables the embedded loop. A loop count of 0xFFFF requests an infinite loop. Another nonzero value requests that many additional passes through the loop range.

Zoombini playback applies every supported embedded infinite loop automatically. Finite loop counts remain parsed but are not yet applied by the ScummVM stream wrapper.

Member Data Documentation

◆ sampleRate

uint16 Mohawk::DataChunk::sampleRate

Number of source sample frames played per second.

◆ sampleCount

uint32 Mohawk::DataChunk::sampleCount

Total number of source sample frames declared by the Data header.

◆ bitsPerSample

byte Mohawk::DataChunk::bitsPerSample

Number of encoded bits for each sample in one channel.

◆ channels

byte Mohawk::DataChunk::channels

Number of interleaved audio channels in each source sample frame.

◆ encoding

uint16 Mohawk::DataChunk::encoding

Payload codec, using Mohawk::kCodecRaw, Mohawk::kCodecADPCM, or Mohawk::kCodecMPEG2.

◆ loopCount

uint16 Mohawk::DataChunk::loopCount

Number of requested repeats for the embedded loop range.

0x0000 disables looping, 0xFFFF is an infinite loop.

◆ loopStart

uint32 Mohawk::DataChunk::loopStart

Inclusive source sample frame at which an embedded loop begins.

◆ loopEnd

uint32 Mohawk::DataChunk::loopEnd

Exclusive source sample frame at which playback returns to DataChunk::loopStart.

◆ audioData

Common::SeekableReadStream* Mohawk::DataChunk::audioData

Stream containing only the encoded sample payload after the Data header.

Ownership transfers to the codec-specific audio stream factory.


The documentation for this struct was generated from the following file: