OSDN Git Service

hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 5 May 2020 10:07:50 +0000 (12:07 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 25 May 2020 09:30:03 +0000 (11:30 +0200)
Use the generic AUDIO_HOST_ENDIANNESS definition instead
of a custom one.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200505100750.27332-1-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/audio/gus.c

index eb4a803..c8df2bd 100644 (file)
 #define ldebug(...)
 #endif
 
-#ifdef HOST_WORDS_BIGENDIAN
-#define GUS_ENDIANNESS 1
-#else
-#define GUS_ENDIANNESS 0
-#endif
-
 #define TYPE_GUS "gus"
 #define GUS(obj) OBJECT_CHECK (GUSState, (obj), TYPE_GUS)
 
@@ -256,7 +250,7 @@ static void gus_realizefn (DeviceState *dev, Error **errp)
     as.freq = s->freq;
     as.nchannels = 2;
     as.fmt = AUDIO_FORMAT_S16;
-    as.endianness = GUS_ENDIANNESS;
+    as.endianness = AUDIO_HOST_ENDIANNESS;
 
     s->voice = AUD_open_out (
         &s->card,