I'm coding a media streaming system in C# that needs to stream audio in the first place, the source is RAW PCM data as byte stream, but it needs to encode it to AAC (no other format is accepted), than it is needed to be forwarded as byte stream, then decoded to RAW PCM data again.
I just can not find any useful solution.
I've tried NAudio, but it does not support encoded stream reading, except by using MediaFoundationReader(URL_STRING)
as source, but it accepts only file path ot URL. Creating a TCP HTTP stream server locally is not an option, as creating file from stream that can be read neither, and PCM->AAC encoding still not solved this way.
I've tried SharpDX, but i have not found any useful example for doing the conversion from stream to stream.
I've coded a buffer for NAudio as a Stream
interface for buffering the PCM data stream so technically it can read from byte array, that may be used as an input and/or output object for the encoder/decoder.
I've also tried the MFLib to use the MediaFoundation library, but the lack of the examples or useful documentation did not make my job easier, and actually this is not the best for those users who want to use the application on older Windows OS, because MF works only on Win7+.
Is there any useful library that i can relatively simply use to these conversion, or i do have to figure out completely how this actually easy looking problem can be solved?
Since both the NAudio and the SharpDX are open source some modification of the classes are accepted.
Later this system also needs to support video streaming in MP4, so solution that can provide both AAC and MP4 audio/video encoding/decoding in the same time from/to streams would be the best.
I'd be thankful to get any hint and/or sources/examples that can give a clue getting closer my goals. Thank You.