I'm writing a WCF service which will be used to receive big files (mp3 files and others), process them and then return an mp3 audio file. I don't want to save those files in the filesystem, I'd just like to process them, and then return an audio file. the problem is I'd like the process to use as low memory as possible.
how would I accomplish this ?
I wrote this :
[ServiceContract]
public interface IService
{
[FaultContract(typeof(ConversionFault))]
[OperationContract]
byte[] ProcessAudio(byte[] audio,string filename);
}
public class MyService : IService
{
public byte[] ProcessAudio(byte[] audio,string filename)
{
//...
//do the processing here.
//return the converted audio.
return processedAudio;
}
}