diff options
author | Mamadou DIOP <bossiel@yahoo.fr> | 2016-02-23 22:00:35 +0100 |
---|---|---|
committer | Mamadou DIOP <bossiel@yahoo.fr> | 2016-02-23 22:00:35 +0100 |
commit | 50dfb4359619563012997bc3ddafb7667741066c (patch) | |
tree | db234c1edc3240a653363b5735fc4077af4b8720 /bindings/_common/AudioResampler.h | |
parent | 94b2219209038e05dd26395f6fb700be4d1062c0 (diff) | |
download | doubango-50dfb4359619563012997bc3ddafb7667741066c.zip doubango-50dfb4359619563012997bc3ddafb7667741066c.tar.gz |
Add new QoS implementation
Code formatting
Diffstat (limited to 'bindings/_common/AudioResampler.h')
-rwxr-xr-x | bindings/_common/AudioResampler.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/bindings/_common/AudioResampler.h b/bindings/_common/AudioResampler.h index 5f597fd..87c7995 100755 --- a/bindings/_common/AudioResampler.h +++ b/bindings/_common/AudioResampler.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-2011 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango.org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -34,22 +34,28 @@ class AudioResampler { public: - AudioResampler(uint32_t nInFreq, uint32_t nOutFreq, uint32_t nFrameDuration, uint32_t nChannels, uint32_t nQuality); - ~AudioResampler(); + AudioResampler(uint32_t nInFreq, uint32_t nOutFreq, uint32_t nFrameDuration, uint32_t nChannels, uint32_t nQuality); + ~AudioResampler(); public: - inline bool isValid(){ return (m_pWrappedResampler != tsk_null); } - inline uint32_t getOutputRequiredSizeInShort(){ return (m_nOutFreq * m_nFrameDuration)/1000; } - inline uint32_t getInputRequiredSizeInShort(){ return (m_nInFreq * m_nFrameDuration)/1000; } - uint32_t process(const void* pInData, uint32_t nInSizeInBytes, void* pOutData, uint32_t nOutSizeInBytes); + inline bool isValid() { + return (m_pWrappedResampler != tsk_null); + } + inline uint32_t getOutputRequiredSizeInShort() { + return (m_nOutFreq * m_nFrameDuration)/1000; + } + inline uint32_t getInputRequiredSizeInShort() { + return (m_nInFreq * m_nFrameDuration)/1000; + } + uint32_t process(const void* pInData, uint32_t nInSizeInBytes, void* pOutData, uint32_t nOutSizeInBytes); private: - struct tmedia_resampler_s* m_pWrappedResampler; - uint32_t m_nOutFreq; - uint32_t m_nInFreq; - uint32_t m_nFrameDuration; - uint32_t m_nChannels; - uint32_t m_nQuality; + struct tmedia_resampler_s* m_pWrappedResampler; + uint32_t m_nOutFreq; + uint32_t m_nInFreq; + uint32_t m_nFrameDuration; + uint32_t m_nChannels; + uint32_t m_nQuality; }; |