diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-02-23 07:45:28 +0100 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-02-23 07:45:28 +0100 |
commit | 5ec77bd73a9de9611498893130e4e5b300b29c75 (patch) | |
tree | adea0f5777f11f66ec1094d405d0cc772cf3df23 /dxr3syncbuffer.h | |
parent | 8e3918bce7b2e1e0e23cab69334df52b58d10f4d (diff) | |
download | vdr-plugin-dxr3-5ec77bd73a9de9611498893130e4e5b300b29c75.tar.gz vdr-plugin-dxr3-5ec77bd73a9de9611498893130e4e5b300b29c75.tar.bz2 |
simplify audiosamplerate handling
Diffstat (limited to 'dxr3syncbuffer.h')
-rw-r--r-- | dxr3syncbuffer.h | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/dxr3syncbuffer.h b/dxr3syncbuffer.h index f72b121..1cfe07d 100644 --- a/dxr3syncbuffer.h +++ b/dxr3syncbuffer.h @@ -52,40 +52,18 @@ public: { m_audioChannelCount = channelCount; } - void SetDataRate(uint32_t dataRate) + void SetSampleRate(uint32_t sampleRate) { - if (m_audioDataRate != UNKNOWN_DATA_RATE) - m_staticAudioDataRate = m_audioDataRate = dataRate; - else - m_audioDataRate = m_staticAudioDataRate; - }; + m_audioSampleRate = sampleRate; + } void SetAspectRatio(uint32_t aspectRatio) { m_videoAspectRatio = aspectRatio; }; - uint32_t GetChannelCount(void) - { - return m_audioChannelCount; - } - uint32_t GetDataRate(void) - { - return ((m_audioDataRate == m_staticAudioDataRate || - !m_staticAudioDataRate) ? - m_audioDataRate : m_staticAudioDataRate); - }; - uint32_t GetAspectRatio(void) - { - return m_videoAspectRatio; - }; - eFrameType GetFrameType(void) - { - return m_type; - } - - static void Clear(void) - { - m_staticAudioDataRate = 0; - }; + uint32_t GetChannelCount() { return m_audioChannelCount; } + uint32_t GetSampleRate() { return m_audioSampleRate; } + uint32_t GetAspectRatio() { return m_videoAspectRatio; } + eFrameType GetFrameType() { return m_type; } protected: uint8_t* m_pData; @@ -95,10 +73,8 @@ protected: eFrameType m_type; uint32_t m_audioChannelCount; - uint32_t m_audioDataRate; + uint32_t m_audioSampleRate; uint32_t m_videoAspectRatio; - - static uint32_t m_staticAudioDataRate; }; // ================================== |