[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx: [341] branches/fusegl/fuse
Brought to you by:
fredm
|
From: <fr...@us...> - 2007-04-07 03:26:57
|
Revision: 341
http://svn.sourceforge.net/fuse-for-macosx/?rev=341&view=rev
Author: fredm
Date: 2007-04-06 20:26:32 -0700 (Fri, 06 Apr 2007)
Log Message:
-----------
Add volume output adjustment for coreaudio.
Modified Paths:
--------------
branches/fusegl/fuse/TODO
branches/fusegl/fuse/sound/coreaudiosound.c
Modified: branches/fusegl/fuse/TODO
===================================================================
--- branches/fusegl/fuse/TODO 2007-04-06 09:48:36 UTC (rev 340)
+++ branches/fusegl/fuse/TODO 2007-04-07 03:26:32 UTC (rev 341)
@@ -24,18 +24,24 @@
X Make sure that fuse_end is called somewhere on exit
X Restore activity icons
X Restore joystick processing (re-use SDL joystick input files from SDL)
-* Make activity icons transparent
+X Sort out remaining FuseController calls into emulator object/thread
+X Restore application level volume adjustment
* Use double buffered texture (in cocoadisplay have screen 0 and 1 for use of
DisplayOpenGLView and flip between them on frame end), should also have a
mutex taken while DisplayOpenGLView changes and cocoadisplay flips to
prevent thread sync problems
-* Sort out remaining FuseController calls into emulator object/thread
* Quit keyhandling when command key is pressed
* Use sheets rather than modal dialogs (for Save As)
* Put in latest hq[23]x filters (HQ2x_555 from ScummVM should do the trick)
* Make border display optional
* Figure out why minimise icon image is partially blanked when minimise starts
-* Make sure that printer text is available as we go on OS X
* Allow Cmd-w to close as many operations as possible
+* Make activity icons transparent
+* Seperate out sound buffer interleaving code to allow for the use of hardware etc.
+ sound mixing
+* Add .WAV loader using audiofile
+* Shouldn't be able to load Interface II carts in Pentagon
+* Add volume option to standard fuse + a sound API method to set volume (or a
+ parameter to sound_lowlevel_init)
$Id: TODO,v 1.4 2004/03/02 13:38:08 pak21 Exp $
Modified: branches/fusegl/fuse/sound/coreaudiosound.c
===================================================================
--- branches/fusegl/fuse/sound/coreaudiosound.c 2007-04-06 09:48:36 UTC (rev 340)
+++ branches/fusegl/fuse/sound/coreaudiosound.c 2007-04-07 03:26:32 UTC (rev 341)
@@ -66,6 +66,7 @@
UInt32 deviceBufferSize; /* bufferSize returned by
kAudioDevicePropertyBufferSize */
int error;
+ Float32 vol = 1.0 - settings_current.volume / 5.0;
/* get the default output device for the HAL */
count = sizeof( device );
@@ -160,6 +161,18 @@
return 1;
}
+ err = AudioUnitSetParameter( gOutputUnit,
+ kHALOutputParam_Volume,
+ kAudioUnitScope_Global,
+ 0,
+ vol,
+ 0 );
+ if( err ) {
+ ui_error( UI_ERROR_ERROR, "AudioUnitSetParameter-Vol=%4.4s, %ld", (char*)&err,
+ err );
+ return 1;
+ }
+
err = AudioUnitInitialize( gOutputUnit );
if( err ) {
ui_error( UI_ERROR_ERROR, "AudioUnitInitialize=%ld", err );
@@ -258,7 +271,7 @@
ioData->mBuffers[1].mData : 0;
if( out_r ) {
- /* Deinterleave the left and right stereo channels into their approptiate
+ /* Deinterleave the left and right stereo channels into their appropriate
buffers */
while( sfifo_used( &sound_fifo ) && len ) {
f = sfifo_read( &sound_fifo, out_l, deviceFormat.mBytesPerFrame );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|