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:
authorLukas Steiblys <imbusy@imbusy.org>2009-10-02 02:29:15 +0400
committerLukas Steiblys <imbusy@imbusy.org>2009-10-02 02:29:15 +0400
commit0677398a649b6b8c293df3ce3c6668f0a3be3bc8 (patch)
tree9d510a5bd23559bf4fae670ed04d7e5d6c12578c /intern/audaspace/intern/AUD_C-API.cpp
parent59248e9f62006ba05e3098e4d213f3dcb23fe711 (diff)
parentbc942eceacb638735dc4f4f68252c4c207147a70 (diff)
merge from 23153 to 23595soc-2009-imbusy
Diffstat (limited to 'intern/audaspace/intern/AUD_C-API.cpp')
-rw-r--r--intern/audaspace/intern/AUD_C-API.cpp38
1 files changed, 35 insertions, 3 deletions
diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp
index 45faebc7e97..255d1d2f1f6 100644
--- a/intern/audaspace/intern/AUD_C-API.cpp
+++ b/intern/audaspace/intern/AUD_C-API.cpp
@@ -516,19 +516,51 @@ AUD_Device* AUD_openReadDevice(AUD_Specs specs)
}
}
-int AUD_playDevice(AUD_Device* device, AUD_Sound* sound)
+AUD_Handle* AUD_playDevice(AUD_Device* device, AUD_Sound* sound)
{
assert(device);
assert(sound);
try
{
- return device->play(sound) != NULL;
+ return device->play(sound);
}
catch(AUD_Exception)
{
- return false;
+ return NULL;
+ }
+}
+
+int AUD_setDeviceVolume(AUD_Device* device, float volume)
+{
+ assert(device);
+
+ try
+ {
+ return device->setCapability(AUD_CAPS_VOLUME, &volume);
+ }
+ catch(AUD_Exception) {}
+
+ return false;
+}
+
+int AUD_setDeviceSoundVolume(AUD_Device* device, AUD_Handle* handle,
+ float volume)
+{
+ if(handle)
+ {
+ assert(device);
+ AUD_SourceCaps caps;
+ caps.handle = handle;
+ caps.value = volume;
+
+ try
+ {
+ return device->setCapability(AUD_CAPS_SOURCE_VOLUME, &caps);
+ }
+ catch(AUD_Exception) {}
}
+ return false;
}
int AUD_readDevice(AUD_Device* device, sample_t* buffer, int length)