bug fix with uninitialized variables

This commit is contained in:
Volker Fischer 2011-06-28 20:17:03 +00:00
parent f62ee2f6be
commit 32ff224982
2 changed files with 11 additions and 1 deletions

View File

@ -67,6 +67,14 @@ if ( jack_get_sample_rate ( pJackClient ) != SYSTEM_SAMPLE_RATE_HZ )
output_port_right = jack_port_register ( pJackClient, "output right",
JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0 );
if ( ( input_port_left == NULL ) ||
( input_port_right == NULL ) ||
( output_port_left == NULL ) ||
( output_port_right == NULL ) )
{
throw CGenErr ( tr ( "Jack port registering failed" ) );
}
const char** ports;
// tell the JACK server that we are ready to roll
@ -257,3 +265,4 @@ void CSound::shutdownCallback ( void* )
throw CGenErr ( tr ( "Jack server was shut down" ) );
}
#endif // WITH_SOUND

View File

@ -59,7 +59,8 @@ class CSound : public CSoundBase
{
public:
CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ), void* arg ) :
CSoundBase ( true, fpNewProcessCallback, arg ) { OpenJack(); }
CSoundBase ( true, fpNewProcessCallback, arg ), iJACKBufferSizeMono ( 0 ),
iJACKBufferSizeStero ( 0 ) { OpenJack(); }
virtual ~CSound() { CloseJack(); }
virtual int Init ( const int iNewPrefMonoBufferSize );