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
func (p *player) resample() { | |
inL, inR := toLR(p.buf) | |
if len(inL) != len(inR) { | |
panic("oto: len(inL) must == len(inR)") | |
} | |
s := p.context.Get("sampleRate").Int() | |
if p.sampleRate == s { | |
p.buf = nil | |
p.bufL = append(p.bufL, inL...) |
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
const m = new Map(); | |
const a = Object.prototype; | |
m[a] = 'This is a' | |
const b = {}; | |
console.log(m[b]); |
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
func isNil(v interface{}) bool { | |
if v == nil { | |
return true | |
} | |
switch rv := reflect.ValueOf(v); rv.Kind() { | |
case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Slice: | |
return rv.IsNil() | |
} | |
return false | |
} |
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
loop ;; label = @1 | |
get_local 0 | |
f32.const 0x0p+0 (;=0;) | |
f32.store | |
get_local 5 | |
f32.const 0x0p+0 (;=0;) | |
f32.store | |
get_local 2 | |
f32.const 0x1p+0 (;=1;) | |
f32.store |
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
package main | |
import ( | |
"time" | |
) | |
func array() []float32 { | |
return make([]float32, 16) | |
} |
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
package main | |
func array() []float32 { | |
return make([]float32, 16) | |
} | |
func heavyTask() float32 { | |
arr := array() | |
result := float32(0.0) |
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
(func $github.com_hajimehoshi_ebiten_internal_graphicsutil.QuadVertices (type 0) (result i32) | |
(local i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) | |
loop ;; label = @1 | |
block ;; label = @2 | |
block ;; label = @3 | |
block ;; label = @4 | |
block ;; label = @5 | |
block ;; label = @6 | |
block ;; label = @7 | |
block ;; label = @8 |
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
> Configure project :app | |
Configuration 'androidTestCompile' in project ':app' is deprecated. Use 'androidTestImplementation' instead. | |
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead. | |
Configuration 'testCompile' in project ':app' is deprecated. Use 'testImplementation' instead. | |
Observed package id 'ndk-bundle' in inconsistent location '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle.r15' (Expected '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle') | |
Already observed package id 'ndk-bundle' in '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle'. Skipping duplicate at '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle.r15' | |
Observed package id 'ndk-bundle' in inconsistent location '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle.r15' (Expected '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle') | |
Already observed package id 'ndk-bundle' in '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle'. Skipping duplicate at '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle.r15' | |
Dow |
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
package main | |
import ( | |
"image/color" | |
"github.com/golang/freetype/truetype" | |
"github.com/hajimehoshi/ebiten" | |
"github.com/hajimehoshi/ebiten/text" | |
"golang.org/x/image/font" | |
"golang.org/x/image/font/gofont/goregular" |
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
// Copyright 2018 The Ebiten Authors | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |