summaryrefslogtreecommitdiff
path: root/src/post/visualizations/oscope.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/post/visualizations/oscope.c')
-rw-r--r--src/post/visualizations/oscope.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c
index e143b8f27..3e2908d54 100644
--- a/src/post/visualizations/oscope.c
+++ b/src/post/visualizations/oscope.c
@@ -20,7 +20,7 @@
* Basic Oscilloscope Visualization Post Plugin For xine
* by Mike Melanson (melanson@pcisys.net)
*
- * $Id: oscope.c,v 1.8 2003/07/26 17:44:30 tmattern Exp $
+ * $Id: oscope.c,v 1.9 2003/08/04 03:47:11 miguelfreitas Exp $
*
*/
@@ -47,6 +47,8 @@ struct post_plugin_oscope_s {
xine_video_port_t *vo_port;
xine_stream_t *stream;
+ double ratio;
+
int data_idx;
short data [MAXCHANNELS][NUMSAMPLES];
audio_buffer_t buf; /* dummy buffer just to hold a copy of audio data */
@@ -209,6 +211,8 @@ static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
post_audio_port_t *port = (post_audio_port_t *)port_gen;
post_plugin_oscope_t *this = (post_plugin_oscope_t *)port->post;
+ this->ratio = (double)OSCOPE_WIDTH/(double)OSCOPE_HEIGHT;
+
this->bits = bits;
this->mode = mode;
this->channels = mode_channels(mode);
@@ -298,7 +302,7 @@ static void oscope_port_put_buffer (xine_audio_port_t *port_gen,
samples_used += this->samples_per_frame;
frame = this->vo_port->get_frame (this->vo_port, OSCOPE_WIDTH, OSCOPE_HEIGHT,
- XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2,
+ this->ratio, XINE_IMGFMT_YUY2,
VO_BOTH_FIELDS);
frame->extra_info->invalid = 1;
frame->bad_frame = 0;