From 94b0f6ee456b1788536711cfcb92fd895e282a7d Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 26 Jun 2007 13:25:21 +0000 Subject: [PATCH] no yielding within OS-level thread --- panda/src/audiotraits/fmodAudioManager.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panda/src/audiotraits/fmodAudioManager.cxx b/panda/src/audiotraits/fmodAudioManager.cxx index f977352388..5b0a671f11 100644 --- a/panda/src/audiotraits/fmodAudioManager.cxx +++ b/panda/src/audiotraits/fmodAudioManager.cxx @@ -756,7 +756,11 @@ read_callback(void *handle, void *buffer, unsigned int size_bytes, istream *str = (istream *)handle; str->read((char *)buffer, size_bytes); (*bytes_read) = str->gcount(); - thread_consider_yield(); + + // We can't yield here, since this callback is made within a + // sub-thread--an OS-level sub-thread spawned by FMod, not a Panda + // thread. + //thread_consider_yield(); if (str->eof()) { if ((*bytes_read) == 0) {