diff options
Diffstat (limited to 'src/post/visualizations')
-rw-r--r-- | src/post/visualizations/fftgraph.c | 20 | ||||
-rw-r--r-- | src/post/visualizations/fftscope.c | 20 | ||||
-rw-r--r-- | src/post/visualizations/fooviz.c | 20 | ||||
-rw-r--r-- | src/post/visualizations/oscope.c | 22 |
4 files changed, 9 insertions, 73 deletions
diff --git a/src/post/visualizations/fftgraph.c b/src/post/visualizations/fftgraph.c index 1953563b7..40a667621 100644 --- a/src/post/visualizations/fftgraph.c +++ b/src/post/visualizations/fftgraph.c @@ -20,7 +20,7 @@ * FftGraph Visualization Post Plugin For xine * by Thibaut Mattern (tmattern@noos.fr) * - * $Id: fftgraph.c,v 1.7 2003/11/26 19:30:17 mroi Exp $ + * $Id: fftgraph.c,v 1.8 2003/12/03 10:52:41 andruil Exp $ * */ @@ -233,22 +233,6 @@ static int fftgraph_rewire_video(xine_post_out_t *output_gen, void *data) return 1; } -static int mode_channels( int mode ) { - switch( mode ) { - case AO_CAP_MODE_MONO: - return 1; - case AO_CAP_MODE_STEREO: - return 2; - case AO_CAP_MODE_4CHANNEL: - return 4; - case AO_CAP_MODE_5CHANNEL: - return 5; - case AO_CAP_MODE_5_1CHANNEL: - return 6; - } - return 0; -} - static int fftgraph_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode) { @@ -264,7 +248,7 @@ static int fftgraph_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream this->bits = bits; this->mode = mode; - this->channels = mode_channels(mode); + this->channels = _x_ao_mode2channels(mode); if( this->channels > MAXCHANNELS ) this->channels = MAXCHANNELS; this->lines_per_channel = FFTGRAPH_HEIGHT / this->channels; diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index d349f8603..ff59f28ed 100644 --- a/src/post/visualizations/fftscope.c +++ b/src/post/visualizations/fftscope.c @@ -22,7 +22,7 @@ * * FFT code by Steve Haehnichen, originally licensed under GPL v1 * - * $Id: fftscope.c,v 1.21 2003/11/26 19:30:17 mroi Exp $ + * $Id: fftscope.c,v 1.22 2003/12/03 10:52:41 andruil Exp $ * */ @@ -315,22 +315,6 @@ static int fftscope_rewire_video(xine_post_out_t *output_gen, void *data) return 1; } -static int mode_channels( int mode ) { - switch( mode ) { - case AO_CAP_MODE_MONO: - return 1; - case AO_CAP_MODE_STEREO: - return 2; - case AO_CAP_MODE_4CHANNEL: - return 4; - case AO_CAP_MODE_5CHANNEL: - return 5; - case AO_CAP_MODE_5_1CHANNEL: - return 6; - } - return 0; -} - static int fftscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode) { @@ -342,7 +326,7 @@ static int fftscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream this->bits = bits; this->mode = mode; - this->channels = mode_channels(mode); + this->channels = _x_ao_mode2channels(mode); if( this->channels > MAXCHANNELS ) this->channels = MAXCHANNELS; this->samples_per_frame = rate / FPS; diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index a6ba782a7..f37c74f12 100644 --- a/src/post/visualizations/fooviz.c +++ b/src/post/visualizations/fooviz.c @@ -23,7 +23,7 @@ * process. It simply paints the screen a solid color and rotates through * colors on each iteration. * - * $Id: fooviz.c,v 1.16 2003/11/26 19:30:17 mroi Exp $ + * $Id: fooviz.c,v 1.17 2003/12/03 10:52:41 andruil Exp $ * */ @@ -130,22 +130,6 @@ static int fooviz_rewire_video(xine_post_out_t *output_gen, void *data) return 1; } -static int mode_channels( int mode ) { - switch( mode ) { - case AO_CAP_MODE_MONO: - return 1; - case AO_CAP_MODE_STEREO: - return 2; - case AO_CAP_MODE_4CHANNEL: - return 4; - case AO_CAP_MODE_5CHANNEL: - return 5; - case AO_CAP_MODE_5_1CHANNEL: - return 6; - } - return 0; -} - static int fooviz_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode) { @@ -155,7 +139,7 @@ static int fooviz_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, this->ratio = (double)FOO_WIDTH/(double)FOO_HEIGHT; this->bits = bits; this->mode = mode; - this->channels = mode_channels(mode); + this->channels = _x_ao_mode2channels(mode); this->samples_per_frame = rate / FPS; this->sample_rate = rate; this->stream = stream; diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c index ee3c905d1..7b2427b83 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.14 2003/11/26 19:30:17 mroi Exp $ + * $Id: oscope.c,v 1.15 2003/12/03 10:52:41 andruil Exp $ * */ @@ -201,22 +201,6 @@ static int oscope_rewire_video(xine_post_out_t *output_gen, void *data) return 1; } -static int mode_channels( int mode ) { - switch( mode ) { - case AO_CAP_MODE_MONO: - return 1; - case AO_CAP_MODE_STEREO: - return 2; - case AO_CAP_MODE_4CHANNEL: - return 4; - case AO_CAP_MODE_5CHANNEL: - return 5; - case AO_CAP_MODE_5_1CHANNEL: - return 6; - } - return 0; -} - static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode) { @@ -227,9 +211,9 @@ static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, this->bits = bits; this->mode = mode; - this->channels = mode_channels(mode); + this->channels = _x_ao_mode2channels(mode); this->samples_per_frame = rate / FPS; - this->sample_rate = rate; + this->sample_rate = rate; this->stream = stream; this->data_idx = 0; init_yuv_planes(&this->yuv, OSCOPE_WIDTH, OSCOPE_HEIGHT); |