1 /*
2  * Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3  *           (C) 2020 Vladimir Sadovnikov <sadko4u@gmail.com>
4  *
5  * This file is part of lsp-plugins
6  * Created on: 24 марта 2016 г.
7  *
8  * lsp-plugins is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * any later version.
12  *
13  * lsp-plugins is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with lsp-plugins. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef CORE_FADE_H_
23 #define CORE_FADE_H_
24 
25 #include <core/types.h>
26 
27 namespace lsp
28 {
29     /** Fade-in (with range check)
30      *
31      * @param dst destination buffer
32      * @param src source buffer
33      * @param fade_len length of fade (in elements)
34      * @param buf_len length of the buffer
35      */
36     void fade_in(float *dst, const float *src, size_t fade_len, size_t buf_len);
37 
38     /** Fade-out (with range check)
39      *
40      * @param dst destination buffer
41      * @param src source buffer
42      * @param fade_len length of fade (in elements)
43      * @param buf_len length of the buffer
44      */
45     void fade_out(float *dst, const float *src, size_t fade_len, size_t buf_len);
46 }
47 
48 #endif /* CORE_FADE_H_ */
49