Files
kichikuou_xsystem35-sdl2/src/volume.h
T
kichikuou 73b3377b77 Add option to mute audio while the window is unfocused
Disabled by default; enable via the mute_on_unfocus rc setting or the
-mute_on_unfocus flag.

Fixes #37.
2026-07-01 17:36:58 +09:00

41 lines
1.4 KiB
C

/*
* volume.h System39.ini volume controller
*
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
* 1998- <masaki-c@is.aist-nara.ac.jp>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __VOLUME_H__
#define __VOLUME_H__
#include <stdbool.h>
// Reads System39.ini / Volume.sav and applies the volumes.
void volume_init(void);
// Opens the modal volume controller dialog.
void volume_dialog_open(void);
// Enables muting audio while the window is unfocused (-mute_on_unfocus).
void volume_set_mute_on_unfocus(bool enable);
// Notifies the volume controller of window focus changes.
void volume_on_window_focus(bool focused);
#endif /* __VOLUME_H__ */