1
// ------------------------------------------------------------------------
2
// audioio_alsa_named.cpp: ALSA 0.9.x named PCM-device input/output.
3
// Copyright (C) 2001-2002 Kai Vehmanen
4
// This program 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.
9
// This program 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.
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
// ------------------------------------------------------------------------
22
#include <kvu_message_item.h>
23
#include <kvu_numtostr.h>
25
#include <alsa/asoundlib.h>
27
#include "audioio_alsa_named.h"
28
#include "eca-error.h"
29
#include "eca-logger.h"
30
#include "eca-version.h"
32
#ifdef ECA_ENABLE_AUDIOIO_PLUGINS
33
static const char* audio_io_keyword_const = "alsa_09";
34
static const char* audio_io_keyword_regex_const = "^alsa_09$";
36
const char* audio_io_keyword(void){return(audio_io_keyword_const); }
37
const char* audio_io_keyword_regex(void){return(audio_io_keyword_regex_const); }
38
AUDIO_IO* audio_io_descriptor(void) { return(new AUDIO_IO_ALSA_PCM_NAMED()); }
39
int audio_io_interface_version(void) { return(ecasound_library_version_current); }
42
AUDIO_IO_ALSA_PCM_NAMED::AUDIO_IO_ALSA_PCM_NAMED (void)
44
set_pcm_device_name("");
47
AUDIO_IO_ALSA_PCM_NAMED::~AUDIO_IO_ALSA_PCM_NAMED(void)
51
AUDIO_IO_ALSA_PCM_NAMED* AUDIO_IO_ALSA_PCM_NAMED::clone(void) const
53
AUDIO_IO_ALSA_PCM_NAMED* target = new AUDIO_IO_ALSA_PCM_NAMED();
54
for(int n = 0; n < number_of_params(); n++) {
55
target->set_parameter(n + 1, get_parameter(n + 1));
60
void AUDIO_IO_ALSA_PCM_NAMED::set_parameter(int param,
69
set_pcm_device_name(value);
74
string AUDIO_IO_ALSA_PCM_NAMED::get_parameter(int param) const
81
return(pcm_device_name());