diff --git a/plugins/icecast/output/instance.go b/plugins/icecast/output/instance.go index a84f440..5ffbc69 100644 --- a/plugins/icecast/output/instance.go +++ b/plugins/icecast/output/instance.go @@ -75,8 +75,6 @@ func (instance *pluginInstance) Init() { sr := container.Sub() defer sr.Close() - log.Println("Someone tuned in to", channelId, channel) - if sendMetadata { mw = streams.NewMetadataInjector(w, metaInt) nw = mw diff --git a/plugins/test/sine/instance.go b/plugins/test/sine/instance.go index 52bb927..cfb006c 100644 --- a/plugins/test/sine/instance.go +++ b/plugins/test/sine/instance.go @@ -22,8 +22,6 @@ func (instance *pluginInstance) Init() { channelManager := instance.channelManager go func() { - time.Sleep(2 * time.Second) // give burst cache a chance to realize - c, err := channelManager.Open("sine") if err != nil { log.Println("ERROR: sine channel could not be opened:", err) diff --git a/plugins/test/sine/sine_stream.go b/plugins/test/sine/sine_stream.go index 1697a37..d2689bf 100644 --- a/plugins/test/sine/sine_stream.go +++ b/plugins/test/sine/sine_stream.go @@ -43,16 +43,11 @@ func (stream *SineStream) Read(data []byte) (n int, err error) { targetTime := stream.Timestamp. Add(time.Duration(float64(time.Second) * float64(stream.State) / float64(stream.Samplerate))) delay := targetTime.Sub(time.Now()) - /*log.Println("state", stream.State, "value", sampleValue, "time", targetTime, "delay", delay) - time.Sleep(time.Second)*/ + if delay > 0 { <-time.After(delay) } - /*if stream.State%uint64(stream.Samplerate) == 0 { - log.Println("state", stream.State, "value", sampleValue, "time", targetTime, "delay", delay) - }*/ - stream.State++ }