Skip to content

Instantly share code, notes, and snippets.

View SineVector241's full-sized avatar
:shipit:
That one idiot in the background

SineVector241

:shipit:
That one idiot in the background
View GitHub Profile
@SineVector241
SineVector241 / AndroidAudioRecorder.cs
Last active December 2, 2024 09:30
NAudio Record Driver for Xamarin.Android. This code is based off of https://gist.github.com/neilt6/6d07322070470536ea0ba409c343c2a5 and the WaveInEvent.cs from NAudio's source.
using Android.Media;
using NAudio.CoreAudioApi;
using System;
using System.Threading;
namespace NAudio.Wave
{
public class AndroidAudioRecorder : IWaveIn
{
private readonly SynchronizationContext? _synchronizationContext;