diff options
author | mio <[email protected]> | 2024-10-20 17:27:01 +1000 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-10-28 09:16:07 +0900 |
commit | 4fe9282a9b13ac41e256f2b0fb4405dbcc46f2dd (patch) | |
tree | c0042c9fb889e7b2be34276be1a34da1d10c2ce3 /src/app/xineEngine.cpp | |
parent | c2ba45c14129890b44db4f677bf0071c790d8910 (diff) | |
download | codeine-4fe9282a9b13ac41e256f2b0fb4405dbcc46f2dd.tar.gz codeine-4fe9282a9b13ac41e256f2b0fb4405dbcc46f2dd.zip |
Fix the audio analyzer
Most of the code was already borrowed from Amarok, but wasn't properly
finished. This just updates the code to more closely match what is
currently in TDE's Amarok.
The Analyzer still sits in the statusBar(), which is cool, but can have
some delays when watching a video (the video itself is unaffected).
See: TDE/codeine#23
Signed-off-by: mio <[email protected]>
(cherry picked from commit a3ea0ee70fe8590a96df03dca43ca77f3f28791e)
Diffstat (limited to 'src/app/xineEngine.cpp')
-rw-r--r-- | src/app/xineEngine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/xineEngine.cpp b/src/app/xineEngine.cpp index 708ab13..2cb9cd3 100644 --- a/src/app/xineEngine.cpp +++ b/src/app/xineEngine.cpp @@ -615,7 +615,7 @@ VideoWindow::scope() //prune the buffer list and update the m_current_vpts timestamp timerEvent( nullptr ); - // const int64_t pts_per_smpls = 0; //scope_plugin_pts_per_smpls( m_scope ); + const int64_t pts_per_smpls = scope_plugin_pts_per_smpls(m_scope); for( int channels = xine_get_stream_info( m_stream, XINE_STREAM_INFO_AUDIO_CHANNELS ), frame = 0; frame < SCOPE_SIZE; ) { MyNode *best_node = nullptr; @@ -631,7 +631,7 @@ VideoWindow::scope() diff = m_current_vpts; diff -= best_node->vpts; diff *= 1<<16; - // diff /= pts_per_smpls; + diff /= pts_per_smpls; const int16_t* data16 = best_node->mem; |