- added MultiBuffer

- improved tests
This commit is contained in:
2025-10-27 21:48:51 +01:00
parent 9fedd040b3
commit 7f66f9e60d
7 changed files with 153 additions and 19 deletions
+19 -5
View File
@@ -7,10 +7,10 @@
template<typename T>
void print(dsp::BufferView<T> &v, size_t size)
{
// for(const auto&i : v)
// {
// std::cout << i << std::endl;
// }
for(const auto&i : v)
{
std::cout << i << std::endl;
}
std::cout << "----------------------------------------------" << std::endl;
for (int i=0; i < size; i++)
{
@@ -19,8 +19,17 @@ void print(dsp::BufferView<T> &v, size_t size)
}
int main()
static void info()
{
std::cout << "----------------------------------------------" << std::endl;
std::cout << "Start test_buffer()" << std::endl;
std::cout << "----------------------------------------------" << std::endl;
}
int test_buffer()
{
info();
dsp::Buffer<int> buffer(10);
printf("Buffer capacity = %zu\n", buffer.capacity());
for (int i=0; i < 10; i++)
@@ -44,5 +53,10 @@ int main()
v2[2] = 77;
print(v2,10);
for(const auto&i : buffer)
{
std::cout << i+100 << std::endl;
}
return 0;
}