/// <summary> /// Make a "tock" sound (rather like you might hear with a clock's tick-tock sound). This is done is several places, /// so this method is provided in order to keep the code related to the choice of sound, in one place. /// </summary> public void MakeKeyPressSound() { //todo #if !SILVERLIGHT AudioLib.PlaySoundResource(SoundResourceForKeyPressSound); #endif }
/// <summary> /// Make a "tock" sound (rather like you might hear with a clock's tick-tock sound). This is done is several places, /// so this method is provided in order to keep the code related to the choice of sound, in one place. /// </summary> public void MakeBackspaceSound() { // WP7 makes a slightly different tone for this, which I like. TODO: Get an audio file to play for this. #if !SILVERLIGHT AudioLib.PlaySoundResource(SoundResourceForKeyPressSound); #endif }
/// <summary> /// Initializises Commands, NavigationHandler and AudioLib of Model /// </summary> /// <param name="handler"> For navigation</param> public AddSongPageVM(NavigationHandler handler) { _handler = handler; _audioLib = AudioLib.SingletonAudioLib; AddSongCommand = new Command(AddSong); PickFileCommand = new Command(PickFile); }
void Update() { if (!Microphone.IsRecording(null) && isRecording) { AudioLib.Save("test.wav", audioClip); GetComponentInChildren <Text>().text = "Start recording"; isRecording = false; } }
void Awake() { if (instance == null) { //Debug.Log("Setting InputProcessor Singleton"); instance = this; } else if (instance != this) { Destroy(gameObject); Debug.LogError("Singleton InputProcessor instantiated multiple times, destroy all but first to awaken"); } }
/// <summary> /// Initializises Commands, NavigationHandler and AudioLib, AudioPlayer of Model /// </summary> /// <param name="handler">For navigation</param> public AudioLibPageVM(NavigationHandler handler) { _handler = handler; _audioLib = AudioLib.SingletonAudioLib; _audioPlayer = AudioPlayer.SingletonAudioPlayer; _oldSongs = null; _deleteList = new List <AudioTrack>(); TitleSortCommand = new Command(TitleSort); ArtistSortCommand = new Command(ArtistSort); BPMSortCommand = new Command(BPMSort); PlaySongCommand = new Command <AudioTrack>(PlaySong); AddSongCommand = new Command(AddSong); SearchSongCommand = new Command <string>(SearchSong); DeleteSongsCommand = new Command(DeleteSongs); EditDeleteListCommand = new Command <AudioTrack>(EditDeleteList); }