some exception cleanup (throw clauses in function declarations)

This commit is contained in:
darkeye 2002-07-21 08:47:06 +00:00
parent 591e52f9ef
commit 6724dec6c6
3 changed files with 18 additions and 6 deletions

View File

@ -178,7 +178,7 @@ class BufferedSink : public Sink, public virtual Reporter
* @see #chunkSize * @see #chunkSize
*/ */
inline bool inline bool
align ( void ) align ( void ) throw ( Exception )
{ {
char b[] = { 0 }; char b[] = { 0 };
@ -391,6 +391,9 @@ class BufferedSink : public Sink, public virtual Reporter
$Source$ $Source$
$Log$ $Log$
Revision 1.7 2002/07/21 08:47:06 darkeye
some exception cleanup (throw clauses in function declarations)
Revision 1.6 2002/05/28 12:35:41 darkeye Revision 1.6 2002/05/28 12:35:41 darkeye
code cleanup: compiles under gcc-c++ 3.1, using -pedantic option code cleanup: compiles under gcc-c++ 3.1, using -pedantic option

View File

@ -289,7 +289,7 @@ Util :: conv8 ( unsigned char * pcmBuffer,
unsigned int lenPcmBuffer, unsigned int lenPcmBuffer,
short int * leftBuffer, short int * leftBuffer,
short int * rightBuffer, short int * rightBuffer,
unsigned int channels ) unsigned int channels ) throw ( Exception )
{ {
if ( channels == 1 ) { if ( channels == 1 ) {
unsigned int i, j; unsigned int i, j;
@ -301,7 +301,7 @@ Util :: conv8 ( unsigned char * pcmBuffer,
leftBuffer[j] = (short int) value; leftBuffer[j] = (short int) value;
++j; ++j;
} }
} else { } else if ( channels == 2 ) {
unsigned int i, j; unsigned int i, j;
for ( i = 0, j = 0; i < lenPcmBuffer; ) { for ( i = 0, j = 0; i < lenPcmBuffer; ) {
@ -313,6 +313,9 @@ Util :: conv8 ( unsigned char * pcmBuffer,
rightBuffer[j] = (short int) value; rightBuffer[j] = (short int) value;
++j; ++j;
} }
} else {
throw Exception( __FILE__, __LINE__,
"this number of channels not supported", channels);
} }
} }
@ -327,7 +330,7 @@ Util :: conv16 ( unsigned char * pcmBuffer,
short int * leftBuffer, short int * leftBuffer,
short int * rightBuffer, short int * rightBuffer,
unsigned int channels, unsigned int channels,
bool isBigEndian ) bool isBigEndian ) throw ( Exception )
{ {
if ( isBigEndian ) { if ( isBigEndian ) {
if ( channels == 1 ) { if ( channels == 1 ) {
@ -393,6 +396,9 @@ Util :: conv16 ( unsigned char * pcmBuffer,
$Source$ $Source$
$Log$ $Log$
Revision 1.8 2002/07/21 08:47:06 darkeye
some exception cleanup (throw clauses in function declarations)
Revision 1.7 2002/03/28 16:45:46 darkeye Revision 1.7 2002/03/28 16:45:46 darkeye
added functions strToD(), conv8(), conv16() and conv() added functions strToD(), conv8(), conv16() and conv()

View File

@ -251,7 +251,7 @@ class Util
unsigned int lenPcmBuffer, unsigned int lenPcmBuffer,
short int * leftBuffer, short int * leftBuffer,
short int * rightBuffer, short int * rightBuffer,
unsigned int channels ); unsigned int channels ) throw ( Exception );
/** /**
* Convert a char buffer holding 16 bit PCM values to a short buffer * Convert a char buffer holding 16 bit PCM values to a short buffer
@ -271,7 +271,7 @@ class Util
short int * leftBuffer, short int * leftBuffer,
short int * rightBuffer, short int * rightBuffer,
unsigned int channels, unsigned int channels,
bool isBigEndian ); bool isBigEndian ) throw ( Exception );
}; };
@ -291,6 +291,9 @@ class Util
$Source$ $Source$
$Log$ $Log$
Revision 1.6 2002/07/21 08:47:06 darkeye
some exception cleanup (throw clauses in function declarations)
Revision 1.5 2002/03/28 16:45:46 darkeye Revision 1.5 2002/03/28 16:45:46 darkeye
added functions strToD(), conv8(), conv16() and conv() added functions strToD(), conv8(), conv16() and conv()