# HG changeset patch # User Andrew O. Shadoura # Date 1218653799 -10800 # Node ID 639241e725e28548bbdf9091331395a741a2688e # Parent 43115ea335b94117fc81bdee8c181141a5f80524 fixed mod_samples when shout==NULL diff -r 43115ea335b9 -r 639241e725e2 src/icecast/icecast.c --- a/src/icecast/icecast.c Wed Aug 13 21:45:39 2008 +0300 +++ b/src/icecast/icecast.c Wed Aug 13 21:56:39 2008 +0300 @@ -166,7 +166,7 @@ static void ice_init(void) { ConfigDb *db; - /*g_debug("ICE_INIT");*/ + g_debug("ICE_INIT"); if (initialized==TRUE) return; shout_init(); g_message("Using libshout %s", shout_version(NULL, NULL, NULL)); @@ -387,7 +387,7 @@ rv = (plugin.open)(); - /*g_debug("ICE_OPEN");*/ + g_debug("ICE_OPEN"); return rv; } @@ -407,17 +407,15 @@ if (!shout) { - if (ice_open(afmt, srate, nch)) - { - if (shout) - { - int len; - ep_playing = TRUE; - len = convert_process(d, length); - plugin.write(convert_output, length); - ice_tid = g_timeout_add_seconds(ice_close_timeout, ice_real_close, NULL); - } - } + ice_open(afmt, srate, nch); + } + if (shout) + { + int len; + ep_playing = TRUE; + len = convert_process(d, length); + plugin.write(convert_output, length); + ice_tid = g_timeout_add_seconds(ice_close_timeout, ice_real_close, NULL); } return length; } @@ -428,7 +426,7 @@ if (!length) return length; ret = shout_send(shout, ptr, length); shout_sync(shout); - /*g_debug("ice_write[%d:%d]", ret, length);*/ + g_debug("ice_write[%d:%d]", ret, length); return 0; } @@ -469,7 +467,7 @@ } shout = NULL; ice_tid = 0; - /*g_debug("ICE_REAL_CLOSE");*/ + g_debug("ICE_REAL_CLOSE"); return FALSE; } @@ -479,7 +477,7 @@ if (ice_tid) g_source_remove(ice_tid); ice_tid = g_timeout_add_seconds(ice_close_timeout, ice_real_close, NULL); - /*g_debug("ICE_CLOSE: starting timer");*/ + g_debug("ICE_CLOSE: starting timer"); } static void ice_flush(gint time)