简体   繁体   English

C HTTP流服务器以流音频分贝级别

[英]C HTTP streaming server to stream audio decibel levels

Hi I have written a decibel level meter in C which reads Linux alsa constantly and output decibel levels numbers in STDOUT. 嗨,我用C语言编写了一个分贝电平表,它可以不断读取Linux alsa并在STDOUT中输出分贝电平数。

Now I would like to view via HTTP and streaming live data to clients, with proper js+html decoration, it behaves as a noise meter, with graph and needles. 现在,我想通过HTTP查看并使用适当的js + html装饰将实时数据流传输到客户端,它的行为就像一个噪声计,带有图形和指针。

Therefore I would like to know if some one can point me direction integrate them into a HTTP streaming server able to server multiple clients in real time. 因此,我想知道是否有人可以指示我的方向,将它们集成到能够实时为多个客户端提供服务的HTTP流服务器中。

You can use several C libraries. 您可以使用几个C库。 Some C libraries provide HTTP server abilities, eg libonion or libmicrohttpd . 一些C库提供HTTP服务器功能,例如libonionlibmicrohttpd Other libraries provide HTTP client abilities, eg libcurl 其他库提供HTTP客户端功能,例如libcurl

All are using some event loop, eg libev , libevent or at least some multiplexing syscall like poll(2) 所有人都在使用某个事件循环,例如libevlibevent或至少某些复用的系统调用,例如poll(2)

You could also make your application a FASTCGI app. 您也可以将您的应用程序设置为FASTCGI应用程序。

Reading Advanced Linux Programming should help. 阅读高级Linux编程应该会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM