--- libgig/trunk/src/gig.cpp 2013/12/12 17:39:52 2483 +++ libgig/trunk/src/gig.cpp 2013/12/31 00:13:20 2484 @@ -581,6 +581,14 @@ // update '3gix' chunk pData = (uint8_t*) pCk3gix->LoadChunkData(); store16(&pData[0], iSampleGroup); + + // if the library user toggled the "Compressed" attribute from true to + // false, then the EWAV chunk associated with compressed samples needs + // to be deleted + RIFF::Chunk* ewav = pWaveList->GetSubChunk(CHUNK_ID_EWAV); + if (ewav && !Compressed) { + pWaveList->DeleteSubChunk(ewav); + } } /// Scans compressed samples for mandatory informations (e.g. actual number of total sample points).