diff options
author | Michael J. Bishop <mbtyke@gmail.com> | 2013-07-15 18:49:34 -0400 |
---|---|---|
committer | Michael J. Bishop <mbtyke@gmail.com> | 2013-07-15 18:49:34 -0400 |
commit | ed0c109645836520c244dcc7456cf8b8ba619de6 (patch) | |
tree | 28c0cf6dc1f43986cedfbd42c8f382c64aa31beb /emscripten.py | |
parent | b87be16d64b81efd5c5e9187d3cd601441b4af31 (diff) |
Added support for loading .ogg audio files using a combination of
`SDL_RWFromConstMem()` + `Mix_LoadMUS/WAV_RW()`.
`SDL_RWFromConstMem()` now returns an opaque reference that corresponds
to a Javascript-side object which retains the information passed in.
The same for `SDL_RWFromFile()` but it saves different information.
When `Mix_LoadMUS/WAV_RW()` is called, it now expects a reference to
one of those Javascript-side objects and from it, either uses a
pre-loaded Audio, or reads bytes from the file-system to make one,
or uses the bytes originally passed into `SDL_RWFromConstMem()` to
create one.
Note that with this change you can now simply embed sound files in your
app, you do not need to preload them.
Diffstat (limited to 'emscripten.py')
0 files changed, 0 insertions, 0 deletions