use sequence parameters as audio output parameters

This commit is contained in:
itsmattkc
2019-11-15 20:11:17 +09:00
parent 0081511f18
commit cd69bd76b9
5 changed files with 74 additions and 10 deletions
+14
View File
@@ -48,6 +48,20 @@ const SampleFormat &AudioRenderingParams::format() const
return format_;
}
bool AudioRenderingParams::operator==(const AudioRenderingParams &other)
{
return (format() == other.format()
&& sample_rate() == other.sample_rate()
&& channel_layout() == other.channel_layout());
}
bool AudioRenderingParams::operator!=(const AudioRenderingParams &other)
{
return (format() != other.format()
|| sample_rate() != other.sample_rate()
|| channel_layout() != other.channel_layout());
}
int AudioRenderingParams::time_to_bytes(const rational &time) const
{
Q_ASSERT(is_valid());
+3
View File
@@ -38,6 +38,9 @@ public:
const SampleFormat& format() const;
bool operator==(const AudioRenderingParams& other);
bool operator!=(const AudioRenderingParams& other);
private:
SampleFormat format_;
};