Volume of NSSound
Volume of NSSound
- Subject: Volume of NSSound
- From: Herwig Henseler <email@hidden>
- Date: Tue, 15 May 2001 22:15:11 +0200
Hi experts,
I'm just starting with Java/Cocoa. In my app I want to play a sound.
I have a .aiff-file which I use:
String h = NSBundle.mainBundle().pathForResource ( "sound", "aiff" );
NSSound sound = new NSSound( h, true );
sound.play();
The sound is played at _full_volume_ regardless of my system
preferences. I lowered the volume level of the sound file via
SoundEdit with the same result. The sound gets heavily distorted but
is always played at peak level.
Even converting it to a NeXT sound via SoundApp didn't help.
Playing the file in the Finder or via Quicktime Player reveals a
totally normal volume level, even if I set the volume slider to max.
How do I adjust the volume level in my program?
TIA,
Herwig
--
ECCE TERRAM Dr. Herwig Henseler
Internet Services GmbH Tel. 0441 / 500 12-0
Edewechter Landstrasse 42 Fax. 0441 / 500 12-29
26131 Oldenburg URL:
http://www.ecce-terram.de
"Life is a heuristic guided depth-first search without backtracking"