Index: amarok/src/engine/xine/xine-engine.cpp =================================================================== --- amarok/src/engine/xine/xine-engine.cpp (revision 747368) +++ amarok/src/engine/xine/xine-engine.cpp (working copy) @@ -49,7 +49,7 @@ //define this to use xine in a more standard way -//#define XINE_SAFE_MODE +#define XINE_SAFE_MODE ///some logging static globals Index: amarok/src/engine/xine/xine-scope.c =================================================================== --- amarok/src/engine/xine/xine-scope.c (revision 747368) +++ amarok/src/engine/xine/xine-scope.c (working copy) @@ -29,27 +29,30 @@ *************************/ static int -scope_port_open( xine_audio_port_t *port_gen, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode ) +scope_port_open( xine_audio_port_t *port_gen, xine_stream_t *stream, ao_format_t format ) { - #define port ((post_audio_port_t*)port_gen) - #define this ((scope_plugin_t*)((post_audio_port_t*)port_gen)->post) - + post_audio_port_t *port = (post_audio_port_t *)port_gen; + scope_plugin_t *this = ((post_audio_port_t *)port)->post; +#if 0 + define port ((post_audio_port_t*)port_gen) + define this ((scope_plugin_t*)((post_audio_port_t*)port_gen)->post) +#endif _x_post_rewire( (post_plugin_t*)port->post ); _x_post_inc_usage( port ); port->stream = stream; - port->bits = bits; - port->rate = rate; - port->mode = mode; + port->format = format; - this->channels = _x_ao_mode2channels( mode ); + this->channels = _x_ao_mode2channels( format.mode ); - return port->original_port->open( port->original_port, stream, bits, rate, mode ); + return port->original_port->open( port->original_port, stream, format ); } static void scope_port_close( xine_audio_port_t *port_gen, xine_stream_t *stream ) { + post_audio_port_t *port = (post_audio_port_t *)port_gen; + scope_plugin_t *this = ((post_audio_port_t *)port)->post; MyNode *node; /* ensure the buffers are deleted during the next XineEngine::timerEvent() */ @@ -68,6 +71,9 @@ /* FIXME With 8-bit samples the scope won't work correctly. For a special 8-bit code path, the sample size could be checked like this: if( port->bits == 8 ) */ + post_audio_port_t *port = (post_audio_port_t *)port_gen; + scope_plugin_t *this = ((post_audio_port_t *)port)->post; + const int num_samples = buf->num_frames * this->channels; metronom_t *myMetronom = &this->metronom; MyNode *new_node;