From c9e509b4c512383e14d73ac90680460d9f185185 Mon Sep 17 00:00:00 2001 From: darkeye Date: Fri, 20 Dec 2002 10:40:40 +0000 Subject: [PATCH] added support for big endian OSS devices (like Linux PowerPC) --- darkice/trunk/ChangeLog | 1 + darkice/trunk/src/OssDspSource.cpp | 15 ++++++++++++++- darkice/trunk/src/OssDspSource.h | 12 ++++++------ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/darkice/trunk/ChangeLog b/darkice/trunk/ChangeLog index bb2312b..cc9f7da 100644 --- a/darkice/trunk/ChangeLog +++ b/darkice/trunk/ChangeLog @@ -5,6 +5,7 @@ DarkIce next version: o bugfix: MultiThreadedConnector::sinkThread() was private, now public o added fileAddDate configuration option thanks to Nicu Pavel + o added support for big endian OSS devices (like Linux PowerPC) 20-10-2002: DarkIce 0.12 released diff --git a/darkice/trunk/src/OssDspSource.cpp b/darkice/trunk/src/OssDspSource.cpp index 31be6d3..23f3a80 100644 --- a/darkice/trunk/src/OssDspSource.cpp +++ b/darkice/trunk/src/OssDspSource.cpp @@ -108,6 +108,16 @@ static const char fileid[] = "$Id$"; /* ============================================================= module code */ +/*------------------------------------------------------------------------------ + * Tell if source id big endian + *----------------------------------------------------------------------------*/ +bool +OssDspSource :: isBigEndian ( void ) const throw () +{ + return AFMT_S16_NE == AFMT_S16_BE; +} + + /*------------------------------------------------------------------------------ * Initialize the object *----------------------------------------------------------------------------*/ @@ -154,7 +164,7 @@ OssDspSource :: open ( void ) throw ( Exception ) break; case 16: - format = AFMT_S16_LE; + format = AFMT_S16_NE; break; default: @@ -285,6 +295,9 @@ OssDspSource :: close ( void ) throw ( Exception ) $Source$ $Log$ + Revision 1.12 2002/12/20 10:40:40 darkeye + added support for big endian OSS devices (like Linux PowerPC) + Revision 1.11 2002/05/28 12:35:41 darkeye code cleanup: compiles under gcc-c++ 3.1, using -pedantic option diff --git a/darkice/trunk/src/OssDspSource.h b/darkice/trunk/src/OssDspSource.h index 281ce56..b85f59f 100644 --- a/darkice/trunk/src/OssDspSource.h +++ b/darkice/trunk/src/OssDspSource.h @@ -176,13 +176,10 @@ class OssDspSource : public AudioSource, public virtual Reporter /** * Tell if the data from this source comes in big or little endian. * - * @return false + * @return true if the source is big endian, false otherwise */ - virtual inline bool - isBigEndian ( void ) const throw () - { - return false; - } + virtual bool + isBigEndian ( void ) const throw (); /** * Open the OssDspSource. @@ -262,6 +259,9 @@ class OssDspSource : public AudioSource, public virtual Reporter $Source$ $Log$ + Revision 1.6 2002/12/20 10:40:40 darkeye + added support for big endian OSS devices (like Linux PowerPC) + Revision 1.5 2001/09/18 14:57:19 darkeye finalized Solaris port