2013-04-18 03:09:55 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// 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
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include <cstdlib>
|
|
|
|
#include "AudioCommon/SoundStream.h"
|
2010-11-14 23:56:26 +00:00
|
|
|
|
|
|
|
#define BUF_SIZE (48000 * 4 / 32)
|
|
|
|
|
2014-03-18 14:37:45 +00:00
|
|
|
class NullSound final : public SoundStream
|
2010-11-14 23:56:26 +00:00
|
|
|
{
|
2013-03-20 01:51:12 +00:00
|
|
|
// playback position
|
|
|
|
short realtimeBuffer[BUF_SIZE / sizeof(short)];
|
2010-11-14 23:56:26 +00:00
|
|
|
|
|
|
|
public:
|
2013-10-19 09:27:57 +00:00
|
|
|
NullSound(CMixer *mixer)
|
2010-11-14 23:56:26 +00:00
|
|
|
: SoundStream(mixer)
|
|
|
|
{}
|
|
|
|
|
2013-03-20 01:51:12 +00:00
|
|
|
virtual ~NullSound() {}
|
|
|
|
|
2014-03-08 00:54:44 +00:00
|
|
|
virtual bool Start() override;
|
|
|
|
virtual void SoundLoop() override;
|
|
|
|
virtual void SetVolume(int volume) override;
|
|
|
|
virtual void Stop() override;
|
|
|
|
virtual void Clear(bool mute) override;
|
2013-03-20 01:51:12 +00:00
|
|
|
static bool isValid() { return true; }
|
2014-03-08 00:54:44 +00:00
|
|
|
virtual void Update() override;
|
2010-11-14 23:56:26 +00:00
|
|
|
};
|