随笔分类 - polypaudio
摘要:https://www.jianshu.com/p/3f69197f9055 https://www.jianshu.com/p/261fee277a7f
阅读全文
摘要:install and compile app https://blog.csdn.net/yfldyxl/article/details/89352560 how to use libuv https://blog.csdn.net/qq_35886593/article/details/8889
阅读全文
摘要:• install https://blog.csdn.net/yfldyxl/article/details/89352560 • example https://www.cnblogs.com/sherlock-lin/p/14349993.html
阅读全文
摘要:Makefile.am module_native_protocol_unix_la_SOURCES = module-protocol-stub.cmodule_native_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_N
阅读全文
摘要:module-alsa-sink.c sink-input.c
阅读全文
摘要:pa_sink_input_peek() 从queue中peek出数据 如果有resample,进行resample处理,返回resample后的数据;如果没有resample,返回peek后的数据 pa_sink_input_new() 参数与sink的参数进行比较,如果一致,不创建resampl
阅读全文
摘要:pa_module_init snd_pcm_open() pa_alsa_set_hw_params() pa_sink_new() 声卡可以写入时回调io_callback() -> do_write() -> pa_sink_render() 将各个sink-input数据进行mix,如果所有
阅读全文
摘要:• pulseaudio官网 https://www.freedesktop.org/wiki/Software/PulseAudio/ • pulseaudio-under-the-hood https://gavv.github.io/articles/pulseaudio-under-the-
阅读全文
摘要:■ TCP 代码结构 参考: https://blog.csdn.net/qq_33951180/article/details/68066634 ■ socket-client • 创建socket socket-client.c -> pa_socket_client_new_unix() ->
阅读全文
摘要:1. pulseaudio启动 module-alsa-source.c • 加载了source 在module加载pa_module_init时,创建pa_source_new。 s->outputs = pa_idxset_new(NULL, NULL); 创建一个outputs的容器(数组)
阅读全文
摘要:了解socket-server,需先学习下socket的server的一般流程,顺着流程去看代码就比较容易了。 1. socket socket(PF_LOCAL, SOCK_STREAM, 0) 2. bind bind(fd, (struct sockaddr*) &sa, SUN_LEN(&s
阅读全文
摘要:struct pa_packet { enum { PA_PACKET_APPENDED, PA_PACKET_DYNAMIC } type; unsigned ref; size_t length; uint8_t *data;}; ■ struct pa_packet* pa_packet_ne
阅读全文
摘要:■ static int load(const char *fn, void *data, size_t length) 从fn文件中读出length长度的数据,用data返回数据 ■ static int generate(const char *fn, void *data, size_t le
阅读全文
摘要:■ int pa_alsa_set_hw_params(snd_pcm_t *pcm_handle, struct pa_sample_spec *ss, uint32_t *periods, snd_pcm_uframes_t *buffer_size) https://i.cnblogs.com
阅读全文
摘要:样本长度(sample):样本是记录音频数据最基本的单位,计算机对每个通道采样量化时数字比特位数,常见的有8位和16位。通道数(channel):该参数为1表示单声道,2则是立体声。帧(frame):帧记录了一个声音单元,其长度为样本长度与通道数的乘积,一段音频数据就是由苦干帧组成的。采样率(rat
阅读全文
摘要:■ 函数说明 int poll(struct pollfd *fds, nfds_t nfds, int timeout); The set of file descriptors to be monitored is specified in the fds argument, which is
阅读全文
摘要:根据输入的args,将key和value存入到map中,关键就是如何解析args。 ■ static int add_key_value(struct pa_hashmap *map, char *key, char *value, const char* const* valid_keys)■ s
阅读全文
摘要:★ //memblock->data 的有效数据从index索引开始,长度为lengthstruct pa_memchunk { struct pa_memblock *memblock; size_t index, length;};★ //base 是每次取出的大小//buffer和buffer
阅读全文
摘要:■ struct pa_memblock *pa_memblock_new(size_t length)memblock分配,分配类型是PA_MEMBLOCK_APPENDED。pa_memblock 和 数据是连续分配的,由pa_memblock中data指向分配的数据区域。■ struct pa
阅读全文
浙公网安备 33010602011771号