[soundflower] r108 committed - trivial/whitespace modifications

1 view
Skip to first unread message

sound...@googlecode.com

unread,
Mar 12, 2010, 2:33:06 PM3/12/10
to soundfl...@googlegroups.com
Revision: 108
Author: t...@electrotap.com
Date: Fri Mar 12 10:30:21 2010
Log: trivial/whitespace modifications
http://code.google.com/p/soundflower/source/detail?r=108

Modified:
/trunk/Source/SoundflowerDevice.cpp
/trunk/Source/SoundflowerDevice.h
/trunk/Source/SoundflowerEngine.cpp
/trunk/Source/SoundflowerEngine.h

=======================================
--- /trunk/Source/SoundflowerDevice.cpp Tue Sep 1 11:04:17 2009
+++ /trunk/Source/SoundflowerDevice.cpp Fri Mar 12 10:30:21 2010
@@ -30,14 +30,11 @@
*/

#include "SoundflowerDevice.h"
-
#include "SoundflowerEngine.h"
-
#include <IOKit/audio/IOAudioControl.h>
#include <IOKit/audio/IOAudioLevelControl.h>
#include <IOKit/audio/IOAudioToggleControl.h>
#include <IOKit/audio/IOAudioDefines.h>
-
#include <IOKit/IOLib.h>

#define super IOAudioDevice
@@ -47,9 +44,8 @@
const SInt32 SoundflowerDevice::kVolumeMax = 65535;
const SInt32 SoundflowerDevice::kGainMax = 65535;

-/*
- * initHardware()
- */
+
+
bool SoundflowerDevice::initHardware(IOService *provider)
{
bool result = false;
@@ -76,9 +72,7 @@
return result;
}

-/*
- * createAudioEngines()
- */
+
bool SoundflowerDevice::createAudioEngines()
{
OSArray* audioEngineArray = OSDynamicCast(OSArray,
getProperty(AUDIO_ENGINES_KEY));
@@ -199,9 +193,6 @@
}


-/*
- * volumeChangeHandler()
- */
IOReturn SoundflowerDevice::volumeChangeHandler(IOService *target,
IOAudioControl *volumeControl, SInt32 oldValue, SInt32 newValue)
{
IOReturn result = kIOReturnBadArgument;
@@ -215,9 +206,7 @@
return result;
}

-/*
- * volumeChanged()
- */
+
IOReturn SoundflowerDevice::volumeChanged(IOAudioControl *volumeControl,
SInt32 oldValue, SInt32 newValue)
{
//IOLog("SoundflowerDevice[%p]::volumeChanged(%p, %ld, %ld)\n", this,
volumeControl, oldValue, newValue);
@@ -231,9 +220,6 @@
}


-/*
- * outputMuteChangeHandler()
- */
IOReturn SoundflowerDevice::outputMuteChangeHandler(IOService *target,
IOAudioControl *muteControl, SInt32 oldValue, SInt32 newValue)
{
IOReturn result = kIOReturnBadArgument;
@@ -247,9 +233,7 @@
return result;
}

-/*
- * outputMuteChanged()
- */
+
IOReturn SoundflowerDevice::outputMuteChanged(IOAudioControl *muteControl,
SInt32 oldValue, SInt32 newValue)
{
//IOLog("SoundflowerDevice[%p]::outputMuteChanged(%p, %ld, %ld)\n",
this, muteControl, oldValue, newValue);
@@ -263,9 +247,6 @@
}


-/*
- * gainChangeHandler()
- */
IOReturn SoundflowerDevice::gainChangeHandler(IOService *target,
IOAudioControl *gainControl, SInt32 oldValue, SInt32 newValue)
{
IOReturn result = kIOReturnBadArgument;
@@ -279,9 +260,7 @@
return result;
}

-/*
- * gainChanged()
- */
+
IOReturn SoundflowerDevice::gainChanged(IOAudioControl *gainControl,
SInt32 oldValue, SInt32 newValue)
{
//IOLog("SoundflowerDevice[%p]::gainChanged(%p, %ld, %ld)\n", this,
gainControl, oldValue, newValue);
@@ -295,9 +274,6 @@
}


-/*
- * inputMuteChangeHandler()
- */
IOReturn SoundflowerDevice::inputMuteChangeHandler(IOService *target,
IOAudioControl *muteControl, SInt32 oldValue, SInt32 newValue)
{
IOReturn result = kIOReturnBadArgument;
@@ -311,9 +287,7 @@
return result;
}

-/*
- * inputMuteChanged()
- */
+
IOReturn SoundflowerDevice::inputMuteChanged(IOAudioControl *muteControl,
SInt32 oldValue, SInt32 newValue)
{
//IOLog("SoundflowerDevice[%p]::inputMuteChanged(%p, %ld, %ld)\n",
this, muteControl, oldValue, newValue);
=======================================
--- /trunk/Source/SoundflowerDevice.h Fri Mar 12 10:26:38 2010
+++ /trunk/Source/SoundflowerDevice.h Fri Mar 12 10:30:21 2010
@@ -33,40 +33,48 @@
#define SAMPLE_RATES_KEY "SampleRates"
#define SEPARATE_STREAM_BUFFERS_KEY "SeparateStreamBuffers"
#define SEPARATE_INPUT_BUFFERS_KEY "SeparateInputBuffers"
-
-#define SoundflowerDevice com_cycling74_driver_SoundflowerDevice
+#define SoundflowerDevice com_cycling74_driver_SoundflowerDevice
+

