Yet Another Synthesizer Engine
 
Loading...
Searching...
No Matches
audio.hh
1//
2// YASE Audio Module Header
3//
4// Copyright (C) 2022 Eric Klavins
5// This file is part of YASE
6//
7// YASE is free software: you can redistribute it and/or modify it under the
8// terms of the GNU General Public License as published by the Free Software
9// Foundation, either version 3 of the License, or (at your option) any later
10// version.
11//
12// YASE is distributed in the hope that it will be useful, but WITHOUT ANY
13// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15// details.
16//
17// You should have received a copy of the GNU General Public License along
18// with YASE. If not, see <https://www.gnu.org/licenses/>.
19//
20
21#ifndef YASE_AUDIO_H
22#define YASE_AUDIO_H
23
24#include "portaudio.h"
25#include "globals.hh"
26#include "module.hh"
27
28namespace yase {
29
31
46 class Audio : public Module {
47
48 public:
49
50 Audio(int num_output_channels=2, int num_input_channels=0);
51 void init();
52 void update();
53
54 private:
55
56 PaStreamParameters outputParameters, inputParameters;
57 PaStream *stream;
58 PaError err;
59
60 int frame;
61 int left, right;
62 int num_output_channels,
63 num_input_channels;
64
65 float * output_buffer, * input_buffer;
66
67 bool initialized;
68
69 };
70
71}
72
73#endif
A module wrapper for a stereo PortAudio interface (http://www.portaudio.com/).
Definition audio.hh:46
void update()
Definition audio.cc:140
void init()
Definition audio.cc:55
An abstract base class for modules.
Definition module.hh:39
Definition additive_saw.cc:24