From bb2df2cc8e8a8981d23b102eeb4179f68bae55fa Mon Sep 17 00:00:00 2001 From: Flamefire Date: Sat, 15 Mar 2014 13:56:00 +0100 Subject: [PATCH] Organize Lib/Sound --- Vocaluxe/Base/CConfig.cs | 1 + Vocaluxe/Base/CSound.cs | 8 +++++ .../Decoder/CAudioDecoderFFmpeg.cs | 2 +- .../{ => Playback}/Decoder/IAudioDecoder.cs | 2 +- .../Gstreamer}/CGstreamerAudio.cs | 3 +- .../Gstreamer/CGstreamerAudioWrapper.cs | 2 +- .../GstreamerSharp}/CGstreamerSharpAudio.cs | 7 ++--- .../Lib/Sound/{ => Playback}/IPlayback.cs | 2 +- .../{ => Playback/OpenAL}/COpenALPlay.cs | 4 +-- .../PortAudio}/CPortAudioPlay.cs | 4 +-- .../Sound/{ => Playback/PortAudio}/CPt1.cs | 2 +- .../{ => Playback/PortAudio}/CSyncTimer.cs | 2 +- Vocaluxe/Lib/Sound/{ => Record}/CBuffer.cs | 2 +- Vocaluxe/Lib/Sound/{ => Record}/CDelayTest.cs | 2 +- .../DirectSound}/CDirectSoundRecord.cs | 2 +- Vocaluxe/Lib/Sound/{ => Record}/IRecord.cs | 2 +- .../PortAudio}/CPortAudioRecord.cs | 2 +- Vocaluxe/Screens/CScreenOptionsRecord.cs | 1 + Vocaluxe/Vocaluxe.csproj | 30 +++++++++---------- 19 files changed, 44 insertions(+), 36 deletions(-) rename Vocaluxe/Lib/Sound/{ => Playback}/Decoder/CAudioDecoderFFmpeg.cs (99%) rename Vocaluxe/Lib/Sound/{ => Playback}/Decoder/IAudioDecoder.cs (96%) rename Vocaluxe/Lib/Sound/{ => Playback/Gstreamer}/CGstreamerAudio.cs (98%) rename Vocaluxe/Lib/Sound/{ => Playback}/Gstreamer/CGstreamerAudioWrapper.cs (99%) rename Vocaluxe/Lib/Sound/{ => Playback/GstreamerSharp}/CGstreamerSharpAudio.cs (98%) rename Vocaluxe/Lib/Sound/{ => Playback}/IPlayback.cs (98%) rename Vocaluxe/Lib/Sound/{ => Playback/OpenAL}/COpenALPlay.cs (99%) rename Vocaluxe/Lib/Sound/{ => Playback/PortAudio}/CPortAudioPlay.cs (99%) rename Vocaluxe/Lib/Sound/{ => Playback/PortAudio}/CPt1.cs (97%) rename Vocaluxe/Lib/Sound/{ => Playback/PortAudio}/CSyncTimer.cs (97%) rename Vocaluxe/Lib/Sound/{ => Record}/CBuffer.cs (99%) rename Vocaluxe/Lib/Sound/{ => Record}/CDelayTest.cs (98%) rename Vocaluxe/Lib/Sound/{ => Record/DirectSound}/CDirectSoundRecord.cs (99%) rename Vocaluxe/Lib/Sound/{ => Record}/IRecord.cs (98%) rename Vocaluxe/Lib/Sound/{ => Record/PortAudio}/CPortAudioRecord.cs (99%) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 2b5d8b3d..8afa3d64 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -25,6 +25,7 @@ using System.Text.RegularExpressions; using System.Windows.Forms; using System.Xml; using Vocaluxe.Lib.Sound; +using Vocaluxe.Lib.Sound.Record; using Vocaluxe.Lib.Webcam; using VocaluxeLib; using VocaluxeLib.Profile; diff --git a/Vocaluxe/Base/CSound.cs b/Vocaluxe/Base/CSound.cs index d6b55cbe..662bb8f0 100644 --- a/Vocaluxe/Base/CSound.cs +++ b/Vocaluxe/Base/CSound.cs @@ -19,6 +19,14 @@ using System; using System.Collections.ObjectModel; using System.IO; using Vocaluxe.Lib.Sound; +using Vocaluxe.Lib.Sound.Playback; +using Vocaluxe.Lib.Sound.Playback.Gstreamer; +using Vocaluxe.Lib.Sound.Playback.GstreamerSharp; +using Vocaluxe.Lib.Sound.Playback.OpenAL; +using Vocaluxe.Lib.Sound.Playback.PortAudio; +using Vocaluxe.Lib.Sound.Record; +using Vocaluxe.Lib.Sound.Record.DirectSound; +using Vocaluxe.Lib.Sound.Record.PortAudio; using VocaluxeLib; namespace Vocaluxe.Base diff --git a/Vocaluxe/Lib/Sound/Decoder/CAudioDecoderFFmpeg.cs b/Vocaluxe/Lib/Sound/Playback/Decoder/CAudioDecoderFFmpeg.cs similarity index 99% rename from Vocaluxe/Lib/Sound/Decoder/CAudioDecoderFFmpeg.cs rename to Vocaluxe/Lib/Sound/Playback/Decoder/CAudioDecoderFFmpeg.cs index d1503dfc..1668deb0 100644 --- a/Vocaluxe/Lib/Sound/Decoder/CAudioDecoderFFmpeg.cs +++ b/Vocaluxe/Lib/Sound/Playback/Decoder/CAudioDecoderFFmpeg.cs @@ -20,7 +20,7 @@ using System.Runtime.InteropServices; using Vocaluxe.Base; using Vocaluxe.Lib.Video.Acinerella; -namespace Vocaluxe.Lib.Sound.Decoder +namespace Vocaluxe.Lib.Sound.Playback.Decoder { class CAudioDecoderFFmpeg : IAudioDecoder, IDisposable { diff --git a/Vocaluxe/Lib/Sound/Decoder/IAudioDecoder.cs b/Vocaluxe/Lib/Sound/Playback/Decoder/IAudioDecoder.cs similarity index 96% rename from Vocaluxe/Lib/Sound/Decoder/IAudioDecoder.cs rename to Vocaluxe/Lib/Sound/Playback/Decoder/IAudioDecoder.cs index 7308ba09..6187c279 100644 --- a/Vocaluxe/Lib/Sound/Decoder/IAudioDecoder.cs +++ b/Vocaluxe/Lib/Sound/Playback/Decoder/IAudioDecoder.cs @@ -15,7 +15,7 @@ // along with Vocaluxe. If not, see . #endregion -namespace Vocaluxe.Lib.Sound.Decoder +namespace Vocaluxe.Lib.Sound.Playback.Decoder { struct SFormatInfo { diff --git a/Vocaluxe/Lib/Sound/CGstreamerAudio.cs b/Vocaluxe/Lib/Sound/Playback/Gstreamer/CGstreamerAudio.cs similarity index 98% rename from Vocaluxe/Lib/Sound/CGstreamerAudio.cs rename to Vocaluxe/Lib/Sound/Playback/Gstreamer/CGstreamerAudio.cs index e29937de..66a30301 100644 --- a/Vocaluxe/Lib/Sound/CGstreamerAudio.cs +++ b/Vocaluxe/Lib/Sound/Playback/Gstreamer/CGstreamerAudio.cs @@ -17,9 +17,8 @@ using System; using Vocaluxe.Base; -using Vocaluxe.Lib.Sound.Gstreamer; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Playback.Gstreamer { class CGstreamerAudio : IPlayback { diff --git a/Vocaluxe/Lib/Sound/Gstreamer/CGstreamerAudioWrapper.cs b/Vocaluxe/Lib/Sound/Playback/Gstreamer/CGstreamerAudioWrapper.cs similarity index 99% rename from Vocaluxe/Lib/Sound/Gstreamer/CGstreamerAudioWrapper.cs rename to Vocaluxe/Lib/Sound/Playback/Gstreamer/CGstreamerAudioWrapper.cs index e4db4114..bf600899 100644 --- a/Vocaluxe/Lib/Sound/Gstreamer/CGstreamerAudioWrapper.cs +++ b/Vocaluxe/Lib/Sound/Playback/Gstreamer/CGstreamerAudioWrapper.cs @@ -17,7 +17,7 @@ using System.Runtime.InteropServices; -namespace Vocaluxe.Lib.Sound.Gstreamer +namespace Vocaluxe.Lib.Sound.Playback.Gstreamer { public static class CGstreamerAudioWrapper { diff --git a/Vocaluxe/Lib/Sound/CGstreamerSharpAudio.cs b/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudio.cs similarity index 98% rename from Vocaluxe/Lib/Sound/CGstreamerSharpAudio.cs rename to Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudio.cs index dc856e98..8696bdc2 100644 --- a/Vocaluxe/Lib/Sound/CGstreamerSharpAudio.cs +++ b/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudio.cs @@ -22,9 +22,8 @@ using GLib; using System.Runtime.InteropServices; using Vocaluxe.Base; using VocaluxeLib; -using Thread = System.Threading.Thread; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp { public class CGstreamerSharpAudio : IPlayback { @@ -322,7 +321,7 @@ namespace Vocaluxe.Lib.Sound { Closed = true; Finished = true; - var t = new Thread(_TerminateStream) {Name = "GSt Terminate"}; + var t = new System.Threading.Thread(_TerminateStream) {Name = "GSt Terminate"}; t.Start(); } } @@ -403,7 +402,7 @@ namespace Vocaluxe.Lib.Sound if (_Duration < 0 && !_QueryingDuration) { _QueryingDuration = true; // Set this to avoid race conditions - var t = new Thread(_UpdateDuration) {Name = "GSt Update Duration"}; + var t = new System.Threading.Thread(_UpdateDuration) {Name = "GSt Update Duration"}; t.Start(); } return _Duration > 0 ? _Duration : -1; diff --git a/Vocaluxe/Lib/Sound/IPlayback.cs b/Vocaluxe/Lib/Sound/Playback/IPlayback.cs similarity index 98% rename from Vocaluxe/Lib/Sound/IPlayback.cs rename to Vocaluxe/Lib/Sound/Playback/IPlayback.cs index 22d7d7b7..c69eed4e 100644 --- a/Vocaluxe/Lib/Sound/IPlayback.cs +++ b/Vocaluxe/Lib/Sound/Playback/IPlayback.cs @@ -15,7 +15,7 @@ // along with Vocaluxe. If not, see . #endregion -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Playback { public enum EStreamAction { diff --git a/Vocaluxe/Lib/Sound/COpenALPlay.cs b/Vocaluxe/Lib/Sound/Playback/OpenAL/COpenALPlay.cs similarity index 99% rename from Vocaluxe/Lib/Sound/COpenALPlay.cs rename to Vocaluxe/Lib/Sound/Playback/OpenAL/COpenALPlay.cs index 6ab9f2b4..5e9850e6 100644 --- a/Vocaluxe/Lib/Sound/COpenALPlay.cs +++ b/Vocaluxe/Lib/Sound/Playback/OpenAL/COpenALPlay.cs @@ -23,10 +23,10 @@ using System.Diagnostics; using System.IO; using System.Threading; using Vocaluxe.Base; -using Vocaluxe.Lib.Sound.Decoder; +using Vocaluxe.Lib.Sound.Playback.Decoder; using VocaluxeLib; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Playback.OpenAL { class COpenALPlay : IPlayback, IDisposable { diff --git a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs b/Vocaluxe/Lib/Sound/Playback/PortAudio/CPortAudioPlay.cs similarity index 99% rename from Vocaluxe/Lib/Sound/CPortAudioPlay.cs rename to Vocaluxe/Lib/Sound/Playback/PortAudio/CPortAudioPlay.cs index 2be82c2c..c0cd93f8 100644 --- a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs +++ b/Vocaluxe/Lib/Sound/Playback/PortAudio/CPortAudioPlay.cs @@ -22,11 +22,11 @@ using System.Linq; using System.Runtime.InteropServices; using System.Threading; using Vocaluxe.Base; -using Vocaluxe.Lib.Sound.Decoder; +using Vocaluxe.Lib.Sound.Playback.Decoder; using Vocaluxe.Lib.Sound.PortAudio; using VocaluxeLib; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Playback.PortAudio { class CPortAudioPlay : IPlayback { diff --git a/Vocaluxe/Lib/Sound/CPt1.cs b/Vocaluxe/Lib/Sound/Playback/PortAudio/CPt1.cs similarity index 97% rename from Vocaluxe/Lib/Sound/CPt1.cs rename to Vocaluxe/Lib/Sound/Playback/PortAudio/CPt1.cs index 4ca4b951..17b92f45 100644 --- a/Vocaluxe/Lib/Sound/CPt1.cs +++ b/Vocaluxe/Lib/Sound/Playback/PortAudio/CPt1.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Playback.PortAudio { class CPt1 { diff --git a/Vocaluxe/Lib/Sound/CSyncTimer.cs b/Vocaluxe/Lib/Sound/Playback/PortAudio/CSyncTimer.cs similarity index 97% rename from Vocaluxe/Lib/Sound/CSyncTimer.cs rename to Vocaluxe/Lib/Sound/Playback/PortAudio/CSyncTimer.cs index 6ccd380c..2b405c9c 100644 --- a/Vocaluxe/Lib/Sound/CSyncTimer.cs +++ b/Vocaluxe/Lib/Sound/Playback/PortAudio/CSyncTimer.cs @@ -1,7 +1,7 @@ using System; using System.Diagnostics; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Playback.PortAudio { class CSyncTimer { diff --git a/Vocaluxe/Lib/Sound/CBuffer.cs b/Vocaluxe/Lib/Sound/Record/CBuffer.cs similarity index 99% rename from Vocaluxe/Lib/Sound/CBuffer.cs rename to Vocaluxe/Lib/Sound/Record/CBuffer.cs index 34831ccd..cbf72706 100644 --- a/Vocaluxe/Lib/Sound/CBuffer.cs +++ b/Vocaluxe/Lib/Sound/Record/CBuffer.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Record { class CBuffer : IDisposable { diff --git a/Vocaluxe/Lib/Sound/CDelayTest.cs b/Vocaluxe/Lib/Sound/Record/CDelayTest.cs similarity index 98% rename from Vocaluxe/Lib/Sound/CDelayTest.cs rename to Vocaluxe/Lib/Sound/Record/CDelayTest.cs index 047b3999..d8c07b5e 100644 --- a/Vocaluxe/Lib/Sound/CDelayTest.cs +++ b/Vocaluxe/Lib/Sound/Record/CDelayTest.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using Vocaluxe.Base; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Record { class CDelayTest { diff --git a/Vocaluxe/Lib/Sound/CDirectSoundRecord.cs b/Vocaluxe/Lib/Sound/Record/DirectSound/CDirectSoundRecord.cs similarity index 99% rename from Vocaluxe/Lib/Sound/CDirectSoundRecord.cs rename to Vocaluxe/Lib/Sound/Record/DirectSound/CDirectSoundRecord.cs index eabf0d73..e135211e 100644 --- a/Vocaluxe/Lib/Sound/CDirectSoundRecord.cs +++ b/Vocaluxe/Lib/Sound/Record/DirectSound/CDirectSoundRecord.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Threading; using Vocaluxe.Base; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Record.DirectSound { class CDirectSoundRecord : IRecord { diff --git a/Vocaluxe/Lib/Sound/IRecord.cs b/Vocaluxe/Lib/Sound/Record/IRecord.cs similarity index 98% rename from Vocaluxe/Lib/Sound/IRecord.cs rename to Vocaluxe/Lib/Sound/Record/IRecord.cs index f4568a93..1dfea755 100644 --- a/Vocaluxe/Lib/Sound/IRecord.cs +++ b/Vocaluxe/Lib/Sound/Record/IRecord.cs @@ -18,7 +18,7 @@ using System; using System.Collections.ObjectModel; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Record { class CRecordDevice { diff --git a/Vocaluxe/Lib/Sound/CPortAudioRecord.cs b/Vocaluxe/Lib/Sound/Record/PortAudio/CPortAudioRecord.cs similarity index 99% rename from Vocaluxe/Lib/Sound/CPortAudioRecord.cs rename to Vocaluxe/Lib/Sound/Record/PortAudio/CPortAudioRecord.cs index 37d6c808..05b37330 100644 --- a/Vocaluxe/Lib/Sound/CPortAudioRecord.cs +++ b/Vocaluxe/Lib/Sound/Record/PortAudio/CPortAudioRecord.cs @@ -23,7 +23,7 @@ using System.Runtime.InteropServices; using Vocaluxe.Base; using Vocaluxe.Lib.Sound.PortAudio; -namespace Vocaluxe.Lib.Sound +namespace Vocaluxe.Lib.Sound.Record.PortAudio { class CPortAudioRecord : IRecord { diff --git a/Vocaluxe/Screens/CScreenOptionsRecord.cs b/Vocaluxe/Screens/CScreenOptionsRecord.cs index 979809c6..8a1e3c97 100644 --- a/Vocaluxe/Screens/CScreenOptionsRecord.cs +++ b/Vocaluxe/Screens/CScreenOptionsRecord.cs @@ -20,6 +20,7 @@ using System.Collections.ObjectModel; using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Lib.Sound; +using Vocaluxe.Lib.Sound.Record; using VocaluxeLib; using VocaluxeLib.Menu; diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index 1b5d5b87..e97608d2 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -212,14 +212,14 @@ - + - - + + @@ -252,11 +252,11 @@ - + - + @@ -278,17 +278,17 @@ - - - + + + - - - - - - - + + + + + + +