AudioFormat: remove obsolete method GetTimeToSize()

This commit is contained in:
Max Kellermann 2018-09-22 19:39:20 +02:00
parent 84de88841b
commit bfd261929e

View File

@ -149,12 +149,6 @@ struct AudioFormat {
*/ */
unsigned GetFrameSize() const; unsigned GetFrameSize() const;
/**
* Returns the floating point factor which converts a time
* span to a storage size in bytes.
*/
double GetTimeToSize() const;
template<typename D> template<typename D>
constexpr auto TimeToFrames(D t) const noexcept { constexpr auto TimeToFrames(D t) const noexcept {
using Period = typename D::period; using Period = typename D::period;
@ -236,12 +230,6 @@ AudioFormat::GetFrameSize() const
return GetSampleSize() * channels; return GetSampleSize() * channels;
} }
inline double
AudioFormat::GetTimeToSize() const
{
return sample_rate * GetFrameSize();
}
/** /**
* Renders the #AudioFormat object into a string, e.g. for printing * Renders the #AudioFormat object into a string, e.g. for printing
* it in a log file. * it in a log file.