mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-15 23:44:59 +01:00
BlockFile::ReadData overrides: on failure, pad with 0s or throw...
... as the mayThrow argument directs.
This commit is contained in:
@@ -75,14 +75,14 @@ PCMAliasBlockFile::~PCMAliasBlockFile()
|
||||
/// @param start The offset within the block to begin reading
|
||||
/// @param len The number of samples to read
|
||||
size_t PCMAliasBlockFile::ReadData(samplePtr data, sampleFormat format,
|
||||
size_t start, size_t len) const
|
||||
size_t start, size_t len, bool mayThrow) const
|
||||
{
|
||||
if(!mAliasedFileName.IsOk()){ // intentionally silenced
|
||||
memset(data, 0, SAMPLE_SIZE(format) * len);
|
||||
return len;
|
||||
}
|
||||
|
||||
return CommonReadData(
|
||||
return CommonReadData( mayThrow,
|
||||
mAliasedFileName, mSilentAliasLog, this, mAliasStart, mAliasChannel,
|
||||
data, format, start, len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user