-rw-r--r-- | libopie2/opiemm/osoundsystem.cpp | 12 | ||||
-rw-r--r-- | libopie2/opiemm/osoundsystem.h | 13 |
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 |