gtkIOStream
1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
ALSA.H
Go to the documentation of this file.
1
/* Copyright 2000-2018 Matt Flax <flatmax@flatmax.org>
2
This file is part of GTK+ IOStream class set
3
4
GTK+ IOStream is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
8
9
GTK+ IOStream is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You have received a copy of the GNU General Public License
15
along with GTK+ IOStream
16
*/
17
#ifndef ALSA_H
18
#define ALSA_H
19
20
#pragma GCC diagnostic push
21
#pragma GCC diagnostic ignored "-Wignored-attributes"
22
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
23
#include <Eigen/Dense>
24
#pragma GCC diagnostic pop
25
26
namespace
ALSA
{
27
28
#define PCM_NOT_OPEN_CHECK_NO_PRINT(pcm, type) {if (!pcm) return (type)ALSADebug().evaluateError(ALSA_PCM_NOT_OPEN_ERROR);}
29
#define PCM_NOT_OPEN_CHECK_TYPED(pcm, type) {printf("\t\tfunc: %s\n",__func__); PCM_NOT_OPEN_CHECK_NO_PRINT(pcm, type)}
30
#define PCM_NOT_OPEN_CHECK(pcm) PCM_NOT_OPEN_CHECK_TYPED(pcm, int)
31
#define PCM_NOT_OPEN_CHECK_STRING(pcm) {printf("\t\tfunc: %s\n",__func__); if (!pcm) return "PCM not open error";}
32
33
#define MIXER_NOT_OPEN_CHECK_NO_PRINT(handle, type) {if (!handle) return (type)ALSADebug().evaluateError(ALSA_MIXER_NOT_OPEN_ERROR);}
34
#define MIXER_NOT_OPEN_CHECK_TYPED(handle, type) {printf("\t\tfunc: %s\n",__func__); MIXER_NOT_OPEN_CHECK_NO_PRINT(handle, type)}
35
#define MIXER_NOT_OPEN_CHECK(handle) MIXER_NOT_OPEN_CHECK_TYPED(handle, int)
36
37
#define ALSA_DEFAULT_START_FS 48000
38
#define ALSA_DEFAULT_FORMAT SND_PCM_FORMAT_S16_LE
39
#define ALSA_DEFAULT_CHANNELS 2
40
}
41
42
#include <
ALSA/ALSADebug.H
>
43
#include <
ALSA/PCM.H
>
44
#include <
ALSA/Hardware.H
>
45
#include <
ALSA/Software.H
>
46
#include <
ALSA/Stream.H
>
47
#include <
ALSA/Playback.H
>
48
#include <
ALSA/Capture.H
>
49
#include <
ALSA/FullDuplex.H
>
50
#include <
ALSA/Mixer.H
>
51
#endif // ALSA_H
Capture.H
Stream.H
Software.H
ALSA
Definition:
ALSA.H:26
PCM.H
ALSADebug.H
Playback.H
Hardware.H
Mixer.H
FullDuplex.H
gtkIOStream: /tmp/gtkiostream/include/ALSA/ALSA.H Source File
Support this project by purchasing our hardware.
GTK+ IOStream
Beta