Skip to content

Instantly share code, notes, and snippets.

View skitaoka's full-sized avatar

Shinya Kitaoka skitaoka

View GitHub Profile
@ykst
ykst / gist:6e80e3566bd6b9d63d19
Last active May 5, 2024 03:40
WebAudio+WebSocketでブラウザへの音声リアルタイムストリーミングを実装する

WebAudio+WebSocketでブラウザへの音声リアルタイムストリーミングを実装する

WebRTCでやれよ!と言われそうなところですが、 WebSocket+WebAudioの組み合わせで音声ストリーミングをシンプルに構成する方法を紹介してみます。

サーバーサイド(Node.js + ws + pcm)

サーバーサイドは何でも良いのですが、 とりあえずNode.jsでtest.mp3というサンプルファイルをpcmモジュールでデコードし、 wsでクライアントに垂れ流す作りにしておきます。

@mbinna
mbinna / effective_modern_cmake.md
Last active May 3, 2024 15:44
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@voluntas
voluntas / webrtc.rst
Last active April 30, 2024 14:20
WebRTC コトハジメ
@voluntas
voluntas / shiguredo_webrtc_sfu_log.rst
Last active April 19, 2024 12:05
時雨堂 WebRTC SFU Sora 開発ログ
@jdupuy
jdupuy / SampleVndf_GGX.cpp
Last active April 15, 2024 20:09
Sampling Visible GGX Normals with Spherical Caps
// Helper function: sample the visible hemisphere from a spherical cap
vec3 SampleVndf_Hemisphere(vec2 u, vec3 wi)
{
// sample a spherical cap in (-wi.z, 1]
float phi = 2.0f * M_PI * u.x;
float z = fma((1.0f - u.y), (1.0f + wi.z), -wi.z);
float sinTheta = sqrt(clamp(1.0f - z * z, 0.0f, 1.0f));
float x = sinTheta * cos(phi);
float y = sinTheta * sin(phi);
vec3 c = vec3(x, y, z);
@voluntas
voluntas / webrtc_sfu_dev.rst
Last active March 28, 2024 12:31
WebRTC SFU コトハジメ

WebRTC SFU コトハジメ

日時

2023-12-03

voluntas

バージョン

2023.1

url

https://voluntas.github.io

この記事が良いと思ったらこの記事に Star をお願いします

@voluntas
voluntas / ayame_labo.rst
Last active March 17, 2024 06:36
時雨堂 Ayame Labo 開発ログ

時雨堂 Ayame Labo 開発ログ

日時

2022-04-19

時雨堂

バージョン

2022.1

URL

https://ayame-labo.shiguredo.app/

このサービスに興味がある人はこの資料に Star をつけてもらえると嬉しいです。

@sile
sile / 0_raft.md
Last active March 8, 2024 09:31
Raft(分散合意アルゴリズム)について
@Ishotihadus
Ishotihadus / atr.md
Last active February 13, 2024 02:53
ATR503文元ネタ集

ATR 音素バランス 503 文元ネタ集

判明している音素バランス文の元ネタを集めた。

Subset A

a01: あらゆる現実をすべて自分のほうへねじ曲げたのだ。

「マルサの女 撮影日記」(伊丹十三)(文藝春秋 1987 年 2 月)(c03、g01 と同一)

@voluntas
voluntas / webrtc.rst
Last active January 23, 2024 06:57
WebRTC の未来