From 55b425fe49ce8f28e0e7aac719e01bd42494b2fe Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 27 Oct 2024 11:26:22 +1000 Subject: Update the xineScope to remove global variables. This patch updates xineScope.c to better align with Amarok's code. As a result, the analyzer is more accurate. For instance, when playing an audio file and there is a silent spot, the blocks will correctly "drop" to the bottom, leaving an empty analyzer. The previous behaviour would leave some blocks "stuck" in their position See: TDE/codeine#23 Signed-off-by: mio (cherry picked from commit ff2a5768dd4d199cb8bbbe2af4ea3fbb68a489f3) --- src/app/xineScope.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/app/xineScope.h') diff --git a/src/app/xineScope.h b/src/app/xineScope.h index 623d56d..99d7215 100644 --- a/src/app/xineScope.h +++ b/src/app/xineScope.h @@ -33,18 +33,23 @@ struct my_node_s int64_t vpts_end; }; -extern MyNode* const myList; - #ifdef __cplusplus extern "C" { +#endif + #if XINE_MAJOR_VERSION > 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION > 2) || \ (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION >= 10) extern const plugin_info_t scope_plugin_info[]; #else xine_post_t* scope_plugin_new( xine_t*, xine_audio_port_t* ); #endif - int64_t scope_plugin_pts_per_smpls( void* ); + + int scope_plugin_channels(void *); + MyNode *scope_plugin_list(void *); + int64_t scope_plugin_pts_per_smpls(void *); + +#ifdef __cplusplus } #endif -- cgit v1.2.1