Dmitry Marakasov
e2c1333987
Make setters return reference to self: AudioDevice
2015-01-19 00:58:22 +03:00
Dmitry Marakasov
3796a6d246
Switch AudioDevice to Optional
...
No compatibility here, as API is broken anyway (Optional<std::string>
ctor won't accept const char*)
2014-12-25 19:15:28 +03:00
Dmitry Marakasov
a6ef469487
Split AudioSpec into separate header
2014-12-18 18:26:11 +03:00
Dmitry Marakasov
9a245e073a
Merge branch 'audio-fixes'
2014-12-18 17:28:02 +03:00
Dmitry Marakasov
46591a9cbf
Update project comment
2014-12-18 02:52:08 +03:00
Dmitry Marakasov
a727fb4857
Use more consistent name for an option
2014-12-18 02:44:16 +03:00
Dmitry Marakasov
70fafab8dd
Exception safety
...
Suck callback in only after everything was created to not needlessly
destroy it if exception is thrown in the constructor
2014-12-16 23:31:41 +03:00
Dmitry Marakasov
5abf3558be
Move audio callback from AudioSpec into AudioDevice
...
Though this is not 100% compatible with SDL2, this makes API much
more consistent and less error prone. For example, you don't need
to store AudioSpec along with AudioDevice just to have your callback
lambda around, you don't need to copy AudioSpec from Wav file just
to fill in the callback (see wav demo), you are no more obliged to
take care of locking AudioDevice while replacing the callback.
2014-12-16 05:59:19 +03:00
Dmitry Marakasov
93a77542d8
Fix move assignments
...
- Add self-assignment checks
- Free resources of object which is going to be replaced to avoid
resource leaks
2014-11-30 01:22:22 +03:00
Dmitry Marakasov
2be68a9ebb
Add wrapper for large part of SDL2 audio functionality
2014-11-29 22:58:27 +03:00