HOW TO: The easiest audio engine?

I am curious. How can you implement the simplest sound engine? I have something like a stream for audio data in memory using the default audio device. Playing a lot with RtAudio, I think that if it were possible to refuse some functions, it would be possible. Does anyone know where to start?

+4
source share
3 answers

I would do it (do it) like this: http://ccan.ozlabs.org/info/wwviaudio.html

+2
source

Well, there is no reason why you cannot create a sound engine that has a trivially simple interface:

audioEngine.PlayStream(myStream) 

Then the sound engine periodically read data from this stream and sent it to the sound card. The reason sound engines are usually more complicated is because there are all sorts of options that you can control, including playback latency, sample rate, bit depth, and it is often necessary to convert audio between formats. Add to the problem repositioning of streams and synchronization of several streams, support for several API audio drivers, etc., And soon you will have a sound engine as complex as any other.

0
source

Thank you for your responses.

to.Mark Heath:

yes, of course, I know that there can be many parameters for tuning, be it filter cutoff, resonance, delay time, etc. etc.

I was just curious how to build a sound engine as simple and modular as possible. The main intention that I had in mind was to rebuild the soundchip for gameboy (again here, there are many implementations, i.e. JavaBoy).

to.smcameron

It seems that ccan / wwviaaudio is dependent on libvorbis / portaudio (version> = 19), which will have the same effect as using rtaudio (which is quite small compared to the other real-time audio interface with built-in asio support). However, I will try.

Yours faithfully,

Audax

0
source

All Articles