Skip to content

Instantly share code, notes, and snippets.

View mattvr's full-sized avatar
☯️
🫵

mattvr mattvr

☯️
🫵
View GitHub Profile
public override bool GetAudioBytes(int streamId, int bufferSize, out byte[] bytes, out int receivedBytes)
{
//Debug.Log("Get coherent audio data. Bytes = " + bufferSize);
IntPtr audioBuffer = Marshal.AllocHGlobal(bufferSize);
// When you need more data to play for stream #streamID
//int timeout = 0; // A zero timeout means block until data is received
receivedBytes = m_View.GetAudioData(streamId, audioBuffer, bufferSize, 0);
if (receivedBytes <= 0)
@terkel
terkel / _easing.scss
Last active October 30, 2024 22:43
Timing functions for CSS animations and transitions
// _easing.scss, CSS easing functions - gist.github.com/terkel/4377409
// Based on Caesar - matthewlein.com/ceaser
$linear: cubic-bezier( 0.250, 0.250, 0.750, 0.750 );
$ease: cubic-bezier( 0.250, 0.100, 0.250, 1.000 );
$ease-in: cubic-bezier( 0.420, 0.000, 1.000, 1.000 );
$ease-out: cubic-bezier( 0.000, 0.000, 0.580, 1.000 );
$ease-in-out: cubic-bezier( 0.420, 0.000, 0.580, 1.000 );
$ease-in-quad: cubic-bezier( 0.550, 0.085, 0.680, 0.530 );