Bonjour 
J'ai une animation (win32) OpenGL à laquelle j'essaie d'intégrer de la synthese sonore avec la lib STK.(...au passage, si vous en connaissez d'autres, tournant sous windows
)
Alors, mon problème vient du fait que le rendu graphique via une fonction glut:
main.cpp :
int main()
{
...
glutReshapeFunc(ReshapeCallback_1);
glutDisplayFunc(RenderCallback_1);
...
}
...est bloqué pendant le calcul du son, lancé par une classe Attack (pouvant avoir de multiples instances):
attack.cpp:
int Attack::tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
double streamTime, RtAudioStreamStatus status, void *dataPointer )
{
SineWave *sine = (SineWave *) dataPointer;
register StkFloat *samples = (StkFloat *) outputBuffer;
for ( unsigned int i=0; i<nBufferFrames; i++ )
*samples++ = sine->tick();
return 1;
}
//---------------------------------------------------------
bool Attack::play()
{
SineWave sine;
//- Figure out how many bytes in an StkFloat and setup the RtAudio stream.
RtAudio::StreamParameters p;
p.deviceId = dac.getDefaultOutputDevice();
p.nChannels = 1;//_o_->channel;
RtAudioFormat format = ( sizeof(StkFloat) == 8 ) ? RTAUDIO_FLOAT64 : RTAUDIO_FLOAT32;
//-The bufferFrames argument is an API-dependent buffering parameter (see RtAudio for further information).
unsigned int bufferFrames = RT_BUFFER_SIZE;//defined in Stk.h.
//--1) OPEN STREAM
try {
dac.openStream( &p, //RtAudio::StreamParameters *outputParameters,
NULL, //RtAudio::StreamParameters *inputParameters,
format, // RtAudioFormat format, unsigned int sampleRate
(unsigned int)Stk::sampleRate(), //unsigned int *bufferFrames
&bufferFrames, //RtAudioCallback callback, void *userData
&Attack::tick, //RtAudio::StreamOptions *options
(void *)&sine
);
}
catch ( RtError &error ) {
error.printMessage();
goto cleanup;
}
sine.setFrequency( _o_->frequency );
//--2) START STREAM
try {
dac.startStream();
}
catch ( RtError &error ) {
error.printMessage();
goto cleanup;
}
// Block waiting here.
/*char keyhit;
cout << "\nPlaying ... press <enter> to quit.\n";
cin.get( keyhit );
-> QUOI METTRE A LA PLACE (ci-dessus) ??
****************************************/
cleanup:
dac.closeStream();
//delete dac;
//_o_->func_killFM(_o_->id);
}
... qui semble utiliser une thread , concept que je n'avais pas encore abordé 
Je suis donc parti d'un exemple de Callback, dont une portion du code est en partie responsable du problème:
// Block waiting here.
char keyhit;
cout << "\nPlaying ... press <enter> to quit.\n";
cin.get( keyhit );
J'ai remplacé cette partie par
return 1;
... pensant que le son continuerait à jouer mais cela provoque une erreur (error.printMessage() ) -que je n'arrive pas à afficher- puisque
goto cleanup
...est aussitôt appelé !
Auriez-vous une solution 
merci
ps: On m'a suggéré de mettre un
return 1;
juste après startStream() , ou dans tick()
... ou encore de m'intéresser au concept de concurrence !?? mais je n'ai rien trouvé 