mixer/Internal: document that caller must lock the mutex

This commit is contained in:
Max Kellermann 2022-08-18 14:27:54 +02:00
parent e1e8f45983
commit 6c0546d829

View File

@ -72,18 +72,24 @@ public:
/** /**
* Open mixer device * Open mixer device
* *
* Caller must lock the mutex.
*
* Throws std::runtime_error on error. * Throws std::runtime_error on error.
*/ */
virtual void Open() = 0; virtual void Open() = 0;
/** /**
* Close mixer device * Close mixer device
*
* Caller must lock the mutex.
*/ */
virtual void Close() noexcept = 0; virtual void Close() noexcept = 0;
/** /**
* Reads the current volume. * Reads the current volume.
* *
* Caller must lock the mutex.
*
* Throws std::runtime_error on error. * Throws std::runtime_error on error.
* *
* @return the current volume (0..100 including) or -1 if * @return the current volume (0..100 including) or -1 if
@ -94,6 +100,8 @@ public:
/** /**
* Sets the volume. * Sets the volume.
* *
* Caller must lock the mutex.
*
* Throws std::runtime_error on error. * Throws std::runtime_error on error.
* *
* @param volume the new volume (0..100 including) * @param volume the new volume (0..100 including)