Changeset 920:ce0dc2fbe8e2 in roaraudio


Ignore:
Timestamp:
12/07/08 00:22:55 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added --standby and --auto-standby

Location:
roard
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • roard/include/roard.h

    r905 r920  
    6363 
    6464int g_standby; 
     65int g_autostandby; 
    6566 
    6667int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa, int sysclocksync); 
  • roard/loop.c

    r906 r920  
    8282*/ 
    8383 
    84   if ( g_standby ) { 
     84  if ( g_standby || (streams < 1 && g_autostandby) ) { 
    8585   usleep((1000000 * ROAR_OUTPUT_BUFFER_SAMPLES) / sa->rate); 
    8686   ROAR_DBG("usleep(%u) = ?\n", (1000000 * ROAR_OUTPUT_BUFFER_SAMPLES) / sa->rate); 
  • roard/roard.c

    r905 r920  
    9191        " --client-fh           - Comunicate with a client over this handle\n" 
    9292        "                         (only usefull for relaing)\n" 
    93         " --close-fh            - Closes the given fh\n", 
     93        " --close-fh            - Closes the given fh\n" 
     94        " --standby             - Start in standby state\n" 
     95        " --auto-standby        - Automatical goes into standby if there are no streams\n", 
    9496        ROAR_DEFAULT_SOCKGRP 
    9597       ); 
     
    148150 g_listen_socket = -1; 
    149151 g_standby       =  0; 
     152 g_autostandby   =  0; 
    150153 
    151154 sa.bits     = ROAR_BITS_DEFAULT; 
     
    325328   close(atoi(argv[++i])); 
    326329 
     330  } else if ( strcmp(k, "--standby") == 0 ) { 
     331   g_standby = 1; 
     332  } else if ( strcmp(k, "--auto-standby") == 0 ) { 
     333   g_autostandby = 1; 
    327334  } else { 
    328335   usage(); 
Note: See TracChangeset for help on using the changeset viewer.