From: tho Date: Wed, 23 Jun 2010 11:21:00 +0000 (+0000) Subject: Utils: Beeper::start_beep() is public now X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=95433c552aec98efafbd6d94924a9266466ab948;hp=0b8ca53e27f21515b66491c8df3d480c77810346;p=senf.git Utils: Beeper::start_beep() is public now git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1641 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Utils/Beeper.cc b/senf/Utils/Beeper.cc index bb4517e..4b6a6cc 100644 --- a/senf/Utils/Beeper.cc +++ b/senf/Utils/Beeper.cc @@ -21,16 +21,14 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief TypeInfo non-inline non-template implementation */ + \brief Beeper non-inline non-template implementation */ #include "Beeper.hh" //#include "Beeper.ih" // Custom includes #include -#include #include -#include #include #include "Exception.hh" @@ -54,16 +52,6 @@ prefix_ senf::Beeper::~Beeper() ::close(fd_); } -prefix_ bool senf::Beeper::start_beep(float freq) -{ - return ::ioctl(fd_, KIOCSOUND, (int)(CLOCK_TICK_RATE/freq)) == 0; -} - -prefix_ void senf::Beeper::stop_beep() -{ - ::ioctl(fd_, KIOCSOUND, 0); -} - prefix_ void senf::Beeper::beep_sync(float freq, unsigned length, unsigned count, unsigned delay) { for (unsigned i = 0; i < count; ++i) { diff --git a/senf/Utils/Beeper.cci b/senf/Utils/Beeper.cci new file mode 100644 index 0000000..ef6c05e --- /dev/null +++ b/senf/Utils/Beeper.cci @@ -0,0 +1,58 @@ +// $Id$ +// +// Copyright (C) 2010 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Thorsten Horstmann +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/** \file + \brief Beeper inline non-template implementation */ + +// Custom includes +#include +#include + +#define prefix_ inline +///////////////////////////////cci.p//////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////// +// senf::Beeper + +prefix_ bool senf::Beeper::start_beep(float freq) +{ + return ::ioctl(fd_, KIOCSOUND, (int)(CLOCK_TICK_RATE/freq)) == 0; +} + +prefix_ void senf::Beeper::stop_beep() +{ + ::ioctl(fd_, KIOCSOUND, 0); +} + +///////////////////////////////cci.e//////////////////////////////////////// +#undef prefix_ + + +// Local Variables: +// mode: c++ +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 +// End: diff --git a/senf/Utils/Beeper.hh b/senf/Utils/Beeper.hh index 7a29d60..072a9d7 100644 --- a/senf/Utils/Beeper.hh +++ b/senf/Utils/Beeper.hh @@ -54,20 +54,24 @@ namespace senf { void beep_sync(float freq, unsigned length, unsigned count = 1, unsigned delay = 100); ///< play beep synchronous - /**< \param freq frequency in Hz, where 0