Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Full sound volume ?

Posted on 1997-09-06
1
Medium Priority
?
282 Views
Last Modified: 2013-12-26
I'm looking for some C/C++ code to temporarily change the systems sound volume. I've checked out the Caveman Sound System, but you cannot set the volume of a sound channel to a value higher than the system volume defined with the Sound-control panel.
I just want some lines of code that help me to do this.
0
Comment
Question by:mennigmann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
Hose earned 100 total points
ID: 1291677
If you're just looking for code to change the main system volume, here it is:

long      theSoundVol;

GetDefaultOutputVolume( &theSoundVol);
SetDefaultOutputVolume( kFullVolume );

/* do whatever here */

SetDefaultOutputVolume( theSoundVol );


Don't forget to do an #include <Sound.h> in your includes.

If you're looking to specifically alter an individual sound channel, then you're going to have to dive into the sound commands and channel structure.  I'd recommend picking up "Graphics and Sound Programming Techniques" (contains a subtitle "For The Mac") by Dan Sydow.  ISBN 1-55851-442-2  You'll need a reference work too, so pick up Inside Macintosh (I'd recommend the CD version with all the books--if you're going to be manipulating sound channels then you'll probably be doing some other advanced stuff in need to IM at some point in time).  Good luck.  :)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question