This file contains hidden or 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 <Foundation/Foundation.h> | |
| #import <MediaPlayer/MediaPlayer.h> | |
| #import <AVFoundation/AVFoundation.h> |
This file contains hidden or 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
| MPMusicPlayerController *myPlayer; | |
| MPMediaItem *curItem; | |
| NSArray *playlists; | |
| void setQueueWithPlaylist(NSString * name) | |
| { | |
| MPMediaQuery *query = [MPMediaQuery playlistsQuery]; | |
| playlists = query.collections; | |
| for (MPMediaPlaylist *playlist in playlists) |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Runtime.InteropServices; | |
| public class Binding : MonoBehaviour | |
| { | |
| [DllImport("__Internal")] | |
| private static extern void Initialize_(); | |
| public static void Initialize() | |
| { |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Runtime.InteropServices; | |
| public class Binding : MonoBehaviour | |
| { | |
| [DllImport("__Internal")] | |
| private static extern void Initialize_(); | |
| public static void Initialize() | |
| { |
This file contains hidden or 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
| NSFileManager *fileManager = [NSFileManager defaultManager]; | |
| if ([fileManager fileExistsAtPath:outPath]) | |
| { | |
| [fileManager removeItemAtURL:outURL error:nil]; | |
| } |
This file contains hidden or 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
| AudioSource extraAudioSource; | |
| WWW wwwFile; | |
| wwwFile = new WWW("file://" + Application.persistentDataPath + valueForProperty:MPMediaItemPropertyTitle + ".wav"); | |
| extraAudioSource.clip = wwwFile.GetAudioClip(false, false, AudioType.WAV); |
This file contains hidden or 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 int SAMPLE_NUM = 512; | |
| LineRenderer line; | |
| line = gameObject.AddComponent<LineRenderer>(); | |
| //好きな色を指定しています。 | |
| line.material.color = Color.cyan; | |
| //ちょうどいい太さを指定しています。 | |
| line.SetWidth(0.065f, 0.065f); | |
| line.SetVertexCount(SAMPLE_NUM); | |
| float[] audioWaveFloat = new float[SAMPLE_NUM]; | |
| audioWaveFloat = extraAudioSource.audio.GetSpectrumData(SAMPLE_NUM, 0, FFTWindow.BlackmanHarris); |
This file contains hidden or 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
| NSLog(@"title: %@", [curItem valueForProperty:MPMediaItemPropertyTitle] |
This file contains hidden or 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
| $ boot2docker ip |
This file contains hidden or 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
| $ sudo yum install docker |
OlderNewer