10 Commits

Author SHA1 Message Date
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
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
646380520f Add method to check if two AudioSpecs are equal 2014-11-30 00:45:36 +03:00
Dmitry Marakasov
7ebd613d01 Add AudioSpec copy constructor
Since callback is non-copyable, new callback is specified
2014-11-30 00:44:43 +03:00
Dmitry Marakasov
e034f6cd67 Add AudioSpec empty constructor 2014-11-30 00:44:02 +03:00
Dmitry Marakasov
724e3f37a8 Provide default value for empty callback 2014-11-30 00:43:13 +03:00
Dmitry Marakasov
fcf0302213 Remove noexcept specifications
std::function(std::function&&) is only noexcept in libc++, not
libstdc++, so calculated signatire of move ctor/assignment of AudioSpec
won't match specification
2014-11-29 23:12:11 +03:00
Dmitry Marakasov
2be68a9ebb Add wrapper for large part of SDL2 audio functionality 2014-11-29 22:58:27 +03:00