summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2012-04-05 15:34:55 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2012-04-05 15:34:55 +0800
commitd80e08b9e39c6b10eb17cb2384d1134dc5454094 (patch)
tree8460150479914d44b7c9545e555aefcdb5a8d971 /src
parent468632ed2ad032c7c2113fa234d9cde9d0f1b748 (diff)
Added pause and resume support on iOS
Diffstat (limited to 'src')
-rw-r--r--src/device_coreaudio.cpp10
-rw-r--r--src/device_coreaudio.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/device_coreaudio.cpp b/src/device_coreaudio.cpp
index 3e27894..b4eabe3 100644
--- a/src/device_coreaudio.cpp
+++ b/src/device_coreaudio.cpp
@@ -216,6 +216,16 @@ namespace audiere {
#endif
}
+ void CAAudioDevice::pause() {
+ ADR_GUARD("CAAudioDevice::~CAAudioDevice");
+ AudioOutputUnitStop(m_unit);
+ }
+
+ void CAAudioDevice::resume() {
+ ADR_GUARD("CAAudioDevice::~CAAudioDevice");
+ AudioOutputUnitStart(m_unit);
+ }
+
OSStatus CAAudioDevice::fillInput(void *inRefCon,
AudioUnitRenderActionFlags * ioActionFlags,
diff --git a/src/device_coreaudio.h b/src/device_coreaudio.h
index 06ea9f6..609b975 100644
--- a/src/device_coreaudio.h
+++ b/src/device_coreaudio.h
@@ -23,6 +23,8 @@ namespace audiere {
public:
void ADR_CALL update();
const char* ADR_CALL getName();
+ void ADR_CALL pause();
+ void ADR_CALL resume();
static OSStatus fillInput(void *inRefCon,
AudioUnitRenderActionFlags * ioActionFlags,