setting the sound card recording sample rate is now more relaxed
there is no error reported if the sample rate is not exactly the same
This commit is contained in:
parent
a251f4ad26
commit
05335d1d59
|
@ -172,11 +172,17 @@ OssDspSource :: open ( void ) throw ( Exception )
|
|||
}
|
||||
|
||||
u = getSampleRate();
|
||||
if ( ioctl( fileDescriptor, SNDCTL_DSP_SPEED, &u) == -1 ||
|
||||
u != getSampleRate() ) {
|
||||
if ( ioctl( fileDescriptor, SNDCTL_DSP_SPEED, &u) == -1 ) {
|
||||
|
||||
close();
|
||||
throw Exception( __FILE__, __LINE__, "can't set speed", u);
|
||||
throw Exception( __FILE__, __LINE__,
|
||||
"can't set soundcard recording sample rate", u);
|
||||
}
|
||||
if ( u != getSampleRate() ) {
|
||||
reportEvent( 2, "sound card recording sample rate set to ", u,
|
||||
" while trying to set it to ", getSampleRate());
|
||||
reportEvent( 2, "this is probably not a problem, but a slight "
|
||||
"drift in the sound card driver");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -265,6 +271,10 @@ OssDspSource :: close ( void ) throw ( Exception )
|
|||
$Source$
|
||||
|
||||
$Log$
|
||||
Revision 1.8 2001/09/02 14:08:40 darkeye
|
||||
setting the sound card recording sample rate is now more relaxed
|
||||
there is no error reported if the sample rate is not exactly the same
|
||||
|
||||
Revision 1.7 2001/08/30 17:25:56 darkeye
|
||||
renamed configure.h to config.h
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
/* ============================================================ include files */
|
||||
|
||||
#include "Reporter.h"
|
||||
#include "AudioSource.h"
|
||||
|
||||
|
||||
|
@ -53,7 +54,7 @@
|
|||
* @author $Author$
|
||||
* @version $Revision$
|
||||
*/
|
||||
class OssDspSource : public AudioSource
|
||||
class OssDspSource : public AudioSource, public virtual Reporter
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -250,6 +251,10 @@ class OssDspSource : public AudioSource
|
|||
$Source$
|
||||
|
||||
$Log$
|
||||
Revision 1.4 2001/09/02 14:08:40 darkeye
|
||||
setting the sound card recording sample rate is now more relaxed
|
||||
there is no error reported if the sample rate is not exactly the same
|
||||
|
||||
Revision 1.3 2000/11/12 13:31:40 darkeye
|
||||
added kdoc-style documentation comments
|
||||
|
||||
|
|
Loading…
Reference in New Issue