Skip to content

Commit

Permalink
Updated some debugging messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Aug 14, 2010
1 parent 93f9b37 commit b9b1408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roar/pcm_roar.c
Expand Up @@ -212,9 +212,11 @@ static snd_pcm_sframes_t roar_pcm_pointer(snd_pcm_ioplug_t *io) {
ptr = snd_pcm_bytes_to_frames(io->pcm, self->bufptr);
pthread_mutex_unlock(&(self->lock));


ptr = io->appl_ptr - ptr;
self->last_ptr = io->appl_ptr;

ROAR_DBG("roar_pcm_pointer(*) appl_ptr: %d, ptr: %d, calculated avail frames: %d", (int)io->appl_ptr, (int)ptr, (int)(io->appl_ptr - ptr));
return ptr;
}

Expand Down Expand Up @@ -368,6 +370,7 @@ static int roar_pcm_hw_params(snd_pcm_ioplug_t *io, snd_pcm_hw_params_t *params)
return -1;
self->bufptr = 0;

ROAR_DBG("roar_pcm_hw_params(*) Setting buffersize (bytes): %d", (int)self->bufsize);
ROAR_DBG("roar_pcm_hw_params(*) = 0");
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions roar/thread.c
Expand Up @@ -132,6 +132,7 @@ void* roar_thread (void * thread_data) {
memmove(self->buffer, self->buffer + rc, self->bufsize - rc);
self->bufptr -= rc;
pthread_mutex_unlock(&(self->lock));
ROAR_DBG("roar_thread(*): Wrote data to vio. New bufptr: %d", (int)self->bufptr);

/* Buffer has decreased, signal fill_buffer() */
pthread_cond_signal(&(self->cond));
Expand Down

0 comments on commit b9b1408

Please sign in to comment.