diff options
author | kleines Filmröllchen <malu.bertsch@gmail.com> | 2021-08-27 16:18:11 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-08-31 17:03:55 +0430 |
commit | a749b166748f46aa562b1f46eb400351f5a9a87a (patch) | |
tree | 053ffbcb40c5afc4a9ff2b193f6607a71354d0d0 /Userland/Libraries/LibAudio | |
parent | 8f4b5774059bbf283915b73d35104167cb8090f7 (diff) | |
download | serenity-a749b166748f46aa562b1f46eb400351f5a9a87a.zip |
Libraries: Add LibDSP
LibDSP is a library for digital signal processing, and is primarily
intended to support the future DAW version of Piano.
Diffstat (limited to 'Userland/Libraries/LibAudio')
-rw-r--r-- | Userland/Libraries/LibAudio/Buffer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibAudio/Buffer.h b/Userland/Libraries/LibAudio/Buffer.h index b00a533dc3..ebf40af0bd 100644 --- a/Userland/Libraries/LibAudio/Buffer.h +++ b/Userland/Libraries/LibAudio/Buffer.h @@ -60,6 +60,12 @@ struct Frame { right *= pct; } + // FIXME: This is temporary until we have log scaling + Frame scaled(double fraction) const + { + return Frame { left * fraction, right * fraction }; + } + Frame& operator+=(const Frame& other) { left += other.left; |