Summary: | Standard output volume too high | ||
---|---|---|---|
Product: | [Unmaintained] arts | Reporter: | Benedikt Gollatz <benedikt> |
Component: | artsd | Assignee: | George Staikos <staikos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Benedikt Gollatz
2003-07-02 16:00:43 UTC
Subject: ARTS_1_1_BRANCH: arts/soundserver [POSSIBLY UNSAFE] CVS commit by staikos: implement #60636 in slightly modified form to work around volume level problems. Would appreciate if someone can put this in ARTS HEAD. thanks. CCMAIL: 60636-done@bugs.kde.org M +8 -0 artsd.cc 1.43.2.1 [POSSIBLY UNSAFE: printf] --- arts/soundserver/artsd.cc #1.43:1.43.2.1 @@ -26,4 +26,5 @@ #include "mcoputils.h" #include <signal.h> +#include <math.h> #include <iostream> #include <stdio.h> @@ -67,4 +68,5 @@ static void exitUsage(const char *progna fprintf(stderr,"-b <bits> set number of bits (8 or 16)\n"); fprintf(stderr,"-d enable full duplex operation\n"); + fprintf(stderr,"-V <volume> set output volume\n"); fprintf(stderr,"-D <devicename> audio device (usually /dev/dsp)\n"); fprintf(stderr,"-F <fragments> number of fragments\n"); @@ -117,4 +119,5 @@ static const char *cfgAudio static int cfgAutoSuspend = 0; static int cfgBuffers = 0; +static float cfgVolume = 0.0; static bool cmdListAudioIO = false; @@ -163,4 +166,6 @@ static void handleArgs(int argc, char ** case 'f': cfgForceStart = true; break; + case 'V': cfgVolume = atof(optarg); + break; case 'h': default: @@ -286,4 +291,7 @@ int main(int argc, char **argv) SoundServerV2 server; AudioManager audioManager; + + if (fabsf(cfgVolume) > 1e-10) + server.outVolume().scaleFactor(cfgVolume); if (cfgAutoSuspend) Isn't the alteration of the getopt-call missing in this new patch? When using it, artsd says "invalid option -- V" if it's called with the -V option. argh you're correct. I'm sorry. I patched it by hand. I'll fix it asap. Subject: ARTS_1_1_BRANCH: arts/soundserver CVS commit by staikos: missed a part of this patch CCMAIL: 60636-done@bugs.kde.org M +1 -1 artsd.cc 1.43.2.2 --- arts/soundserver/artsd.cc #1.43.2.1:1.43.2.2 @@ -126,5 +126,5 @@ static void handleArgs(int argc, char ** { int optch; - while((optch = getopt(argc,argv,"r:p:nuF:S:hD:dl:a:Ab:s:m:vNw:f")) > 0) + while((optch = getopt(argc,argv,"r:p:nuF:S:hD:dl:a:Ab:s:m:vNw:fV:")) > 0) { switch(optch) Resolved? It is still way to loud and I'm using 3.1.94 Did you read the original report? To fix this bug a new option (-V) was added to the arts daemon. This way you can override the default volume. You should find the option (derived from the original post) in KControl->Sound System->Sound I/O->Other custom options. Christian |