nariakiiwatani / ofxNDI

NewTek NDI SDK Wrapper for openFrameworks.
https://ndi.tv/
MIT License
103 stars 19 forks source link

audio sender #5

Closed stephanschulz closed 6 years ago

stephanschulz commented 6 years ago

would it be possible to also send audio with NDI or just receive it?

do you happen to have some tips on how to implement this?

thanks a bunch

nariakiiwatani commented 6 years ago

I added an audio example. There's also a receiver example. check it, please. :)

stephanschulz commented 6 years ago

thanks for making those examples.

I tried them. I tried both on the same computer which produces crackling noisy sound. Then I tired is with 2 computers on the same local network. Same problem with crackling bad sound.

receiver does seem to start ok

NDI Source Detected : STEPHAN.LOCAL (ofxNDI audio sender example),10.0.1.3:5961

but after a while says:

[warning] ofRtAudioSoundStream: stream over/underflow detected

does it work for you? I'm on macOS 10.12.6 with OF 0.10.0

nariakiiwatani commented 6 years ago

No, my machine also makes noise. XD The noise occurs because there is no enough received audio samples when the system requires audio signal.

I thought it was okay because it is not a problem from the addon itself; it depends how programmers treat their audio buffers. It is related to a kind of tradeoff between responsibility and stability.

But after some glance and checking, now I think at least I should show how developers could deal with them. I roughly fixed audio examples to try to show the way. Could you try it out? https://github.com/nariakiiwatani/ofxNDI/tree/fixAudioExamplesClippingNoise

After more fixes and optimization, I will merge them to master.

stephanschulz commented 6 years ago

thanks for putting in this extra work. yes it does work better now. the audio makes sense now. it's still very low quality over my wifi network with some crackling too. But you are correct that's up to me now to figure out how to make the send and receive buffer more stable. I was hoping that NDI is this magic tool that handles most of the quality control in the back :(

nariakiiwatani commented 6 years ago

Updated examples and closing this issue.

I was hoping that NDI is this magic tool that handles most of the quality control in the back :(

Actually me too. 😢 There is no golden hammer. 🔨