#91 WAV samples greater 8bits broken

closed-fixed
nobody
None
5
2005-09-27
2005-06-24
dezi62
No

in method CAAFPCMCodec::PutEssenceFormat the
_bytesPerFrame value is not recomputed after
specifying new property.

below is the corrected source code.
thanks

if(EqualAUID
(&kAAFAudioSampleBits, &opcode))
{
XASSERT
(bytesRead == sizeof(valueUInt32),
AAFRESULT_INVALID_PARM_SIZE);
memcpy
(&valueUInt32, buf, bytesRead);
XASSERT
(valueUInt32 > 0, AAFRESULT_ZERO_SAMPLESIZE);

_bitsPerSample = (aafUInt16)valueUInt32;

_bytesPerFrame = ((_bitsPerSample + 7) / 8)
* _numCh;
}
else if(EqualAUID
(&kAAFNumChannels, &opcode))
{
XASSERT
(bytesRead == sizeof(valueUInt32),
AAFRESULT_INVALID_PARM_SIZE);
memcpy
(&valueUInt32, buf, bytesRead);
XASSERT
(valueUInt32 > 0, AAFRESULT_CODEC_CHANNELS);
_numCh =
(aafUInt16)valueUInt32;

_bytesPerFrame = ((_bitsPerSample + 7) / 8)
* _numCh;
}
}

Discussion

  • Stuart Cunningham

    Logged In: YES
    user_id=692703

    Quite right. This bug limited the bitsPerSample to the
    default of 8. Using a format specifier to change it had no
    effect.

    Fixed in revision 1.11 of CAAFPCMCodec.cpp on 2005/09/27.

    Thanks.

     
  • Stuart Cunningham

    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks