src/audio/emscripten/SDL_emscriptenaudio.c


Log

Author Commit Date CI Message
Philipp Wiesemann 75931972 2017-05-26T22:45:40 emscripten: Fixed compiling on C89 compilers.
Ryan C. Gordon c878b59b 2017-05-10T16:18:43 audio: fixed more "spec" references that should have been "callbackspec". This should catch all the ones for audio targets that have provided their own audio threads.
Ryan C. Gordon b3e8db80 2017-01-06T01:07:34 audio: rename fake_stream to work_buffer. It's more than an alternative for when the OS can't provide a DMA buffer, now.
Ryan C. Gordon 992124d4 2017-01-06T01:02:58 audio: Fixed SDL_AudioStreamGet() function parameters. There was a draft of this where it did audio conversion into the final buffer, if there was enough room available past what you asked for, but that interface got removed, so the parameters didn't make sense (and we were using the wrong one in any case, too!).
Ryan C. Gordon 1a90c72d 2017-01-06T00:49:35 emscriptenaudio: don't get stuck in infinite loop if SDL_AudioStreamPut fails.
Ryan C. Gordon f07a1a5a 2017-01-05T21:31:02 emscriptenaudio: Reworked to use SDL_AudioStream.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Ryan C. Gordon 06700a90 2016-09-18T18:07:47 emscripten: get even more aggressive about audio device closing. I still get exceptions thrown sometimes on shutdown without this.
Alon Zakai 63200ea3 2016-09-13T00:03:41 optimize a getValue
Ryan C. Gordon 2098bfb3 2016-08-31T16:10:04 emscripten: Be more aggressive when closing audio capture devices. Fixes exceptions being thrown on shutdown.
Ryan C. Gordon 3b88f5c6 2016-08-12T00:03:58 emscripten audio: check for an "undefined" object, remove some console.log().
Ryan C. Gordon 6f4bcd24 2016-08-11T22:22:09 audio: Renamed some internal driver symbols in various targets.
Ryan C. Gordon 244d2dbc 2016-08-10T14:13:48 emscripten audio: fix timer on capture's silence callback.
Ryan C. Gordon 358a168c 2016-08-09T16:58:32 emscripten audio: Added audio capture support.
Ryan C. Gordon 761a7978 2016-08-05T01:59:06 audio: changed some SDL_memset() calls to SDL_zero(), other minor corrections.
Ryan C. Gordon 9b647727 2016-08-05T01:44:41 audio: Clean up some CloseDevice() interface details. - It's now always called if device->hidden isn't NULL, even if OpenDevice() failed halfway through. This lets implementation code not have to clean up itself on every possible failure point; just return an error and SDL will handle it for you. - Implementations can assume this->hidden != NULL and not check for it. - implementations don't have to set this->hidden = NULL when done, because the caller is always about to free(this). - Don't reset other fields that are in a block of memory about to be free()'d. - Implementations all now free things like internal mix buffers last, after closing devices and such, to guarantee they definitely aren't in use anymore at the point of deallocation.
Ryan C. Gordon 6d5c9c1e 2016-08-02T13:48:52 audio: Made some SDL_AudioDevice fields atomic. This makes sure they're properly communicated to the audio threads.
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Philipp Wiesemann fcc59409 2015-08-05T21:04:10 Emscripten: Added missing error messages for audio and joystick init failures.
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Ryan C. Gordon f9cfd9fa 2015-03-18T02:01:17 Bunch of reworking to how we manage audio devices. Device enumeration now happens at startup and then is managed exclusively through hotplugging instead of full redetection. The device name list now has a unique "handle" associated with each item and SDL will pass this to the backend so they don't have to figure out how a human readable name maps to real hardware for a second time. Other cleanups, fixes, improvements, plus all the audio backends updated to the new interface...largely untested at this point, though.
Philipp Wiesemann 6abd242b 2015-02-14T00:16:27 Emscripten: Fixed throwing JavaScript exception if no audio context available. Handling the error in C provides the possibility to just continue without audio.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
Philipp Wiesemann 79b3221b 2014-12-25T22:03:07 Fixed compile warnings about unused variables. Found by buildbot.
Ryan C. Gordon fe40a172 2014-12-18T00:19:52 Initial merge of Emscripten port! With this commit, you can compile SDL2 with Emscripten ( http://emscripten.org/ ), and make your SDL-based C/C++ program into a web app. This port was due to the efforts of several people, including: Charlie Birks, Sathyanarayanan Gunasekaran, Jukka Jyl?nki, Alon Zakai, Edward Rudd, Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!)