1

I am doing Silverlight application. which i need to save data into server.

Is it Possible to Save recorded stream in one dummy file.

 Stream stream = saveFileDialog.OpenFile();

 WavManager.SavePcmToWav(_sink.BackingStream, stream, _sink.CurrentFormat);

 stream.Close();

Instead of selecting user by SaveFileDialog I want to use Dummy file at runtime.

if it possible any one will tell i will greatly appreciate.Advance thanks.

Jehof
  • 34,674
  • 10
  • 123
  • 155
Radix
  • 121
  • 1
  • 10

1 Answers1

3

You can use the IsolatedStorageFile to create a temp/dummy file without asking the user to select a file.

The IsolatedStorage is a restricted area for your silverlight application to store files and data.

 IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication (); 
 IsolatedStorageFileStream stream = store.CreateFile("dummy.wav");

 WavManager.SavePcmToWav(_sink.BackingStream, stream, _sink.CurrentFormat);

 stream.Close();

Another solution would be to store the data of your .wav file in a in-memory stream. This can be done by using a MemoryStream.

Jehof
  • 34,674
  • 10
  • 123
  • 155