【发布时间】:2014-06-17 21:10:23
【问题描述】:
我正在尝试读取包含从麦克风捕获的音频数据的文件。现在,当我使用以下查询查询应用程序商店时,我可以看到保存在我的 IsolatedStorage 中的文件列表。
查询:
var f = userStore.GetFileNames();
foreach (var df in f) {
System.Diagnostics.Debug.WriteLine(df);
}
查询结果:
Audio.sdf
Audio1.wav
Audio2.wav
但是当我尝试使用此查询读取文件“Audio1.wav”时:
FileStream = new IsolatedStorageFileStream(FileName, FileMode.Open, userStore);
我收到以下错误:
An exception of type 'System.IO.IOException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
A first chance exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.ni.dll
An exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
System.IO.IsolatedStorage.IsolatedStorageException: [IsolatedStorage_Operation_ISFS]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50829.0&File=mscorlib.dll&Key=IsolatedStorage_Operation_ISFS
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf)
at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile(String path, FileMode mode)
at AudioRecorder.MainPage.start_player()
有什么帮助吗?
【问题讨论】:
标签: c# windows-phone-7 dll windows-phone-8