Warning, file /multimedia/libkcompactdisc/src/wmlib/audio/audio.c was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*  This file is part of the KDE project
0002     Copyright (C) 2006 Alexander Kern <alex.kern@gmx.de>
0003 
0004     This library is free software; you can redistribute it and/or
0005     modify it under the terms of the GNU Library General Public
0006     License version 2 as published by the Free Software Foundation.
0007 
0008     This library is distributed in the hope that it will be useful,
0009     but WITHOUT ANY WARRANTY; without even the implied warranty of
0010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0011     Library General Public License for more details.
0012 
0013     You should have received a copy of the GNU Library General Public License
0014     along with this library; see the file COPYING.LIB.  If not, write to
0015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0016     Boston, MA 02110-1301, USA.
0017 */
0018 
0019 #include "audio.h"
0020 #include "../include/wm_config.h"
0021 
0022 #include <config-alsa.h>
0023 
0024 #include <string.h>
0025 
0026 struct audio_oops *setup_phonon(const char *dev, const char *ctl);
0027 struct audio_oops *setup_arts(const char *dev, const char *ctl);
0028 struct audio_oops *setup_alsa(const char *dev, const char *ctl);
0029 
0030 struct audio_oops *setup_soundsystem(const char *ss, const char *dev, const char *ctl)
0031 {
0032   if(!ss) {
0033     ERRORLOG("audio: Internal error, trying to setup a NULL soundsystem.\n");
0034     return NULL;
0035   }
0036 
0037   if(!strcmp(ss, "phonon")) {
0038     ERRORLOG("audio: phonon has own reader and output driver.\n");
0039     return NULL;
0040   }
0041 #ifdef USE_ARTS
0042   if(!strcmp(ss, "arts"))
0043     return setup_arts(dev, ctl);
0044 #endif
0045 #if defined(HAVE_ALSA)
0046   if(!strcmp(ss, "alsa"))
0047     return setup_alsa(dev, ctl);
0048 #endif
0049 #if defined(sun) || defined(__sun__)
0050   if(!strcmp(ss, "sun"))
0051     return setup_sun_audio(dev, ctl);
0052 #endif
0053   ERRORLOG("audio: unknown soundsystem '%s'\n", ss);
0054   return NULL;
0055 }