cosmo2
Legacy Member
Ik ben een programma aant het maken waar je het geluidspectrum kan zien terwijl je iets inspreek. Ondertussen wordt alles opgenomen wat je zegt, na 5 seconden stop hij automatisch met opnemen en save'd hij het bestand in een map (in dit geval Desktop).
Ik gebruik de gratis nAudio library. Eergisteren werkte alles, nu wil ik verder werken en geeft hij plots de melden dat ik geen toegang meer heb tot de map waar het .wav bestand wordt opgeslaan...als admin uitvoeren doet ook niets uit. Ik heb ook alle rechten al toegekent op de map voor iedereen.
Dit is de errordump van de exception.
Zo raar dat alles eergisteren perfect werkte en nu niet meer....
Hier geeft hij de fout.
WaveIn en WaveFileWriter zijn niet null, dus daar ligt het niet aan. Ook maakt het niet uit of ik de '@' weg laat of niet.
Waarom geeft hij nu die fout en 2 dagen geleden niet? :doh:
Ik gebruik de gratis nAudio library. Eergisteren werkte alles, nu wil ik verder werken en geeft hij plots de melden dat ik geen toegang meer heb tot de map waar het .wav bestand wordt opgeslaan...als admin uitvoeren doet ook niets uit. Ik heb ook alle rechten al toegekent op de map voor iedereen.
Dit is de errordump van de exception.
Code:
System.UnauthorizedAccessException was unhandled
HResult=-2147024891
Message=Access to the path 'C:\Users\Jan\Desktop' is denied.
Source=mscorlib
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at NAudio.Wave.WaveFileWriter..ctor(String filename, WaveFormat format)
at _1314MMT1EP3JanBael.Logic.Recording.saveFile(WaveIn wi, WaveFileWriter wfw) in c:\Users\Jan\Documents\visual studio 2012\Projects\1314MMT1EP3JanBael\1314MMT1EP3JanBael\Logic\Recording.cs:line 21
at _1314MMT1EP3JanBael.Form1.bootRecorder() in c:\Users\Jan\Documents\visual studio 2012\Projects\1314MMT1EP3JanBael\1314MMT1EP3JanBael\Form1.cs:line 77
at _1314MMT1EP3JanBael.Form1.bStart_Click(Object sender, EventArgs e) in c:\Users\Jan\Documents\visual studio 2012\Projects\1314MMT1EP3JanBael\1314MMT1EP3JanBael\Form1.cs:line 50
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at _1314MMT1EP3JanBael.Program.Main() in c:\Users\Jan\Documents\visual studio 2012\Projects\1314MMT1EP3JanBael\1314MMT1EP3JanBael\Program.cs:line 16
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Zo raar dat alles eergisteren perfect werkte en nu niet meer....
Hier geeft hij de fout.
Code:
public void saveFile(WaveIn wi, WaveFileWriter wfw) {
wfw = new WaveFileWriter(@getFolder(), wi.WaveFormat);
}
WaveIn en WaveFileWriter zijn niet null, dus daar ligt het niet aan. Ook maakt het niet uit of ik de '@' weg laat of niet.
Waarom geeft hij nu die fout en 2 dagen geleden niet? :doh: