aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/coreaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-10-09 03:29:25 -0700
committerChris Robinson <[email protected]>2019-10-09 03:29:25 -0700
commitb687e952efa7407e323e8465df41e2e84b277b31 (patch)
treeaa2272b383366a2c37c9663e498ea1bc158a8984 /alc/backends/coreaudio.cpp
parenta7c12453600d4e9ae756b933770c6f42977a2663 (diff)
Make C callbacks noexcept
No telling what would happen if exceptions managed to get back into presumably C-based callers.
Diffstat (limited to 'alc/backends/coreaudio.cpp')
-rw-r--r--alc/backends/coreaudio.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index 5a0e4027..7c18287b 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -47,16 +47,16 @@ struct CoreAudioPlayback final : public BackendBase {
CoreAudioPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
~CoreAudioPlayback() override;
+ OSStatus MixerProc(AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames,
+ AudioBufferList *ioData) noexcept;
static OSStatus MixerProcC(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames,
- AudioBufferList *ioData)
+ AudioBufferList *ioData) noexcept
{
return static_cast<CoreAudioPlayback*>(inRefCon)->MixerProc(ioActionFlags, inTimeStamp,
inBusNumber, inNumberFrames, ioData);
}
- OSStatus MixerProc(AudioUnitRenderActionFlags *ioActionFlags,
- const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames,
- AudioBufferList *ioData);
void open(const ALCchar *name) override;
bool reset() override;
@@ -78,8 +78,8 @@ CoreAudioPlayback::~CoreAudioPlayback()
}
-OSStatus CoreAudioPlayback::MixerProc(AudioUnitRenderActionFlags*,
- const AudioTimeStamp*, UInt32, UInt32, AudioBufferList *ioData)
+OSStatus CoreAudioPlayback::MixerProc(AudioUnitRenderActionFlags*, const AudioTimeStamp*, UInt32,
+ UInt32, AudioBufferList *ioData) noexcept
{
std::lock_guard<CoreAudioPlayback> _{*this};
aluMixData(mDevice, ioData->mBuffers[0].mData, ioData->mBuffers[0].mDataByteSize/mFrameSize);
@@ -291,16 +291,16 @@ struct CoreAudioCapture final : public BackendBase {
CoreAudioCapture(ALCdevice *device) noexcept : BackendBase{device} { }
~CoreAudioCapture() override;
+ OSStatus RecordProc(AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber,
+ UInt32 inNumberFrames, AudioBufferList *ioData) noexcept;
static OSStatus RecordProcC(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames,
- AudioBufferList *ioData)
+ AudioBufferList *ioData) noexcept
{
return static_cast<CoreAudioCapture*>(inRefCon)->RecordProc(ioActionFlags, inTimeStamp,
inBusNumber, inNumberFrames, ioData);
}
- OSStatus RecordProc(AudioUnitRenderActionFlags *ioActionFlags,
- const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber,
- UInt32 inNumberFrames, AudioBufferList *ioData);
void open(const ALCchar *name) override;
bool start() override;
@@ -330,7 +330,7 @@ CoreAudioCapture::~CoreAudioCapture()
OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags*,
const AudioTimeStamp *inTimeStamp, UInt32, UInt32 inNumberFrames,
- AudioBufferList*)
+ AudioBufferList*) noexcept
{
AudioUnitRenderActionFlags flags = 0;
union {