Skip to content

Instantly share code, notes, and snippets.

@imoldfella
imoldfella / gist:32188969dad94480af5e89a66d2b008e
Created November 3, 2020 03:45
Possible bug in sound_flutter
import 'package:flutter/material.dart';
import 'package:flutter_sound/flutter_sound.dart';
import 'dart:async';
import 'dart:typed_data';
import 'dart:collection';
const int SAMPLE_RATE = 8000;
const int MAX_BUFFERED = 10*SAMPLE_RATE;
// Each speech event captures the phrase identified and the PCM buffers used to identify it.
#include "stdafx.h"
#include <experimental/coroutine>
using namespace std::experimental;
using namespace std;
template<class T>
struct gen
{
struct promise_type
@imoldfella
imoldfella / gist:ea264e146df67884056da0af1e61964f
Last active December 11, 2017 19:56
coroutine TS vs Simon Tatham hacky coroutines
#include <inttypes.h>
#include <experimental/generator>
#include <intrin.h>
#include <functional>
using namespace std::experimental;
generator<int> ints(int start,int stride)
{