Files

33 lines
785 B
C++
Raw Permalink Normal View History

// Copyright 2008 Dolphin Emulator Project
2015-05-18 01:08:10 +02:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
2011-01-02 02:49:30 +00:00
#ifdef __APPLE__
#include <AudioUnit/AudioUnit.h>
2011-01-02 02:49:30 +00:00
#endif
2014-02-17 05:18:15 -05:00
#include "AudioCommon/SoundStream.h"
2014-03-18 10:37:45 -04:00
class CoreAudioSound final : public SoundStream
{
2011-01-02 02:49:30 +00:00
#ifdef __APPLE__
public:
bool Start() override;
void SetVolume(int volume) override;
void SoundLoop() override;
void Stop() override;
void Update() override;
static bool isValid() { return true; }
private:
AudioUnit audioUnit;
int m_volume;
static OSStatus callback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags,
const AudioTimeStamp* inTimeStamp, UInt32 inBusNumber,
UInt32 inNumberFrames, AudioBufferList* ioData);
2011-01-02 02:49:30 +00:00
#endif
};