Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlankhorst committed Mar 22, 2020
1 parent 4cfa19e commit 0dcc0ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/openrct2-ui/audio/AudioFormat.h
Expand Up @@ -24,11 +24,12 @@ namespace OpenRCT2::Audio
SDL_AudioFormat format;
int32_t channels;

[[nodiscard]] int32_t BytesPerSample() const {
[[nodiscard]] int32_t BytesPerSample() const
{
return (SDL_AUDIO_BITSIZE(format)) / 8; // NOLINT(hicpp-signed-bitwise)
}

[[nodiscard]] int32_t GetByteRate() const
[[nodiscard]] int32_t GetByteRate() const
{
return BytesPerSample() * channels;
}
Expand Down
3 changes: 0 additions & 3 deletions src/openrct2-ui/audio/FileAudioSource.cpp
Expand Up @@ -35,9 +35,6 @@ namespace OpenRCT2::Audio
Unload();
}

[[nodiscard]] uint64_t GetLength() const override { return _dataLength; }

[[nodiscard]] AudioFormat GetFormat() const override
{
return _format;
}
Expand Down
7 changes: 5 additions & 2 deletions src/openrct2-ui/audio/MemoryAudioSource.cpp
Expand Up @@ -41,9 +41,12 @@ namespace OpenRCT2::Audio
Unload();
}

[[nodiscard]] uint64_t GetLength() const override { return _length; }
[[nodiscard]] uint64_t GetLength() const override
{
return _length;
}

[[nodiscard]] AudioFormat GetFormat() const override
[[nodiscard]] AudioFormat GetFormat() const override
{
return _format;
}
Expand Down

0 comments on commit 0dcc0ce

Please sign in to comment.