Author: nyadav
Date: Fri Jun 10 07:00:52 2011
New Revision: 52169
URL:
http://svn.reactos.org/svn/reactos?rev=52169&view=rev
Log:
[AUDSRV] More Style Fixes
Modified:
branches/nyadav-audio-branch/base/services/audsrv/mixer.c
branches/nyadav-audio-branch/base/services/audsrv/rpc.c
branches/nyadav-audio-branch/base/services/audsrv/stream.c
branches/nyadav-audio-branch/dll/win32/audsrvapi/audsrvapi.c
branches/nyadav-audio-branch/drivers/wdm/audio/backpln/audclient/audclient.c
Modified: branches/nyadav-audio-branch/base/services/audsrv/mixer.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/audsrv/mixer.c [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/base/services/audsrv/mixer.c [iso-8859-1] Fri Jun 10
07:00:52 2011
@@ -8,96 +8,106 @@
*/
#include "audsrv.h"
-void * MixS8(MixerEngine * mixer,int buffer)
+void * MixS8(MixerEngine * mixer,
+ int buffer)
{
return NULL;
}
-void * MixS16(MixerEngine * mixer,int buffer)
+void * MixS16(MixerEngine * mixer,
+ int buffer)
{
- int length=0;
- short minsamplevalue,maxsamplevalue;
- float coefficient = 1.0;
- int streamcount = 0,i;
- PSHORT localsinkbuf,localsrcbuf;
- ServerStream * stream = mixer->serverstreamlist;
+ int length=0;
+ short minsamplevalue,maxsamplevalue;
+ float coefficient = 1.0;
+ int streamcount = 0,i;
+ PSHORT localsinkbuf,localsrcbuf;
+ ServerStream * stream = mixer->serverstreamlist;
- /*TODOAssert(mixer->serverstreamlist == NULL)*/
+ /*TODOAssert(mixer->serverstreamlist == NULL)*/
- /*Find the Longest Buffer within all ServerStreams*/
- length = stream->length_filtered;
- while(stream->next != NULL)
- {
- if(stream->length_filtered > length && stream->ready == TRUE )
- length = stream->length_filtered;
- stream = stream->next;
- }
+ /*Find the Longest Buffer within all ServerStreams*/
+ length = stream->length_filtered;
+ while(stream->next != NULL)
+ {
+ if(stream->length_filtered > length && stream->ready == TRUE )
+ length = stream->length_filtered;
+ stream = stream->next;
+ }
- /*Allocate MasterBuffer*/
+ /*Allocate MasterBuffer*/
mixer->masterbuf[buffer] = HeapAlloc(GetProcessHeap(), 0, length);
- localsinkbuf = mixer->masterbuf[buffer];
+ localsinkbuf = mixer->masterbuf[buffer];
mixer->bytes_to_play = length;
- /*Perform Actual Mixing*/
- stream = mixer->serverstreamlist;
- minsamplevalue = *(short *) stream->minsamplevalue;
- maxsamplevalue = *(short *) stream->maxsamplevalue;
- while(stream->next != NULL)
- {
- localsrcbuf = stream->filteredbuf;
- if(stream->ready == TRUE )
- {
- if( *(short *)stream->maxsamplevalue != maxsamplevalue ||
- *(short *)stream->minsamplevalue != minsamplevalue )
- {
- if( (float) maxsamplevalue / (float)*(short *)stream->maxsamplevalue <
- (float) minsamplevalue / (float)*(short *)stream->minsamplevalue )
- coefficient = (float) maxsamplevalue / (float)*(short *)stream->maxsamplevalue;
- else
- coefficient = (float) minsamplevalue / (float)*(short *)stream->minsamplevalue;
-
- for(i=0;i<stream->length_filtered;i++)
- {
- localsinkbuf[i] = (short) (( (localsinkbuf[i] * streamcount) + ((short)((float)
localsrcbuf[i] ) * coefficient) ) / (streamcount +1));
- }
- }
- }
- stream->ready = 0;
- streamcount++;
- stream = stream->next;
- }
+ /*Perform Actual Mixing*/
+ stream = mixer->serverstreamlist;
+ minsamplevalue = *(short *) stream->minsamplevalue;
+ maxsamplevalue = *(short *) stream->maxsamplevalue;
+ while(stream->next != NULL)
+ {
+ localsrcbuf = stream->filteredbuf;
+ if(stream->ready == TRUE )
+ {
+ if( *(short *)stream->maxsamplevalue != maxsamplevalue ||
+ *(short *)stream->minsamplevalue != minsamplevalue )
+ {
+ if( (float) maxsamplevalue / (float)*(short *)stream->maxsamplevalue
<
+ (float) minsamplevalue / (float)*(short *)stream->minsamplevalue
)
+ coefficient = (float) maxsamplevalue / (float)*(short
*)stream->maxsamplevalue;
+ else
+ coefficient = (float) minsamplevalue / (float)*(short
*)stream->minsamplevalue;
+
+ for(i=0;i<stream->length_filtered;i++)
+ {
+ localsinkbuf[i] = (short) (( (localsinkbuf[i] * streamcount) +
((short)((float) localsrcbuf[i] ) * coefficient) ) / (streamcount +1));
+ }
+ }
+ }
+ stream->ready = 0;
+ streamcount++;
+ stream = stream->next;
+ }
CopyMemory(mixer->masterbuf[buffer],mixer->serverstreamlist->filteredbuf,mixer->serverstreamlist->length_filtered);
return NULL;
}
-void * MixS32(MixerEngine * mixer,int buffer)
+void * MixS32(MixerEngine * mixer,
+ int buffer)
{
return NULL;
}
-void * MixS64(MixerEngine * mixer,int buffer)
+void * MixS64(MixerEngine * mixer,
+ int buffer)
{
return NULL;
}
-void * MixU8(MixerEngine * mixer,int buffer)
+void * MixU8(MixerEngine * mixer,
+ int buffer)
{
return NULL;
}
-void * MixU16(MixerEngine * mixer,int buffer)
+void * MixU16(MixerEngine * mixer,
+ int buffer)
{
return NULL;
}
-void * MixU32(MixerEngine * mixer,int buffer)
+void * MixU32(MixerEngine * mixer,
+ int buffer)
{
return NULL;
}
-void * MixU64(MixerEngine * mixer,int buffer)
+void * MixU64(MixerEngine * mixer,
+ int buffer)
{
return NULL;
}
-void * MixFL32(MixerEngine * mixer,int buffer)
+void * MixFL32(MixerEngine * mixer,
+ int buffer)
{
return NULL;
}
-void * MixFL64(MixerEngine * mixer,int buffer)
+void * MixFL64(MixerEngine * mixer,
+ int buffer)
{
return NULL;
}
Modified: branches/nyadav-audio-branch/base/services/audsrv/rpc.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/audsrv/rpc.c [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/base/services/audsrv/rpc.c [iso-8859-1] Fri Jun 10
07:00:52 2011
@@ -51,7 +51,15 @@
/*************************RPC Functions**********************************/
-long AUDInitStream( IN RPC_BINDING_HANDLE hBinding,LONG frequency,int channels,int
bitspersample,int datatype, ULONG channelmask,int volume,int mute,float balance)
+long AUDInitStream( IN RPC_BINDING_HANDLE hBinding,
+ LONG frequency,
+ int channels,
+ int bitspersample,
+ int datatype,
+ ULONG channelmask,
+ int volume,
+ int mute,
+ float balance )
{
long stream;
Modified: branches/nyadav-audio-branch/base/services/audsrv/stream.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/audsrv/stream.c [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/base/services/audsrv/stream.c [iso-8859-1] Fri Jun 10
07:00:52 2011
@@ -88,7 +88,14 @@
/*Clean Stream's data*/
}
-long AddStream(LONG frequency,int channels,int bitspersample,int datatype, ULONG
channelmask,int volume,int mute,float balance)
+long AddStream(LONG frequency,
+ int channels,
+ int bitspersample,
+ int datatype,
+ ULONG channelmask,
+ int volume,
+ int mute,
+ float balance )
{
ServerStream * newstream,*localstream;
DWORD dwID;
Modified: branches/nyadav-audio-branch/dll/win32/audsrvapi/audsrvapi.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/dll/win32/a…
==============================================================================
--- branches/nyadav-audio-branch/dll/win32/audsrvapi/audsrvapi.c [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/dll/win32/audsrvapi/audsrvapi.c [iso-8859-1] Fri Jun 10
07:00:52 2011
@@ -14,7 +14,15 @@
/*Initialize an audio stream
*Return -1 if callbacks are NULL pointers
*/
-WINAPI int InitStream (ClientStream * clientstream,LONG frequency,int channels,int
bitspersample,int datatype, ULONG channelmask,int volume,int mute,float balance)
+WINAPI int InitStream (ClientStream * clientstream,
+ LONG frequency,
+ int channels,
+ int bitspersample,
+ int datatype,
+ ULONG channelmask,
+ int volume,
+ int mute,
+ float balance)
{
long streamid;
@@ -75,8 +83,8 @@
break;
}
- if(clientstream->dead)
- break;
+ if(clientstream->dead)
+ break;
/*Check Connection Status If not connected call Connect()*/
/*If connected Properly call the remote audsrv_play() function,This will be a
blocking call, placing a dummy wait function here is a good idea.*/
@@ -98,17 +106,20 @@
return 0;
}
-WINAPI int Volume(ClientStream * clientstream, int * volume )
+WINAPI int Volume(ClientStream * clientstream,
+ int * volume )
{
return 0;
}
-WINAPI int SetVolume(ClientStream * clientstream ,const int newvolume)
+WINAPI int SetVolume(ClientStream * clientstream ,
+ const int newvolume)
{
return 0;
}
-WINAPI int Write(ClientStream * clientstream ,const char * aData)
+WINAPI int Write(ClientStream * clientstream ,
+ const char * aData)
{
if(clientstream->dead)
return -1;
@@ -118,12 +129,14 @@
return 0;
}
-WINAPI int SetBalance(ClientStream * clientstream ,float balance)
+WINAPI int SetBalance(ClientStream * clientstream ,
+ float balance)
{
return 0;
}
-WINAPI int GetBalance(ClientStream * clientstream ,float * balance)
+WINAPI int GetBalance(ClientStream * clientstream ,
+ float * balance)
{
return 0;
}
Modified: branches/nyadav-audio-branch/drivers/wdm/audio/backpln/audclient/audclient.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/drivers/wdm…
==============================================================================
--- branches/nyadav-audio-branch/drivers/wdm/audio/backpln/audclient/audclient.c
[iso-8859-1] (original)
+++ branches/nyadav-audio-branch/drivers/wdm/audio/backpln/audclient/audclient.c
[iso-8859-1] Fri Jun 10 07:00:52 2011
@@ -51,7 +51,8 @@
}
int
__cdecl
-wmain(int argc, char* argv[])
+wmain(int argc,
+ char* argv[])
{
int error;
DWORD dwID;