preliminary fix for Jack interface

This commit is contained in:
Volker Fischer 2009-03-10 18:39:29 +00:00
parent 1f8549d00d
commit dfbbfb3db5

View file

@ -43,11 +43,13 @@ if ( jack_get_sample_rate ( pJackClient ) != SND_CRD_SAMPLE_RATE )
// create four ports (two for input, two for output -> stereo) // create four ports (two for input, two for output -> stereo)
input_port_left = jack_port_register ( pJackClient, "input left", input_port_left = jack_port_register ( pJackClient, "input left",
JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0 ); JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0 );
input_port_right = jack_port_register ( pJackClient, "input right", input_port_right = jack_port_register ( pJackClient, "input right",
JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0 ); JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0 );
output_port_left = jack_port_register ( pJackClient, "output left", output_port_left = jack_port_register ( pJackClient, "output left",
JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0 ); JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0 );
output_port_right = jack_port_register ( pJackClient, "output right", output_port_right = jack_port_register ( pJackClient, "output right",
JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0 ); JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0 );
} }
@ -125,8 +127,9 @@ void CSound::Stop()
int CSound::Init ( const int iNewPrefMonoBufferSize ) int CSound::Init ( const int iNewPrefMonoBufferSize )
{ {
// try setting buffer size // try setting buffer size
jack_set_buffer_size ( pJackClient, iNewPrefMonoBufferSize ); // TODO seems not to work! -> no audio after this operation!
//jack_set_buffer_size ( pJackClient, iNewPrefMonoBufferSize );
// get actual buffer size // get actual buffer size
iJACKBufferSizeMono = jack_get_buffer_size ( pJackClient ); iJACKBufferSizeMono = jack_get_buffer_size ( pJackClient );