]> git.mxchange.org Git - flightgear.git/commit
This patch creates a sample manager next to the sound manager. The
authorcurt <curt>
Mon, 4 Mar 2002 16:03:11 +0000 (16:03 +0000)
committercurt <curt>
Mon, 4 Mar 2002 16:03:11 +0000 (16:03 +0000)
commitd8b6786d20a6762b31ccdfded78b1b5da9ac56e3
tree5159795b9d4becdda1d513b02544429922396f36
parent1f5096105b22201b43f2aad33773bf740f6b1655
This patch creates a sample manager next to the sound manager. The
difference between the two is this: A sample is file related and sound
is a authonomus entity. This means you can have several sounds pointing
to a single sample. In that case, just one sample is loaded into memory.
The advantage is you can play the same sample with different pitch or
volume, but with just one  sample loaded into memory.

To fully support this there is a new fucntion call:

    FGSimpleSound *sample = new FGSimpleSound("filename");
    mgr->add(sample, "name");

should be replaced by:

    FGSimpleSound *sample = mgr->add("name", "filename");

But the old behaviour is still supported with one minor change, sounds
with the same name aren't supported anymore.

Erik
src/Sound/fg_sound.cxx
src/Sound/soundmgr.cxx
src/Sound/soundmgr.hxx