2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:09:55 +00:00
|
|
|
// Refer to the license.txt file included.
|
2010-11-14 23:56:26 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2010-11-14 23:56:26 +00:00
|
|
|
|
2015-12-05 19:33:33 +00:00
|
|
|
#include <array>
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "AudioCommon/SoundStream.h"
|
2010-11-14 23:56:26 +00:00
|
|
|
|
2014-03-18 14:37:45 +00:00
|
|
|
class NullSound final : public SoundStream
|
2010-11-14 23:56:26 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
bool Start() override;
|
|
|
|
void SoundLoop() override;
|
|
|
|
void SetVolume(int volume) override;
|
|
|
|
void Stop() override;
|
|
|
|
void Clear(bool mute) override;
|
|
|
|
void Update() override;
|
2015-12-05 19:31:36 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
static bool isValid() { return true; }
|
2015-12-05 19:31:36 +00:00
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
static constexpr size_t BUFFER_SIZE = 48000 * 4 / 32;
|
2015-12-05 19:31:36 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// Playback position
|
|
|
|
std::array<short, BUFFER_SIZE / sizeof(short)> m_realtime_buffer;
|
2010-11-14 23:56:26 +00:00
|
|
|
};
|