Changeset 458:7deaeb20da4f in roaraudio


Ignore:
Timestamp:
08/12/08 05:55:59 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

removed a lot non working code, no metadata update within a file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/xmms/roar.c

    r457 r458  
    77#include <stdio.h> 
    88#include <string.h> 
    9 #include <pthread.h> 
    109 
    1110#include "xmms/plugin.h" 
     
    7473 long unsigned int bps; 
    7574 int session; 
    76  int next_test; 
    7775 int pause; 
    78  int updateing; 
    7976} g_inst; 
    8077 
     
    8683 g_inst.state = 0; 
    8784 g_inst.server = NULL; 
    88  g_inst.updateing = 0; 
    8985 g_inst.session = ctrlsocket_get_session_id(); 
    9086 ROAR_DBG("roar_init(*) = (void)"); 
     
    9793void roar_write(void *ptr, int length) { 
    9894 int r; 
    99  int need_update = 0; 
    100  pthread_t thread; 
    101  
    102  if ( g_inst.next_test < 1 ) { 
    103   need_update = 1; 
    104   g_inst.next_test = g_inst.bps; 
    105   pthread_create(&thread, NULL, (void (*)(void*))roar_chk_metadata, NULL); 
    106   //roar_socket_nonblock(g_inst.data_fh, ROAR_SOCKET_NONBLOCK); 
    107  } 
    10895 
    10996 if ( g_inst.pause ) 
     
    115102   ptr              += r; 
    116103   length           -= r; 
    117    g_inst.next_test -= r; 
    118104  } else { 
    119    if ( errno == EAGAIN ) { 
    120     roar_socket_nonblock(g_inst.data_fh, ROAR_SOCKET_BLOCK); 
    121    } else { 
    122     return; 
    123    } 
     105   return; 
    124106  } 
    125  } 
    126  
    127  
    128  if ( need_update ) { 
    129   //roar_socket_nonblock(g_inst.data_fh, ROAR_SOCKET_BLOCK); 
    130   pthread_join(thread, NULL); 
    131107 } 
    132108} 
     
    180156 
    181157 g_inst.bps       = nch * rate * bits / 8; 
    182  g_inst.next_test = g_inst.bps; 
    183158 
    184159 if ( (g_inst.data_fh = roar_simple_new_stream_obj(&(g_inst.con), &(g_inst.stream), 
     
    259234 int pos; 
    260235 
    261  g_inst.updateing++; 
    262  
    263  if ( g_inst.updateing > 1 ) { 
    264   g_inst.updateing--; 
    265   return -1; 
    266  } 
    267  
    268236 pos     = xmms_remote_get_playlist_pos(g_inst.session); 
    269237 
     
    299267 } 
    300268 
    301  g_inst.updateing--; 
    302269 return 0; 
    303270} 
Note: See TracChangeset for help on using the changeset viewer.