-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#pragma once | ||
|
||
#include <functional> | ||
|
||
#include "../Filter.hpp" | ||
#include "../Listener.hpp" | ||
#include "../Sound.hpp" | ||
|
||
namespace Dynamo::Sound { | ||
/** | ||
* @brief Audio filter graph. | ||
* | ||
* Multiple sources, single sink. | ||
* | ||
* TODO: Implement this | ||
* | ||
*/ | ||
class FilterGraph : public Filter { | ||
std::vector<FilterRef> _nodes; | ||
std::unordered_map<unsigned, std::vector<unsigned>> _adjacency; | ||
|
||
public: | ||
Sound &apply(Sound &src, | ||
const unsigned src_offset, | ||
const unsigned length, | ||
const Material &material, | ||
const ListenerProperties &listener) override; | ||
|
||
/** | ||
* @brief Add an edge to the filter graph. | ||
* | ||
* @param from | ||
* @param to | ||
*/ | ||
void add_edge(Filter &from, Filter &to); | ||
}; | ||
|
||
/** | ||
* @brief Filter graph reference. | ||
* | ||
*/ | ||
using FilterGraphRef = std::reference_wrapper<FilterGraph>; | ||
} // namespace Dynamo::Sound |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters