Пример #1
0
 public static void WriteXmlWavEvent(
     this WavComposite writeTo,
     XmlWavEvent segment,
     string prefixLang1,
     string prefixLang2,
     double? speedChange)
 {
     switch (segment.Type) {
         case WavEventType.WavRecording1:
             writeTo.AppendAllOfFile(prefixLang1 + "/" + segment.Filename, speedChange);
             break;
         case WavEventType.WavRecording2:
             writeTo.AppendAllOfFile(prefixLang2 + "/" + segment.Filename, speedChange);
             break;
         case WavEventType.Mp3Segment:
             writeTo.WritePieceOfSomeFileMp3(prefixLang1 + "/" + segment.Filename, segment.TimeIn.TotalSeconds, segment.TimeOut.TotalSeconds, speedChange);
             writeTo.AppendAllOfFile(prefixLang1 + "/" + segment.Filename, speedChange);
             break;
     }
 }
Пример #2
0
        public static void WriteXmlWavEvent(
            this WavComposite writeTo,
            XmlWavEvent segment,
            string prefixLang1,
            string prefixLang2,
            double?speedChange)
        {
            switch (segment.Type)
            {
            case WavEventType.WavRecording1:
                writeTo.AppendAllOfFile(prefixLang1 + "/" + segment.Filename, speedChange);
                break;

            case WavEventType.WavRecording2:
                writeTo.AppendAllOfFile(prefixLang2 + "/" + segment.Filename, speedChange);
                break;

            case WavEventType.Mp3Segment:
                writeTo.WritePieceOfSomeFileMp3(prefixLang1 + "/" + segment.Filename, segment.TimeIn.TotalSeconds, segment.TimeOut.TotalSeconds, speedChange);
                writeTo.AppendAllOfFile(prefixLang1 + "/" + segment.Filename, speedChange);
                break;
            }
        }
Пример #3
0
 private void startSegment()
 {
     recMan.StartRecording();
     CurSegment = new XmlWavEvent() {
         //TimeIn = curTime,
         Filename = string.Format(FilenameFormat, segmentId),
         Type = WavEventType.WavRecording2,
     };
 }
Пример #4
0
 private void nextLang1Phrase_manual()
 {
     Lang1CurSegment = new XmlWavEvent {
         Filename = IlyaXml.Lang1Mp3Filename,
         TimeIn = ManualSegmentA,
         TimeOut = ManualSegmentB,
         Type = WavEventType.Mp3Segment
     };
     if (Lang1CurSegment != null) {
         CurIlyaSentence = new XmlIlyaSentence();
         CurIlyaSentence.Lang1Segments.Add(Lang1CurSegment);
         CurIlyaParagraph.Sentences.Add(CurIlyaSentence);
         RecordedSegments = CurIlyaSentence.Lang2Segments;
     }
 }
Пример #5
0
 private void startSegment()
 {
     whenLastSegmentStarted = DateTime.Now;
     recMan.StartRecording();
     curSegment = new XmlWavEvent() {
         Type = WavEventType.WavRecording1,
         Filename = string.Format(FilenameFormat, xml.Segments.Count),
         TimeIn = curTime,
     };
     FireHandler(CurSegmentUpdated);
     FireSegmentTimeUpdatedBasedOnCurrentSituation();
 }
Пример #6
0
 //public void pauseRecording() {
 //    commitSegment();
 //    curSegment = null;
 //}
 public void stopRecording()
 {
     //commitSegment();
     ttSex.Stop();
     recMan.StopRecording();
     recMan.DisposeOfLastRecording();
     curSegment = null;
     FireHandler(RecStopped);
     FireSegmentTimeUpdatedBasedOnCurrentSituation();
 }