Advice for soft-synth game audio project

Mike Gran spk121 at yahoo.com
Fri Oct 26 05:26:49 PDT 2012


Hi-
 
Since the last line of http://gstreamer.freedesktop.org/apps/ says that
this is the place to ask for advice, I've got a question.
 
I'm writing a game, and it is meant to have a simple, 4-channel soft
synth as well as a library of dozens of short (< 1 sec) sound clips
that are stored as uncompressed 8-bit waveforms in memory.  Each
channel of the soft-synth will generate an in-memory 8-bit waveform
of the next note or noise.
 
So, as far as I can tell, if I wanted to use GStreamer to make the
audio work on GNU/Linux, I'd
- use a different instance of the appsrc plugin for each channel
  of the soft-synth and for each sound clip to make a source
- somehow mix the various synth and sound clip channels into a
  left and right channels
- then sink it to Alsa
 
So I have a couple of starter questions.
 
First, I'm not clear on how you mix channels together.  Obviously
some sort of N-channel source to a 2-channel (left/right) sink
mixer element needs to be made.
 
Second, it seems like the way to get in memory waveforms into a
pipe is to use appsrc, but the docs also say appsrc is strongly
discouraged.  Is there some other way to do it?
 
Thanks,
 
Mike Gran


More information about the gstreamer-devel mailing list