#include "config.h"
#include "AudioSession.h"
#if USE(AUDIO_SESSION)
#include "NotImplemented.h"
#include <wtf/NeverDestroyed.h>
namespace WebCore {
AudioSession& AudioSession::sharedSession()
{
static NeverDestroyed<AudioSession> session;
return session;
}
bool AudioSession::tryToSetActive(bool active)
{
if (!tryToSetActiveInternal(active))
return false;
m_active = active;
return true;
}
#if !PLATFORM(COCOA)
class AudioSessionPrivate {
};
AudioSession::AudioSession()
: m_private(nullptr)
{
notImplemented();
}
AudioSession::~AudioSession() = default;
void AudioSession::setCategory(CategoryType)
{
notImplemented();
}
AudioSession::CategoryType AudioSession::categoryOverride() const
{
notImplemented();
return None;
}
void AudioSession::setCategoryOverride(CategoryType)
{
notImplemented();
}
AudioSession::CategoryType AudioSession::category() const
{
notImplemented();
return None;
}
float AudioSession::sampleRate() const
{
notImplemented();
return 0;
}
size_t AudioSession::bufferSize() const
{
notImplemented();
return 0;
}
size_t AudioSession::numberOfOutputChannels() const
{
notImplemented();
return 0;
}
bool AudioSession::tryToSetActiveInternal(bool)
{
notImplemented();
return true;
}
size_t AudioSession::preferredBufferSize() const
{
notImplemented();
return 0;
}
void AudioSession::setPreferredBufferSize(size_t)
{
notImplemented();
}
RouteSharingPolicy AudioSession::routeSharingPolicy() const
{
return RouteSharingPolicy::Default;
}
String AudioSession::routingContextUID() const
{
return emptyString();
}
#endif // !PLATFORM(COCOA)
}
#endif // USE(AUDIO_SESSION)