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 android.arch.lifecycle.LiveData | |
import android.content.Context | |
import android.hardware.Sensor | |
import android.hardware.SensorEvent | |
import android.hardware.SensorEventListener | |
import android.hardware.SensorManager | |
data class Orientation( | |
val azimuth: Float, | |
val pitch: Float, |
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 android.Manifest | |
import android.annotation.SuppressLint | |
import android.app.Activity | |
import android.arch.lifecycle.LiveData | |
import android.content.Context | |
import android.content.pm.PackageManager | |
import android.location.Location | |
import android.os.Looper | |
import android.support.v4.app.ActivityCompat | |
import android.support.v4.content.ContextCompat |
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 android.content.Context | |
import android.graphics.SurfaceTexture | |
import android.net.Uri | |
import android.view.Surface | |
interface IPlayer { | |
/** | |
* コンテンツの全体時間を取得する。単位はミリ秒。 | |
*/ |
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
class RingBuffer(val capacity: Int) { | |
private val storage = ByteArray(capacity) | |
/** | |
* Convenient version of [read]. | |
* This method allocates new array every time. Do not use this in heavy loop. | |
* | |
* @param startPosition Start position. Can be over than capacity. | |
* @param size Result data size. |
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 android.media.AudioFormat | |
import android.media.AudioRecord | |
import android.media.MediaRecorder | |
import java.io.IOException | |
import java.io.InputStream | |
class AudioInputStream( | |
audioSource: Int = MediaRecorder.AudioSource.DEFAULT, | |
sampleRate: Int = 44100, | |
channelConfig: Int = AudioFormat.CHANNEL_IN_MONO, |
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 org.joml.Quaternionf; | |
import org.joml.Vector3f; | |
/** | |
* Arm model from https://github.com/EpicGames/UnrealEngine/tree/release/Engine/Plugins/Runtime/GoogleVR/GoogleVRController/Source/GoogleVRController/Private/ArmModel | |
*/ | |
public class GvrArmModel { | |
private static final Vector3f FORWARD = new Vector3f(0.0f, 0.0f, -1.0f); | |
private static final Vector3f UP = new Vector3f(0.0f, 1.0f, 0.0f); |
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 android.app.Activity; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.support.annotation.Nullable; | |
import android.view.SurfaceView; | |
import com.google.android.exoplayer2.C; | |
import com.google.android.exoplayer2.DefaultLoadControl; | |
import com.google.android.exoplayer2.ExoPlayerFactory; |
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 android.app.Activity; | |
import android.media.MediaPlayer; | |
import org.androidannotations.annotations.AfterViews; | |
import org.androidannotations.annotations.Bean; | |
import org.androidannotations.annotations.EActivity; | |
import org.androidannotations.annotations.ViewById; | |
import org.rajawali3d.view.SurfaceView; | |
import java.io.IOException; |
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
angular.module('jsTree', []) | |
.component('jsTree', { | |
template: '<div id="js-tree"></div>', | |
bindings: { | |
core: '<', | |
pluginsConf: '<', | |
plugins: '<', | |
onInit: '&', | |
onLoading: '&', | |
onLoaded: '&', |
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
public class BufferedData { | |
public interface OnBufferFilledListener { | |
void onBufferFilled(float[] buffer); | |
} | |
private final float[][] buffers; | |
private int currentBufferIndex; | |
private int indexInCurrentBuffer; | |
private OnBufferFilledListener listener; |