跳到正文

个人记录

aplay的神金使用方法

Allen123456hello约 2 分钟
原文
文章信息与版本

文章信息

发布
2026年5月25日
收录
2026年7月17日
更新
2026年11月11日
篇幅
约 2 分钟

版本

  1. v2当前
  2. v1

CC0

C++
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
void beep(int pitch,int delay=100,int rest=100){
    for (int i=1;i<=delay;++i){for (int k=1;k<=pitch;++k){putchar('a');}putchar('\n');}
    for (int i=1;i<=rest;++i){putchar('\n');}
    return;
}
int main(){
    freopen("aplay.shushu","w",stdout);
    //example
    beep(14);
    beep(14);
    beep(10);
    beep(10);
    beep(9);
    beep(9);
    beep(10,200);
    beep(11);
    beep(11);
    beep(12);
    beep(12);
    beep(13);
    beep(13);
    beep(14,200);
    return 0;
}
Bash
pv aplay.shushu | aplay
Bash
#!/usr/bin/bash
curl -A "Mozilla" "https://api.injahow.cn/bparse/?bv=$1&ep=&q=80&type=video&format=mp4&otype=json"
ffmpeg -user_agent "User-Agent: Mozilla" -i $(echo print\($(curl -A "Mozilla" "https://api.injahow.cn/bparse/?bv=$1&ep=&q=80&type=video&format=mp4&otype=json")\[\"url\"\].replace\(\"\\\\/\",\"/\"\)\) | python) -f wav - | aplay
Bash
./aplay_quqi BV1GJ411x7h7
原文