summaryrefslogtreecommitdiff
path: root/libopie2/opiemm
authormickeyl <mickeyl>2005-05-19 11:59:32 (UTC)
committer mickeyl <mickeyl>2005-05-19 11:59:32 (UTC)
commited7ba8b228d3d0ffae9c9b68900b7f723d7ade4a (patch) (side-by-side diff)
tree83b59755f58747cdb7e543a4c237e9e217b03fbd /libopie2/opiemm
parentcb243f00d12c5fc40de02e7f9f20009b52303a66 (diff)
downloadopie-ed7ba8b228d3d0ffae9c9b68900b7f723d7ade4a.zip
opie-ed7ba8b228d3d0ffae9c9b68900b7f723d7ade4a.tar.gz
opie-ed7ba8b228d3d0ffae9c9b68900b7f723d7ade4a.tar.bz2
- add linux pcmcia subsystem wrapper: OPcmciaSystem and OPcmciaCard
- move linux-only subsystems in subdirectory linux - minor header cleanups
Diffstat (limited to 'libopie2/opiemm') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiemm/osoundsystem.cpp12
-rw-r--r--libopie2/opiemm/osoundsystem.h13
2 files changed, 13 insertions, 12 deletions
diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp
index 2956682..6f849cd 100644
--- a/libopie2/opiemm/osoundsystem.cpp
+++ b/libopie2/opiemm/osoundsystem.cpp
@@ -1,70 +1,72 @@
/*
                This file is part of the Opie Project
-              (C) 2003-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
- =.
+ =. (C) 2003-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
.=l.
           .>+-=
 _;:,     .>    :=|. This program is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This program is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
-#include <opie2/osoundsystem.h>
+#include "osoundsystem.h"
+using namespace Opie::MM;
+
+/* OPIE */
#include <opie2/odebug.h>
+using namespace Opie::Core;
+/* STD */
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/soundcard.h>
#include <sys/stat.h>
static const char* device_label[] = SOUND_DEVICE_LABELS;
static int max_device_nr = sizeof device_label / sizeof (const char*);
-using namespace Opie::Core;
-using namespace Opie::MM;
/*======================================================================================
* OSoundSystem
*======================================================================================*/
OSoundSystem* OSoundSystem::_instance = 0;
OSoundSystem::OSoundSystem()
{
odebug << "OSoundSystem::OSoundSystem()" << oendl;
synchronize();
}
void OSoundSystem::synchronize()
{
_interfaces.clear();
_interfaces.insert( "soundcard", new OSoundCard( this, "soundcard" ) );
/*
QString str;
QFile f( "/dev/sound" );
bool hasFile = f.open( IO_ReadOnly );
if ( !hasFile )
{
diff --git a/libopie2/opiemm/osoundsystem.h b/libopie2/opiemm/osoundsystem.h
index 5f6fb7a..1e48f5c 100644
--- a/libopie2/opiemm/osoundsystem.h
+++ b/libopie2/opiemm/osoundsystem.h
@@ -1,78 +1,77 @@
/*
                This file is part of the Opie Project
-              (C) 2003-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
- =.
+ =. (C) 2003-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
.=l.
           .>+-=
 _;:,     .>    :=|. This program is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
    .%`+i>       _;_.
    .i_,=:_.      -<s. This program is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef OSOUNDSYSTEM_H
#define OSOUNDSYSTEM_H
#include <qobject.h>
#include <qdict.h>
#include <qmap.h>
namespace Opie {
namespace MM {
class OAudioInterface;
class OMixerInterface;
class OSoundCard;
/*======================================================================================
* OSoundSystem
*======================================================================================*/
/**
- * @brief A container class for all audio interfaces
+ * @brief A container class for the Linux OSS/ALSA audio subsystem
*
- * This class provides access to all available audio/midi/sequencer interfaces of your computer.
+ * This class provides access to all available audio/midi/sequencer interfaces of your device.
*
- * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
+ * @author Michael 'Mickey' Lauer <mickey@Vanille.de>
*/
class OSoundSystem : public QObject
{
Q_OBJECT
public:
typedef QDict<OSoundCard> CardMap;
typedef QDictIterator<OSoundCard> CardIterator;
public:
/**
* @returns the number of available interfaces
*/
int count() const;
/**
* @returns a pointer to the (one and only) @ref OSystem instance.
*/
static OSoundSystem* instance();
/**
* @returns an iterator usable for iterating through all sound cards.
*/
CardIterator iterator() const;
/**
* @returns a pointer to the @ref OAudioInterface object for the specified @a interface or 0, if not found