Solved

Full sound volume ?

Posted on 1997-09-06
1
266 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 50 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Installing Microsoft R server on REDHAT or SUSE Linux 4 152
dog bark java program 15 122
pre4 challenge 19 111
Unix Command -- Challenging  question 7 102
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.

696 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