class SoundflowerEngine;

class SoundflowerDevice : public IOAudioDevice
{
OSDeclareDefaultStructors(SoundflowerDevice)
-
friend class SoundflowerEngine;

+ // class members
+
+ static const SInt32 kVolumeMax;
+ static const SInt32 kGainMax;
+
+
+ // instance members
+
+ SInt32 mVolume[17];
+ SInt32 mMuteOut[17];
+ SInt32 mMuteIn[17];
+ SInt32 mGain[17];
+
+
+ // methods
+
virtual bool initHardware(IOService *provider);
virtual bool createAudioEngines();
virtual bool initControls(SoundflowerEngine *audioEngine);

- static IOReturn volumeChangeHandler(IOService *target, IOAudioControl
*volumeControl, SInt32 oldValue, SInt32 newValue);
+ static IOReturn volumeChangeHandler(IOService *target, IOAudioControl
*volumeControl, SInt32 oldValue, SInt32 newValue);
virtual IOReturn volumeChanged(IOAudioControl *volumeControl, SInt32
oldValue, SInt32 newValue);

- static IOReturn outputMuteChangeHandler(IOService *target,
IOAudioControl *muteControl, SInt32 oldValue, SInt32 newValue);
+ static IOReturn outputMuteChangeHandler(IOService *target,
IOAudioControl *muteControl, SInt32 oldValue, SInt32 newValue);
virtual IOReturn outputMuteChanged(IOAudioControl *muteControl, SInt32
oldValue, SInt32 newValue);

- static IOReturn gainChangeHandler(IOService *target, IOAudioControl
*gainControl, SInt32 oldValue, SInt32 newValue);
+ static IOReturn gainChangeHandler(IOService *target, IOAudioControl
*gainControl, SInt32 oldValue, SInt32 newValue);
virtual IOReturn gainChanged(IOAudioControl *gainControl, SInt32
oldValue, SInt32 newValue);

- static IOReturn inputMuteChangeHandler(IOService *target,
IOAudioControl *muteControl, SInt32 oldValue, SInt32 newValue);
+ static IOReturn inputMuteChangeHandler(IOService *target,
IOAudioControl *muteControl, SInt32 oldValue, SInt32 newValue);
virtual IOReturn inputMuteChanged(IOAudioControl *muteControl, SInt32
oldValue, SInt32 newValue);
-
- SInt32 mVolume[17];
- SInt32 mMuteOut[17];
- SInt32 mMuteIn[17];
- SInt32 mGain[17];
-
- static const SInt32 kVolumeMax;
- static const SInt32 kGainMax;
+
};

#endif // _SAMPLEAUDIODEVICE_H
=======================================
--- /trunk/Source/SoundflowerEngine.cpp Fri Mar 12 10:27:26 2010
+++ /trunk/Source/SoundflowerEngine.cpp Fri Mar 12 10:30:21 2010
@@ -20,12 +20,10 @@
*/

#include "SoundflowerEngine.h"
-
#include <IOKit/audio/IOAudioControl.h>
#include <IOKit/audio/IOAudioLevelControl.h>
#include <IOKit/audio/IOAudioToggleControl.h>
#include <IOKit/audio/IOAudioDefines.h>
-
#include <IOKit/IOLib.h>
#include <IOKit/IOWorkLoop.h>
#include <IOKit/IOTimerEventSource.h>
@@ -37,10 +35,9 @@

#define super IOAudioEngine

-
-
OSDefineMetaClassAndStructors(SoundflowerEngine, IOAudioEngine)

+

bool SoundflowerEngine::init(OSDictionary *properties)
{
=======================================
--- /trunk/Source/SoundflowerEngine.h Tue Sep 1 11:04:17 2009
+++ /trunk/Source/SoundflowerEngine.h Fri Mar 12 10:30:21 2010
@@ -24,7 +24,6 @@
#define _SoundflowerENGINE_H

#include <IOKit/audio/IOAudioEngine.h>
-
#include "SoundflowerDevice.h"


@@ -32,29 +31,30 @@
{
OSDeclareDefaultStructors(SoundflowerEngine)

- UInt32 outputBufferSize;
- UInt32 inputBufferSize;
-
- IOAudioStream *inputStream;
- IOAudioStream *outputStream;
-
- void *outputBuffer;
- void *inputBuffer;
-
- UInt32 thruBufferSize;
- float *thruBuffer; // intermediate buffer to pass in-->out
-
- IOTimerEventSource *timerEventSource;
-
- UInt32 blockSize; // In sample frames
- UInt32 numBlocks;
- UInt32 currentBlock;
-
- UInt64 blockTimeoutNS;
- UInt64 nextTime; // the estimated time the timer will fire next
-
- bool duringHardwareInit;
-
+ UInt32 outputBufferSize;
+ UInt32 inputBufferSize;
+
+ IOAudioStream* outputStream;
+ IOAudioStream* inputStream;
+
+ void* outputBuffer;
+ void* inputBuffer;
+
+ UInt32 thruBufferSize;
+ float* thruBuffer; // intermediate buffer to pass in-->out
+
+ IOTimerEventSource* timerEventSource;
+
+ UInt32 blockSize; // In sample frames
+ UInt32 numBlocks;
+ UInt32 currentBlock;
+
+ UInt64 blockTimeoutNS;
+ UInt64 nextTime; // the estimated time the timer will fire next
+
+ bool duringHardwareInit;
+
+
public:

virtual bool init(OSDictionary *properties);

Reply all
Reply to author
Forward
0 new messages