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-03 12:07:21 +0400
committerJoerg Mueller <nexyon@gmail.com>2010-08-03 12:07:21 +0400
commitce44d63ae1e6e76545bacd87ca8402b35a0317a0 (patch)
tree8f209fdbd889cee39f700cf092b0045f1f87ec3a /intern/audaspace/sndfile
parent8baeb4393c281b5c6765aa5ce4708a8221123b34 (diff)
Audaspace:
* Added an error string for audaspace exceptions. * Fixed PyAPI exceptions. * Minor bugfixes. * Added a name parameter to the Jack device, so that one can define an own name via Python.
Diffstat (limited to 'intern/audaspace/sndfile')
-rw-r--r--intern/audaspace/sndfile/AUD_SndFileReader.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/intern/audaspace/sndfile/AUD_SndFileReader.cpp b/intern/audaspace/sndfile/AUD_SndFileReader.cpp
index 339139e9abb..488a06d8728 100644
--- a/intern/audaspace/sndfile/AUD_SndFileReader.cpp
+++ b/intern/audaspace/sndfile/AUD_SndFileReader.cpp
@@ -76,6 +76,9 @@ sf_count_t AUD_SndFileReader::vio_tell(void *user_data)
return reader->m_memoffset;
}
+static const char* fileopen_error = "AUD_SndFileReader: File couldn't be "
+ "read.";
+
AUD_SndFileReader::AUD_SndFileReader(std::string filename) :
m_position(0)
{
@@ -85,7 +88,7 @@ AUD_SndFileReader::AUD_SndFileReader(std::string filename) :
m_sndfile = sf_open(filename.c_str(), SFM_READ, &sfinfo);
if(!m_sndfile)
- AUD_THROW(AUD_ERROR_FILE);
+ AUD_THROW(AUD_ERROR_FILE, fileopen_error);
m_specs.channels = (AUD_Channels) sfinfo.channels;
m_specs.rate = (AUD_SampleRate) sfinfo.samplerate;
@@ -110,7 +113,7 @@ AUD_SndFileReader::AUD_SndFileReader(AUD_Reference<AUD_Buffer> buffer) :
m_sndfile = sf_open_virtual(&m_vio, SFM_READ, &sfinfo, this);
if(!m_sndfile)
- AUD_THROW(AUD_ERROR_FILE);
+ AUD_THROW(AUD_ERROR_FILE, fileopen_error);
m_specs.channels = (AUD_Channels) sfinfo.channels;
m_specs.rate = (AUD_SampleRate) sfinfo.samplerate;