示例#1
0
        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();
        }
示例#2
0
文件: Mod.cs 项目: torial/manicdigger
 public void InstallHttpModule(string name, ManicDigger.Func<string> description, FragLabs.HTTP.IHttpModule module)
 {
     server.InstallHttpModule(name, description, module);
 }
示例#3
0
 public bool ResponsibleForRequest(FragLabs.HTTP.HttpRequest request)
 {
     if (request.Uri.AbsolutePath.ToLower() == "/")
     {
         return true;
     }
     return false;
 }
示例#4
0
 public void Installed(FragLabs.HTTP.HttpServer server)
 {
 }
示例#5
0
 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;
 }