pcm/Export: add GetInputFrameSize()

This commit is contained in:
Max Kellermann 2019-06-26 15:48:18 +02:00
parent 2f243f2295
commit 2093e53641
2 changed files with 9 additions and 1 deletions

View File

@ -141,7 +141,7 @@ PcmExport::GetOutputFrameSize() const noexcept
}
#endif
return channels * sample_format_size(src_sample_format);
return GetInputFrameSize();
}
unsigned

View File

@ -184,6 +184,14 @@ public:
*/
void Reset() noexcept;
/**
* Calculate the size of one input frame.
*/
gcc_pure
size_t GetInputFrameSize() const noexcept {
return channels * sample_format_size(src_sample_format);
}
/**
* Calculate the size of one output frame.
*/