This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
// #include <opus/opus.h> | |
#include </opt/homebrew/Cellar/opus/1.5.2/include/opus/opus.h> // cbf build path | |
// brew install opus | |
// gcc -O3 -o miniaudio_opus_example miniaudio_opus_example.c -I/opt/homebrew/Cellar/opus/1.5.2/include -L/opt/homebrew/Cellar/opus/1.5.2/lib -lm -lpthread -lopus && ./miniaudio_opus_example | |
#define MINIAUDIO_IMPLEMENTATION | |
#include "miniaudio.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AVFoundation | |
import Opus | |
import SwiftUI | |
import Starscream | |
import CoreAudio | |
import CoreAudioTypes | |
import AVFoundation | |
import AudioToolbox | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::future::Future; | |
use std::thread::sleep; | |
use std::time::Duration; | |
use anyhow::{anyhow, Result}; | |
use opus::{Application, Decoder, Encoder}; | |
use rodio::buffer; | |
use rodio::cpal; | |
use rodio::cpal::traits::HostTrait; | |
use rodio::cpal::traits::StreamTrait; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { remote } from 'webdriverio'; | |
async function main() { | |
const caps = { | |
"platformName": "Android", | |
"appium:automationName": "UiAutomator2", | |
"appium:ensureWebviewsHavePages": true, | |
"appium:nativeWebScreenshot": true, | |
"appium:newCommandTimeout": 3600, | |
"appium:connectHardwareKeyboard": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AVFoundation | |
import Opus | |
import SwiftUI | |
import Starscream | |
import CoreAudio | |
import CoreAudioTypes | |
import AVFoundation | |
import AudioToolbox | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::future::Future; | |
use std::thread::sleep; | |
use std::time::Duration; | |
use anyhow::{anyhow, Result}; | |
use rodio::buffer; | |
use rodio::cpal; | |
use rodio::cpal::traits::HostTrait; | |
use rodio::cpal::traits::StreamTrait; | |
use rodio::source::SineWave; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::future::Future; | |
use anyhow::Ok; | |
use tokio::sync::mpsc; | |
use tokio::sync::oneshot; | |
use tokio::task; | |
use tokio::task::JoinSet; | |
use anyhow::Result; | |
enum Signal { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use tokio::net::{TcpListener, TcpStream}; | |
use tokio_stream::StreamExt; | |
use tokio_tungstenite::{accept_async, WebSocketStream}; | |
use opus::{Decoder, Encoder, Error}; | |
use rodio::{OutputStream, Source}; | |
use rodio::buffer::SamplesBuffer; | |
#[tokio::main] | |
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> { | |
let listener = TcpListener::bind("0.0.0.0:8080").await?; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::time::Duration; | |
use anyhow::{anyhow, Ok, Result}; | |
use rodio::{ | |
cpal::{ | |
self, | |
traits::{HostTrait, StreamTrait}, | |
BufferSize, SampleRate, StreamConfig, | |
}, |
NewerOlder