Debian Codegraph @

src/audio/abstract.cpp

raw
1 /**
2 * Furnace Tracker - multi-system chiptune tracker
3 * Copyright (C) 2021-2025 tildearrow and contributors
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #include "taAudio.h"
21 #include "../ta-log.h"
22
23 void TAAudio::setSampleRateChangeCallback(void (*callback)(SampleRateChangeEvent)) {
24 sampleRateChanged=callback;
25 }
26
27 void TAAudio::setBufferSizeChangeCallback(void (*callback)(BufferSizeChangeEvent)) {
28 bufferSizeChanged=callback;
29 }
30
31 void TAAudio::setCallback(void (*callback)(void*,float**,float**,int,int,unsigned int), void* user) {
32 audioProcCallback=callback;
33 audioProcCallbackUser=user;
34 }
35
36 void* TAAudio::getContext() {
37 return NULL;
38 }
39
40 bool TAAudio::quit() {
41 return true;
42 }
43
44 bool TAAudio::setRun(bool run) {
45 running=run;
46 return running;
47 }
48
49 std::vector<String> TAAudio::listAudioDevices() {
50 return std::vector<String>();
51 }
52
53 bool TAAudio::init(TAAudioDesc& request, TAAudioDesc& response) {
54 response=request;
55 return true;
56 }
57
58 TAAudio::~TAAudio() {
59 }
60
61 bool TAMidiIn::gather() {
62 return false;
63 }
64
65 bool TAMidiOut::send(const TAMidiMessage& what) {
66 logE("virtual method TAMidiOut::send() called! this is a bug!");
67 return false;
68 }
69
70 bool TAMidiIn::isDeviceOpen() {
71 return false;
72 }
73
74 bool TAMidiOut::isDeviceOpen() {
75 return false;
76 }
77
78 bool TAMidiIn::openDevice(String name) {
79 return false;
80 }
81
82 bool TAMidiOut::openDevice(String name) {
83 return false;
84 }
85
86 bool TAMidiIn::closeDevice() {
87 return false;
88 }
89
90 bool TAMidiOut::closeDevice() {
91 return false;
92 }
93
94 std::vector<String> TAMidiIn::listDevices() {
95 logW("attempting to list devices of abstract TAMidiIn!");
96 return std::vector<String>();
97 }
98
99 std::vector<String> TAMidiOut::listDevices() {
100 logW("attempting to list devices of abstract TAMidiOut!");
101 return std::vector<String>();
102 }
103
104 bool TAMidiIn::init() {
105 return false;
106 }
107
108 bool TAMidiOut::init() {
109 return false;
110 }
111
112 bool TAMidiIn::quit() {
113 return true;
114 }
115
116 bool TAMidiOut::quit() {
117 return true;
118 }
119
120 TAMidiIn::~TAMidiIn() {
121 }
122
123 TAMidiOut::~TAMidiOut() {
124 }