Commit 2093e536 authored by Max Kellermann's avatar Max Kellermann

pcm/Export: add GetInputFrameSize()

parent 2f243f22
...@@ -141,7 +141,7 @@ PcmExport::GetOutputFrameSize() const noexcept ...@@ -141,7 +141,7 @@ PcmExport::GetOutputFrameSize() const noexcept
} }
#endif #endif
return channels * sample_format_size(src_sample_format); return GetInputFrameSize();
} }
unsigned unsigned
......
...@@ -185,6 +185,14 @@ public: ...@@ -185,6 +185,14 @@ public:
void Reset() noexcept; 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. * Calculate the size of one output frame.
*/ */
gcc_pure gcc_pure
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment