Jokeoo's recent timeline updates
Jokeoo

Jokeoo

V2EX member #559198, joined on 2021-10-21 09:47:59 +08:00
Jokeoo's recent replies
May 20, 2024
Replied to a topic by cnhh OpenAI 低价的 GPT-4-turbo 模型 API 来了
用户名 Jokeoo
在 Linux ( Ubuntu )下,可以使用 PulseAudio 库来捕获系统声音。以下是一个简单的示例代码片段,可以通过 g++编译:

```
#include <pulse/simple.h>
#include <pulse/error.h>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;

#define BUFSIZE 1024

int main(int argc, char const *argv[]) {
pa_sample_spec ss;
ss.format = PA_SAMPLE_S16LE;
ss.channels = 2;
ss.rate = 44100;
int error;
pa_simple *s = pa_simple_new(NULL, argv[0], PA_STREAM_RECORD, NULL, "record", &ss, NULL, NULL, &error);
if (!s) {
cerr << "pa_simple_new() failed: " << pa_strerror(error) << endl;
return 1;
}

char buf[BUFSIZE];
int cnt = 0;
while (cnt++ < 100) {
int ret = pa_simple_read(s, buf, BUFSIZE, &error);
if (ret < 0) {
cerr << "pa_simple_read() failed: " << pa_strerror(error) << endl;
break;
}
fwrite(buf, 1, ret, stdout);
}

pa_simple_free(s);
return 0;
}

```

该代码将捕获系统声音,并将其输出到标准输出( stdout )。您可以将其修改为将音频写入文件或进行其他处理。

notion AI
Jul 20, 2022
Replied to a topic by andyJado 程序员 你最常用的 CLI(命令行工具)是什么?
1 1825 18.2027% tig
2 1224 12.2083% git
3 924 9.21604% l
4 601 5.99441% cd
5 567 5.6553% picocom
6 560 5.58548% vi
7 418 4.16916% repo
8 374 3.7303% bflb-iot-tool
9 363 3.62059% sudo
10 273 2.72292% gfa
要不是 wslg 需要 win11 ,谁愿意升上来
Oct 25, 2021
Replied to a topic by jatsz2020 深圳 请问哪些地方租房可以开 invoice 报销?
receipt [riˈsiːt]

释义

n.收据,收条;接受;收到;(pl.)收入款;领到;食谱

vt.开收据;签帐单

vi.开收据
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4612 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 10:04 · PVG 18:04 · LAX 03:04 · JFK 06:04
♥ Do have faith in what you're doing.