summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/sndmenu.h
blob: 03f682027488f55bc3a746eb000cbc6cbc3ea24e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// license:BSD-3-Clause
// copyright-holders:Maurizio Petrarota
/***************************************************************************

    ui/sndmenu.h

    Internal UI user interface.

***************************************************************************/

#ifndef MAME_FRONTEND_UI_SNDMENU_H
#define MAME_FRONTEND_UI_SNDMENU_H

#pragma once

#include "ui/menu.h"

namespace ui {

//-------------------------------------------------
//  class sound options menu
//-------------------------------------------------

class menu_sound_options : public menu
{
public:
	menu_sound_options(mame_ui_manager &mui, render_container &container);

protected:
	virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
	virtual void menu_dismissed() override;

private:
	enum
	{
		ENABLE_SOUND = 1,
		ENABLE_COMPRESSOR,
		SAMPLE_RATE,
		ENABLE_SAMPLES
	};

	virtual void populate(float &customtop, float &custombottom) override;
	virtual void handle(event const *ev) override;

	uint16_t          m_cur_rates;
	static const int  m_sound_rate[];
	int               m_sample_rate;
	bool              m_samples, m_sound, m_compressor;
};

} // namespace ui

#endif // MAME_FRONTEND_UI_SNDMENU_H