Changeset 5157:065c4c7f1be2 in roaraudio


Ignore:
Timestamp:
10/16/11 09:11:27 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

made it build again

Location:
plugins
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • plugins/alsa/pcm_roar.c

    r5156 r5157  
    7777 self->bufptr = 0; 
    7878 self->thread_active = 1; // We have to activate the thread before starting it, because the thread lives on that thread_active is 1. 
    79  if ( pthread_create(&(self->thread), NULL, roar_thread, self) < 0 ) { 
     79 if ( pthread_create(&(self->thread), NULL, roar_plugin_thread, self) < 0 ) { 
    8080  self->thread_active = 0; 
    8181  return -1; 
     
    8585} 
    8686 
    87 void roar_reset(struct roar_alsa_pcm *self) { 
     87void roar_plugin_reset(struct roar_alsa_pcm *self) { 
    8888 if ( !self->stream_opened ) 
    8989  return; 
     
    120120 } 
    121121 
    122  roar_reset(self); 
     122 roar_plugin_reset(self); 
    123123 
    124124 return 0; 
     
    240240 buf = (char *)areas->addr + (areas->first + areas->step * offset) / 8; 
    241241 
    242  ret = roar_write(self, buf, len); 
     242 ret = roar_plugin_write(self, buf, len); 
    243243 
    244244 if ( ret == -1 ) 
     
    260260 // TODO: We need to set *delayp the latency in frames. 
    261261 pthread_mutex_lock(&(self->lock)); 
    262  roar_drain(self); 
     262 roar_plugin_drain(self); 
    263263 *delayp = snd_pcm_bytes_to_frames(io->pcm, self->bytes_in_buffer); 
    264264 pthread_mutex_unlock(&(self->lock)); 
  • plugins/alsa/roar.h

    r5156 r5157  
    7676}; 
    7777 
    78 void roar_reset(struct roar_alsa_pcm * self); 
    79 void* roar_thread (void * thread_data); 
    80 size_t roar_write(struct roar_alsa_pcm * self, const char * buf, size_t size); 
    81 void roar_drain(struct roar_alsa_pcm * self); 
     78void roar_plugin_reset(struct roar_alsa_pcm * self); 
     79void* roar_plugin_thread (void * thread_data); 
     80size_t roar_plugin_write(struct roar_alsa_pcm * self, const char * buf, size_t size); 
     81void roar_plugin_drain(struct roar_alsa_pcm * self); 
    8282 
    8383#endif 
  • plugins/alsa/thread.c

    r5156 r5157  
    4343 
    4444// Writes to the FIFO buffer. Waits until there is room to write. 
    45 size_t roar_write(struct roar_alsa_pcm *self, const char *buf, size_t size) { 
     45size_t roar_plugin_write(struct roar_alsa_pcm *self, const char *buf, size_t size) { 
    4646 /* Wait until we have a ready buffer */ 
    4747 while (1) { 
     
    8282 
    8383// Attemps to drain the buffer at all times and write to libroar. 
    84 // If there is no data, it will wait for roar_write() to fill up more data. 
    85 void* roar_thread (void * thread_data) { 
     84// If there is no data, it will wait for roar_plugin_write() to fill up more data. 
     85void* roar_plugin_thread (void * thread_data) { 
    8686 /* We share data between thread and callable functions */ 
    8787 struct roar_alsa_pcm *self = thread_data; 
     
    109109   if ( rc < 0 ) { 
    110110    _TEST_CANCEL(); 
    111     roar_reset(self); 
     111    roar_plugin_reset(self); 
    112112 
    113113    /* Wakes up a potentially sleeping fill_buffer() */ 
     
    135135   self->bufptr -= rc; 
    136136   pthread_mutex_unlock(&(self->lock)); 
    137    ROAR_DBG("roar_thread(*): Wrote data to vio. New bufptr: %i", (int)self->bufptr); 
     137   ROAR_DBG("roar_plugin_thread(*): Wrote data to vio. New bufptr: %i", (int)self->bufptr); 
    138138 
    139139   /* Buffer has decreased, signal fill_buffer() */ 
     
    158158} 
    159159 
    160 void roar_drain(struct roar_alsa_pcm *self) { 
     160void roar_plugin_drain(struct roar_alsa_pcm *self) { 
    161161 struct timespec now_tv; 
    162162 int64_t temp, temp2; 
  • plugins/alsavs/pcm_roar.c

    r5156 r5157  
    7777 self->bufptr = 0; 
    7878 self->thread_active = 1; // We have to activate the thread before starting it, because the thread lives on that thread_active is 1. 
    79  if ( pthread_create(&(self->thread), NULL, roar_thread, self) < 0 ) { 
     79 if ( pthread_create(&(self->thread), NULL, roar_plugin_thread, self) < 0 ) { 
    8080  self->thread_active = 0; 
    8181  return -1; 
     
    8585} 
    8686 
    87 void roar_reset(struct roar_alsa_pcm *self) { 
     87void roar_plugin_reset(struct roar_alsa_pcm *self) { 
    8888 if ( !self->stream_opened ) 
    8989  return; 
     
    120120 } 
    121121 
    122  roar_reset(self); 
     122 roar_plugin_reset(self); 
    123123 
    124124 return 0; 
     
    240240 buf = (char *)areas->addr + (areas->first + areas->step * offset) / 8; 
    241241 
    242  ret = roar_write(self, buf, len); 
     242 ret = roar_plugin_write(self, buf, len); 
    243243 
    244244 if ( ret == -1 ) 
     
    260260 // TODO: We need to set *delayp the latency in frames. 
    261261 pthread_mutex_lock(&(self->lock)); 
    262  roar_drain(self); 
     262 roar_plugin_drain(self); 
    263263 *delayp = snd_pcm_bytes_to_frames(io->pcm, self->bytes_in_buffer); 
    264264 pthread_mutex_unlock(&(self->lock)); 
  • plugins/alsavs/roar.h

    r5156 r5157  
    7676}; 
    7777 
    78 void roar_reset(struct roar_alsa_pcm * self); 
    79 void* roar_thread (void * thread_data); 
    80 size_t roar_write(struct roar_alsa_pcm * self, const char * buf, size_t size); 
    81 void roar_drain(struct roar_alsa_pcm * self); 
     78void roar_plugin_reset(struct roar_alsa_pcm * self); 
     79void* roar_plugin_thread (void * thread_data); 
     80size_t roar_plugin_write(struct roar_alsa_pcm * self, const char * buf, size_t size); 
     81void roar_plugin_drain(struct roar_alsa_pcm * self); 
    8282 
    8383#endif 
  • plugins/alsavs/thread.c

    r5156 r5157  
    4343 
    4444// Writes to the FIFO buffer. Waits until there is room to write. 
    45 size_t roar_write(struct roar_alsa_pcm *self, const char *buf, size_t size) { 
     45size_t roar_plugin_write(struct roar_alsa_pcm *self, const char *buf, size_t size) { 
    4646 /* Wait until we have a ready buffer */ 
    4747 while (1) { 
     
    8282 
    8383// Attemps to drain the buffer at all times and write to libroar. 
    84 // If there is no data, it will wait for roar_write() to fill up more data. 
    85 void* roar_thread (void * thread_data) { 
     84// If there is no data, it will wait for roar_plugin_write() to fill up more data. 
     85void* roar_plugin_thread (void * thread_data) { 
    8686 /* We share data between thread and callable functions */ 
    8787 struct roar_alsa_pcm *self = thread_data; 
     
    109109   if ( rc < 0 ) { 
    110110    _TEST_CANCEL(); 
    111     roar_reset(self); 
     111    roar_plugin_reset(self); 
    112112 
    113113    /* Wakes up a potentially sleeping fill_buffer() */ 
     
    135135   self->bufptr -= rc; 
    136136   pthread_mutex_unlock(&(self->lock)); 
    137    ROAR_DBG("roar_thread(*): Wrote data to vio. New bufptr: %i", (int)self->bufptr); 
     137   ROAR_DBG("roar_plugin_thread(*): Wrote data to vio. New bufptr: %i", (int)self->bufptr); 
    138138 
    139139   /* Buffer has decreased, signal fill_buffer() */ 
     
    158158} 
    159159 
    160 void roar_drain(struct roar_alsa_pcm *self) { 
     160void roar_plugin_drain(struct roar_alsa_pcm *self) { 
    161161 struct timespec now_tv; 
    162162 int64_t temp, temp2; 
Note: See TracChangeset for help on using the changeset viewer.