bartolsthoorn / NVDSP

iOS/OSX DSP for audio (with Novocaine)
MIT License
413 stars 80 forks source link

Audio stream filtering #2

Closed tim-kozak closed 11 years ago

tim-kozak commented 11 years ago

Is there any chance to filter audio streams? I want to apply eq on AVPlayer or smth that can stream over http.

Please help me or show me the way. Thanks

bartolsthoorn commented 11 years ago

NVDSP works with raw audio data, just arrays of floats, so it doesn't care where the audio comes from. One implements it inside an audio buffer loop, wether it's audio coming from a microphone, mp3 file or an audio stream.

So, on an abstract level, you implement it like this:

Connecting to audio stream
Requesting new small buffer
- Process buffer with NVDSP
Send small buffer to audio output

Requesting new small buffer
- Process buffer with NVDSP
Send small buffer to audio output

... and so on

So you probably have some callback processing the audio data with NVDSP every time a buffer is passing.