public void OnEndRecord() { if (fileSlot == null) { fileSlot = GameObject.Find("FileSlot(Clone)").GetComponent <FileSlot>(); } fileSlot.EncodeWavFile(s.clipName); }
void Start() { fileSlot = null; networkAddress = "192.168.219.118"; s = GameObject.Find("RecordManager").GetComponent <SoundRecorder>(); // OpenServer(); ConnectClientToServer(); }
public void OnSendToHost() { if (fileSlot == null) { fileSlot = GameObject.Find("FileSlot(Clone)").GetComponent <FileSlot>(); } Debug.Log("[Client]OnSendToHost."); StartCoroutine(fileSlot.UploadWavCoroutine(true)); Debug.Log("[Client]OnSendToHost Finished."); }
public void OnEndEdit() { if (fileSlot == null) { fileSlot = GameObject.Find("FileSlot(Clone)").GetComponent <FileSlot>(); } inputText = inputTxtField.text; inputTxtField.text = ""; fileSlot.EncodeTextFile(inputText); fileSlot.CmdUploadTxt(fileSlot.txtFileData); SetLoadingImageEnabled(true); }
// Start is called before the first frame update void Start() { fileSlot = null; fileType = FileType.Text; exceptionText = GameObject.Find("SocketExceptionText").GetComponent <Text>(); exceptionText.text = ""; clientInfoText = GameObject.Find("ClientInfoText").GetComponent <Text>(); clientInfoText.text = ""; logText = GameObject.Find("LogText").GetComponent <Text>(); logText.text = ""; togglegroup = GameObject.Find("ToggleGroup").GetComponent <ToggleGroup>(); inputAddressField = GameObject.Find("AddressInputField").GetComponent <InputField>(); inputMessageField = GameObject.Find("MessageInputField").GetComponent <InputField>(); }
private IEnumerator GetTxt_SendWav_Routine(FileSlot fileSlot) { while (true) { if (File.Exists(Path.Combine(dataPath, "result.wav"))) { break; } Debug.Log(File.Exists(Path.Combine(dataPath, "result.wav"))); yield return(null); } yield return(StartCoroutine(fileSlot.WavEncodingCoroutine("result"))); yield return(StartCoroutine(fileSlot.UploadWavCoroutine(false))); }
public void OnSendToHost() { if (fileSlot == null) { fileSlot = GameObject.Find("FileSlot(Clone)").GetComponent <FileSlot>(); } if (fileType == FileType.Text) { fileSlot.CmdUploadTxt(fileSlot.txtFileData); } else if (fileType == FileType.Wav) { StartCoroutine(fileSlot.UploadWavCoroutine(true)); } }
public void OnEnroll() { if (fileSlot == null) { fileSlot = GameObject.Find("FileSlot(Clone)").GetComponent <FileSlot>(); } if (fileType == FileType.Text) { fileSlot.EncodeTextFile(inputMessage); } else if (fileType == FileType.Wav) { fileSlot.EncodeWavFile(inputMessage); } }
public void OnTextRecieved(FileSlot fileSlot, string content) { StartCoroutine(GetTxt_SendWav_Routine(fileSlot)); }