NovelRT icon indicating copy to clipboard operation
NovelRT copied to clipboard

Audio: Add Handle for loaded sound/music

Open capnkenny opened this issue 5 years ago • 0 comments

For NovelAudioService::load()

It would be good if you gave back some kind of "opaque handle" that could be used instead of the file name. Basically just something that, for an already loaded sound, can be used to play a sound with O(1) (or really cheap) lookup.

For the overload that takes a name, you would effectively just have

auto soundHandle = loadSound(soundName);
playSound(soundHandle);

Originally posted by @tannergooding in https://github.com/novelrt/NovelRT/pull/33

capnkenny avatar Oct 08 '19 03:10 capnkenny