public OpusCodec(int bitRate, int outputSampleRate, FragLabs.Audio.Codecs.Opus.Application opusMode) { this.outputSampleRate = outputSampleRate; this.bitRate = bitRate; this.opusMode = opusMode; _segmentFrames = 960; _recordFormat = new WaveFormat(outputSampleRate, 16 * channels, channels); CreateEncoder(); CreateDecoder(); }
public void InstallHttpModule(string name, ManicDigger.Func<string> description, FragLabs.HTTP.IHttpModule module) { server.InstallHttpModule(name, description, module); }
public bool ResponsibleForRequest(FragLabs.HTTP.HttpRequest request) { if (request.Uri.AbsolutePath.ToLower() == "/") { return true; } return false; }
public void Installed(FragLabs.HTTP.HttpServer server) { }
public bool ProcessAsync(FragLabs.HTTP.ProcessRequestEventArgs args) { string html = "<html>"; List<string> modules = new List<string>(); foreach (var m in server.httpModules) { modules.Add(m.name); } modules.Sort(); foreach (string s in modules) { foreach (var m in server.httpModules) { if (m.name == s) { html += string.Format("<a href='{0}'>{0}</a> - {1}", m.name, m.description()); } } } html += "</html>"; args.Response.Producer = new FragLabs.HTTP.BufferedProducer(html); return false; }