Implement empty constructor for AudioDevice::LockHandle

Useful if lock must be initialized after it was created
This commit is contained in:
Dmitry Marakasov 2014-12-16 23:19:36 +03:00
parent 70fafab8dd
commit 16b9399bd1
2 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,7 @@ public:
LockHandle(AudioDevice* device);
public:
LockHandle();
~LockHandle();
LockHandle(LockHandle&& other) noexcept;

View File

@ -23,6 +23,9 @@
namespace SDL2pp {
AudioDevice::LockHandle::LockHandle() : device_(nullptr) {
}
AudioDevice::LockHandle::LockHandle(AudioDevice* device) : device_(device) {
SDL_LockAudioDevice(device_->device_id_);
}