HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
ComplexBuffer.h
Go to the documentation of this file.
1#pragma once
2#include "HephShared.h"
3#include "Complex.h"
5#include <initializer_list>
6
9namespace Heph
10{
15 class HEPH_API ComplexBuffer final :
16 public BufferBase<ComplexBuffer, Complex>,
17 public BufferArithmeticOperators<ComplexBuffer, Complex>,
18 public BufferArithmeticOperators<ComplexBuffer, Complex, double>,
19 public BufferArithmeticOperators<ComplexBuffer, Complex, ComplexBuffer, Complex>,
20 public BufferArithmeticOperators<ComplexBuffer, Complex, DoubleBuffer, double>,
21 public BufferUnaryMinusOperator<ComplexBuffer, Complex>
22 {
23 public:
26
28 explicit ComplexBuffer(size_t size);
29
31 ComplexBuffer(size_t size, BufferFlags flags);
32
34 ComplexBuffer(const std::initializer_list<double>& rhs);
35
37 ComplexBuffer(const std::initializer_list<Complex>& rhs);
38
40 explicit ComplexBuffer(const DoubleBuffer& rhs);
41
44
47
48 ComplexBuffer& operator=(const std::initializer_list<double>& rhs);
49 ComplexBuffer& operator=(const std::initializer_list<Complex>& rhs);
50 ComplexBuffer& operator=(const DoubleBuffer& rhs);
51 ComplexBuffer& operator=(const ComplexBuffer& rhs);
52 ComplexBuffer& operator=(ComplexBuffer&& rhs) noexcept;
53
55 void Invert();
56
57 private:
58 static void AddEventHandlers();
59 static void ResultCreatedEventHandler(const Heph::EventParams& params);
60 static void ResultCreatedEventHandlerDouble(const Heph::EventParams& params);
61 static void ResultCreatedEventHandlerComplexBuffer(const Heph::EventParams& params);
62 static void ResultCreatedEventHandlerDoubleBuffer(const Heph::EventParams& params);
63 };
64};
BufferFlags
Definition BufferBase.h:13
#define HEPH_API
Definition HephShared.h:132
provides arithmetic operators to the buffer.
Definition BufferOperators.h:595
base class for buffers. Provides basic buffer operations and methods.
Definition BufferBase.h:31
provides unary minus operator to the buffer.
Definition BufferOperators.h:609
buffer for storing complex numbers.
Definition ComplexBuffer.h:22
ComplexBuffer(ComplexBuffer &&rhs) noexcept
ComplexBuffer(size_t size, BufferFlags flags)
ComplexBuffer(size_t size)
ComplexBuffer(const DoubleBuffer &rhs)
ComplexBuffer(const std::initializer_list< double > &rhs)
ComplexBuffer(const std::initializer_list< Complex > &rhs)
ComplexBuffer(const ComplexBuffer &rhs)
buffer for storing doubles.
Definition DoubleBuffer.h:14
stores the information required to handle an event.
Definition EventParams.h:16