[Tuxnes-devel] Sound routine abstraction
Brought to you by:
tmmm
|
From: Jim U. <ji...@3e...> - 2001-07-21 03:45:58
|
It seems like it might be a good idea to abstract the InitAudio()
and UpdateAudio() routines into platform-specific functions, and
call the old InitAudio() etc. functions through an indirect call,
e.g. sound->InitAudio(). This would mirror what the renderer
currently does.
Just as the renderer has Renderer and RendererConfig structs, the
sound engine could add a Sound struct to complement its
SoundConfig struct.
This thought came about because I'm currently adding sound support to
the dreamcast port, and thought it would be clearer to have
InitAudioDC() instead of overwriting the current InitAudio().
It would help with portability. You might have functions
like InitAudio{Linux,OSS,ALSA,ESD} and so on.
I think I will go ahead and implement this in my copy of the
tree. I would then be happy to submit a patch if it's worthwhile,
once we agree on naming conventions.
Any reason this would not be a good idea?
Jim
--
"Sometimes I have trouble making bowel sounds." -- Fernando
ji...@3e... / 0x43340710 / 517B C658 D2CB 260D 3E1F 5ED1 6DB3 FBB9 4334 0710
|