[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GSI sound.
I seem to remember once long ago there was some discussion on
our list about using the GGI project's GSI (General Sound Interface).
>From what I can tell, it looks a lot like what we want for our "Layer P" .
Anyway I'll let the sound guys decide. Here is something I found
on the GGI mailing list.
Forwarded message:
> SOUND
> -----
> [andy said]
>
> > > * What about a GGI/KGI for soundcards?
> >
> > There is a 3D sound library that comes with ggiDescent. Actually the OSS
> > driver is close to being a KGI for soundcards.
> >
> > CU,Andy
>
> GSI does not come with ggi-descent. it's separate.
> I've completed v 0.6 now which uses sockets, should run on generic
> /dev/audio. In fact, porting to other sound API's for the sample part
> should be trivial (all lower level API code has been separated in
> dsp.c/mixer.c).
>
> Here's some info on gsi 0.6:
> multiple clients can use it at the same time: e.g. play ggi-descent and
> if that's not enough to keep you occupied play some sounds. The server
> must be started beforehand now (could change that to execvp if not found
> running). Sound formats supported: .raw/.au/.snd/.wav/.aiff/.aifc/.mid
> Midi playing is not yet usable though (need to iron out a few bugs).
> Also, the server releases the DSP when there are no more clients or no
> more clients that request the dsp (clients should release the DSP, or
> rather their claim to the DSP, with release_dsp(), when not using it for
> a while, e.g. on a leave event in X11). This means running non-GSI apps
> is still possible after starting the server (eliminating the problem
> that comes with all other sound servers).
>
> gsiplay is now very useful: e.g. gsiplay -v 100 sound1 -v 200 sound2 to
> play sound1 at soft volume 100, then sound2 at softvolume 200 (you can
> even adjust the volume during play by pressing +/- when in the
> foreground). It can also set the hardware volumes (PCM/SYNTH/CD/MASTER).
>
> If you (yes YOU!) haven't tried it yet, this is how simple GSI is to
> use:
>
> -------------------
> gsi_init();
> gsi_init_pcm(8000 /* Hz */, 2 /* stereo */, GSI_8BIT, 0 /* automatic
> fragsize calc */, "/home/wouter/sounds", NULL);
>
> gsi_load_file(0, "test.au");
> /* loads the file /home/wouter/sounds/test.au in slot 0 */
>
> gsi_load_file(1, "/home/wouter/more_sounds/test2.au");
> /* loads the file /home/wouter/more_sounds/test2.au in slot 1 */
>
> gsi_play_sound_pan(-1 /* =stack */, 0, 0 /* center */);
> /* plays test.au */
>
> gsi_play_sound_pan(0 /* channel 0 */, 1, -256 /* left */);
> /* plays test2.au */
>
> ....
>
> gsi_close();
> ----------------------
> Can it be any simpler than this ?
>