patch-src_Sequence_cpp 1.0 KB

123456789101112131415161718192021222324252627282930
  1. $OpenBSD: patch-src_Sequence_cpp,v 1.6 2009/10/28 18:40:13 jakemsr Exp $
  2. --- src/Sequence.cpp.orig Mon Aug 31 03:45:39 2009
  3. +++ src/Sequence.cpp Sat Oct 17 14:29:54 2009
  4. @@ -947,7 +947,8 @@ bool Sequence::Get(samplePtr buffer, sampleFormat form
  5. sampleCount start, sampleCount len) const
  6. {
  7. if (start < 0 || start > mNumSamples ||
  8. - start+len > mNumSamples)
  9. + start+len > mNumSamples ||
  10. + (format != mSampleFormat) || !buffer)
  11. return false;
  12. int b = FindBlock(start);
  13. @@ -981,6 +982,7 @@ bool Sequence::Set(samplePtr buffer, sampleFormat form
  14. if (format != mSampleFormat) {
  15. temp = NewSamples(mMaxSamples, mSampleFormat);
  16. wxASSERT(temp);
  17. + return false;
  18. }
  19. samplePtr silence = NULL;
  20. @@ -988,6 +990,7 @@ bool Sequence::Set(samplePtr buffer, sampleFormat form
  21. silence = NewSamples(mMaxSamples, format);
  22. wxASSERT(silence);
  23. ClearSamples(silence, format, 0, mMaxSamples);
  24. + return false;
  25. }
  26. int b = FindBlock(start);