#include FormatChunk &FormatChunk::operator=(const FormatChunk &someFormatChunk) { formatTag(someFormatChunk.formatTag()); channels(someFormatChunk.channels()); samplesPerSecond(someFormatChunk.samplesPerSecond()); averageBytesPerSecond(someFormatChunk.averageBytesPerSecond()); blockAlign(someFormatChunk.blockAlign()); bitsPerSample(someFormatChunk.bitsPerSample()); return *this; } MemFile &FormatChunk::operator>>(MemFile &someMemFile)const { mChunkID>>someMemFile; someMemFile.write((char*)&mSize,sizeof(mSize)); someMemFile.write((char*)&mFormatTag,sizeof(mFormatTag)); someMemFile.write((char*)&mChannels,sizeof(mChannels)); someMemFile.write((char*)&mSamplesPerSecond,sizeof(mSamplesPerSecond)); someMemFile.write((char*)&mAvgBytesPerSecond,sizeof(mAvgBytesPerSecond)); someMemFile.write((char*)&mBlockAlign,sizeof(mBlockAlign)); someMemFile.write((char*)&mBitsPerSample,sizeof(mBitsPerSample)); if(mSize==sizeof(mFormatTag)+sizeof(mChannels)+sizeof(mSamplesPerSecond)+sizeof(mAvgBytesPerSecond)+sizeof(mBlockAlign)+sizeof(mBitsPerSample)+sizeof(mExtraInfo))someMemFile.write((char*)&mExtraInfo,sizeof(mExtraInfo)); return someMemFile; } FileHandle &FormatChunk::operator<<(FileHandle &someFileHandle) { mChunkID<"); strChunk+=mChunkID.toString(); strChunk+=String(" Size=")+String().fromInt(mSize).quotes(); strChunk+=String(" FormatTag=")+String().fromInt(mFormatTag).quotes(); strChunk+=String(" Channels=")+String().fromInt(mChannels).quotes(); strChunk+=String(" SamplesPerSecond=")+String().fromInt(mSamplesPerSecond).quotes(); strChunk+=String(" AvgBytesPerSecond=")+String().fromInt(mAvgBytesPerSecond).quotes(); strChunk+=String(" BlockAlign=")+String().fromInt(mBlockAlign).quotes(); strChunk+=String(" BitsPerSample=")+String().fromInt(mBitsPerSample).quotes(); strChunk+=String(" ExtraInfo=")+String().fromInt(mExtraInfo).quotes()+String(""); return strChunk; }