summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'audio/utils/include/tiaudioutils/NullPcm.h')
-rw-r--r--audio/utils/include/tiaudioutils/NullPcm.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/audio/utils/include/tiaudioutils/NullPcm.h b/audio/utils/include/tiaudioutils/NullPcm.h
index 977faaa..0998a72 100644
--- a/audio/utils/include/tiaudioutils/NullPcm.h
+++ b/audio/utils/include/tiaudioutils/NullPcm.h
@@ -77,6 +77,15 @@ class NullInPort : public PcmInPort {
77 uint32_t getPortId() const { return 0; } 77 uint32_t getPortId() const { return 0; }
78 78
79 /** 79 /**
80 * \brief Get the port name
81 *
82 * Gets the name of the null capture port.
83 *
84 * \return The name of the PCM port
85 */
86 const char* getName() const { return mName.c_str(); }
87
88 /**
80 * \brief Open the null port for capture 89 * \brief Open the null port for capture
81 * 90 *
82 * Opens the null PCM port for capture with the given parameters. There is 91 * Opens the null PCM port for capture with the given parameters. There is
@@ -144,6 +153,7 @@ class NullInPort : public PcmInPort {
144 153
145 protected: 154 protected:
146 bool mOpen; /**< State of the port: open or closed */ 155 bool mOpen; /**< State of the port: open or closed */
156 string mName; /**< Name of the null PCM port */
147 PcmParams mParams; /**< PCM params of the port */ 157 PcmParams mParams; /**< PCM params of the port */
148 Mutex mLock; /**< Synchronize PCM port use */ 158 Mutex mLock; /**< Synchronize PCM port use */
149}; 159};
@@ -195,6 +205,15 @@ class NullOutPort : public PcmOutPort {
195 uint32_t getPortId() const { return 0; } 205 uint32_t getPortId() const { return 0; }
196 206
197 /** 207 /**
208 * \brief Get the port name
209 *
210 * Gets the name of the null playback port.
211 *
212 * \return The name of the PCM port
213 */
214 const char* getName() const { return mName.c_str(); }
215
216 /**
198 * \brief Open the null port for playback 217 * \brief Open the null port for playback
199 * 218 *
200 * Opens the null PCM port for playback with the given parameters. There is 219 * Opens the null PCM port for playback with the given parameters. There is
@@ -261,6 +280,7 @@ class NullOutPort : public PcmOutPort {
261 280
262 protected: 281 protected:
263 bool mOpen; /**< State of the port: open or closed */ 282 bool mOpen; /**< State of the port: open or closed */
283 string mName; /**< Name of the null PCM port */
264 PcmParams mParams; /**< PCM params of the port */ 284 PcmParams mParams; /**< PCM params of the port */
265 Mutex mLock; /**< Synchronize PCM port use */ 285 Mutex mLock; /**< Synchronize PCM port use */
266}; 286};