c# - NAudio - Stream audio outward in realtime via RTP -
i using naudio audio needs, i've run thorny issue. have remote device can receive rtp audio. stream audio file device (after u-law or similar encoding + rtp wrapping). however, there doesn't seem mechanism maintain outgoing timing rtp packets. for example, waveout player "manages" timing responding requests underlying sound/directx layers. in manner, timing maintained sound drivers using "pull" method. what i'm looking component can provide correct "pull" timing on (e.g.) iwaveprovider (or similar) can take each packet, rtp-ify it, , send on wire. so, here's core code: ipendpoint target = new ipendpoint(addr, port); socket sender = new socket( addressfamily.internetwork, sockettype.dgram, protocoltype.udp ); iwaveprovider provider = new audiofilereader(filename); mulawchatcodec codec = new mulawchatcodec(); // <-- chat example int alignment = provider.blockalign ...