Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2010-08-16 17:13:05 +0400
committerJoerg Mueller <nexyon@gmail.com>2010-08-16 17:13:05 +0400
commitb2cb83598c717fb0a23a20b72c989e88aa5e8dfa (patch)
treefe721f6725595797c5f06e2ee00303abc2e692a9 /intern/audaspace
parent77e286fee9f453ee4f26b3050a2258442a3a456c (diff)
Audaspace:
* Fix for uncached exception whith invalid audio file. * Includes fix for windows.
Diffstat (limited to 'intern/audaspace')
-rw-r--r--intern/audaspace/Python/AUD_PyAPI.cpp3
-rw-r--r--intern/audaspace/intern/AUD_C-API.cpp21
2 files changed, 12 insertions, 12 deletions
diff --git a/intern/audaspace/Python/AUD_PyAPI.cpp b/intern/audaspace/Python/AUD_PyAPI.cpp
index 4b1298b04a4..b0c55d5856e 100644
--- a/intern/audaspace/Python/AUD_PyAPI.cpp
+++ b/intern/audaspace/Python/AUD_PyAPI.cpp
@@ -58,9 +58,6 @@
#include "AUD_JackDevice.h"
#endif
-#include <cstdlib>
-#include <unistd.h>
-
// ====================================================================
typedef enum
diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp
index 40cbbd92d93..a12478ab477 100644
--- a/intern/audaspace/intern/AUD_C-API.cpp
+++ b/intern/audaspace/intern/AUD_C-API.cpp
@@ -244,20 +244,23 @@ AUD_SoundInfo AUD_getInfo(AUD_Sound* sound)
{
assert(sound);
- AUD_IReader* reader = sound->createReader();
-
AUD_SoundInfo info;
+ info.specs.channels = AUD_CHANNELS_INVALID;
+ info.specs.rate = AUD_RATE_INVALID;
+ info.length = 0.0f;
- if(reader)
+ try
{
- info.specs = reader->getSpecs();
- info.length = reader->getLength() / (float) info.specs.rate;
+ AUD_IReader* reader = sound->createReader();
+
+ if(reader)
+ {
+ info.specs = reader->getSpecs();
+ info.length = reader->getLength() / (float) info.specs.rate;
+ }
}
- else
+ catch(AUD_Exception&)
{
- info.specs.channels = AUD_CHANNELS_INVALID;
- info.specs.rate = AUD_RATE_INVALID;
- info.length = 0.0f;
}
return info;