Welcome to mirror list, hosted at ThFree Co, Russian Federation.

DspMatrix.h « src - github.com/mpc-hc/sanear.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f02ab180b1c14a132a731604da372478be6a4750 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once

#include "DspChunk.h"

namespace SaneAudioRenderer
{
    class DspMatrix final
    {
    public:

        DspMatrix() = default;
        DspMatrix(const DspMatrix&) = delete;
        DspMatrix& operator=(const DspMatrix&) = delete;

        void Initialize(uint32_t inputChannels, DWORD inputMask,
                        uint32_t outputChannels, DWORD outputMask);

        void Process(DspChunk& chunk);
        void Finish(DspChunk& chunk);

        static DWORD GetChannelMask(const WAVEFORMATEXTENSIBLE& format);

    private:

        std::unique_ptr<float[]> m_matrix;
        uint32_t m_inputChannels;
        uint32_t m_outputChannels;
    };
}