Add new comment

Sure,

jackCallbackProcess_out is the callback function.
( jack_set_process_callback(client_out, jackCallbackProcess_out, 0); )

The callback function transfers the new data ( process_out(nframes) )and signals to initiates a new audio update cycle.

int jackCallbackProcess_out(jack_nframes_t nframes, void *arg)
{
int err, core;

if (transport_aware_out)
{
jack_position_t pos;
if (jack_transport_query(client_out, &pos) != JackTransportRolling)
{
process_silence_out(nframes);
return 0;
}
}

process_out(nframes);

// Triger update process
pthread_mutex_lock(&updateThreadMutex);
pthread_mutex_unlock(&updateThreadMutex);
// Signal update thread
pthread_cond_signal(&updateThreadCv);

return 0;
}

The update process thread measures the entrance time and calculates the elapsed time from the previous entrance time -> ~5800 microsec.

void* AUDMNG_updateThread(void *arg)
{
int lockCount = 0, voice, count;
int ID;
int core, utilization;
struct timeval startts, prvStartts;
struct timeval stopts;

while (updateThreadIsRunning)
{

pthread_mutex_lock(&updateThreadMutex);
pthread_cond_wait(&updateThreadCv, &updateThreadMutex);
pthread_mutex_unlock(&updateThreadMutex);

ModSynth::get_instance()->update_tasks(0);

prvStartts.tv_usec = startts.tv_usec;
gettimeofday(&startts, NULL);

fprintf(stderr, "Time from last block: %i Time from prev block end time [us]: %i\n", startts.tv_usec- prvStartts.tv_usec, startts.tv_usec - stopts.tv_usec);

.
.
.
gettimeofday(&stopts, NULL);

}

return NULL;
}

Thanks,

Nahum.

The content of this field is kept private and will not be shown publicly.

Markdown

  • Parses markdown and converts it to HTML.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt height width> <strike> <pre> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <b> <i> <pre> <img src alt height width> <strike>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
File attachments
Unlimited number of files can be uploaded to this field.
2 MB limit.
Allowed types: jpg jpeg gif png txt doc docx xls xlsx pdf ppt pps odt ods odp zip gz bz2 xz patch diff wav ogg flac ogv mp4 qtz.
CAPTCHA
Enter the characters shown in the image.