2013-04-17 21:09:55 -06:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2010-11-14 16:56:26 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2010-11-14 16:56:26 -07:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include <cstdlib>
|
|
|
|
#include "AudioCommon/SoundStream.h"
|
2010-11-14 16:56:26 -07:00
|
|
|
|
|
|
|
#define BUF_SIZE (48000 * 4 / 32)
|
|
|
|
|
2014-03-18 08:37:45 -06:00
|
|
|
class NullSound final : public SoundStream
|
2010-11-14 16:56:26 -07:00
|
|
|
{
|
2013-03-19 19:51:12 -06:00
|
|
|
// playback position
|
|
|
|
short realtimeBuffer[BUF_SIZE / sizeof(short)];
|
2010-11-14 16:56:26 -07:00
|
|
|
|
|
|
|
public:
|
2013-10-19 03:27:57 -06:00
|
|
|
NullSound(CMixer *mixer)
|
2010-11-14 16:56:26 -07:00
|
|
|
: SoundStream(mixer)
|
|
|
|
{}
|
|
|
|
|
2013-03-19 19:51:12 -06:00
|
|
|
virtual ~NullSound() {}
|
|
|
|
|
2014-03-07 17:54:44 -07: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-19 19:51:12 -06:00
|
|
|
static bool isValid() { return true; }
|
2014-03-07 17:54:44 -07:00
|
|
|
virtual void Update() override;
|
2010-11-14 16:56:26 -07:00
|
|
|
};
|