added x64 (win) support,

removed BASS and NAudio
This commit is contained in:
Alexander Eckart committed 2012-02-29 14:30:31 +01:00
1 parent 8be93a3df8
commit 78341baf9f
40 files changed
+57788 -1579

No files matched your search

Binary file not shown.
-31
View File
@@ -1,31 +0,0 @@
Microsoft Public License (Ms-PL)
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
BIN
View File
Binary file not shown.
-3
View File
@@ -1,3 +0,0 @@
<configuration>
<dllmap os="linux" dll="PortAudio.dll" target="libportaudio.so"/>
</configuration>
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
<dllmap os="linux" dll="PortAudio.dll" target="libportaudio.so.2"/>
</startup>
</configuration>
-3
View File
@@ -1,3 +0,0 @@
<configuration>
<dllmap os="linux" dll="acinerella.dll" target="libacinerella.so"/>
</configuration>
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+57639
View File
File diff suppressed because it is too large. Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
+6
View File
@@ -5,12 +5,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocalu
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Debug|x64.ActiveCfg = Debug|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Debug|x64.Build.0 = Debug|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Debug|x86.ActiveCfg = Debug|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Debug|x86.Build.0 = Debug|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Release|x64.ActiveCfg = Release|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Release|x64.Build.0 = Release|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Release|x86.ActiveCfg = Release|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Release|x86.Build.0 = Release|x86
EndGlobalSection
-3
View File
@@ -68,15 +68,12 @@ namespace Vocaluxe.Base
public enum EPlaybackLib
{
BASS,
PortAudio,
NAudio,
OpenAL
}
public enum ERecordLib
{
BASS,
PortAudio
}
+2 -14
View File
@@ -22,24 +22,16 @@ namespace Vocaluxe.Base
{
switch (CConfig.PlayBackLib)
{
case EPlaybackLib.BASS:
_Playback = new CBassPlay();
break;
case EPlaybackLib.PortAudio:
_Playback = new CPortAudioPlay();
break;
case EPlaybackLib.NAudio:
_Playback = new CNAudioPlay();
break;
case EPlaybackLib.OpenAL:
_Playback = new COpenALPlay();
break;
default:
_Playback = new CBassPlay();
_Playback = new CPortAudioPlay();
break;
}
return true;
@@ -186,16 +178,12 @@ namespace Vocaluxe.Base
{
switch (CConfig.RecordLib)
{
case ERecordLib.BASS:
_Record = new CBassRecord();
break;
case ERecordLib.PortAudio:
_Record = new CPortAudioRecord();
break;
default:
_Record = new CBassRecord();
_Record = new CPortAudioRecord();
break;
}
-483
View File
@@ -1,483 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Windows.Forms;
using System.Xml;
using System.Xml.XPath;
using Un4seen.Bass;
using Vocaluxe.Base;
namespace Vocaluxe.Lib.Sound
{
class CBassPlay: IPlayback
{
private bool _Initialized = false;
private List<AudioStreams> _Streams;
private SYNCPROC _SyncSlideAndStop;
private SYNCPROC _SyncSlideAndPause;
private Object MutexAudioStreams = new Object();
public CBassPlay()
{
Init();
}
public bool Init()
{
if (_Initialized)
return true;
#region Registration
string EMail = String.Empty;
string Code = String.Empty;
ReadRegistrationFile(Path.Combine(Environment.CurrentDirectory, CSettings.sBassRegistration), ref EMail, ref Code);
if (EMail == String.Empty || Code == String.Empty)
WriteRegistrationFile(Path.Combine(Environment.CurrentDirectory, CSettings.sBassRegistration), "your mail adress", "your registration code");
else
BassNet.Registration(EMail, Code);
#endregion Registration
bool ok = false;
try
{
ok = Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
_Streams = new List<AudioStreams>();
_SyncSlideAndStop = new SYNCPROC(EndSync);
_SyncSlideAndPause = new SYNCPROC(PauseSync);
}
catch (Exception)
{
ok = false;
}
_Initialized = ok;
return ok;
}
public void CloseAll()
{
while (_Streams.Count > 0)
{
Close(_Streams[_Streams.Count - 1].handle);
}
lock (MutexAudioStreams)
{
_Streams.Clear();
}
}
public void SetGlobalVolume(float Volume)
{
if (_Initialized)
{
Bass.BASS_SetVolume(Volume / 100f);
}
}
public int GetStreamCount()
{
if (!_Initialized)
return 0;
lock (MutexAudioStreams)
{
return _Streams.Count;
}
}
public void Update()
{
}
#region Stream Handling
public int Load(string Media)
{
return Load(Media, false);
}
public int Load(string Media, bool Prescan)
{
if (!_Initialized)
return 0;
BASSFlag flags = BASSFlag.BASS_DEFAULT;
if (Prescan)
flags = BASSFlag.BASS_STREAM_PRESCAN;
AudioStreams stream = new AudioStreams(0);
stream.handle = Bass.BASS_StreamCreateFile(Media, 0L, 0L, flags);
if (stream.handle != 0)
{
stream.file = Media;
lock (MutexAudioStreams)
{
_Streams.Add(stream);
}
return stream.handle;
}
return 0;
}
public void Close(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Bass.BASS_StreamFree(Stream);
_Streams.RemoveAt(GetStreamIndex(Stream));
}
}
}
}
public void Play(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Play(Stream, false);
}
}
}
}
public void Play(int Stream, bool Loop)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
if (Loop)
Bass.BASS_ChannelFlags(Stream, BASSFlag.BASS_SAMPLE_LOOP, BASSFlag.BASS_SAMPLE_LOOP);
Bass.BASS_ChannelPlay(Stream, false);
}
}
}
}
public void Pause(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Bass.BASS_ChannelPause(Stream);
}
}
}
}
public void Stop(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Bass.BASS_ChannelStop(Stream);
}
}
}
}
public void Fade(int Stream, float TargetVolume, float Seconds)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Bass.BASS_ChannelSlideAttribute(Stream, BASSAttribute.BASS_ATTRIB_VOL, TargetVolume/100f, (int)Math.Round(Seconds*1000f));
}
}
}
}
public void FadeAndPause(int Stream, float TargetVolume, float Seconds)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Bass.BASS_ChannelSlideAttribute(Stream, BASSAttribute.BASS_ATTRIB_VOL, TargetVolume / 100f, (int)Math.Round(Seconds * 1000f));
Bass.BASS_ChannelSetSync(Stream, BASSSync.BASS_SYNC_SLIDE, 0L, _SyncSlideAndPause, IntPtr.Zero);
}
}
}
}
public void FadeAndStop(int Stream, float TargetVolume, float Seconds)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Bass.BASS_ChannelSlideAttribute(Stream, BASSAttribute.BASS_ATTRIB_VOL, TargetVolume / 100f, (int)Math.Round(Seconds * 1000f));
Bass.BASS_ChannelSetSync(Stream, BASSSync.BASS_SYNC_SLIDE, 0L, _SyncSlideAndStop, IntPtr.Zero);
}
}
}
}
public void SetStreamVolume(int Stream, float Volume)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Bass.BASS_ChannelSetAttribute(Stream, BASSAttribute.BASS_ATTRIB_VOL, Volume / 100f);
}
}
}
}
public float GetLength(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
long len = Bass.BASS_ChannelGetLength(Stream);
return (float)Bass.BASS_ChannelBytes2Seconds(Stream, len);
}
}
return 0f;
}
return 0f;
}
public float GetPosition(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
long pos = Bass.BASS_ChannelGetPosition(Stream);
return (float)Bass.BASS_ChannelBytes2Seconds(Stream, pos);
}
}
return 0f;
}
return 0f;
}
public bool IsPlaying(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
return (Bass.BASS_ChannelIsActive(Stream) == BASSActive.BASS_ACTIVE_PLAYING);
}
}
}
return false;
}
public bool IsPaused(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
return (Bass.BASS_ChannelIsActive(Stream) == BASSActive.BASS_ACTIVE_PAUSED);
}
}
}
return false;
}
public bool IsFinished(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
return (Bass.BASS_ChannelIsActive(Stream) == BASSActive.BASS_ACTIVE_STOPPED);
}
}
}
return true;
}
public void SetPosition(int Stream, float Position)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Bass.BASS_ChannelSetPosition(Stream, Position);
}
}
}
}
#endregion Stream Handling
private bool AlreadyAdded(int Stream)
{
foreach (AudioStreams st in _Streams)
{
if (st.handle == Stream)
{
return true;
}
}
return false;
}
private int GetStreamIndex(int Stream)
{
for (int i = 0; i < _Streams.Count; i++)
{
if (_Streams[i].handle == Stream)
return i;
}
return -1;
}
private void PauseSync(int handle, int Stream, int data, IntPtr user)
{
if (_Initialized)
{
if (AlreadyAdded(Stream))
{
Pause(Stream);
}
}
}
private void EndSync(int handle, int Stream, int data, IntPtr user)
{
if (_Initialized)
{
if (AlreadyAdded(Stream))
{
Close(Stream);
}
}
}
private void ReadRegistrationFile(string FileName, ref string Email, ref string Code)
{
#region Inits
bool loaded = false;
XPathDocument xPathDoc = null;
XPathNavigator navigator = null;
try
{
xPathDoc = new XPathDocument(FileName);
navigator = xPathDoc.CreateNavigator();
loaded = true;
}
catch (Exception)
{
loaded = false;
if (navigator != null)
navigator = null;
if (xPathDoc != null)
xPathDoc = null;
}
#endregion Inits
if (loaded)
{
CHelper.GetValueFromXML("//root/Registration/EMail", navigator, ref Email, String.Empty);
CHelper.GetValueFromXML("//root/Registration/Code", navigator, ref Code, String.Empty);
}
}
private void WriteRegistrationFile(string FileName, string Email, string Code)
{
XmlWriterSettings _settings = new XmlWriterSettings();
_settings.Indent = true;
_settings.Encoding = Encoding.UTF8;
_settings.ConformanceLevel = ConformanceLevel.Document;
XmlWriter writer;
try
{
writer = XmlWriter.Create(FileName, _settings);
}
catch (Exception)
{
return;
}
writer.WriteStartDocument();
writer.WriteStartElement("root");
writer.WriteStartElement("Registration");
writer.WriteComment("Register your BASS.NET version and suppress the freeware splash screen (http://bass.radio42.com/bass_register.html)");
writer.WriteElementString("EMail", Email);
writer.WriteElementString("Code", Code);
writer.WriteEndElement();
// End of File
writer.WriteEndElement(); //end of root
writer.WriteEndDocument();
writer.Flush();
writer.Close();
}
}
}
-220
View File
@@ -1,220 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using Un4seen.Bass;
using Vocaluxe.Base;
namespace Vocaluxe.Lib.Sound
{
class CBassRecord: IRecord
{
private List<SRecordDevice> _Devices = null;
private SRecordDevice[] _DeviceConfig;
private RECORDPROC _myRecProc;
private int[] _recHandle;
private CBuffer[] _Buffer;
public CBassRecord()
{
Init();
_Buffer = new CBuffer[CSettings.MaxNumPlayer];
for (int i = 0; i < _Buffer.Length; i++)
{
_Buffer[i] = new CBuffer();
}
_recHandle = new int[_Devices.Count];
_myRecProc = new RECORDPROC(MyRecording);
_DeviceConfig = _Devices.ToArray();
}
public bool Init()
{
_Devices = new List<SRecordDevice>();
try
{
BASS_DEVICEINFO info = new BASS_DEVICEINFO();
for (int n = 0; Bass.BASS_RecordGetDeviceInfo(n, info); n++)
{
if (info.IsEnabled)
{
SRecordDevice dev = new SRecordDevice();
dev.ID = n;
dev.Name = info.name;
dev.Driver = info.driver;
dev.Inputs = new List<SInput>();
if (Bass.BASS_RecordInit(n))
{
string name = String.Empty;
for (int j = 0; ((name = Bass.BASS_RecordGetInputName(j)) != null); j++)
{
SInput inp = new SInput();
inp.Name = name;
inp.Channels = 2; //TODO: how to retrieve the amount of channels?
dev.Inputs.Add(inp);
}
_Devices.Add(dev);
Bass.BASS_RecordFree();
}
}
}
}
catch (Exception)
{
//throw;
}
return true;
}
public bool Start(SRecordDevice[] DeviceConfig)
{
for (int i = 0; i < _Buffer.Length; i++)
{
_Buffer[i].Reset();
}
for (int i = 0; i < _recHandle.Length; i++)
{
_recHandle[i] = -1;
}
_DeviceConfig = DeviceConfig;
bool[] active = new bool[DeviceConfig.Length];
for (int dev = 0; dev < DeviceConfig.Length; dev++)
{
active[dev] = false;
for (int inp = 0; inp < DeviceConfig[dev].Inputs.Count; inp++)
{
if (DeviceConfig[dev].Inputs[inp].PlayerChannel1 > 0 ||
DeviceConfig[dev].Inputs[inp].PlayerChannel2 > 0)
active[dev] = true;
}
}
bool result = true;
for (int i = 0; i < _recHandle.Length; i++)
{
if (active[i])
{
if (Bass.BASS_RecordInit(i))
{
_recHandle[i] = Bass.BASS_RecordStart(44100, 2, BASSFlag.BASS_RECORD_PAUSE, 20, _myRecProc, IntPtr.Zero);
// start recording
result |= Bass.BASS_ChannelPlay(_recHandle[i], false);
}
}
}
return result;
}
public bool Stop()
{
for (int i = 0; i < _recHandle.Length; i++)
{
Bass.BASS_ChannelStop(_recHandle[i]);
}
Bass.BASS_RecordFree();
//System.IO.File.Delete("test0.raw");
//System.IO.File.Delete("test1.raw");
//System.IO.File.WriteAllBytes("test0.raw", _Buffer[0].Buffer);
//System.IO.File.WriteAllBytes("test1.raw", _Buffer[1].Buffer);
return true;
}
public void CloseAll()
{
Stop();
}
public void AnalyzeBuffer(int Player)
{
_Buffer[Player].AnalyzeBuffer();
}
public int GetToneAbs(int Player)
{
return _Buffer[Player].ToneAbs;
}
public int GetTone(int Player)
{
return _Buffer[Player].Tone;
}
public void SetTone(int Player, int Tone)
{
_Buffer[Player].Tone = Tone;
}
public float GetMaxVolume(int Player)
{
return _Buffer[Player].MaxVolume;
}
public bool ToneValid(int Player)
{
return _Buffer[Player].ToneValid;
}
public SRecordDevice[] RecordDevices()
{
return _Devices.ToArray();
}
private bool MyRecording(int handle, IntPtr buffer, int length, IntPtr user)
{
bool cont = true;
if (length > 0 && buffer != IntPtr.Zero)
{
byte[] _recbuffer = new byte[length];
byte[] _leftBuffer = new byte[length / 2];
byte[] _rightBuffer = new byte[length / 2];
// copy from managed to unmanaged memory
Marshal.Copy(buffer, _recbuffer, 0, length);
// copy into left/right Buffer
for (int i = 0; i < length / 2; i++)
{
_leftBuffer[i] = _recbuffer[i * 2 - (i % 2)];
_rightBuffer[i] = _recbuffer[i * 2 - (i % 2) + 2];
}
for (int i = 0; i < _recHandle.Length; i++)
{
if (_recHandle[i] == handle)
{
if (_DeviceConfig[i].Inputs[0].PlayerChannel1 > 0)
_Buffer[_DeviceConfig[i].Inputs[0].PlayerChannel1 - 1].ProcessNewBuffer(_leftBuffer);
if (_DeviceConfig[i].Inputs[0].PlayerChannel2 > 0)
_Buffer[_DeviceConfig[i].Inputs[0].PlayerChannel2 - 1].ProcessNewBuffer(_rightBuffer);
break;
}
}
}
return cont;
}
}
}
-740
View File
@@ -1,740 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.IO;
using System.Windows.Forms;
using System.Xml;
using System.Xml.XPath;
using NAudio;
using NAudio.Wave;
using NAudio.CoreAudioApi;
using Vocaluxe.Base;
namespace Vocaluxe.Lib.Sound
{
class NAudioStream
{
const float DELAY = 0.15f;
private string _FileName;
private IWavePlayer _waveOutDevice;
private WaveStream _mainOutputStream;
private WaveChannel32 _volumeStream;
private bool _loaded;
private float _Volume = 1f;
private float _Position = 0f;
private Stopwatch _Timer;
private float _CurrentTime = 0f;
private Stopwatch _fadeTimer;
private float _fadeTime;
private float _targetVolume;
private float _startVolume;
private bool _closeStreamAfterFade = false;
private bool _pauseStreamAfterFade = false;
private bool _fading = false;
public int Handle;
public NAudioStream(string FileName)
{
_loaded = false;
_FileName = FileName;
Handle = 0;
_Timer = new Stopwatch();
_fadeTimer = new Stopwatch();
try
{
_waveOutDevice = new WaveOut();
_mainOutputStream = CreateInputStream(FileName);
_waveOutDevice.Init(_mainOutputStream);
}
catch (Exception)
{
_loaded = false;
}
_loaded = true;
}
public void Play()
{
if (_loaded)
{
if (IsPaused())
{
_waveOutDevice.Play();
_Timer.Start();
}
else
{
_waveOutDevice.Play();
Position = _Position;
Volume = _Volume;
_CurrentTime = Position;
_Timer.Start();
}
_pauseStreamAfterFade = false;
}
}
public void Stop()
{
if (_loaded)
{
_waveOutDevice.Stop();
_Timer.Stop();
_Timer.Reset();
_Position = 0f;
_CurrentTime = _Position;
}
}
public void Pause()
{
if (_loaded)
{
_waveOutDevice.Pause();
_Timer.Stop();
}
}
public void Close()
{
CloseWaveOut();
_Timer.Stop();
}
public float Length
{
get
{
if (_loaded)
{
TimeSpan tt = _volumeStream.TotalTime;
return (float)tt.TotalSeconds;
}
return 0f;
}
}
public float Position
{
get
{
if (_loaded && _volumeStream != null)
{
TimeSpan tt = _volumeStream.CurrentTime;
float time = (float)tt.TotalSeconds;
if (time != _CurrentTime)
{
_CurrentTime = time;
_Timer.Stop();
_Timer.Reset();
_Timer.Start();
}
else
{
time = _CurrentTime + _Timer.ElapsedMilliseconds / 1000f;
}
//Console.WriteLine(time.ToString("#0.000"));
return time - DELAY;
}
return 0f;
}
set
{
if (_loaded && _volumeStream != null)
{
float pos = value;
if (pos > Length)
pos = Length;
if (pos < 0L)
pos = 0L;
int skip = (int)(pos - _CurrentTime);
_volumeStream.Skip(skip);
_CurrentTime += skip;
}
_Position = value;
}
}
public float Volume
{
get
{
if (_loaded && _volumeStream != null)
{
return _volumeStream.Volume;
}
return 0f;
}
set
{
if (_loaded && _volumeStream != null)
{
float volume = value;
if (volume > 1f)
volume = 1f;
if (volume < 0f)
volume = 0f;
_volumeStream.Volume = volume;
}
_Volume = value;
}
}
public bool IsPlaying()
{
if (_loaded && _waveOutDevice != null)
return _waveOutDevice.PlaybackState == PlaybackState.Playing;
return false;
}
public bool IsPaused()
{
if (_loaded && _waveOutDevice != null)
return _waveOutDevice.PlaybackState == PlaybackState.Paused;
return false;
}
public bool IsFinished()
{
if (_loaded && _waveOutDevice != null)
return _waveOutDevice.PlaybackState == PlaybackState.Stopped;
return false;
}
public bool Update()
{
if (_fading)
{
if ((float)_fadeTimer.ElapsedMilliseconds / 1000f < _fadeTime)
Volume = _startVolume + (_targetVolume - _startVolume) * ((_fadeTimer.ElapsedMilliseconds / 1000f) / _fadeTime);
else
{
Volume = _targetVolume;
_fadeTimer.Stop();
_fading = false;
if (_closeStreamAfterFade)
return false;
if (_pauseStreamAfterFade)
Pause();
}
return true;
}
return true;
}
public void Fade(float TargetVolume, float FadeTime)
{
if (!_loaded || _volumeStream == null)
return;
_fading = true;
_fadeTimer.Stop();
_fadeTimer.Reset();
_startVolume = Volume;
_targetVolume = TargetVolume / 100f;
_fadeTime = FadeTime;
_fadeTimer.Start();
}
public void FadeAndPause(float TargetVolume, float FadeTime)
{
if (!_loaded || _volumeStream == null)
return;
_pauseStreamAfterFade = true;
Fade(TargetVolume, FadeTime);
}
public void FadeAndStop(float TargetVolume, float FadeTime)
{
if (!_loaded || _volumeStream == null)
return;
_closeStreamAfterFade = true;
Fade(TargetVolume, FadeTime);
}
private WaveStream CreateInputStream(string fileName)
{
WaveChannel32 inputStream;
if (fileName.EndsWith(".mp3"))
{
WaveStream mp3Reader = new Mp3FileReader(fileName);
inputStream = new WaveChannel32(mp3Reader);
}
else
{
throw new InvalidOperationException("Unsupported extension");
}
_volumeStream = inputStream;
return _volumeStream;
}
private void CloseWaveOut()
{
if (_waveOutDevice != null)
{
_waveOutDevice.Stop();
}
if (_mainOutputStream != null)
{
// this one really closes the file and ACM conversion
_volumeStream.Close();
_volumeStream = null;
// this one does the metering stream
_mainOutputStream.Close();
_mainOutputStream = null;
}
if (_waveOutDevice != null)
{
_waveOutDevice.Dispose();
_waveOutDevice = null;
}
}
}
class CNAudioPlay : IPlayback
{
private bool _Initialized = false;
private int _HandleCounter = 0;
private List<NAudioStream> _Streams;
private Object MutexAudioStreams = new Object();
public CNAudioPlay()
{
Init();
}
public bool Init()
{
if (_Initialized)
{
foreach (NAudioStream stream in _Streams)
{
stream.Close();
}
_Streams.Clear();
_Initialized = false;
}
else
_Streams = new List<NAudioStream>();
_Initialized = true;
return _Initialized;
}
public void CloseAll()
{
while (_Streams.Count > 0)
{
Close(_Streams[_Streams.Count - 1].Handle);
}
lock (MutexAudioStreams)
{
_Streams.Clear();
}
}
public void SetGlobalVolume(float Volume)
{
if (_Initialized)
{
//Bass.BASS_SetVolume(Volume / 100f);
}
}
public int GetStreamCount()
{
if (!_Initialized)
return 0;
lock (MutexAudioStreams)
{
return _Streams.Count;
}
}
public void Update()
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
List<int> StreamsToClose = new List<int>();
for (int i = 0; i < _Streams.Count; i++)
{
if (!_Streams[i].Update())
StreamsToClose.Add(_Streams[i].Handle);
}
foreach (int stream in StreamsToClose)
{
Close(stream);
}
}
}
}
#region Stream Handling
public int Load(string Media)
{
return Load(Media, false);
}
public int Load(string Media, bool Prescan)
{
if (!_Initialized)
return 0;
//BASSFlag flags = BASSFlag.BASS_DEFAULT;
//if (Prescan)
// flags = BASSFlag.BASS_STREAM_PRESCAN;
NAudioStream stream = new NAudioStream(Media);
stream.Handle = ++_HandleCounter;
//stream.handle = Bass.BASS_StreamCreateFile(Media, 0L, 0L, flags);
if (stream.Handle != 0)
{
lock (MutexAudioStreams)
{
_Streams.Add(stream);
}
return stream.Handle;
}
return 0;
}
public void Close(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
_Streams[index].Close();
//Bass.BASS_StreamFree(Stream);
_Streams.RemoveAt(index);
}
}
}
}
public void Play(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
Play(Stream, false);
}
}
}
}
public void Play(int Stream, bool Loop)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
_Streams[index].Play();
//if (Loop)
//Bass.BASS_ChannelFlags(Stream, BASSFlag.BASS_SAMPLE_LOOP, BASSFlag.BASS_SAMPLE_LOOP);
//Bass.BASS_ChannelPlay(Stream, false);
}
}
}
}
public void Pause(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
_Streams[index].Pause();
//Bass.BASS_ChannelPause(Stream);
}
}
}
}
public void Stop(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
_Streams[index].Stop();
//Bass.BASS_ChannelStop(Stream);
}
}
}
}
public void Fade(int Stream, float TargetVolume, float Seconds)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
_Streams[index].Fade(TargetVolume, Seconds);
}
}
}
}
public void FadeAndPause(int Stream, float TargetVolume, float Seconds)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
_Streams[index].FadeAndPause(TargetVolume, Seconds);
}
}
}
}
public void FadeAndStop(int Stream, float TargetVolume, float Seconds)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
//Stop(Stream);
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
_Streams[index].FadeAndStop(TargetVolume, Seconds);
}
}
}
}
public void SetStreamVolume(int Stream, float Volume)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
_Streams[index].Volume = Volume / 100f;
//Bass.BASS_ChannelSetAttribute(Stream, BASSAttribute.BASS_ATTRIB_VOL, Volume / 100f);
}
}
}
}
public float GetLength(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
return _Streams[index].Length;
//long len = Bass.BASS_ChannelGetLength(Stream);
//return (float)Bass.BASS_ChannelBytes2Seconds(Stream, len);
}
}
return 0f;
}
return 0f;
}
public float GetPosition(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
return _Streams[index].Position;
//long pos = Bass.BASS_ChannelGetPosition(Stream);
//return (float)Bass.BASS_ChannelBytes2Seconds(Stream, pos);
}
}
return 0f;
}
return 0f;
}
public bool IsPlaying(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
return _Streams[index].IsPlaying();
//return (Bass.BASS_ChannelIsActive(Stream) == BASSActive.BASS_ACTIVE_PLAYING);
}
}
}
return false;
}
public bool IsPaused(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
return _Streams[index].IsPaused();
//return (Bass.BASS_ChannelIsActive(Stream) == BASSActive.BASS_ACTIVE_PAUSED);
}
}
}
return false;
}
public bool IsFinished(int Stream)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
return _Streams[index].IsFinished();
//return (Bass.BASS_ChannelIsActive(Stream) == BASSActive.BASS_ACTIVE_STOPPED);
}
}
}
return true;
}
public void SetPosition(int Stream, float Position)
{
if (_Initialized)
{
lock (MutexAudioStreams)
{
if (AlreadyAdded(Stream))
{
int index = GetStreamIndex(Stream);
_Streams[index].Position = Position;
//Bass.BASS_ChannelSetPosition(Stream, Position);
}
}
}
}
#endregion Stream Handling
private bool AlreadyAdded(int Stream)
{
foreach (NAudioStream st in _Streams)
{
if (st.Handle == Stream)
{
return true;
}
}
return false;
}
private int GetStreamIndex(int Stream)
{
for (int i = 0; i < _Streams.Count; i++)
{
if (_Streams[i].Handle == Stream)
return i;
}
return -1;
}
private void EndSync(int handle, int Stream, int data, IntPtr user)
{
if (_Initialized)
{
if (AlreadyAdded(Stream))
{
Close(Stream);
}
}
}
}
}
+2 -2
View File
@@ -84,10 +84,10 @@ namespace Vocaluxe.Lib.Sound
_DeviceConfig = _Devices.ToArray();
}
catch (Exception)
catch (Exception e)
{
_initialized = false;
CLog.LogError("Error initializing PortAudio");
CLog.LogError("Error initializing PortAudio: " + e.Message);
return false;
}
return true;
+59 -49
View File
@@ -22,6 +22,9 @@
using System;
using System.Runtime.InteropServices;
using System.IO;
using Vocaluxe.Base;
namespace PortAudioSharp {
@@ -274,11 +277,18 @@ namespace PortAudioSharp {
#endregion
#region **** PORTAUDIO FUNCTIONS ****
[DllImport ("PortAudio.dll")]
#if ARCH_X86
private const string PaDll = "x86\\PortAudio.dll";
#endif
#if ARCH_X64
private const string PaDll = "x64\\PortAudio.dll";
#endif
[DllImport (PaDll)]
public static extern int Pa_GetVersion();
[DllImport ("PortAudio.dll",EntryPoint="Pa_GetVersionText")]
[DllImport (PaDll,EntryPoint="Pa_GetVersionText")]
private static extern IntPtr IntPtr_Pa_GetVersionText();
public static string Pa_GetVersionText() {
@@ -286,7 +296,7 @@ namespace PortAudioSharp {
return Marshal.PtrToStringAnsi(strptr);
}
[DllImport ("PortAudio.dll",EntryPoint="Pa_GetErrorText")]
[DllImport (PaDll,EntryPoint="Pa_GetErrorText")]
public static extern IntPtr IntPtr_Pa_GetErrorText(PaError errorCode);
public static string Pa_GetErrorText(PaError errorCode) {
@@ -294,19 +304,19 @@ namespace PortAudioSharp {
return Marshal.PtrToStringAnsi(strptr);
}
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_Initialize();
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_Terminate();
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern int Pa_GetHostApiCount();
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern int Pa_GetDefaultHostApi();
[DllImport ("PortAudio.dll",EntryPoint="Pa_GetHostApiInfo")]
[DllImport (PaDll,EntryPoint="Pa_GetHostApiInfo")]
public static extern IntPtr IntPtr_Pa_GetHostApiInfo(int hostApi);
public static PaHostApiInfo Pa_GetHostApiInfo(int hostApi) {
@@ -314,13 +324,13 @@ namespace PortAudioSharp {
return (PaHostApiInfo) Marshal.PtrToStructure(structptr, typeof(PaHostApiInfo));
}
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern int Pa_HostApiTypeIdToHostApiIndex(PaHostApiTypeId type);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern int Pa_HostApiDeviceIndexToDeviceIndex(int hostApi, int hostApiDeviceIndex);
[DllImport ("PortAudio.dll",EntryPoint="Pa_GetLastHostErrorInfo")]
[DllImport (PaDll,EntryPoint="Pa_GetLastHostErrorInfo")]
public static extern IntPtr IntPtr_Pa_GetLastHostErrorInfo();
public static PaHostErrorInfo Pa_GetLastHostErrorInfo() {
@@ -328,16 +338,16 @@ namespace PortAudioSharp {
return (PaHostErrorInfo) Marshal.PtrToStructure(structptr, typeof(PaHostErrorInfo));
}
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern int Pa_GetDeviceCount();
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern int Pa_GetDefaultInputDevice();
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern int Pa_GetDefaultOutputDevice();
[DllImport ("PortAudio.dll",EntryPoint="Pa_GetDeviceInfo")]
[DllImport (PaDll,EntryPoint="Pa_GetDeviceInfo")]
public static extern IntPtr IntPtr_Pa_GetDeviceInfo(int device);
public static PaDeviceInfo Pa_GetDeviceInfo(int device) {
@@ -345,13 +355,13 @@ namespace PortAudioSharp {
return (PaDeviceInfo) Marshal.PtrToStructure(structptr, typeof(PaDeviceInfo));
}
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_IsFormatSupported(
ref PaStreamParameters inputParameters,
ref PaStreamParameters outputParameters,
double sampleRate);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_OpenStream(
out IntPtr stream,
ref PaStreamParameters inputParameters,
@@ -362,7 +372,7 @@ namespace PortAudioSharp {
PaStreamCallbackDelegate streamCallback,
IntPtr userData);
[DllImport("PortAudio.dll")]
[DllImport(PaDll)]
public static extern PaError Pa_OpenStream(
out IntPtr stream,
ref PaStreamParameters inputParameters,
@@ -373,7 +383,7 @@ namespace PortAudioSharp {
PaStreamCallbackDelegate streamCallback,
IntPtr userData);
[DllImport("PortAudio.dll")]
[DllImport(PaDll)]
public static extern PaError Pa_OpenStream(
out IntPtr stream,
IntPtr inputParameters,
@@ -384,7 +394,7 @@ namespace PortAudioSharp {
PaStreamCallbackDelegate streamCallback,
IntPtr userData);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_OpenDefaultStream(
out IntPtr stream,
int numInputChannels,
@@ -395,30 +405,30 @@ namespace PortAudioSharp {
PaStreamCallbackDelegate streamCallback,
IntPtr userData);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_CloseStream(IntPtr stream);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_SetStreamFinishedCallback(
ref IntPtr stream,
[MarshalAs(UnmanagedType.FunctionPtr)]PaStreamFinishedCallbackDelegate streamFinishedCallback);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_StartStream(IntPtr stream);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_StopStream(IntPtr stream);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_AbortStream(IntPtr stream);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_IsStreamStopped(IntPtr stream);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_IsStreamActive(IntPtr stream);
[DllImport ("PortAudio.dll",EntryPoint="Pa_GetStreamInfo")]
[DllImport (PaDll,EntryPoint="Pa_GetStreamInfo")]
public static extern IntPtr IntPtr_Pa_GetStreamInfo(IntPtr stream);
public static PaStreamInfo Pa_GetStreamInfo(IntPtr stream) {
@@ -426,106 +436,106 @@ namespace PortAudioSharp {
return (PaStreamInfo) Marshal.PtrToStructure(structptr,typeof(PaStreamInfo));
}
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern double Pa_GetStreamTime(IntPtr stream);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern double Pa_GetStreamCpuLoad(IntPtr stream);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out]float[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out]byte[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out]sbyte[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out]ushort[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out]short[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out]uint[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out]int[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In]float[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In]byte[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In]sbyte[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In]ushort[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In]short[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In]uint[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In]int[] buffer,
uint frames);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern int Pa_GetStreamReadAvailable(IntPtr stream);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern int Pa_GetStreamWriteAvailable(IntPtr stream);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern PaError Pa_GetSampleSize(PaSampleFormat format);
[DllImport ("PortAudio.dll")]
[DllImport (PaDll)]
public static extern void Pa_Sleep(int msec);
#endregion
+11 -1
View File
@@ -1,5 +1,8 @@
using System;
using System.Runtime.InteropServices;
using System.IO;
using Vocaluxe.Base;
namespace Vocaluxe.Lib.Video.Acinerella
{
@@ -155,7 +158,14 @@ namespace Vocaluxe.Lib.Video.Acinerella
public static class CAcinerella
{
private const string AcDll = "acinerella.dll";
#if ARCH_X86
private const string AcDll = "x86\\acinerella.dll";
#endif
#if ARCH_X64
private const string AcDll = "x64\\acinerella.dll";
#endif
private static Object _lock = new Object();
// Defines the type of an Acinerella media stream. Currently only video and
+22 -1
View File
@@ -2,6 +2,7 @@
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Reflection;
using System.Runtime.InteropServices;
using System.IO;
using System.Windows.Forms;
@@ -16,10 +17,12 @@ namespace Vocaluxe
static class MainProgram
{
static SplashScreen _SplashScreen;
[STAThread]
static void Main(string[] args)
{
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolver);
// Close program if there is another instance running
if (!EnsureSingleInstance())
{
@@ -151,6 +154,24 @@ namespace Vocaluxe
CLog.CloseAll();
}
static Assembly AssemblyResolver(Object sender, ResolveEventArgs args)
{
string[] arr = args.Name.Split(new Char[] { ',' });
if (arr != null)
{
#if ARCH_X86
Assembly assembly = Assembly.LoadFrom("x86\\" + arr[0] + ".dll");
#endif
#if ARCH_X64
Assembly assembly = Assembly.LoadFrom("x64\\" + arr[0] + ".dll");
#endif
return assembly;
}
return null;
}
static bool EnsureSingleInstance()
{
Process currentProcess = Process.GetCurrentProcess();
+43 -21
View File
@@ -12,6 +12,7 @@
<AssemblyName>Vocaluxe</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@@ -24,7 +25,6 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
@@ -34,18 +34,23 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Output\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;ARCH_X86</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LibPath>x86</LibPath>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath>
<LibPath>x86</LibPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>ARCH_X86</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup>
<StartupObject>Vocaluxe.MainProgram</StartupObject>
@@ -53,18 +58,35 @@
<PropertyGroup>
<ApplicationIcon>Vocaluxe.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Output\</OutputPath>
<DefineConstants>TRACE;DEBUG;ARCH_X64</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LibPath>x64</LibPath>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath>
<LibPath>x64</LibPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>ARCH_X64</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="Bass.Net, Version=2.4.7.4, Culture=neutral, PublicKeyToken=b7566c273e6ef480, processorArchitecture=MSIL">
<Reference Include="Community.CsharpSqlite">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Output\Bass.Net.dll</HintPath>
</Reference>
<Reference Include="Community.CsharpSqlite, Version=3.7.7.1, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Output\Community.CsharpSqlite.dll</HintPath>
</Reference>
<Reference Include="NAudio, Version=1.5.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Output\NAudio.dll</HintPath>
<HintPath>..\Output\$(LibPath)\Community.CsharpSqlite.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenTK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -78,15 +100,16 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Output\OpenTK.GLControl.dll</HintPath>
</Reference>
<Reference Include="SlimDX, Version=2.0.13.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86">
<Reference Include="SlimDX">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Output\SlimDX.dll</HintPath>
<HintPath>..\Output\$(LibPath)\SlimDX.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Output\System.Data.SQLite.dll</HintPath>
<Reference Include="System.Data.SQLite">
<HintPath>..\Output\$(LibPath)\System.Data.SQLite.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
@@ -125,9 +148,6 @@
</Compile>
<Compile Include="Lib\Song\CNotes.cs" />
<Compile Include="Lib\Song\CSong.cs" />
<Compile Include="Lib\Sound\CBassPlay.cs" />
<Compile Include="Lib\Sound\CBassRecord.cs" />
<Compile Include="Lib\Sound\CNAudioPlay.cs" />
<Compile Include="Lib\Sound\COpenALPlay.cs" />
<Compile Include="Lib\Sound\COpenALRecord.cs" />
<Compile Include="Base\CSound.cs" />
@@ -182,7 +202,9 @@
<Compile Include="Screens\CScreenOptionsVideo.cs" />
<Compile Include="Screens\CScreenOptionsRecord.cs" />
<Compile Include="Screens\CScreenOptionsTheme.cs" />
<None Include="app.config" />
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<Compile Include="Lib\Sound\Portaudio\PortAudio.cs" />
<Compile Include="Lib\Sound\Portaudio\PortAudioASIO.cs" />
<None Include="Doc\SQLite.NET.chm" />
+4 -1
View File
@@ -1,3 +1,6 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>