Changeset 5169:be6f5ef02fc3 in roaraudio


Ignore:
Timestamp:
10/18/11 15:26:39 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added some debugging stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/alsa/thread.c

    r5157 r5169  
    4444// Writes to the FIFO buffer. Waits until there is room to write. 
    4545size_t roar_plugin_write(struct roar_alsa_pcm *self, const char *buf, size_t size) { 
     46 ROAR_DBG("roar_plugin_write(self=%p, buf=%p, size=%llu) = ?", self, buf, (long long unsigned int)size); 
     47 
    4648 /* Wait until we have a ready buffer */ 
    4749 while (1) { 
     
    8385// Attemps to drain the buffer at all times and write to libroar. 
    8486// If there is no data, it will wait for roar_plugin_write() to fill up more data. 
    85 void* roar_plugin_thread (void * thread_data) { 
     87void * roar_plugin_thread (void * thread_data) { 
    8688 /* We share data between thread and callable functions */ 
    8789 struct roar_alsa_pcm *self = thread_data; 
     
    9193 /* Two loops! :3 Beware! */ 
    9294 while(1) { 
     95  ROAR_DBG("roar_plugin_thread(thread_data=%p): got woken up.", thread_data); 
    9396  while(1) { 
    9497   _TEST_CANCEL(); 
     
    104107   pthread_mutex_unlock(&(self->lock)); 
    105108 
     109   ROAR_DBG("roar_plugin_thread(thread_data=%p): Start writing.", thread_data); 
    106110   rc = roar_vio_write(&(self->stream_vio), self->buffer, CHUNK_SIZE); 
     111   ROAR_DBG("roar_plugin_thread(thread_data=%p): wrote %lli bytes.", thread_data, (long long int)rc); 
    107112 
    108113   /* If this happens, we should make sure that subsequent and current calls to rsd_write() will fail. */ 
Note: See TracChangeset for help on using the changeset viewer.