diff options
author | Max Kellermann <max@musicpd.org> | 2017-11-10 23:05:48 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-11-10 23:05:50 +0100 |
commit | 967d81b78230ddb093820e775d73bc403c85f2f2 (patch) | |
tree | 8fac036ce06e6799b12dd69001664680e35da92a /src/AudioFormat.hxx | |
parent | 20199e770c55a792863ab1ea0156d8acc5c1bb55 (diff) |
AudioFormat: add method MatchMask()
Diffstat (limited to 'src/AudioFormat.hxx')
-rw-r--r-- | src/AudioFormat.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/AudioFormat.hxx b/src/AudioFormat.hxx index 77e710f55..4de0ad1c7 100644 --- a/src/AudioFormat.hxx +++ b/src/AudioFormat.hxx @@ -133,6 +133,11 @@ struct AudioFormat { return result; } + gcc_pure + bool MatchMask(AudioFormat mask) const noexcept { + return WithMask(mask) == *this; + } + /** * Returns the size of each (mono) sample in bytes. */ |