diff options
author | Lionel Ulmer | 2002-03-06 23:14:16 +0000 |
---|---|---|
committer | Lionel Ulmer | 2002-03-06 23:14:16 +0000 |
commit | 89d55aca166f62e6c33e97ba5158ff1a670659cb (patch) | |
tree | a62013629457d290e9ba7744685af19baffdebcf | |
parent | 5b2e56509d2b49dfe11f53fd435831d4d17761cb (diff) | |
download | scummvm-rg350-89d55aca166f62e6c33e97ba5158ff1a670659cb.tar.gz scummvm-rg350-89d55aca166f62e6c33e97ba5158ff1a670659cb.tar.bz2 scummvm-rg350-89d55aca166f62e6c33e97ba5158ff1a670659cb.zip |
Remove too strict error checking that prevented debugging.
svn-id: r3672
-rw-r--r-- | x11.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -45,8 +45,6 @@ #include <fcntl.h> #include <sys/ioctl.h> -#undef BUILD_FOR_IPAQ - Scumm scumm; ScummDebugger debugger; Gui gui; @@ -147,15 +145,17 @@ static void *sound_and_music_thread(void *params) { while (1) { unsigned short *buf = (unsigned short *) sound_buffer; + int size, written; scumm.mixWaves((short *) sound_buffer, FRAG_SIZE >> 2); /* Now convert to stereo */ for (int i = ((FRAG_SIZE >> 2) - 1); i >= 0; i--) { buf[2 * i + 1] = buf[2 * i] = buf[i]; } - if (write(sound_fd, sound_buffer, FRAG_SIZE) != FRAG_SIZE) { - error("Bad write to the audio device !\n"); - exit(1); + size = FRAG_SIZE; + while (size > 0) { + written = write(sound_fd, sound_buffer, size); + size -= written; } } |