Commit Graph

32 Commits

Author SHA1 Message Date
Sam Lantinga
d77ab77a7a Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
f0ca0a5183 Fixed missing prototypes on Android, patch from Sylvain 2016-12-02 02:25:12 -08:00
Ryan C. Gordon
9d85883e61 audio: Renamed some internal driver symbols in various targets. 2016-08-11 22:22:09 -04:00
Ryan C. Gordon
e3ff255457 android: implement audio capture support. 2016-08-11 22:04:49 -04:00
Ryan C. Gordon
131fcd9fe0 audio: Changed OnlyHasDefaultInputDevice to OnlyHasDefaultCaptureDevice. 2016-08-05 02:04:48 -04:00
Ryan C. Gordon
d791a67db6 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.
2016-08-05 01:44:41 -04:00
Ryan C. Gordon
a9f4b6ad89 audio: Made some SDL_AudioDevice fields atomic.
This makes sure they're properly communicated to the audio threads.
2016-08-02 13:48:52 -04:00
Sam Lantinga
255c182471 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Sam Lantinga
78f2198e6c Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Ryan C. Gordon
8fc13c2484 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.
2015-03-18 02:01:17 -04:00
Gabriel Jacobo
723a0bc355 [Android] Better fix for #2480, pause/resume audio 2014-09-18 11:03:34 -03:00
Sam Lantinga
dba255c1e5 Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Ryan C. Gordon
03d5719413 Make internal SDL sources include SDL_internal.h instead of SDL_config.h
The new header will include SDL_config.h, but allows for other global stuff.
2013-11-24 23:56:17 -05:00
Sam Lantinga
35d8faed5d Removed unneeded Android audio code 2013-08-08 21:16:29 -07:00
Gabriel Jacobo
d0ac9f02aa Start Android Audio Thread after audio buffer and AudioTrack are ready.
Also, it starts the Audio Thread from the native side, putting the code in line
with other backends.
2013-08-08 21:25:09 -03:00
Sam Lantinga
0d9b661db8 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Philipp Wiesemann
f307a3299f Removed unused variables from C source files. 2013-04-29 23:54:22 +02:00
Ryan C. Gordon
d619a9a9ee Changed audio subsystem's OpenDevice interface to return -1 on error.
This lets us 'return SDL_SetError("whatever");' on one line.

 Fixes Bugzilla #1778.
2013-03-31 13:05:40 -04:00
Sam Lantinga
019c60c1e8 Happy New Year! 2013-02-15 08:47:44 -08:00
Sam Lantinga
b3d60cfcbb Removed executable bit from source files 2012-09-27 14:35:28 -07:00
Sam Lantinga
e256711bb9 Happy New Year! 2011-12-31 09:28:07 -05:00
Sam Lantinga
6371c44a9e Lots of fixes importing SDL source wholesale into a new iOS project 2011-10-31 05:56:58 -04:00
Ryan C. Gordon
632f5e5860 Removed comment questioning the code's correctness (the answer: it's correct). 2011-07-22 00:12:03 -07:00
Sam Lantinga
6196aa221e SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
a2cdcf5486 Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
01fa14dc42 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
I think this also fixes the bug relating to non-latin characters in filenames, since UNICODE wasn't defined in SDL_rwops.c
2011-01-24 21:20:30 -08:00
Sam Lantinga
9a23f9d63a Fixed audio buffer lifecycle and implemented audio shutdown 2011-01-13 12:32:55 -08:00
Sam Lantinga
46004aa2fe Working audio implementation contributed by Joseph Lunderville 2011-01-13 11:14:20 -08:00
Sam Lantinga
9590d26387 More Android cleanup:
* Formalized the interface with Java methods in SDL_android.h
* We don't need the feature system, at least right now
* Fixed waiting for the SDLMain thread
2011-01-12 17:53:06 -08:00
Paul Hunkin
2384244845 Working on the sound system 2010-08-14 12:35:21 +12:00
Paul Hunkin
eb38d6aa71 - Cleaned up a bunch of code
- Added 'feature' enable/disable so we're not running accel/sound/whatever in Java when we don't need to be
- More work on the sound system. But it still crashes pretty horribly, not sure why yet.
2010-07-27 21:21:24 +02:00
Paul Hunkin
262828a8ab Added stub android sound system 2010-07-27 11:34:43 +02:00