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
|
|
|
|
|
|
|
#ifndef _NULLSOUNDSTREAM_H_
|
|
|
|
#define _NULLSOUNDSTREAM_H_
|
|
|
|
|
2013-10-16 22:32:18 -06:00
|
|
|
#include <stdlib.h>
|
2010-11-14 16:56:26 -07:00
|
|
|
#include "SoundStream.h"
|
|
|
|
|
|
|
|
#define BUF_SIZE (48000 * 4 / 32)
|
|
|
|
|
|
|
|
class NullSound : public SoundStream
|
|
|
|
{
|
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() {}
|
|
|
|
|
2010-11-14 16:56:26 -07:00
|
|
|
virtual bool Start();
|
2013-03-19 19:51:12 -06:00
|
|
|
virtual void SoundLoop();
|
2010-11-14 16:56:26 -07:00
|
|
|
virtual void SetVolume(int volume);
|
2013-03-19 19:51:12 -06:00
|
|
|
virtual void Stop();
|
2010-11-14 16:56:26 -07:00
|
|
|
virtual void Clear(bool mute);
|
2013-03-19 19:51:12 -06:00
|
|
|
static bool isValid() { return true; }
|
|
|
|
virtual bool usesMixer() const { return true; }
|
|
|
|
virtual void Update();
|
2010-11-14 16:56:26 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //_NULLSOUNDSTREAM_H_
|