mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-13 08:06:32 +01:00
Return wide type from ImportFileHandle::GetFileUncompressedBytes()...
... and use override. But this function isn't (yet?) used anywhere.
This commit is contained in:
@@ -204,7 +204,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
wxString GetFileDescription();
|
wxString GetFileDescription();
|
||||||
int GetFileUncompressedBytes();
|
ByteCount GetFileUncompressedBytes() override;
|
||||||
|
|
||||||
///! Imports audio
|
///! Imports audio
|
||||||
///\return import status (see Import.cpp)
|
///\return import status (see Import.cpp)
|
||||||
@@ -460,7 +460,7 @@ wxString FFmpegImportFileHandle::GetFileDescription()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int FFmpegImportFileHandle::GetFileUncompressedBytes()
|
auto FFmpegImportFileHandle::GetFileUncompressedBytes() -> ByteCount
|
||||||
{
|
{
|
||||||
// TODO: Get Uncompressed byte count.
|
// TODO: Get Uncompressed byte count.
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ public:
|
|||||||
bool Init();
|
bool Init();
|
||||||
|
|
||||||
wxString GetFileDescription();
|
wxString GetFileDescription();
|
||||||
int GetFileUncompressedBytes();
|
ByteCount GetFileUncompressedBytes() override;
|
||||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||||
Tags *tags) override;
|
Tags *tags) override;
|
||||||
|
|
||||||
@@ -427,7 +427,7 @@ wxString FLACImportFileHandle::GetFileDescription()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int FLACImportFileHandle::GetFileUncompressedBytes()
|
auto FLACImportFileHandle::GetFileUncompressedBytes() -> ByteCount
|
||||||
{
|
{
|
||||||
// TODO: Get Uncompressed byte count.
|
// TODO: Get Uncompressed byte count.
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ public:
|
|||||||
bool Init();
|
bool Init();
|
||||||
|
|
||||||
wxString GetFileDescription();
|
wxString GetFileDescription();
|
||||||
int GetFileUncompressedBytes();
|
ByteCount GetFileUncompressedBytes() override;
|
||||||
|
|
||||||
///! Called by Import.cpp
|
///! Called by Import.cpp
|
||||||
///\return number of readable audio streams in the file
|
///\return number of readable audio streams in the file
|
||||||
@@ -1005,8 +1005,8 @@ GStreamerImportFileHandle::GetFileDescription()
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Return number of uncompressed bytes in file...doubtful this is possible
|
// Return number of uncompressed bytes in file...doubtful this is possible
|
||||||
int
|
auto
|
||||||
GStreamerImportFileHandle::GetFileUncompressedBytes()
|
GStreamerImportFileHandle::GetFileUncompressedBytes() -> ByteCount
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ public:
|
|||||||
~LOFImportFileHandle();
|
~LOFImportFileHandle();
|
||||||
|
|
||||||
wxString GetFileDescription();
|
wxString GetFileDescription();
|
||||||
int GetFileUncompressedBytes();
|
ByteCount GetFileUncompressedBytes() override;
|
||||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||||
Tags *tags) override;
|
Tags *tags) override;
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@ wxString LOFImportFileHandle::GetFileDescription()
|
|||||||
return DESC;
|
return DESC;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LOFImportFileHandle::GetFileUncompressedBytes()
|
auto LOFImportFileHandle::GetFileUncompressedBytes() -> ByteCount
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public:
|
|||||||
~MP3ImportFileHandle();
|
~MP3ImportFileHandle();
|
||||||
|
|
||||||
wxString GetFileDescription();
|
wxString GetFileDescription();
|
||||||
int GetFileUncompressedBytes();
|
ByteCount GetFileUncompressedBytes() override;
|
||||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||||
Tags *tags) override;
|
Tags *tags) override;
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ wxString MP3ImportFileHandle::GetFileDescription()
|
|||||||
return DESC;
|
return DESC;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MP3ImportFileHandle::GetFileUncompressedBytes()
|
auto MP3ImportFileHandle::GetFileUncompressedBytes() -> ByteCount
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ public:
|
|||||||
~OggImportFileHandle();
|
~OggImportFileHandle();
|
||||||
|
|
||||||
wxString GetFileDescription();
|
wxString GetFileDescription();
|
||||||
int GetFileUncompressedBytes();
|
ByteCount GetFileUncompressedBytes() override;
|
||||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||||
Tags *tags) override;
|
Tags *tags) override;
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ wxString OggImportFileHandle::GetFileDescription()
|
|||||||
return DESC;
|
return DESC;
|
||||||
}
|
}
|
||||||
|
|
||||||
int OggImportFileHandle::GetFileUncompressedBytes()
|
auto OggImportFileHandle::GetFileUncompressedBytes() -> ByteCount
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public:
|
|||||||
~PCMImportFileHandle();
|
~PCMImportFileHandle();
|
||||||
|
|
||||||
wxString GetFileDescription();
|
wxString GetFileDescription();
|
||||||
int GetFileUncompressedBytes();
|
ByteCount GetFileUncompressedBytes() override;
|
||||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||||
Tags *tags) override;
|
Tags *tags) override;
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ wxString PCMImportFileHandle::GetFileDescription()
|
|||||||
return SFCall<wxString>(sf_header_name, mInfo.format);
|
return SFCall<wxString>(sf_header_name, mInfo.format);
|
||||||
}
|
}
|
||||||
|
|
||||||
int PCMImportFileHandle::GetFileUncompressedBytes()
|
auto PCMImportFileHandle::GetFileUncompressedBytes() -> ByteCount
|
||||||
{
|
{
|
||||||
return mInfo.frames * mInfo.channels * SAMPLE_SIZE(mFormat);
|
return mInfo.frames * mInfo.channels * SAMPLE_SIZE(mFormat);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,8 +147,10 @@ public:
|
|||||||
virtual wxString GetFileDescription() = 0;
|
virtual wxString GetFileDescription() = 0;
|
||||||
|
|
||||||
// Return an estimate of how many bytes the file will occupy once
|
// Return an estimate of how many bytes the file will occupy once
|
||||||
// imported
|
// imported. In principle this may exceed main memory, so don't use
|
||||||
virtual int GetFileUncompressedBytes() = 0;
|
// size_t.
|
||||||
|
using ByteCount = unsigned long long;
|
||||||
|
virtual ByteCount GetFileUncompressedBytes() = 0;
|
||||||
|
|
||||||
// do the actual import, creating whatever tracks are necessary with
|
// do the actual import, creating whatever tracks are necessary with
|
||||||
// the TrackFactory and calling the progress callback every iteration
|
// the TrackFactory and calling the progress callback every iteration
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ class QTImportFileHandle final : public ImportFileHandle
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxString GetFileDescription();
|
wxString GetFileDescription();
|
||||||
int GetFileUncompressedBytes();
|
ByteCount GetFileUncompressedBytes() override;
|
||||||
|
|
||||||
wxInt32 GetStreamCount()
|
wxInt32 GetStreamCount()
|
||||||
{
|
{
|
||||||
@@ -219,7 +219,7 @@ wxString QTImportFileHandle::GetFileDescription()
|
|||||||
return DESC;
|
return DESC;
|
||||||
}
|
}
|
||||||
|
|
||||||
int QTImportFileHandle::GetFileUncompressedBytes()
|
auto QTImportFileHandle::GetFileUncompressedBytes() -> ByteCount
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -460,8 +460,8 @@ void QTImportFileHandle::AddMetadata(Tags *tags)
|
|||||||
|
|
||||||
QTPropertyValuePtr outValPtr = nil;
|
QTPropertyValuePtr outValPtr = nil;
|
||||||
QTPropertyValueType outPropType;
|
QTPropertyValueType outPropType;
|
||||||
ByteCount outPropValueSize;
|
::ByteCount outPropValueSize;
|
||||||
ByteCount outPropValueSizeUsed = 0;
|
::ByteCount outPropValueSizeUsed = 0;
|
||||||
UInt32 outPropFlags;
|
UInt32 outPropFlags;
|
||||||
UInt32 dataType;
|
UInt32 dataType;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user