CLAM-Development  1.4.0
AudioIO.hxx
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG)
3  * UNIVERSITAT POMPEU FABRA
4  *
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  */
21 
22 #ifndef __AudioIO__
23 #define __AudioIO__
24 
25 #include "Audio.hxx"
26 #include "Processing.hxx"
27 
28 #ifdef WIN32
29 //#define DEFAULT_AUDIO_ARCH "directx"
30 //#define DEFAULT_AUDIO_ARCH "portaudio"
31 #define DEFAULT_AUDIO_ARCH "rtaudio"
32 #else
33 #ifdef linux
34 #define DEFAULT_AUDIO_ARCH "alsa"
35 #else
36 #define DEFAULT_AUDIO_ARCH "rtaudio"
37 #endif
38 #endif
39 
40 namespace CLAM {
41 
51  {
52  public:
55  DYN_ATTRIBUTE (0, public, std::string, Device);
57  DYN_ATTRIBUTE (1, public, int, ChannelID);
59  DYN_ATTRIBUTE (2, public, int, FrameSize);
61  DYN_ATTRIBUTE (3, public, int, SampleRate);
62  protected:
63  void DefaultInit(void)
64  {
65  AddAll();
66  UpdateData();
67 
68  SetDevice("default:default");
69  SetChannelID(0);
70  SetSampleRate(0); /* leave it to the device */
71  SetFrameSize(512);
72  }
73  };
74 
75 
76 }
77 
78 #endif
79