debian/ 0000755 0000000 0000000 00000000000 12377671526 007206 5 ustar debian/watch 0000644 0000000 0000000 00000000057 12351543110 010214 0 ustar # There are no new upstream releases to track.
debian/VolumeControl.desktop 0000644 0000000 0000000 00000000534 12351542267 013402 0 ustar [Desktop Entry]
Type=Application
Categories=Audio;AudioVideo;Mixer;
Name=VolumeControl
Comment=Audio mixer for GNUstep
Comment[bg]=Аудио миксер за GNUstep
Keywords=mixer;audio;sound;volume;
Keywords[bg]=миксер;аудио;звук;
Icon=/usr/lib/GNUstep/Applications/VolumeControl.app/Resources/headphones.tiff
Exec=VolumeControl
debian/rules 0000755 0000000 0000000 00000001547 12360032621 010250 0 ustar #!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/GNUstep/debian/config.mk
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-undefined -Wl,--as-needed
d_app := $(CURDIR)/debian/volumecontrol.app
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
optim := debug=yes
endif
%:
dh $@
override_dh_auto_build:
$(MAKE) $(optim) messages=yes $(shell dpkg-buildflags --export=cmdline)
convert headphones.tiff -resize 32x32 VolumeControl.xpm
override_dh_clean:
dh_clean VolumeControl.xpm
override_dh_link:
dh_gnustep
dh_installdirs usr/share/GNUstep
rm $(d_app)$(GNUSTEP_SYSTEM_APPS)/*.app/Resources/*.desktop
mv $(d_app)$(GNUSTEP_SYSTEM_APPS)/VolumeControl.app/Resources \
$(d_app)/usr/share/GNUstep/VolumeControl.app
dh_link /usr/share/GNUstep/VolumeControl.app \
$(GNUSTEP_SYSTEM_APPS)/VolumeControl.app/Resources
debian/install 0000644 0000000 0000000 00000000133 12351541341 010553 0 ustar debian/VolumeControl.desktop usr/share/applications
VolumeControl.xpm usr/share/pixmaps
debian/menu 0000644 0000000 0000000 00000000325 12351541405 010055 0 ustar ?package(volumecontrol.app):needs="X11" section="Applications/Sound"\
title="VolumeControl" command="/usr/bin/VolumeControl"\
longtitle="Audio mixer for GNUstep"\
icon="/usr/share/pixmaps/VolumeControl.xpm"
debian/copyright 0000644 0000000 0000000 00000003526 12366711477 011145 0 ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: VolumeControl
Source: http://www.linuks.mine.nu/volumecontrol/
The source is no longer available.
Files: *
Copyright: 2004-2005 Gürkan Sengün
License: GPL-2
This package 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; version 2 dated June, 1991.
.
This package 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 package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General Public
License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
Files: debian/*
Copyright: 2004-2014 Debian GNUstep maintainers
License: GPL-2+
This package 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 package 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, see .
.
On Debian systems, the complete text of the GNU General Public
License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
debian/preinst 0000644 0000000 0000000 00000000626 12351540657 010611 0 ustar #!/bin/sh
# Handle the move of arch-independent Resources to /usr/share as dpkg
# will not replace a real directory with a symlink.
# FIXME: Remove during the jessie+1 cycle.
set -e
set -u
RESDIR=/usr/lib/GNUstep/Applications/VolumeControl.app/Resources
if [ "$1" = "upgrade" ] || [ "$1" = "install" ]; then
if [ -d $RESDIR ] && [ ! -L $RESDIR ]; then
rm -rf $RESDIR
fi
fi
#DEBHELPER#
exit 0
debian/VolumeControl.1 0000644 0000000 0000000 00000001317 12351540136 012062 0 ustar .TH VOLUMECONTROL 1 "July 29, 2004"
.SH NAME
VolumeControl \- audio mixer for GNUstep
.SH SYNOPSIS
.B VolumeControl
.SH DESCRIPTION
This manual page documents briefly the
.B VolumeControl
command.
This manual page was written for the Debian distribution
because the original program does not have a manual page.
.PP
\fBVolumeControl\fP is a GNUstep program for adjusting the audio mixer
on systems that use the ALSA or OSS APIs. It allows the sound level,
left/right speakers, muting for master, PCM, bass, and treble levels
to be controlled.
.SH SEE ALSO
.BR GNUstep (7).
.br
.SH AUTHOR
This manual page was written by G\[:u]rkan Seng\[:u]n ,
for the Debian project (but may be used by others).
debian/source/ 0000755 0000000 0000000 00000000000 12351532144 010466 5 ustar debian/source/format 0000644 0000000 0000000 00000000014 12351532144 011674 0 ustar 3.0 (quilt)
debian/patches/ 0000755 0000000 0000000 00000000000 12351547652 010627 5 ustar debian/patches/fix-main-function.patch 0000644 0000000 0000000 00000001515 12351532573 015201 0 ustar Description: Fix initialization problem with gnustep-gui >= 0.20.
Author: Yavor Doganov
Bug-Debian: http://bugs.debian.org/645935
Forwarded: no
Last-Update: 2011-11-10
---
--- volumecontrol.app-0.5.orig/AppController.m
+++ volumecontrol.app-0.5/AppController.m
@@ -3,7 +3,7 @@
#include
#include "AppController.h"
-#include
+#include
#include /* control device */
#include
--- volumecontrol.app-0.5.orig/main.m
+++ volumecontrol.app-0.5/main.m
@@ -1,10 +1,6 @@
#include
-int main(int argc, char **argv)
+int main(int argc, const char **argv)
{
- CREATE_AUTORELEASE_POOL(pool);
- [NSApplication sharedApplication];
- [NSApp run];
- DESTROY(pool);
- return 0;
+ return NSApplicationMain(argc, argv);
}
debian/patches/fix-implicit-declaration.patch 0000644 0000000 0000000 00000000643 12351533506 016525 0 ustar Description: Fix implicit function declaration of `close'.
Author: Yavor Doganov
Forwarded: no
Last-Update: 2014-06-22
---
--- volumecontrol.app.orig/AppController.m
+++ volumecontrol.app/AppController.m
@@ -6,6 +6,7 @@
#include
#include /* control device */
#include
+#include
#define DEVICE_NAME "/dev/mixer"
int mixer_fd;
debian/patches/series 0000644 0000000 0000000 00000000102 12351537206 012027 0 ustar fix-main-function.patch
fix-implicit-declaration.patch
alsa.patch
debian/patches/alsa.patch 0000644 0000000 0000000 00000040022 12351547652 012566 0 ustar Description: Port to ALSA, makes the package usable on GNU/Linux.
Author: Yavor Doganov
Bug-Debian: http://bugs.debian.org/730652
Forwarded: no
Last-Update: 2014-06-22
---
--- volumecontrol.app.orig/AppController.m
+++ volumecontrol.app/AppController.m
@@ -8,15 +8,375 @@
#include
#include
+#ifdef __linux__
+#include
+
+static snd_mixer_t *handle;
+static snd_mixer_elem_t *volumeElem;
+static snd_mixer_elem_t *bassElem;
+static snd_mixer_elem_t *trebleElem;
+static snd_mixer_elem_t *pcmElem;
+static snd_mixer_elem_t *lineElem;
+static BOOL mixerOpened = NO;
+
+/* The "default" device seems to be managed by pulseaudio these days
+ (at least on most desktops), so stick to the real one. This
+ doesn't cope well with multiple cards, but we have a hardcoded GUI
+ anyway so that is the last problem. */
+#define DEVICE_NAME "hw:0"
+
+/* Convenience macro to die in informational manner. */
+#define DIE(msg) \
+ { \
+ NSRunCriticalAlertPanel (@"Error", \
+ msg @"\nThe application will terminate.", \
+ @"OK", nil, nil); \
+ exit (EXIT_FAILURE); \
+ }
+#else
#define DEVICE_NAME "/dev/mixer"
int mixer_fd;
static int ovol,ovol2,ovol3,ovol4,ovol5;
+#endif
@implementation AppController
+#ifdef __linux__
+- (void) refresh
+{
+ int poll_count, fill_count;
+ long lvol, lvol_r;
+ struct pollfd *polls;
+ unsigned short revents;
+
+ poll_count = snd_mixer_poll_descriptors_count (handle);
+ if (poll_count <= 0)
+ DIE (@"Cannot obtain mixer poll descriptors.");
+
+ polls = alloca ((poll_count + 1) * sizeof (struct pollfd));
+ fill_count = snd_mixer_poll_descriptors (handle, polls, poll_count);
+ NSAssert (poll_count = fill_count, @"poll counts differ");
+
+ poll (polls, fill_count + 1, 5);
+
+ /* Ensure that changes made via other programs (alsamixer, etc.) get
+ reflected as well. */
+ snd_mixer_poll_descriptors_revents (handle, polls, poll_count, &revents);
+ if (revents & POLLIN)
+ snd_mixer_handle_events (handle);
+
+ if (volumeElem)
+ {
+ snd_mixer_selem_get_playback_volume (volumeElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ [volL setIntValue: lvol];
+ if (snd_mixer_selem_is_playback_mono (volumeElem))
+ [volR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (volumeElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [volR setIntValue: lvol_r];
+ }
+ }
+
+ if (bassElem)
+ {
+ snd_mixer_selem_get_playback_volume (bassElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ [bassL setIntValue: lvol];
+ if (snd_mixer_selem_is_playback_mono (bassElem))
+ [bassR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (bassElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [bassR setIntValue: lvol_r];
+ }
+ }
+
+ if (trebleElem)
+ {
+ snd_mixer_selem_get_playback_volume (trebleElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ [trebleL setIntValue: lvol];
+ if (snd_mixer_selem_is_playback_mono (trebleElem))
+ [trebleR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (trebleElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [trebleR setIntValue: lvol_r];
+ }
+ }
+
+ if (pcmElem)
+ {
+ snd_mixer_selem_get_playback_volume (pcmElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ [pcmL setIntValue: lvol];
+ if (snd_mixer_selem_is_playback_mono (pcmElem))
+ [pcmR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (pcmElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [pcmR setIntValue: lvol_r];
+ }
+ }
+
+ if (lineElem)
+ {
+ snd_mixer_selem_get_playback_volume (lineElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ [lineL setIntValue: lvol];
+ if (snd_mixer_selem_is_playback_mono (lineElem))
+ [lineR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (lineElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [lineR setIntValue: lvol_r];
+ }
+ }
+}
+
+- (void) openMixer
+{
+ if (snd_mixer_open (&handle, 0) < 0)
+ DIE (@"Cannot open mixer.");
+ if (snd_mixer_attach (handle, DEVICE_NAME) < 0)
+ DIE (@"Cannot attach mixer.");
+ if (snd_mixer_selem_register (handle, NULL, NULL) < 0)
+ DIE (@"Cannot register the mixer elements.");
+ if (snd_mixer_load (handle) < 0)
+ DIE (@"Cannot load mixer.");
+
+ [NSTimer scheduledTimerWithTimeInterval: 0.5
+ target: self
+ selector: @selector(refresh)
+ userInfo: nil
+ repeats: YES];
+ [NSApp setDelegate: self];
+ mixerOpened = YES;
+}
+
+- (void) controlNotAvailable: (id) sender
+{
+ NSRunInformationalAlertPanel (@"Control missing",
+ @"It looks like the sound card does not "
+ @"have this type of control.",
+ @"OK", nil, nil);
+ [sender setIntValue: 0];
+ [sender setEnabled: NO];
+}
+
+- (void) applicationWillTerminate: (NSNotification *) notification
+{
+ snd_mixer_detach (handle, DEVICE_NAME);
+ snd_mixer_close (handle);
+}
+#endif
- (void) awakeFromNib
{
/* read volume settings, and set buttons */
+#ifdef __linux__
+ snd_mixer_elem_t *elem;
+ snd_mixer_selem_id_t *sid;
+ long lvol, lvol_r, min, max;
+
+ if (!mixerOpened)
+ [self openMixer];
+
+ snd_mixer_selem_id_alloca (&sid);
+
+ for (elem = snd_mixer_first_elem (handle); elem;
+ elem = snd_mixer_elem_next (elem))
+ {
+ if (snd_mixer_selem_is_active (elem)
+ && snd_mixer_selem_has_playback_volume (elem))
+ {
+ /* Because our controls are hardcoded in the .gorm file we
+ can't construct the UI on the fly based on the
+ available elements, as it should be done normally. So
+ resort to dumb parsing in the hope that the names of
+ the elements match ours. This is far from ideal; the
+ master element may be called "Front", for example. */
+ snd_mixer_selem_get_id (elem, sid);
+ if (!strcmp (snd_mixer_selem_id_get_name (sid), "Master"))
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ snd_mixer_selem_get_playback_volume_range (elem, &min, &max);
+ [volL setMinValue: min];
+ [volL setMaxValue: max];
+ [volL setIntValue: lvol];
+ [volR setMinValue: min];
+ [volR setMaxValue: max];
+ if (snd_mixer_selem_is_playback_mono (elem))
+ [volR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [volR setIntValue: lvol_r];
+ }
+
+ volumeElem = elem;
+ }
+
+ /* It seems that most cards do not have bass/treble
+ controls. Oh well. */
+ if (!strcmp (snd_mixer_selem_id_get_name (sid), "Bass"))
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ snd_mixer_selem_get_playback_volume_range (elem, &min, &max);
+ [bassL setMinValue: min];
+ [bassL setMaxValue: max];
+ [bassL setIntValue: lvol];
+ [bassR setMinValue: min];
+ [bassR setMaxValue: max];
+
+ if (snd_mixer_selem_is_playback_mono (elem))
+ [bassR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [bassR setIntValue: lvol_r];
+ }
+
+ bassElem = elem;
+ }
+
+ if (!strcmp (snd_mixer_selem_id_get_name (sid), "Treble"))
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ snd_mixer_selem_get_playback_volume_range (elem, &min, &max);
+ [trebleL setMinValue: min];
+ [trebleL setMaxValue: max];
+ [trebleL setIntValue: lvol];
+ [trebleR setMinValue: min];
+ [trebleR setMaxValue: max];
+
+ if (snd_mixer_selem_is_playback_mono (elem))
+ [trebleR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [trebleR setIntValue: lvol_r];
+ }
+
+ trebleElem = elem;
+ }
+
+ if (!strcmp (snd_mixer_selem_id_get_name (sid), "PCM"))
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ snd_mixer_selem_get_playback_volume_range (elem, &min, &max);
+ [pcmL setMinValue: min];
+ [pcmL setMaxValue: max];
+ [pcmL setIntValue: lvol];
+ [pcmR setMinValue: min];
+ [pcmR setMaxValue: max];
+ if (snd_mixer_selem_is_playback_mono (elem))
+ [pcmR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [pcmR setIntValue: lvol_r];
+ }
+
+ pcmElem = elem;
+ }
+
+ if (!strcmp (snd_mixer_selem_id_get_name (sid), "Line"))
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ &lvol);
+ snd_mixer_selem_get_playback_volume_range (elem, &min, &max);
+ [lineL setMinValue: min];
+ [lineL setMaxValue: max];
+ [lineL setIntValue: lvol];
+ [lineR setMinValue: min];
+ [lineR setMaxValue: max];
+
+ if (snd_mixer_selem_is_playback_mono (elem))
+ [lineR setIntValue: lvol];
+ else
+ {
+ snd_mixer_selem_get_playback_volume (elem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ &lvol_r);
+ [lineR setIntValue: lvol_r];
+ }
+
+ lineElem = elem;
+ }
+ }
+ }
+
+ /* Disable controls that are beyond our control. */
+ if (!volumeElem) /* <= Could happen in practice... */
+ {
+ [volL setAction: @selector(controlNotAvailable:)];
+ [volR setEnabled: NO];
+ [volMute setEnabled: NO];
+ [volLock setEnabled: NO];
+ }
+ if (!bassElem)
+ {
+ [bassL setAction: @selector(controlNotAvailable:)];
+ [bassR setEnabled: NO];
+ [bassMute setEnabled: NO];
+ [bassLock setEnabled: NO];
+ }
+ if (!trebleElem)
+ {
+ [trebleL setAction: @selector(controlNotAvailable:)];
+ [trebleR setEnabled: NO];
+ [trebleMute setEnabled: NO];
+ [trebleLock setEnabled: NO];
+ }
+ if (!pcmElem)
+ {
+ [pcmL setAction: @selector(controlNotAvailable:)];
+ [pcmR setEnabled: NO];
+ [pcmMute setEnabled: NO];
+ [pcmLock setEnabled: NO];
+ }
+ if (!lineElem)
+ {
+ [lineL setAction: @selector(controlNotAvailable:)];
+ [lineR setEnabled: NO];
+ [lineMute setEnabled: NO];
+ [lineLock setEnabled: NO];
+ }
+#else
int vol;
if ((mixer_fd=open(DEVICE_NAME, O_RDONLY | O_NONBLOCK, 0)) == -1) {
@@ -47,11 +407,180 @@
timer=[NSTimer scheduledTimerWithTimeInterval:0.5 target:self \
selector:@selector(awakeFromNib) userInfo:nil repeats:NO ];
+#endif
}
- (void) setVolume: (id)sender
{
/* set volume according to the buttons */
+#ifdef __linux__
+ long vol;
+
+ if (volumeElem)
+ {
+ if (![volMute state])
+ {
+ vol = [volL intValue];
+ snd_mixer_selem_set_playback_volume (volumeElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ vol);
+ if ([volLock state])
+ {
+ [volR setIntValue: vol];
+ if (!snd_mixer_selem_is_playback_mono (volumeElem))
+ snd_mixer_selem_set_playback_volume (volumeElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ vol);
+ }
+ else if (!snd_mixer_selem_is_playback_mono (volumeElem))
+ snd_mixer_selem_set_playback_volume (volumeElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ [volR intValue]);
+ }
+ else
+ {
+ snd_mixer_selem_set_playback_volume (volumeElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ 0);
+ if (!snd_mixer_selem_is_playback_mono (volumeElem))
+ snd_mixer_selem_set_playback_volume (volumeElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ 0);
+ }
+ }
+
+ if (bassElem)
+ {
+ if (![bassMute state])
+ {
+ vol = [bassL intValue];
+ snd_mixer_selem_set_playback_volume (bassElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ vol);
+ if ([bassLock state])
+ {
+ [bassR setIntValue: vol];
+ if (!snd_mixer_selem_is_playback_mono (bassElem))
+ snd_mixer_selem_set_playback_volume (bassElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ vol);
+ }
+ else if (!snd_mixer_selem_is_playback_mono (bassElem))
+ snd_mixer_selem_set_playback_volume (bassElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ [bassR intValue]);
+ }
+ else
+ {
+ snd_mixer_selem_set_playback_volume (bassElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ 0);
+ if (!snd_mixer_selem_is_playback_mono (bassElem))
+ snd_mixer_selem_set_playback_volume (bassElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ 0);
+ }
+ }
+
+ if (trebleElem)
+ {
+ if (![trebleMute state])
+ {
+ vol = [trebleL intValue];
+ snd_mixer_selem_set_playback_volume (trebleElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ vol);
+ if ([trebleLock state])
+ {
+ [trebleR setIntValue: vol];
+ if (!snd_mixer_selem_is_playback_mono (trebleElem))
+ snd_mixer_selem_set_playback_volume (trebleElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ vol);
+ }
+ else if (!snd_mixer_selem_is_playback_mono (trebleElem))
+ snd_mixer_selem_set_playback_volume (trebleElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ [trebleR intValue]);
+ }
+ else
+ {
+ snd_mixer_selem_set_playback_volume (trebleElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ 0);
+ if (!snd_mixer_selem_is_playback_mono (trebleElem))
+ snd_mixer_selem_set_playback_volume (trebleElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ 0);
+ }
+ }
+
+ if (pcmElem)
+ {
+ if (![pcmMute state])
+ {
+ vol = [pcmL intValue];
+ snd_mixer_selem_set_playback_volume (pcmElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ vol);
+ if ([pcmLock state])
+ {
+ [pcmR setIntValue: vol];
+ if (!snd_mixer_selem_is_playback_mono (pcmElem))
+ snd_mixer_selem_set_playback_volume (pcmElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ vol);
+ }
+ else if (!snd_mixer_selem_is_playback_mono (pcmElem))
+ snd_mixer_selem_set_playback_volume (pcmElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ [pcmR intValue]);
+ }
+ else
+ {
+ snd_mixer_selem_set_playback_volume (pcmElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ 0);
+ if (!snd_mixer_selem_is_playback_mono (pcmElem))
+ snd_mixer_selem_set_playback_volume (pcmElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ 0);
+ }
+ }
+
+ if (lineElem)
+ {
+ if (![lineMute state])
+ {
+ vol = [lineL intValue];
+ snd_mixer_selem_set_playback_volume (lineElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ vol);
+ if ([lineLock state])
+ {
+ [lineR setIntValue: vol];
+ if (!snd_mixer_selem_is_playback_mono (lineElem))
+ snd_mixer_selem_set_playback_volume (lineElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ vol);
+ }
+ else if (!snd_mixer_selem_is_playback_mono (lineElem))
+ snd_mixer_selem_set_playback_volume (lineElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ [lineR intValue]);
+ }
+ else
+ {
+ snd_mixer_selem_set_playback_volume (lineElem,
+ SND_MIXER_SCHN_FRONT_LEFT,
+ 0);
+ if (!snd_mixer_selem_is_playback_mono (lineElem))
+ snd_mixer_selem_set_playback_volume (lineElem,
+ SND_MIXER_SCHN_FRONT_RIGHT,
+ 0);
+ }
+ }
+#else
int vol,vol2,vol3,vol4,vol5;
/*
@@ -124,6 +653,7 @@
ioctl(mixer_fd,MIXER_WRITE(SOUND_MIXER_LINE),&vol5);
close(mixer_fd);
+#endif
}
@end
--- volumecontrol.app.orig/GNUmakefile
+++ volumecontrol.app/GNUmakefile
@@ -9,5 +9,11 @@
VolumeControl_OBJC_FILES = main.m AppController.m
VolumeControl_RESOURCE_FILES = VolumeControl.gorm headphones.tiff VolumeControl.rtf
+# GNUSTEP_TARGET_OS is defined to `linux-gnueabi' on armel and
+# `linux-gnuspe' on powerpcspe.
+ifneq (,$(findstring linux-gnu,$(GNUSTEP_TARGET_OS)))
+ADDITIONAL_GUI_LIBS = -lasound
+endif
+
include $(GNUSTEP_MAKEFILES)/application.make
debian/compat 0000644 0000000 0000000 00000000002 12351534341 010365 0 ustar 9
debian/control 0000644 0000000 0000000 00000001600 12360032466 010570 0 ustar Source: volumecontrol.app
Section: gnustep
Priority: optional
Maintainer: Debian GNUstep maintainers
Uploaders: Yavor Doganov
Build-Depends: debhelper (>= 9),
libgnustep-gui-dev,
libasound2-dev [linux-any],
gnustep-make (>= 2.6.6-2),
imagemagick
Standards-Version: 3.9.5
Vcs-Git: git://anonscm.debian.org/pkg-gnustep/volumecontrol.app.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-gnustep/volumecontrol.app.git
Package: volumecontrol.app
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
${gnustep:Depends}
Description: Audio mixer for GNUstep
VolumeControl is a GNUstep program for adjusting the audio mixer on
systems that use the ALSA or OSS APIs. It allows the sound level,
left/right speakers, muting for master, PCM, bass, and treble levels
to be controlled.
debian/changelog 0000644 0000000 0000000 00000006275 12377671526 011072 0 ustar volumecontrol.app (0.5-4build1) utopic; urgency=medium
* Rebuild against libgnustep-gui0.24.
-- Colin Watson Thu, 28 Aug 2014 11:22:14 -0700
volumecontrol.app (0.5-4) unstable; urgency=medium
* debian/control (Maintainer): Adopt package on behalf of the Debian
GNUstep team (Closes: #691832).
(Uploaders): [self add].
(Section): Change to "gnustep" to match the override file.
(Build-Depends): Bump debhelper to >= 9, remove ancient version
requirement for libgnustep-gui-dev. Require gnustep-make >= 2.6.6-2
for recent config.mk. Add libasound2-dev [linux-any] for the new ALSA
support and imagemagick for the icon conversion.
(Depends): Add ${misc:Depends} and ${gnustep:Depends}.
(Description): Remove Homepage (Closes: #615451). Not moving to a
separate field as it is not accessible.
(Vcs-Git, Vcs-Browser): New fields.
(Standards-Version): Claim compliance with 3.9.5 as of this release.
* debian/source/format: Switch to 3.0 (quilt).
* main.m (main): Split local source modifications to...
* debian/patches/fix-main-function.patch: ...a patch.
* debian/patches/fix-implicit-declaration.patch: New.
* debian/patches/alsa.patch: New, port to ALSA (Closes: #730652).
* debian/patches/series: Create.
* debian/compat: Set to 9.
* debian/rules: Rewrite for modern dh. Enable hardening and verbose
build. Move Resources to /usr/share/GNUstep.
* debian/install:
* debian/preinst: New file.
* debian/dirs:
* debian/lintian-override: Delete.
* debian/VolumeControl.1: Mention that ALSA is also supported.
* debian/VolumeControl.desktop: Make it valid, add Keywords field.
* debian/menu: Add icon and longtitle.
* debian/watch: Add a dummy one.
* debian/copyright: Rewrite in format 1.0, update copyright years.
-- Yavor Doganov Fri, 01 Aug 2014 16:17:00 +0300
volumecontrol.app (0.5-3.1) unstable; urgency=low
* Non-maintainer upload.
* main.m (main): Use NSApplicationMain to prevent initialization
problems with gnustep-gui/0.20 (Closes: #645935)
* debian/control (Maintainer): Update Gürkan's address.
-- Yavor Doganov Thu, 10 Nov 2011 20:20:47 +0200
volumecontrol.app (0.5-3) unstable; urgency=low
* GNUstep transition.
-- Gürkan Sengün Thu, 04 Oct 2007 12:10:25 +0200
volumecontrol.app (0.5-2) unstable; urgency=low
* Rebuild against latest libgnustep-gui-dev.
* Bump standards version.
-- Gürkan Sengün Sat, 16 Sep 2006 18:47:57 +0200
volumecontrol.app (0.5-1) unstable; urgency=low
* New upstream version.
* Update build depends.
* Bump standards version.
* Update manual page.
-- Gürkan Sengün Fri, 20 Jan 2006 14:11:10 +0100
volumecontrol.app (0.4-1) unstable; urgency=low
* New upstream version.
* Renamed source package to volumecontrol.app.
* Updated debian/control build-depends for GNUstep 0.9.4.
* Removed comments from debian/rules.
-- Gürkan Sengün Sun, 28 Nov 2004 23:34:37 +0100
volumecontrol (0.3-1) unstable; urgency=low
* Initial Release.
-- Gürkan Sengün Thu, 29 Jul 2004 20:12:47 +0200
debian/manpages 0000644 0000000 0000000 00000000027 12351524531 010704 0 ustar debian/VolumeControl.1