Index: amoeba-1.1/audio/linux_oss.cpp
===================================================================
--- amoeba-1.1.orig/audio/linux_oss.cpp
+++ amoeba-1.1/audio/linux_oss.cpp
@@ -17,14 +17,15 @@
 #include <sys/ioctl.h>
 #include <errno.h>
 #include <sys/time.h>
+#include <endian.h>
 
 OSSAudioDriver::OSSAudioDriver(AudioProvider *prv, float jump, MainLoop *lp)
 {
 	this->prov = prv;
 
-	this->oss_fd = open("/dev/sound/dsp", O_RDWR);
+	this->oss_fd = open("/dev/sound/dsp", O_WRONLY);
 	if (this->oss_fd == -1) {
-	        this->oss_fd = open("/dev/dsp", O_RDWR);
+	        this->oss_fd = open("/dev/dsp", O_WRONLY);
 	        if (this->oss_fd == -1)
 	                throw new FatalException("/dev/dsp", strerror(errno));
 	}
@@ -32,7 +33,7 @@ OSSAudioDriver::OSSAudioDriver(AudioProv
 	this->set_ioctl(SNDCTL_DSP_RESET, 1);
 	this->set_ioctl(SOUND_PCM_WRITE_RATE, 44100);
 	this->set_ioctl(SOUND_PCM_WRITE_CHANNELS, 2);
-	this->set_ioctl(SNDCTL_DSP_SETFMT, AFMT_S16_LE);
+	this->set_ioctl(SNDCTL_DSP_SETFMT, AFMT_S16_NE);
 	this->set_ioctl(SNDCTL_DSP_NONBLOCK, 1);
 	this->set_ioctl(SNDCTL_DSP_SETFRAGMENT, 0x7fff000c);
 	
Index: amoeba-1.1/audio/vorbis.cpp
===================================================================
--- amoeba-1.1.orig/audio/vorbis.cpp
+++ amoeba-1.1/audio/vorbis.cpp
@@ -74,7 +74,11 @@ OggVorbisAudioProvider::~OggVorbisAudioP
 int OggVorbisAudioProvider::fill_buf(char *buf, int bytes)
 {
 	int junk, ret;
+#if __BYTE_ORDER == __LITTLE_ENDIAN
 	ret = ov_read(this->vf, buf, bytes, 0, 2, 1, &junk);
+#else
+	ret = ov_read(this->vf, buf, bytes, 1, 2, 1, &junk);
+#endif
 
 	if (ret < 0)
 		throw new FatalException("Ogg Vorbis stream error!");
