aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-25 21:51:13 +0100
committerMax Kellermann <max@duempel.org>2009-02-25 21:51:13 +0100
commit57a9e5605b66e66b2403f2adcaa7a7b903e6cbc5 (patch)
treefa360dcee967c3de4c3edd9cdfbc20c030b90bd3 /src
parentd90246537518bbb103f5bd1ebd04da0e8a626c6e (diff)
downloadmpd-57a9e5605b66e66b2403f2adcaa7a7b903e6cbc5.tar.gz
mpd-57a9e5605b66e66b2403f2adcaa7a7b903e6cbc5.tar.xz
mpd-57a9e5605b66e66b2403f2adcaa7a7b903e6cbc5.zip
mvp: removed big_endian parameter from mvp_set_pcm_params()
Don't pass the big_endian flag to mvp_set_pcm_params(), do a simple "G_BYTE_ORDER==G_LITTLE_ENDIAN" instead.
Diffstat (limited to '')
-rw-r--r--src/output/mvp_plugin.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/output/mvp_plugin.c b/src/output/mvp_plugin.c
index c15935597..5b5fc229a 100644
--- a/src/output/mvp_plugin.c
+++ b/src/output/mvp_plugin.c
@@ -34,12 +34,6 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "mvp"
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-#define MVP_USE_LITTLE_ENDIAN false
-#else
-#define MVP_USE_LITTLE_ENDIAN true
-#endif
-
typedef struct {
unsigned long dsp_status;
unsigned long stream_decode_type;
@@ -126,7 +120,7 @@ mvp_output_finish(void *data)
static int
mvp_set_pcm_params(struct mvp_data *md, unsigned long rate, int channels,
- int big_endian, unsigned bits)
+ unsigned bits)
{
unsigned iloop;
unsigned mix[5];
@@ -147,13 +141,7 @@ mvp_set_pcm_params(struct mvp_data *md, unsigned long rate, int channels,
return -1;
mix[3] = 0; /* stream type? */
-
- if (big_endian == 1)
- mix[4] = 1;
- else if (big_endian == 0)
- mix[4] = 0;
- else
- return -1;
+ mix[4] = G_BYTE_ORDER == G_LITTLE_ENDIAN;
/*
* if there is an exact match for the frequency, use it.
@@ -223,8 +211,7 @@ mvp_output_open(void *data, struct audio_format *audio_format)
return false;
}
mvp_set_pcm_params(md, audio_format->sample_rate,
- audio_format->channels,
- MVP_USE_LITTLE_ENDIAN, audio_format->bits);
+ audio_format->channels, audio_format->bits);
md->audio_format = *audio_format;
return true;
}