Changeset 21916 for trunk/src/winmm
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 14 deleted
- 26 edited
- 8 copied
-
. (modified) (2 props)
-
src/winmm/IRTMidi.cpp (modified) (3 diffs)
-
src/winmm/MIDI.HPP (deleted)
-
src/winmm/Makefile.kmk (copied) (copied from branches/gcc-kmk/src/winmm/Makefile.kmk )
-
src/winmm/WINMM.DEF (deleted)
-
src/winmm/WINMMDBG.DEF (deleted)
-
src/winmm/auxos2.cpp (modified) (1 diff)
-
src/winmm/dbglocal.cpp (modified) (1 diff)
-
src/winmm/initterm.cpp (copied) (copied from branches/gcc-kmk/src/winmm/initterm.cpp )
-
src/winmm/initterm.h (copied) (copied from branches/gcc-kmk/src/winmm/initterm.h )
-
src/winmm/initwinmm.cpp (deleted)
-
src/winmm/initwinmm.h (deleted)
-
src/winmm/irtmidi.hpp (modified) (3 diffs)
-
src/winmm/makefile (deleted)
-
src/winmm/mci.cpp (modified) (2 diffs)
-
src/winmm/mcianim/makefile (deleted)
-
src/winmm/mciavi32/makefile (deleted)
-
src/winmm/mcicda/Makefile.kmk (copied) (copied from branches/gcc-kmk/src/winmm/mcicda/Makefile.kmk )
-
src/winmm/mcicda/cdrom.cpp (modified) (16 diffs)
-
src/winmm/mcicda/makefile (deleted)
-
src/winmm/mcicda/mcicda.cpp (modified) (2 diffs)
-
src/winmm/mcicda/mcicda.def (modified) (1 diff)
-
src/winmm/mcicda/os2cdrom.cpp (modified) (9 diffs)
-
src/winmm/mciseq/makefile (deleted)
-
src/winmm/mciwave/Makefile.kmk (copied) (copied from branches/gcc-kmk/src/winmm/mciwave/Makefile.kmk )
-
src/winmm/mciwave/makefile (deleted)
-
src/winmm/mciwave/mciwave.c (modified) (1 diff)
-
src/winmm/mciwave/mciwave.def (modified) (1 diff)
-
src/winmm/midi.cpp (modified) (5 diffs)
-
src/winmm/midi.hpp (copied) (copied from branches/gcc-kmk/src/winmm/midi.hpp )
-
src/winmm/midimap/makefile (deleted)
-
src/winmm/mixer.cpp (modified) (5 diffs)
-
src/winmm/mixer.h (modified) (1 diff)
-
src/winmm/mixerdata.cpp (modified) (3 diffs)
-
src/winmm/mixeros2.cpp (modified) (1 diff)
-
src/winmm/playsound.cpp (modified) (17 diffs)
-
src/winmm/wavein.cpp (modified) (3 diffs)
-
src/winmm/waveindart.cpp (modified) (1 diff)
-
src/winmm/wavemap/makefile (deleted)
-
src/winmm/waveout.cpp (modified) (3 diffs)
-
src/winmm/waveoutbase.cpp (modified) (1 diff)
-
src/winmm/waveoutdart.cpp (modified) (2 diffs)
-
src/winmm/waveoutflash.cpp (modified) (3 diffs)
-
src/winmm/waveoutflash.h (modified) (2 diffs)
-
src/winmm/winmm.def (copied) (copied from branches/gcc-kmk/src/winmm/winmm.def )
-
src/winmm/winmm.h (modified) (1 diff)
-
src/winmm/winmm.mak (deleted)
-
src/winmm/winmmdbg.def (copied) (copied from branches/gcc-kmk/src/winmm/winmmdbg.def )
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/winmm/IRTMidi.cpp
r5269 r21916 93 93 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDICreateInstance", &modAddr ); 94 94 if ( rc ) return rc; 95 pfnMidiCreateInstance = (ULONG( *APIENTRY )( ULONG, MINSTANCE*, PSZ, ULONG)) modAddr;95 pfnMidiCreateInstance = (ULONG(APIENTRY *)( ULONG, MINSTANCE*, PCSZ, ULONG)) modAddr; 96 96 97 97 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIDeleteInstance", &modAddr ); 98 98 if ( rc ) return rc; 99 pfnMidiDeleteInstance = (ULONG( *APIENTRY)(MINSTANCE, ULONG)) modAddr;99 pfnMidiDeleteInstance = (ULONG(APIENTRY *)(MINSTANCE, ULONG)) modAddr; 100 100 101 101 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIEnableInstance", &modAddr ); 102 102 if ( rc ) return rc; 103 pfnMidiEnableInstance = (ULONG( *APIENTRY)(MINSTANCE, ULONG)) modAddr;103 pfnMidiEnableInstance = (ULONG(APIENTRY *)(MINSTANCE, ULONG)) modAddr; 104 104 105 105 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIDisableInstance", &modAddr ); 106 106 if ( rc ) return rc; 107 pfnMidiDisableInstance = (ULONG( *APIENTRY)(MINSTANCE, ULONG)) modAddr;107 pfnMidiDisableInstance = (ULONG(APIENTRY *)(MINSTANCE, ULONG)) modAddr; 108 108 109 109 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIAddLink", &modAddr ); 110 110 if ( rc ) return rc; 111 pfnMidiAddLink = (ULONG( *APIENTRY)(MINSTANCE, MINSTANCE, ULONG, ULONG)) modAddr;111 pfnMidiAddLink = (ULONG(APIENTRY *)(MINSTANCE, MINSTANCE, ULONG, ULONG)) modAddr; 112 112 113 113 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIRemoveLink", &modAddr ); 114 114 if ( rc ) return rc; 115 pfnMidiRemoveLink = (ULONG( *APIENTRY)(MINSTANCE, MINSTANCE, ULONG, ULONG)) modAddr;115 pfnMidiRemoveLink = (ULONG(APIENTRY *)(MINSTANCE, MINSTANCE, ULONG, ULONG)) modAddr; 116 116 117 117 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIQueryClassList", &modAddr ); 118 118 if ( rc ) return rc; 119 pfnMidiQueryClassList = (ULONG( *APIENTRY)(ULONG, PMIDICLASSINFO, ULONG)) modAddr;119 pfnMidiQueryClassList = (ULONG(APIENTRY *)(ULONG, PMIDICLASSINFO, ULONG)) modAddr; 120 120 121 121 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIQueryInstanceList", &modAddr ); 122 122 if ( rc ) return rc; 123 pfnMidiQueryInstanceList = (ULONG( *APIENTRY)(ULONG, PMIDIINSTANCEINFO, ULONG)) modAddr;123 pfnMidiQueryInstanceList = (ULONG(APIENTRY *)(ULONG, PMIDIINSTANCEINFO, ULONG)) modAddr; 124 124 125 125 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIQueryNumClasses", &modAddr ); 126 126 if ( rc ) return rc; 127 pfnMidiQueryNumClasses = (ULONG( *APIENTRY)(PULONG, ULONG)) modAddr;127 pfnMidiQueryNumClasses = (ULONG(APIENTRY *)(PULONG, ULONG)) modAddr; 128 128 129 129 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIQueryNumInstances", &modAddr ); 130 130 if ( rc ) return rc; 131 pfnMidiQueryNumInstances = (ULONG( *APIENTRY)(PULONG, ULONG)) modAddr;131 pfnMidiQueryNumInstances = (ULONG(APIENTRY *)(PULONG, ULONG)) modAddr; 132 132 133 133 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDISendMessages", &modAddr ); 134 134 if ( rc ) return rc; 135 pfnMidiSendMessages = (ULONG( *APIENTRY)(PMESSAGE, ULONG, ULONG)) modAddr;135 pfnMidiSendMessages = (ULONG(APIENTRY *)(PMESSAGE, ULONG, ULONG)) modAddr; 136 136 137 137 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDISendSysexMessage", &modAddr ); 138 138 if ( rc ) return rc; 139 pfnMidiSendSysexMessage = (ULONG( *APIENTRY)(PMESSAGE, ULONG, ULONG)) modAddr;139 pfnMidiSendSysexMessage = (ULONG(APIENTRY *)(PMESSAGE, ULONG, ULONG)) modAddr; 140 140 141 141 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDIRetrieveMessages", &modAddr ); 142 142 if ( rc ) return rc; 143 pfnMidiRetrieveMessages = (ULONG( *APIENTRY)(MINSTANCE, PVOID, PULONG, ULONG)) modAddr;143 pfnMidiRetrieveMessages = (ULONG(APIENTRY *)(MINSTANCE, PVOID, PULONG, ULONG)) modAddr; 144 144 145 145 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDISetup", &modAddr ); 146 146 if ( rc ) return rc; 147 pfnMidiSetup = (ULONG( *APIENTRY)(PMIDISETUP, ULONG)) modAddr;147 pfnMidiSetup = (ULONG(APIENTRY *)(PMIDISETUP, ULONG)) modAddr; 148 148 149 149 rc = DosQueryProcAddr( iRTMidiModule, 0L, "MIDITimer", &modAddr ); 150 150 if ( rc ) return rc; 151 pfnMidiTimer = (ULONG( *APIENTRY)(ULONG, ULONG)) modAddr;151 pfnMidiTimer = (ULONG(APIENTRY *)(ULONG, ULONG)) modAddr; 152 152 153 153 return 0; … … 177 177 // IRTMidi :: RCExplanation 178 178 //------------------------------------------------------------------------------ 179 c har * IRTMidi::RCExplanation() const180 { 181 c har * DebugString;179 const char * IRTMidi::RCExplanation() const 180 { 181 const char * DebugString; 182 182 switch( iLastRC ) 183 183 { … … 460 460 } 461 461 462 ULONG IRTMidi::MidiCreateInstance( ULONG a, MINSTANCE* b, P SZ c, ULONG d)462 ULONG IRTMidi::MidiCreateInstance( ULONG a, MINSTANCE* b, PCSZ c, ULONG d) 463 463 { 464 464 ULONG ret; -
trunk/src/winmm/auxos2.cpp
r7196 r21916 28 28 29 29 #include "auxiliary.h" 30 #include "init winmm.h"30 #include "initterm.h" 31 31 32 32 #define DBG_LOCALLOG DBG_auxos2 -
trunk/src/winmm/dbglocal.cpp
r21358 r21916 19 19 USHORT DbgEnabledLvl2WINMM[DBG_MAXFILES] = {0}; 20 20 21 static c har *DbgFileNames[DBG_MAXFILES] =21 static const char *DbgFileNames[DBG_MAXFILES] = 22 22 { 23 23 "os2timer", -
trunk/src/winmm/irtmidi.hpp
r5269 r21916 87 87 unsigned long hardwareClass() const 88 88 { return iHardwareClass; }; 89 c har *RCExplanation() const;89 const char * RCExplanation() const; 90 90 static IRTMidi* instance(); 91 91 static void shutdown(); … … 103 103 104 104 // Methods for calls to RTMIDI functions 105 ULONG (*APIENTRY pfnMidiCreateInstance) ( ULONG, MINSTANCE*, P SZ, ULONG );105 ULONG (*APIENTRY pfnMidiCreateInstance) ( ULONG, MINSTANCE*, PCSZ, ULONG ); 106 106 ULONG (*APIENTRY pfnMidiDeleteInstance) ( MINSTANCE, ULONG ); 107 107 ULONG (*APIENTRY pfnMidiEnableInstance) ( MINSTANCE, ULONG ); … … 119 119 ULONG (*APIENTRY pfnMidiTimer) ( ULONG, ULONG ); 120 120 121 ULONG MidiCreateInstance ( ULONG, MINSTANCE*, P SZ, ULONG );121 ULONG MidiCreateInstance ( ULONG, MINSTANCE*, PCSZ, ULONG ); 122 122 ULONG MidiDeleteInstance ( MINSTANCE, ULONG ); 123 123 ULONG MidiEnableInstance ( MINSTANCE, ULONG ); -
trunk/src/winmm/mci.cpp
r10410 r21916 157 157 { 158 158 dprintf(("WINMM:mciGetErrorStringA(%d)\n", mcierr )); 159 c har * theMsg = getWinmmMsg( mcierr );159 const char * theMsg = getWinmmMsg( mcierr ); 160 160 if ( theMsg ) 161 161 strncpy( pszText, theMsg, cchText ); … … 184 184 { 185 185 dprintf(("WINMM:mciGetErrorStringW(%d)\n", mcierr )); 186 c har * theMsg = getWinmmMsg( mcierr );186 const char * theMsg = getWinmmMsg( mcierr ); 187 187 if ( theMsg ) 188 188 AsciiToUnicodeN( theMsg, pszText, cchText ); -
trunk/src/winmm/mcicda/cdrom.cpp
r5005 r21916 15 15 #include <string.h> 16 16 17 /* 17 /* 18 18 * FIXME: Should use the right errorcodes for SetLastError if a function fails. 19 19 */ … … 32 32 if(strlen(wcda->chrDrive)==2) { 33 33 if((wcda->hfOS2Handle=os2CDOpen(wcda->chrDrive))==NULL) { 34 SetLastError(ERROR_WRONG_DISK); 34 SetLastError(ERROR_WRONG_DISK); 35 35 /* We always return TRUE because we want to open the driver not the disk */ 36 36 } … … 38 38 } 39 39 40 if(!str cmpi(wcda->chrDeviceType,"cdaudio")) {40 if(!stricmp(wcda->chrDeviceType,"cdaudio")) { 41 41 /* We try any CDROM in the system until one can be opened */ 42 42 if(!os2CDQueryCDDrives(&iNumCD, chrFirstCD)) { 43 SetLastError(ERROR_WRONG_DISK); 43 SetLastError(ERROR_WRONG_DISK); 44 44 return FALSE;/* Can't get drives in system */ 45 45 } 46 46 47 47 chrFirstCD[1]=':'; 48 48 for(i=0;i<iNumCD;i++) { 49 49 chrFirstCD[0]++; 50 if((wcda->hfOS2Handle=os2CDOpen(chrFirstCD))!=NULL) { 50 if((wcda->hfOS2Handle=os2CDOpen(chrFirstCD))!=NULL) { 51 51 return TRUE; 52 52 } 53 53 } 54 54 SetLastError(ERROR_WRONG_DISK); 55 /* We always return TRUE because we want to open the driver not the disk */ 56 /* Can't open CD */ 55 /* We always return TRUE because we want to open the driver not the disk */ 56 /* Can't open CD */ 57 57 } 58 58 /* We always return TRUE because we want to open the driver not the disk */ … … 63 63 { 64 64 ULONG rc; 65 65 66 66 dprintf(("MCICDA-CDROM: CDAUDIO_Close: Closing drive: %s...\n",wcda->chrDrive)); 67 67 68 68 if(wcda->hfOS2Handle==NULL) { 69 69 SetLastError(ERROR_INVALID_PARAMETER); 70 70 return FALSE; 71 71 } 72 72 73 73 if((rc=os2CDClose(wcda->hfOS2Handle))!=0) { 74 74 dprintf(("MCICDA-CDROM: CDAUDIO_Close:rc=%d \n",rc)); … … 160 160 } 161 161 } 162 162 163 163 os2CDSeek(wcda->hfOS2Handle, at); 164 164 return 0; … … 177 177 } 178 178 } 179 179 180 180 CDAUDIO_Stop(wcda); 181 181 if(open) { … … 190 190 191 191 /******************************************/ 192 /* Result: 192 /* Result: 193 193 0: Error 194 194 -1: CD is Data Disk … … 215 215 return -1; 216 216 case 0: 217 SetLastError(ERROR_WRONG_DISK); 217 SetLastError(ERROR_WRONG_DISK); 218 218 return 1; 219 219 default: … … 243 243 } 244 244 } 245 245 246 246 if (wcda->nTracks == 0) { 247 247 if (CDAUDIO_GetNumberOfTracks(wcda) <= 0) 248 248 return FALSE; 249 249 } 250 250 251 251 TRACE("nTracks=%u\n", wcda->nTracks); 252 252 253 253 SetLastError(ERROR_INVALID_PARAMETER); 254 255 if (wcda->lpdwTrackLen != NULL) 254 255 if (wcda->lpdwTrackLen != NULL) 256 256 free(wcda->lpdwTrackLen); 257 257 wcda->lpdwTrackLen = (LPDWORD)malloc((wcda->nTracks + 1) * sizeof(DWORD)); 258 if (wcda->lpdwTrackPos != NULL) 258 if (wcda->lpdwTrackPos != NULL) 259 259 free(wcda->lpdwTrackPos); 260 260 wcda->lpdwTrackPos = (LPDWORD)malloc((wcda->nTracks + 1) * sizeof(DWORD)); … … 262 262 free(wcda->lpbTrackFlags); 263 263 wcda->lpbTrackFlags = (LPBYTE)malloc((wcda->nTracks + 1) * sizeof(BYTE)); 264 264 265 265 if (wcda->lpdwTrackLen == NULL || wcda->lpdwTrackPos == NULL || 266 266 wcda->lpbTrackFlags == NULL) { 267 267 WARN("error allocating track table !\n"); 268 268 /* Freeing the already allocated mem */ 269 if (wcda->lpdwTrackLen != NULL) 269 if (wcda->lpdwTrackLen != NULL) 270 270 free(wcda->lpdwTrackLen); 271 if (wcda->lpdwTrackPos != NULL) 271 if (wcda->lpdwTrackPos != NULL) 272 272 free(wcda->lpdwTrackPos); 273 273 if (wcda->lpbTrackFlags != NULL) … … 281 281 memset(wcda->lpdwTrackPos, 0, (wcda->nTracks + 1) * sizeof(DWORD)); 282 282 memset(wcda->lpbTrackFlags, 0, (wcda->nTracks + 1) * sizeof(BYTE)); 283 283 284 284 for (i = 0; i <= wcda->nTracks; i++) { 285 285 if((start=os2CDQueryTrackStartSector(wcda->hfOS2Handle,i,&flAudioTrack))==0) … … 287 287 WARN("error reading start sector for track %d\n", i+1); 288 288 /* Freeing the already allocated mem */ 289 if (wcda->lpdwTrackLen != NULL) 289 if (wcda->lpdwTrackLen != NULL) 290 290 free(wcda->lpdwTrackLen); 291 if (wcda->lpdwTrackPos != NULL) 291 if (wcda->lpdwTrackPos != NULL) 292 292 free(wcda->lpdwTrackPos); 293 293 if (wcda->lpbTrackFlags != NULL) … … 299 299 } 300 300 start-=150; 301 301 302 302 if (i == 0) { 303 303 last_start = start; … … 315 315 //if(wcda->ulCDROMStatus & ) 316 316 if (!flAudioTrack) 317 wcda->lpbTrackFlags[i] = CDROM_DATA_TRACK; 317 wcda->lpbTrackFlags[i] = CDROM_DATA_TRACK; 318 318 else 319 319 wcda->lpbTrackFlags[i] = 0; 320 320 //TRACE("track #%u flags=%02x\n", i + 1, wcda->lpbTrackFlags[i]); 321 321 }/* for */ 322 322 323 323 wcda->dwLastFrame = last_start; 324 324 TRACE("total_len=%u Leaving CDAUDIO_GetTracksInfo...\n", total_length); 325 325 326 326 return TRUE; 327 327 } … … 346 346 return FALSE; 347 347 } 348 /* Current mode */ 348 /* Current mode */ 349 349 //wcda->cdaMode=WINE_CDA_STOP; 350 350 if(wcda->ulCDROMStatus & 0x1L) … … 385 385 if (wcda->cdaMode != WINE_CDA_OPEN) 386 386 return TRUE; 387 else 387 else 388 388 return FALSE; 389 389 } -
trunk/src/winmm/mcicda/mcicda.cpp
r4982 r21916 407 407 static DWORD CDAUDIO_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMSA lpParms) 408 408 { 409 LP STR str = NULL;409 LPCSTR str = NULL; 410 410 WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID); 411 411 DWORD ret = 0; … … 758 758 break; 759 759 default: 760 TRACE("Seeking to ??=%lu\n", dwFlags);760 TRACE("Seeking to #%lu\n", dwFlags); 761 761 return MCIERR_UNSUPPORTED_FUNCTION; 762 762 } -
trunk/src/winmm/mcicda/mcicda.def
r4809 r21916 5 5 6 6 EXPORTS 7 DriverProc = _MCICDAUDIO_DriverProc@20@17 DriverProc = "_MCICDAUDIO_DriverProc@20" @1 -
trunk/src/winmm/mcicda/os2cdrom.cpp
r9976 r21916 148 148 149 149 rc = DosDevIOCtl(hfOS2Handle, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK, 150 "CD01", 4, &ulParamLen, &cdInfo,150 (void*)"CD01", 4, &ulParamLen, &cdInfo, 151 151 sizeof(cdInfo), &ulDataLen); 152 152 … … 194 194 ulParamLen=4; 195 195 rc = DosDevIOCtl(hfOS2Handle, IOCTL_CDROMDISK, CDROMDISK_DEVICESTATUS, 196 "CD01", 4, &ulParamLen, &ulDeviceStatus,196 (void*)"CD01", 4, &ulParamLen, &ulDeviceStatus, 197 197 sizeof(ulDeviceStatus), &ulDataLen); 198 198 if(rc) { … … 218 218 /* Get information */ 219 219 rc = DosDevIOCtl(hfOS2Handle, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOSTATUS, 220 "CD01", 4, &ulParamLen, &asStatus,220 (void*)"CD01", 4, &ulParamLen, &asStatus, 221 221 sizeof(asStatus), &ulDataLen); 222 222 if(rc) { … … 247 247 ulParamLen=4; 248 248 rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK, 249 "CD01", 4, &ulParamLen, &cdInfo,249 (void*)"CD01", 4, &ulParamLen, &cdInfo, 250 250 sizeof(cdInfo), &ulDataLen); 251 251 if(rc) … … 292 292 ulParamLen=4; 293 293 rc = DosDevIOCtl(hfDrive, IOCTL_CDROMDISK, CDROMDISK_EJECTDISK, 294 "CD01", 4, &ulParamLen,0,294 (void*)"CD01", 4, &ulParamLen,0, 295 295 0, 0); 296 296 if(rc) … … 314 314 ulParamLen=4; 315 315 rc = DosDevIOCtl(hfDrive, IOCTL_CDROMDISK, CDROMDISK_CLOSETRAY, 316 "CD01", 4, &ulParamLen,0,316 (void*)"CD01", 4, &ulParamLen,0, 317 317 0, 0); 318 318 if(rc) … … 335 335 ulParamLen=4; 336 336 rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_STOPAUDIO, 337 "CD01", 4, &ulParamLen,0,337 (void*)"CD01", 4, &ulParamLen,0, 338 338 0, 0); 339 339 if(rc) … … 396 396 ulParamLen=4; 397 397 rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_RESUMEAUDIO, 398 "CD01", 4, &ulParamLen,0,398 (void*)"CD01", 4, &ulParamLen,0, 399 399 0, 0); 400 400 if(rc) … … 484 484 ulParamLen=4; 485 485 rc = DosDevIOCtl(hfOS2Handle, IOCTL_CDROMAUDIO, CDROMAUDIO_GETSUBCHANNELQ, 486 "CD01", 4, &ulParamLen, &scq,486 (void*)"CD01", 4, &ulParamLen, &scq, 487 487 sizeof(scq), &ulDataLen); 488 488 if(rc) { -
trunk/src/winmm/mciwave/mciwave.c
r10410 r21916 23 23 24 24 #include <stdarg.h> 25 #include <string.h> 26 #include <memory.h> 25 27 26 28 #include "winerror.h" -
trunk/src/winmm/mciwave/mciwave.def
r4809 r21916 6 6 7 7 EXPORTS 8 DriverProc = _MCIWAVE_DriverProc@20@18 DriverProc = "_MCIWAVE_DriverProc@20" @1 -
trunk/src/winmm/midi.cpp
r10173 r21916 38 38 */ 39 39 40 c har * getWinmmMsg( MMRESULT result )41 { 42 c har * ret;40 const char * getWinmmMsg( MMRESULT result ) 41 { 42 const char * ret; 43 43 switch ( result ) 44 44 { … … 243 243 { 244 244 dprintf(("WINMM:midiInGetErrorTextA(%d)\n", wError )); 245 c har * theMsg = getWinmmMsg( wError );245 const char * theMsg = getWinmmMsg( wError ); 246 246 if ( theMsg ) 247 247 strncpy( lpText, theMsg, cchText ); … … 260 260 { 261 261 dprintf(("WINMM:midiInGetErrorTextW(%d)\n", wError )); 262 c har * theMsg = getWinmmMsg( wError );262 const char * theMsg = getWinmmMsg( wError ); 263 263 if ( theMsg ) 264 264 AsciiToUnicodeN( theMsg, lpText, cchText ); … … 563 563 { 564 564 dprintf(("WINMM:midiOutGetErrorTextA(%d)\n", wError )); 565 c har * theMsg = getWinmmMsg( wError );565 const char * theMsg = getWinmmMsg( wError ); 566 566 if ( theMsg ) 567 567 strncpy( lpText, theMsg, cchText ); … … 579 579 { 580 580 dprintf(("WINMM:midiOutGetErrorTextW(%d) - need to translate\n", wError )); 581 c har * theMsg = getWinmmMsg( wError );581 const char * theMsg = getWinmmMsg( wError ); 582 582 if ( theMsg ) 583 583 AsciiToUnicodeN( theMsg, lpText, cchText ); -
trunk/src/winmm/mixer.cpp
r21570 r21916 34 34 #include "waveoutdart.h" 35 35 #include "winmm.h" 36 #include "init winmm.h"36 #include "initterm.h" 37 37 #include "mixer.h" 38 38 #include "mixeros2.h" … … 749 749 //find line associated with this control 750 750 lpMlc->dwLineID = -1; 751 for(int i=0;i<nrLines;i++) { 751 int i; 752 for(i=0;i<nrLines;i++) { 752 753 for(int j=0;j<pmixerLines[i]->cControls;j++) { 753 754 if(pmixerLines[i]->Controls[j] == lpMlc->u.dwControlID) { … … 1086 1087 #endif 1087 1088 //search all lines (src & dest) for one with specified type 1088 for(int i=0;i<nrLines;i++) { 1089 int i; 1090 for(i=0;i<nrLines;i++) { 1089 1091 if(pmixerLines[i]->line.dwComponentType == lpMl->dwComponentType) { 1090 1092 break; … … 1130 1132 //TODO: Should we compare mid, pid & pddname too? (must be initialized according to MSDN) 1131 1133 // (see below; unicode version doesn't copy pddname; change if these checks are required) 1134 int i; 1132 1135 for(int i=0;i<nrLines;i++) { 1133 1136 if(pmixerLines[i]->line.Target.dwType == lpMl->Target.dwType) { … … 1371 1374 1372 1375 memset(mixerDest, 0, sizeof(mixerDest)); 1373 for(int i=0;i<MIXER_DEST_MAX;i++) { 1376 int i; 1377 for(i=0;i<MIXER_DEST_MAX;i++) { 1374 1378 memset(mixerDest[i].Connections, -1, sizeof(mixerDest[i].Connections)); 1375 1379 memset(mixerDest[i].Controls, -1, sizeof(mixerDest[i].Controls)); -
trunk/src/winmm/mixer.h
r8495 r21916 56 56 void mixerExit(); 57 57 58 extern c har *szCtrlName[MIX_CTRL_MAX][2];59 extern c har *szSourceName[MIXER_SRC_MAX][2];60 extern c har *szDestName[MIXER_DEST_MAX][2];58 extern const char *szCtrlName[MIX_CTRL_MAX][2]; 59 extern const char *szSourceName[MIXER_SRC_MAX][2]; 60 extern const char *szDestName[MIXER_DEST_MAX][2]; 61 61 62 62 #ifdef __cplusplus -
trunk/src/winmm/mixerdata.cpp
r8493 r21916 17 17 /******************************************************************************/ 18 18 /******************************************************************************/ 19 c har *szCtrlName[MIX_CTRL_MAX][2] = {19 const char *szCtrlName[MIX_CTRL_MAX][2] = { 20 20 { 21 21 "MasterVol", … … 201 201 /******************************************************************************/ 202 202 /******************************************************************************/ 203 c har *szDestName[MIXER_DEST_MAX][2] = {203 const char *szDestName[MIXER_DEST_MAX][2] = { 204 204 { 205 205 "Volume Control", … … 217 217 /******************************************************************************/ 218 218 /******************************************************************************/ 219 c har *szSourceName[MIXER_SRC_MAX][2] = {219 const char *szSourceName[MIXER_SRC_MAX][2] = { 220 220 { 221 221 "MonoIn", -
trunk/src/winmm/mixeros2.cpp
r8858 r21916 23 23 #include <ioctl90.h> 24 24 25 #include "init winmm.h"25 #include "initterm.h" 26 26 #include "mixeros2.h" 27 27 -
trunk/src/winmm/playsound.cpp
r8470 r21916 17 17 * Includes * 18 18 ****************************************************************************/ 19 20 #include <string.h> 19 21 20 22 #include <os2win.h> … … 23 25 #include <heapstring.h> 24 26 #include <misc.h> 25 #include <string.h> 26 #include <win\debugtools.h> 27 #include <win/debugtools.h> 27 28 28 29 #define DBG_LOCALLOG DBG_playsound … … 51 52 } 52 53 53 static HMMIO get_mmioFromProfile(UINT uFlags, LPCSTR lpszName) 54 static HMMIO get_mmioFromProfile(UINT uFlags, LPCSTR lpszName) 54 55 { 55 56 char str[128]; 56 57 LPSTR ptr; 57 58 HMMIO hmmio; 58 59 59 60 TRACE("searching in SystemSound List !\n"); 60 61 GetProfileStringA("Sounds", (LPSTR)lpszName, "", str, sizeof(str)); … … 78 79 }; 79 80 80 static void CALLBACK PlaySound_Callback(HWAVEOUT hwo, UINT uMsg, 81 DWORD dwInstance, 81 static void CALLBACK PlaySound_Callback(HWAVEOUT hwo, UINT uMsg, 82 DWORD dwInstance, 82 83 DWORD dwParam1, DWORD dwParam2) 83 84 { … … 98 99 } 99 100 100 static void PlaySound_WaitDone(struct playsound_data* s) 101 static void PlaySound_WaitDone(struct playsound_data* s) 101 102 { 102 103 for (;;) { … … 106 107 } 107 108 InterlockedIncrement((LPLONG)&s->dwEventCount); 108 109 109 110 WaitForSingleObject(s->hEvent, INFINITE); 110 111 } … … 141 142 hmmio = 0; 142 143 if (uFlags & SND_ALIAS) 143 if ((hmmio = get_mmioFromProfile(uFlags, lpszSoundName)) == 0) 144 if ((hmmio = get_mmioFromProfile(uFlags, lpszSoundName)) == 0) 144 145 return FALSE; 145 146 146 147 if (uFlags & SND_FILENAME) 147 148 if ((hmmio=get_mmioFromFile(lpszSoundName)) == 0) return FALSE; 148 149 149 150 if (PlaySound_SearchMode == 1) { 150 151 PlaySound_SearchMode = 0; 151 if ((hmmio = get_mmioFromFile(lpszSoundName)) == 0) 152 if ((hmmio = get_mmioFromFile(lpszSoundName)) == 0) 152 153 hmmio = get_mmioFromProfile(uFlags, lpszSoundName); 153 154 } 154 155 155 156 if (PlaySound_SearchMode == 2) { 156 157 PlaySound_SearchMode = 0; 157 if ((hmmio = get_mmioFromProfile(uFlags | SND_NODEFAULT, lpszSoundName)) == 0) 158 if ((hmmio = get_mmioFromFile(lpszSoundName)) == 0) 158 if ((hmmio = get_mmioFromProfile(uFlags | SND_NODEFAULT, lpszSoundName)) == 0) 159 if ((hmmio = get_mmioFromFile(lpszSoundName)) == 0) 159 160 hmmio = get_mmioFromProfile(uFlags, lpszSoundName); 160 161 } … … 197 198 goto errCleanUp; 198 199 199 TRACE("Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX\n", 200 TRACE("Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX\n", 200 201 (LPSTR)&mmckInfo.ckid, (LPSTR)&mmckInfo.fccType, mmckInfo.cksize); 201 202 … … 216 217 waveHdr[0].dwFlags = waveHdr[1].dwFlags = 0L; 217 218 waveHdr[0].dwBufferLength = waveHdr[1].dwBufferLength = bufsize; 218 if (waveOutPrepareHeader(hWave, &waveHdr[0], sizeof(WAVEHDR)) || 219 if (waveOutPrepareHeader(hWave, &waveHdr[0], sizeof(WAVEHDR)) || 219 220 waveOutPrepareHeader(hWave, &waveHdr[1], sizeof(WAVEHDR))) { 220 221 goto errCleanUp; … … 260 261 } 261 262 262 static DWORD WINAPI PlaySound_Thread(LPVOID arg) 263 static DWORD WINAPI PlaySound_Thread(LPVOID arg) 263 264 { 264 265 DWORD res; 265 266 266 267 for (;;) { 267 268 PlaySound_Playing = FALSE; … … 273 274 if (res != WAIT_OBJECT_0) continue; 274 275 PlaySound_Playing = TRUE; 275 276 276 277 if ((PlaySound_fdwSound & SND_RESOURCE) == SND_RESOURCE) { 277 278 HRSRC hRES; … … 292 293 continue; 293 294 } 294 PlaySound_Result = proc_PlaySound((LPCSTR)ptr, 295 PlaySound_Result = proc_PlaySound((LPCSTR)ptr, 295 296 ((UINT16)PlaySound_fdwSound ^ SND_RESOURCE) | SND_MEMORY); 296 297 FreeResource(hGLOB); … … 319 320 { 320 321 static LPSTR StrDup = NULL; 321 322 322 323 TRACE("pszSound='%p' hmod=%04X fdwSound=%08lX\n", 323 324 pszSound, hmod, fdwSound); 324 325 325 326 if (PlaySound_hThread == 0) { /* This is the first time they called us */ 326 327 DWORD id; … … 331 332 if ((PlaySound_hPlayEvent = CreateEventA(NULL, FALSE, FALSE, NULL)) == 0) 332 333 return FALSE; 333 if ((PlaySound_hThread = CreateThread(NULL, 0, PlaySound_Thread, 0, 0, &id)) == 0) 334 return FALSE; 335 } 336 337 /* FIXME? I see no difference between SND_WAIT and SND_NOSTOP ! */ 338 if ((fdwSound & (SND_NOWAIT | SND_NOSTOP)) && PlaySound_Playing) 334 if ((PlaySound_hThread = CreateThread(NULL, 0, PlaySound_Thread, 0, 0, &id)) == 0) 335 return FALSE; 336 } 337 338 /* FIXME? I see no difference between SND_WAIT and SND_NOSTOP ! */ 339 if ((fdwSound & (SND_NOWAIT | SND_NOSTOP)) && PlaySound_Playing) 339 340 return FALSE; 340 341 341 342 /* Trying to stop if playing */ 342 343 if (PlaySound_Playing) PlaySound_Stop = TRUE; 343 344 344 345 /* Waiting playing thread to get ready. I think 10 secs is ok & if not then leave*/ 345 346 if (WaitForSingleObject(PlaySound_hReadyEvent, 1000*10) != WAIT_OBJECT_0) 346 347 return FALSE; 347 348 if (!pszSound || (fdwSound & SND_PURGE)) 348 349 if (!pszSound || (fdwSound & SND_PURGE)) 349 350 return FALSE; /* We stoped playing so leaving */ 350 351 351 352 if (PlaySound_SearchMode != 1) PlaySound_SearchMode = 2; 352 353 if (!(fdwSound & SND_ASYNC)) { 353 if (fdwSound & SND_LOOP) 354 if (fdwSound & SND_LOOP) 354 355 return FALSE; 355 356 PlaySound_pszSound = pszSound; … … 358 359 PlaySound_Result = FALSE; 359 360 SetEvent(PlaySound_hPlayEvent); 360 if (WaitForSingleObject(PlaySound_hMiddleEvent, INFINITE) != WAIT_OBJECT_0) 361 return FALSE; 362 if (WaitForSingleObject(PlaySound_hReadyEvent, INFINITE) != WAIT_OBJECT_0) 361 if (WaitForSingleObject(PlaySound_hMiddleEvent, INFINITE) != WAIT_OBJECT_0) 362 return FALSE; 363 if (WaitForSingleObject(PlaySound_hReadyEvent, INFINITE) != WAIT_OBJECT_0) 363 364 return FALSE; 364 365 return PlaySound_Result; … … 371 372 StrDup = NULL; 372 373 } 373 if (!((fdwSound & SND_MEMORY) || ((fdwSound & SND_RESOURCE) && 374 if (!((fdwSound & SND_MEMORY) || ((fdwSound & SND_RESOURCE) && 374 375 !((DWORD)pszSound >> 16)) || !pszSound)) { 375 376 StrDup = HEAP_strdupA(GetProcessHeap(), 0,pszSound); … … 403 404 LPSTR pszSoundA; 404 405 BOOL bSound; 405 406 if (!((fdwSound & SND_MEMORY) || ((fdwSound & SND_RESOURCE) && 406 407 if (!((fdwSound & SND_MEMORY) || ((fdwSound & SND_RESOURCE) && 407 408 !((DWORD)pszSound >> 16)) || !pszSound)) { 408 409 pszSoundA = HEAP_strdupWtoA(GetProcessHeap(), 0,pszSound); 409 410 bSound = PlaySoundA(pszSoundA, hmod, fdwSound); 410 411 HeapFree(GetProcessHeap(), 0, pszSoundA); 411 } else 412 } else 412 413 bSound = PlaySoundA((LPCSTR)pszSound, hmod, fdwSound); 413 414 414 415 return bSound; 415 416 } -
trunk/src/winmm/wavein.cpp
r21358 r21916 28 28 #include "winmm.h" 29 29 #include "waveindart.h" 30 #include "init winmm.h"30 #include "initterm.h" 31 31 32 32 #define DBG_LOCALLOG DBG_wavein … … 281 281 { 282 282 dprintf(("WINMM:waveInGetErrorTextA(%d)\n", wError )); 283 c har * theMsg = getWinmmMsg( wError );283 const char * theMsg = getWinmmMsg( wError ); 284 284 if ( theMsg ) 285 285 strncpy( lpText, theMsg, cchText ); … … 297 297 { 298 298 dprintf(("WINMM:waveInGetErrorTextW(%d) - stub\n", wError )); 299 c har * theMsg = getWinmmMsg( wError );299 const char * theMsg = getWinmmMsg( wError ); 300 300 if ( theMsg ) 301 301 AsciiToUnicodeN( theMsg, lpText, cchText ); -
trunk/src/winmm/waveindart.cpp
r21358 r21916 28 28 #include "misc.h" 29 29 #include "waveindart.h" 30 #include "init winmm.h"30 #include "initterm.h" 31 31 32 32 #define DBG_LOCALLOG DBG_waveindart -
trunk/src/winmm/waveout.cpp
r21358 r21916 31 31 #include "misc.h" 32 32 #include "winmm.h" 33 #include "init winmm.h"33 #include "initterm.h" 34 34 35 35 #define DBG_LOCALLOG DBG_waveout … … 315 315 MMRESULT WINAPI waveOutGetErrorTextA(MMRESULT wError, LPSTR lpText, UINT cchText) 316 316 { 317 c har * theMsg = getWinmmMsg( wError );317 const char * theMsg = getWinmmMsg( wError ); 318 318 if(theMsg) { 319 319 strncpy( lpText, theMsg, cchText ); … … 331 331 MMRESULT WINAPI waveOutGetErrorTextW(MMRESULT wError, LPWSTR lpText, UINT cchText) 332 332 { 333 c har * theMsg = getWinmmMsg( wError );333 const char * theMsg = getWinmmMsg( wError ); 334 334 if(theMsg) { 335 335 AsciiToUnicodeN( theMsg, lpText, cchText ); -
trunk/src/winmm/waveoutbase.cpp
r21358 r21916 30 30 #include "misc.h" 31 31 #include "waveoutbase.h" 32 #include "init winmm.h"32 #include "initterm.h" 33 33 34 34 #define DBG_LOCALLOG DBG_waveoutbase -
trunk/src/winmm/waveoutdart.cpp
r21358 r21916 33 33 #include "misc.h" 34 34 #include "waveoutdart.h" 35 #include "init winmm.h"35 #include "initterm.h" 36 36 37 37 #define DBG_LOCALLOG DBG_waveoutdart … … 759 759 dprintf2(("WaveOutHandler %x %x %x", ulStatus, pBuffer, ulFlags)); 760 760 761 #ifdef __IBMC__ 761 762 ptib2 = (PTIB2)_getTIBvalue(offsetof(TIB, tib_ptib2)); 763 #else 764 PTIB ptib; 765 DosGetInfoBlocks(&ptib, NULL); 766 ptib2 = ptib->tib_ptib2; 767 #endif 768 762 769 if (ptib2 && HIBYTE(ptib2->tib2_ulpri) != PRTYC_TIMECRITICAL && 763 770 LOBYTE(ptib2->tib2_ulpri) != PRTYD_MAXIMUM) -
trunk/src/winmm/waveoutflash.cpp
r21358 r21916 31 31 #include "misc.h" 32 32 #include "waveoutflash.h" 33 #include "init winmm.h"33 #include "initterm.h" 34 34 35 35 #define DBG_LOCALLOG DBG_waveoutflash … … 338 338 MCI_BUFFER_PARMS BufferParms; 339 339 340 dprintf(( __FUNCTION__" - bufsize= %d", dartBufSize));340 dprintf(("$ - bufsize= %d", __FUNCTION__, dartBufSize)); 341 341 342 342 // Set up the BufferParms data structure and … … 763 763 // Displays the text associated with an MCI error code. 764 764 765 void FlashWaveOut::mciError(c har * msg, ULONG rc)765 void FlashWaveOut::mciError(const char * msg, ULONG rc) 766 766 { 767 767 #ifdef DEBUG -
trunk/src/winmm/waveoutflash.h
r21358 r21916 48 48 void writeBuffer(); 49 49 void handler(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags); 50 void mciError(c har * msg, ULONG rc);50 void mciError(const char * msg, ULONG rc); 51 51 52 52 private: … … 70 70 }; 71 71 72 LONG APIENTRY FlashWaveOutHandler(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, 73 ULONG ulFlags); 74 72 75 #endif 73 76 -
trunk/src/winmm/winmm.h
r3303 r21916 9 9 #define __WINMM_H__ 10 10 11 c har * getWinmmMsg( MMRESULT result );11 const char * getWinmmMsg( MMRESULT result ); 12 12 13 13 typedef struct {
Note:
See TracChangeset
for help on using the changeset viewer.
