Index: libroaresd/Makefile
===================================================================
--- libroaresd/Makefile	(revision 4748)
+++ libroaresd/Makefile	(revision 5270)
@@ -11,5 +11,5 @@
 INCLUDE = -I../include -I../include/libroaresd
 CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS+= -g $(SHARED) $(LDPATH) -L../lib/
+LDFLAGS+= -g -Wall $(SHARED) $(LDPATH) -L../lib/
 LIBS    = $(LIBROAR)
 
Index: libroaresd/esdbasic.c
===================================================================
--- libroaresd/esdbasic.c	(revision 5226)
+++ libroaresd/esdbasic.c	(revision 5270)
@@ -66,4 +66,5 @@
 /* send the authorization cookie, create one if needed */
 int esd_send_auth( int sock ) {
+ (void) sock;
  return 0;
 }
Index: libroaresd/esdctl.c
===================================================================
--- libroaresd/esdctl.c	(revision 5236)
+++ libroaresd/esdctl.c	(revision 5270)
@@ -45,7 +45,11 @@
 // so always return -1
 int esd_lock( int esd ) {
+ (void)esd;
+ errno = ENOSYS;
  return -1;
 }
 int esd_unlock( int esd ) {
+ (void)esd;
+ errno = ENOSYS;
  return -1;
 }
@@ -66,4 +70,19 @@
 
  return roar_set_standby(&con, ROAR_STANDBY_INACTIVE);
+}
+
+static void _format2str(char * buf, size_t len, esd_format_t format) {
+
+ if ( (format & ESD_BITS16) == ESD_BITS16 ) {
+  roar_mm_strlcat(buf, "16 bit ", len);
+ } else {
+  roar_mm_strlcat(buf, "8 bit ", len);
+ }
+
+ if ( (format & ESD_STEREO) == ESD_STEREO ) {
+  roar_mm_strlcat(buf, "stereo ", len);
+ } else {
+  roar_mm_strlcat(buf, "mono ", len);
+ }
 }
 
@@ -72,13 +91,5 @@
  char buf[80] = "";
 
- if ( server_info->format & ESD_BITS16 )
-  strcat(buf, "16 bit ");
- else
-  strcat(buf, "8 bit ");
-
- if ( server_info->format & ESD_STEREO )
-  strcat(buf, "stereo ");
- else
-  strcat(buf, "mono ");
+ _format2str(buf, sizeof(buf), server_info->format);
 
  printf("server version   = %i\n",        server_info->version);
@@ -87,17 +98,8 @@
 }
 
-
 void esd_print_player_info( esd_player_info_t *player_info ) {
  char buf[80] = "";
 
- if ( (player_info->format & ESD_BITS16) == ESD_BITS16 )
-  strcat(buf, "16 bit ");
- else
-  strcat(buf, "8 bit ");
-
- if ( (player_info->format & ESD_STEREO) == ESD_STEREO )
-  strcat(buf, "stereo ");
- else
-  strcat(buf, "mono ");
+ _format2str(buf, sizeof(buf), player_info->format);
 
  printf("player %i name    = %s\n",        player_info->source_id, player_info->name);
@@ -109,4 +111,14 @@
 
 void esd_print_sample_info( esd_sample_info_t *sample_info ) {
+ char buf[80] = "";
+
+ _format2str(buf, sizeof(buf), sample_info->format);
+
+ printf("sample %i name    = %s\n",        sample_info->sample_id, sample_info->name);
+ printf("sample %i format  = 0x%08x %s\n", sample_info->sample_id, sample_info->format, buf);
+ printf("sample %i rate    = %i\n",        sample_info->sample_id, sample_info->rate);
+ printf("sample %i left    = %i\n",        sample_info->sample_id, sample_info->left_vol_scale);
+ printf("sample %i right   = %i\n",        sample_info->sample_id, sample_info->right_vol_scale);
+ printf("sample %i length  = %i\n",        sample_info->sample_id, sample_info->length);
 }
 
@@ -282,4 +294,6 @@
 /* retrieve all information from server, and update until unsubsribed or closed */
 esd_info_t *esd_subscribe_all_info( int esd ) {
+ (void)esd;
+ errno = ENOSYS;
  return NULL; // Not yet implemented in upstream esd
 }
@@ -288,8 +302,12 @@
 esd_info_t *esd_update_info( int esd, esd_info_t *info,
                              esd_update_info_callbacks_t *callbacks ) {
+ (void)esd, (void)info, (void)callbacks;
+ errno = ENOSYS;
  return NULL; // Not yet implemented in upstream esd
 }
 
 esd_info_t *esd_unsubscribe_info( int esd ) {
+ (void)esd;
+ errno = ENOSYS;
  return NULL; // Not yet implemented in upstream esd
 }
@@ -362,4 +380,7 @@
 int esd_set_default_sample_pan( int esd, int sample_id,
                                 int left_scale, int right_scale ) {
+ // this is not yet implemented by the RA protocol.
+ (void)esd, (void)sample_id, (void)left_scale, (void)right_scale;
+ errno = ENOSYS;
  return -1;
 }
Index: libroaresd/esdfile.c
===================================================================
--- libroaresd/esdfile.c	(revision 4708)
+++ libroaresd/esdfile.c	(revision 5270)
@@ -47,6 +47,13 @@
 }
 int esd_play_file( const char *name_prefix, const char *filename, int fallback ) {
- // TODO: add support for fallback
- return roar_simple_play_file((char*)filename, NULL, (char*)name_prefix) == -1 ? -1 : 0;
+ int ret = roar_simple_play_file(filename, NULL, name_prefix);
+
+ if ( ret != -1 )
+  return 0;
+
+ if ( !fallback )
+  return -1;
+
+ return roar_simple_play_file(filename, "+fork", name_prefix) == -1 ? -1 : 0;
 }
 int esd_file_cache( int esd, const char *name_prefix, const char *filename ) {
