diff options
author | James McDonnell <jmcdonnell@blackberry.com> | 2019-11-25 12:00:33 -0500 |
---|---|---|
committer | James McDonnell <jmcdonnell@blackberry.com> | 2019-12-02 15:13:14 -0500 |
commit | fa66653d99052f6fce74824ab12e0148922e27bc (patch) | |
tree | 33edc9b2b5b5063e245464900f3c534e27c81312 /src/plugins/qnx-audio/audio/qnxaudioinput.cpp | |
parent | d986420f3f35d096014ca67f6c40fc3c757091f7 (diff) |
Make the code compatible with future versions of QNX libasound
Some changes are being made to improve the consistency of the API.
Change-Id: Idb4b8ba5d73a5242c25d306dcc7c77e3654ac3b6
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Diffstat (limited to 'src/plugins/qnx-audio/audio/qnxaudioinput.cpp')
-rw-r--r-- | src/plugins/qnx-audio/audio/qnxaudioinput.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/qnx-audio/audio/qnxaudioinput.cpp b/src/plugins/qnx-audio/audio/qnxaudioinput.cpp index b16328892..70b83390c 100644 --- a/src/plugins/qnx-audio/audio/qnxaudioinput.cpp +++ b/src/plugins/qnx-audio/audio/qnxaudioinput.cpp @@ -339,7 +339,11 @@ bool QnxAudioInput::open() void QnxAudioInput::close() { if (m_pcmHandle) +#if SND_PCM_VERSION < SND_PROTOCOL_VERSION('P',3,0,2) snd_pcm_plugin_flush(m_pcmHandle, SND_PCM_CHANNEL_CAPTURE); +#else + snd_pcm_plugin_drop(m_pcmHandle, SND_PCM_CHANNEL_CAPTURE); +#endif if (m_pcmNotifier) { delete m_pcmNotifier; |